diff --git a/Projects/BanquetForFools/BanquetForCyka/Class1.cs b/Projects/BanquetForFools/BanquetForCyka/Class1.cs index 055427c..e0e57ae 100644 --- a/Projects/BanquetForFools/BanquetForCyka/Class1.cs +++ b/Projects/BanquetForFools/BanquetForCyka/Class1.cs @@ -15,15 +15,22 @@ namespace BanquetForCyka { public static ConfigEntry debug; public static ConfigEntry debugXp; + public static ConfigEntry debugDodgeWindow; + public static ExpressionConfigEntry xpMultiplier; + public static ExpressionConfigEntry dodgeWindow; public void Awake() { debug = Config.Bind("Debug", "Global Debug", false); debugXp = Config.Bind("Debug", "XP Debug", false); + debugDodgeWindow = Config.Bind("Debug", "Dodge Window Debug", false); xpMultiplier = new ExpressionConfigEntry( Config, "General", "XP Multiplier", "v*1", "XP Multiplier expression. Use 'v' to represent the original value.", debugXp); + dodgeWindow = new ExpressionConfigEntry( + Config, "General", "Dodge Window", "v*1", + "Dodge Window expression. Use 'v' to represent the original value.", debugDodgeWindow); Logger.LogInfo("BanquetForCyka loaded"); HarmonyFileLog.Enabled = true; @@ -48,4 +55,14 @@ namespace BanquetForCyka { Main.LogDebug("Modified XP amount: " + amt, Main.debugXp); } } + + [HarmonyPatch(typeof(Actions), "DodgeCalculation")] + public class Actions_DodgeCalculation { + public static void Postfix(ref float __result) { + Main.LogDebug("Original dodge window: " + __result, Main.debugDodgeWindow); + float result = Main.dodgeWindow.Evaluate(__result); + __result = result; + Main.LogDebug("Modified dodge window: " + __result, Main.debugDodgeWindow); + } + } }