@@ -27,20 +27,9 @@ static bool shopPricesPatch(CharacterOverworld _cow, MiniHexInfo _poi, FTK_itemb
2727 //__instance.m_ID = "bladeGlass03";
2828 int MapSeed = GameLogic . Instance . m_MapGenRandomSeed ;
2929 int Turn = GameFlow . Instance . m_RoundCount ;
30- int TI1 = GameLogic . Instance . m_CurrentPlayer . TurnIndex ;
31- int TI2 = GameLogic . Instance . m_CurrentPlayer . m_TurnIndex ;
32- int AveragePlayerLevel = ( int ) GameFlow . Instance . AveragePlayerLevel ;
33- //Debug.Log($"Round Count: {GameFlow.Instance.m_RoundCount}");
3430
3531 // [Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
3632
37- //SEED = Turn * MapSeed +
38- // Turn * __instance._goldValue +
39- // Turn * (__instance.m_MaxLevel + Turn + __instance.m_MinLevel + Turn) +
40- // (Turn + TI1) * MapSeed + (Turn + TI2) * MapSeed;
41-
42- //SEED = (Turn + TI1) * MapSeed + (Turn + TI2) * MapSeed;
43-
4433 SEED = 0 ;
4534 SEED += MapSeed + Turn ;
4635 SEED += Turn * __instance . _goldValue ;
@@ -49,10 +38,7 @@ static bool shopPricesPatch(CharacterOverworld _cow, MiniHexInfo _poi, FTK_itemb
4938
5039 rand = new System . Random ( ( int ) SEED ) ;
5140
52- int amount = rand . Next ( 1 , ( int ) Math . Max ( _goldValue / 1.5 , 1 ) ) ;
53-
54-
55- // Use the same Random instance to get the same sequence
41+ int amount = rand . Next ( 1 , ( int ) Math . Max ( _goldValue / 1.5 , 3 ) ) ;
5642 if ( rand . Next ( 101 ) <= 50 )
5743 {
5844 newPrice = _goldValue + amount ;
0 commit comments