Bunch more moves, changes in how additional information for items works.
This commit is contained in:
22
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/MatBlock.cs
Normal file
22
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/MatBlock.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Side;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "mat_block")]
|
||||
public class MatBlock : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
{
|
||||
var battleData = move.User.BattleData;
|
||||
if (battleData == null)
|
||||
return;
|
||||
if (battleData.SwitchInTurn != battleData.Battle.CurrentTurnNumber)
|
||||
{
|
||||
move.GetHitData(target, hit).Fail();
|
||||
return;
|
||||
}
|
||||
|
||||
battleData.BattleSide.VolatileScripts.Add(new MatBlockEffect());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user