Implements a bunch more moves
This commit is contained in:
25
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/HealBell.cs
Normal file
25
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/HealBell.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Linq;
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
using PkmnLib.Static.Utils;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "heal_bell")]
|
||||
public class HealBell : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
{
|
||||
var party = move.User.BattleData?.Battle.Parties.FirstOrDefault(p => p.Party.Contains(target));
|
||||
if (party == null)
|
||||
return;
|
||||
|
||||
foreach (var pokemon in party.Party.WhereNotNull())
|
||||
{
|
||||
pokemon.ClearStatus();
|
||||
var confusion = ScriptUtils.ResolveName<Confusion>();
|
||||
if (pokemon.Volatile.Contains(confusion))
|
||||
pokemon.Volatile.Remove(confusion);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user