21 lines
635 B
C#
21 lines
635 B
C#
namespace PkmnLib.Plugin.Gen7.Scripts.Side;
|
|
|
|
[Script(ScriptCategory.Side, "double_power_if_target_damaged_in_turn_data")]
|
|
public class DoublePowerIfTargetDamagedInTurnData : Script, IScriptOnEndTurn, IScriptOnDamage
|
|
{
|
|
public readonly HashSet<IPokemon> HitPokemon = [];
|
|
|
|
/// <param name="owner"></param>
|
|
/// <param name="battle"></param>
|
|
/// <inheritdoc />
|
|
public void OnEndTurn(IScriptSource owner, IBattle battle)
|
|
{
|
|
RemoveSelf();
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void OnDamage(IPokemon pokemon, DamageSource source, uint oldHealth, uint newHealth)
|
|
{
|
|
HitPokemon.Add(pokemon);
|
|
}
|
|
} |