More unit tests, fixes
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user