28 lines
615 B
C#
28 lines
615 B
C#
namespace PkmnLib.Plugin.Gen7.Scripts.Side;
|
|
|
|
[Script(ScriptCategory.Side, "rage_powder")]
|
|
public class RagePowderEffect : Script
|
|
{
|
|
public IPokemon User { get; set; }
|
|
|
|
public RagePowderEffect(IPokemon user)
|
|
{
|
|
User = user;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override void ChangeIncomingTargets(IMoveChoice moveChoice, ref IReadOnlyList<IPokemon?> targets)
|
|
{
|
|
// Ignore multi-hit moves
|
|
if (targets.Count != 1)
|
|
return;
|
|
|
|
targets = [User];
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override void OnEndTurn(IBattle battle)
|
|
{
|
|
RemoveSelf();
|
|
}
|
|
} |