Further work on the script interface rework
This commit is contained in:
@@ -6,10 +6,10 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Magic_Guard_(Ability)">Bulbapedia - Magic Guard</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "magic_guard")]
|
||||
public class MagicGuard : Script
|
||||
public class MagicGuard : Script, IScriptChangeIncomingDamage
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void ChangeIncomingDamage(IPokemon pokemon, DamageSource source, ref uint damage)
|
||||
public void ChangeIncomingDamage(IPokemon pokemon, DamageSource source, ref uint damage)
|
||||
{
|
||||
// Magic Guard doesn't work if the Pokémon is not in battle.
|
||||
if (pokemon.BattleData is null)
|
||||
|
||||
Reference in New Issue
Block a user