Implement highest damage AI, further work on AI runner, random fixes
All checks were successful
Build / Build (push) Successful in 51s

This commit is contained in:
2025-07-05 14:56:25 +02:00
parent 32aaa5150a
commit c795f20e54
30 changed files with 261 additions and 26 deletions

View File

@@ -33,4 +33,13 @@ public class ChargeBounceEffect : Script, IScriptForceTurnSelection, IScriptChan
if (!move.UseMove.HasFlag("effective_against_fly"))
damage *= 2;
}
/// <inheritdoc />
public override void OnAfterMoveChoice(IMoveChoice moveChoice)
{
if (moveChoice.AdditionalData?.ContainsKey("bounce_charge") != true)
{
RemoveSelf();
}
}
}

View File

@@ -33,4 +33,13 @@ public class ChargeFlyEffect : Script, IScriptForceTurnSelection, IScriptChangeI
if (!move.UseMove.HasFlag("effective_against_fly"))
damage *= 2;
}
/// <inheritdoc />
public override void OnAfterMoveChoice(IMoveChoice moveChoice)
{
if (moveChoice.AdditionalData?.ContainsKey("fly_charge") != true)
{
RemoveSelf();
}
}
}

View File

@@ -33,4 +33,13 @@ public class ChargeSkyDropEffect : Script, IScriptForceTurnSelection, IScriptCha
if (!move.UseMove.HasFlag("effective_against_fly"))
damage *= 2;
}
/// <inheritdoc />
public override void OnAfterMoveChoice(IMoveChoice moveChoice)
{
if (moveChoice.AdditionalData?.ContainsKey("sky_drop_charge") != true)
{
RemoveSelf();
}
}
}

View File

@@ -32,4 +32,13 @@ public class DigEffect : Script, IScriptForceTurnSelection, IScriptChangeIncomin
if (!move.UseMove.HasFlag("effective_against_underground"))
damage *= 2;
}
/// <inheritdoc />
public override void OnAfterMoveChoice(IMoveChoice moveChoice)
{
if (moveChoice.AdditionalData?.ContainsKey("dig_charge") != true)
{
RemoveSelf();
}
}
}

View File

@@ -32,4 +32,13 @@ public class DiveEffect : Script, IScriptForceTurnSelection, IScriptChangeIncomi
if (!move.UseMove.HasFlag("effective_against_underwater"))
damage *= 2;
}
/// <inheritdoc />
public override void OnAfterMoveChoice(IMoveChoice moveChoice)
{
if (moveChoice.AdditionalData?.ContainsKey("dive_charge") != true)
{
RemoveSelf();
}
}
}

View File

@@ -1,5 +1,6 @@
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
[Script(ScriptCategory.Pokemon, "helping_hand")]
public class HelpingHandEffect : Script, IScriptChangeBasePower, IScriptOnEndTurn
{
/// <inheritdoc />

View File

@@ -1,5 +1,6 @@
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
[Script(ScriptCategory.Pokemon, "lucky_chant")]
public class LuckyChantEffect : Script, IScriptBlockCriticalHit, IScriptOnEndTurn
{
private int _turnsLeft = 5;

View File

@@ -24,4 +24,13 @@ public class PhantomForceCharge : Script, IScriptForceTurnSelection, IScriptBloc
{
block = true;
}
/// <inheritdoc />
public override void OnAfterMoveChoice(IMoveChoice moveChoice)
{
if (moveChoice.AdditionalData?.ContainsKey("phantom_force_charge") != true)
{
moveChoice.User.Volatile.Remove(ScriptUtils.ResolveName<PhantomForceCharge>());
}
}
}

View File

@@ -24,4 +24,13 @@ public class ShadowForceCharge : Script, IScriptForceTurnSelection, IScriptBlock
{
block = true;
}
/// <inheritdoc />
public override void OnAfterMoveChoice(IMoveChoice moveChoice)
{
if (moveChoice.AdditionalData?.ContainsKey("shadow_force_charge") != true)
{
RemoveSelf();
}
}
}