20 lines
585 B
C#
20 lines
585 B
C#
|
using PkmnLib.Plugin.Gen7.Scripts.Side;
|
||
|
|
||
|
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||
|
|
||
|
[Script(ScriptCategory.Move, "healing_wish")]
|
||
|
public class HealingWish : Script
|
||
|
{
|
||
|
/// <inheritdoc />
|
||
|
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||
|
{
|
||
|
var battleData = move.User.BattleData;
|
||
|
if (battleData == null)
|
||
|
return;
|
||
|
|
||
|
var side = battleData.Battle.Sides[battleData.SideIndex];
|
||
|
side.VolatileScripts.Add(new HealingWishEffect(battleData.Position));
|
||
|
|
||
|
move.User.Faint(DamageSource.Misc);
|
||
|
}
|
||
|
}
|