Implement stat drop handling for AI, Fixes for Conversion2
All checks were successful
Build / Build (push) Successful in 39s

This commit is contained in:
2026-05-23 12:57:15 +02:00
parent a5ef757b01
commit be5100df8a
5 changed files with 286 additions and 8 deletions

View File

@@ -6,10 +6,8 @@ public class Conversion2 : Script, IScriptOnSecondaryEffect
/// <inheritdoc />
public void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
var previousTurnChoices = target.BattleData?.Battle.PreviousTurnChoices;
var nextExecutingChoice = target.BattleData?.Battle.ChoiceQueue?.Peek();
var lastMoveByTarget = target.BattleData?.LastMoveChoice;
if (lastMoveByTarget == null)
if (lastMoveByTarget == null || lastMoveByTarget.ChosenMove.MoveData.MoveType.Name == "none")
{
move.GetHitData(target, hit).Fail();
return;