Support for changing turn choice when executing
All checks were successful
Build / Build (push) Successful in 50s

This commit is contained in:
2025-06-15 14:23:28 +02:00
parent b11203cb3a
commit e305cfaef6
23 changed files with 34 additions and 28 deletions

View File

@@ -44,13 +44,16 @@ public class Gen7DamageCalculator(Gen7PluginConfiguration configuration) : IDama
floatDamage = MathF.Floor(floatDamage * randomFactor);
}
var stabModifier = 1.0f;
var isStab = false;
if (hitData.Type != null && executingMove.User.Types.Contains(hitData.Type.Value))
{
var stabModifier = 1.5f;
executingMove.RunScriptHook(script =>
script.ChangeStabModifier(executingMove, target, hitNumber, ref stabModifier));
floatDamage = MathF.Floor(floatDamage * stabModifier);
stabModifier = 1.5f;
isStab = true;
}
executingMove.RunScriptHook(script =>
script.ChangeStabModifier(executingMove, target, hitNumber, isStab, ref stabModifier));
floatDamage = MathF.Floor(floatDamage * stabModifier);
floatDamage = MathF.Floor(floatDamage * hitData.Effectiveness);
uint damage = floatDamage switch