Night raidering

This commit is contained in:
2025-02-23 15:31:52 +01:00
parent a71a25226f
commit 03c8043c77

View File

@@ -62,10 +62,11 @@ namespace CykaRaider
Console.WriteLine("CykaRaider: upgradePriceMultiplier: Transpiler");
var codes = new List<CodeInstruction>(instructions);
for (int i = 0; i < codes.Count; i++) {
// Does not work for -125k.... idk why... go fix....
if (codes[i].opcode == OpCodes.Ldc_I4 && ((int)codes[i].operand == 125000 || (int)codes[i].operand == -125000)) {
if (Main.debugMode.Value)
Console.WriteLine("CykaRaider: upgradePriceMultiplier: Old price {0}", codes[i].operand);
codes[i].operand = (int)((float)codes[i].operand * Main.upgradePriceMultiplier.Value);
codes[i].operand = (int)((int)codes[i].operand * Main.upgradePriceMultiplier.Value);
if (Main.debugMode.Value)
Console.WriteLine("CykaRaider: upgradePriceMultiplier: New price {0}", codes[i].operand);
}
@@ -84,7 +85,7 @@ namespace CykaRaider
if (codes[i].opcode == OpCodes.Ldc_I4 && ((int)codes[i].operand == 125000 || (int)codes[i].operand == -125000)) {
if (Main.debugMode.Value)
Console.WriteLine("CykaRaider: refreshSkillPriceMultiplier: Old price {0}", codes[i].operand);
codes[i].operand = (int)((float)codes[i].operand * Main.upgradePriceMultiplier.Value);
codes[i].operand = (int)((int)codes[i].operand * Main.upgradePriceMultiplier.Value);
if (Main.debugMode.Value)
Console.WriteLine("CykaRaider: refreshSkillPriceMultiplier: New price {0}", codes[i].operand);
}