Even more moves
This commit is contained in:
18
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Quash.cs
Normal file
18
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Quash.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "quash")]
|
||||
public class Quash : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
{
|
||||
var battleData = move.User.BattleData;
|
||||
if (battleData == null)
|
||||
return;
|
||||
|
||||
if (battleData.Battle.ChoiceQueue?.MovePokemonChoiceLast(target) == false)
|
||||
{
|
||||
move.GetHitData(target, hit).Fail();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user