Add multipliers for fucking level up stats
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using CykaOfQud;
|
||||
using HarmonyLib;
|
||||
|
||||
@@ -7,15 +8,63 @@ namespace CykaOfIndustry {
|
||||
public class Patches {
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(XRL.World.Parts.Leveler), "GetXPForLevel")]
|
||||
static int xpPerLevelMultiplier(ref int __result) {
|
||||
static void xpPerLevelMultiplier(ref int __result) {
|
||||
if (Main.debugMode.Value)
|
||||
Console.WriteLine("CykaOfQud: Old XP for level {0}", __result);
|
||||
__result = (int)(__result * Main.xpPerLevelMultiplier.Value);
|
||||
if (Main.debugMode.Value)
|
||||
Console.WriteLine("CykaOfQud: New XP for level {0}", __result);
|
||||
return __result;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(XRL.World.Parts.Leveler), "AddHitpoints")]
|
||||
static void hitpointsPerLevelMultiplier(StringBuilder sb, ref int HPGain) {
|
||||
if (Main.debugMode.Value)
|
||||
Console.WriteLine("CykaOfQud: Old HP for level {0}", HPGain);
|
||||
HPGain = (int)(HPGain * Main.hitpointsPerLevelMultiplier.Value);
|
||||
if (Main.debugMode.Value)
|
||||
Console.WriteLine("CykaOfQud: New HP for level {0}", HPGain);
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(XRL.World.Parts.Leveler), "AddSkillPoints")]
|
||||
static void skillPointsPerLevelMultiplier(StringBuilder sb, ref int SPGain) {
|
||||
if (Main.debugMode.Value)
|
||||
Console.WriteLine("CykaOfQud: Old SP for level {0}", SPGain);
|
||||
SPGain = (int)(SPGain * Main.skillPointsPerLevelMultiplier.Value);
|
||||
if (Main.debugMode.Value)
|
||||
Console.WriteLine("CykaOfQud: New SP for level {0}", SPGain);
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(XRL.World.Parts.Leveler), "AddMutationPoints")]
|
||||
static void mutationPointsPerLevelMultiplier(StringBuilder sb, ref int MPGain) {
|
||||
if (Main.debugMode.Value)
|
||||
Console.WriteLine("CykaOfQud: Old MP for level {0}", MPGain);
|
||||
MPGain = (int)(MPGain * Main.mutationPointsPerLevelMultiplier.Value);
|
||||
if (Main.debugMode.Value)
|
||||
Console.WriteLine("CykaOfQud: New MP for level {0}", MPGain);
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(XRL.World.Parts.Leveler), "AddAttributePoints")]
|
||||
static void attributePointsPerLevelMultiplier(StringBuilder sb, ref int APGain) {
|
||||
if (Main.debugMode.Value)
|
||||
Console.WriteLine("CykaOfQud: Old AP for level {0}", APGain);
|
||||
APGain = (int)(APGain * Main.attributePointsPerLevelMultiplier.Value);
|
||||
if (Main.debugMode.Value)
|
||||
Console.WriteLine("CykaOfQud: New AP for level {0}", APGain);
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(XRL.World.Parts.Leveler), "AddAttributeBonus")]
|
||||
static void attributeBonusPerLevelMultiplier(StringBuilder sb, ref int ABGain) {
|
||||
if (Main.debugMode.Value)
|
||||
Console.WriteLine("CykaOfQud: Old AB for level {0}", ABGain);
|
||||
ABGain = (int)(ABGain * Main.attributeBonusPerLevelMultiplier.Value);
|
||||
if (Main.debugMode.Value)
|
||||
Console.WriteLine("CykaOfQud: New AB for level {0}", ABGain);
|
||||
}
|
||||
}
|
||||
// [HarmonyPrefix]
|
||||
// [HarmonyPatch(typeof(ExcavatorProtoBuilder.ExcavatorProtoBuilderState), "SetMinedThicknessByDistanceMeters")]
|
||||
|
||||
Reference in New Issue
Block a user