Further work on refactor to interface based scripts
This commit is contained in:
@@ -10,10 +10,10 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Cursed_Body_(Ability)">Bulbapedia - Cursed Body</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "cursed_body")]
|
||||
public class CursedBody : Script
|
||||
public class CursedBody : Script, IScriptOnIncomingHit
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void OnIncomingHit(IExecutingMove move, IPokemon target, byte hit)
|
||||
public void OnIncomingHit(IExecutingMove move, IPokemon target, byte hit)
|
||||
{
|
||||
// 30% chance to disable the move
|
||||
if (move.Battle.Random.GetFloat() > 0.3f)
|
||||
|
||||
Reference in New Issue
Block a user