More unit tests, fixes

This commit is contained in:
2026-07-05 19:45:40 +02:00
parent db839ac214
commit 2f51e27811
18 changed files with 1499 additions and 19 deletions

View File

@@ -1,3 +1,4 @@
using System.Collections.Frozen;
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
@@ -13,7 +14,8 @@ public class Encore : Script, IScriptOnSecondaryEffect
return;
var lastMove = target.BattleData?.LastMoveChoice;
if (lastMove == null || battle.Library.MiscLibrary.IsReplacementChoice(lastMove))
if (lastMove == null || battle.Library.MiscLibrary.IsReplacementChoice(lastMove) ||
lastMove.ChosenMove.MoveData.HasFlag(MoveFlags.CantRepeat))
{
move.GetHitData(target, hit).Fail();
return;