2021-03-28 18:22:46 +00:00
|
|
|
namespace Gen7 {
|
|
|
|
[Move effect=HealEachEndOfTurn]
|
|
|
|
shared class HealEachEndOfTurn : PkmnScript {
|
|
|
|
float _amount;
|
|
|
|
|
2022-02-12 16:47:59 +00:00
|
|
|
void OnInitialize(const BattleLibrary@ library, const narray<EffectParameter@>@ parameters) override{
|
2021-03-28 18:22:46 +00:00
|
|
|
_amount = float(parameters[0].AsFloat()) / 100;
|
|
|
|
}
|
|
|
|
|
|
|
|
void OnSecondaryEffect(ExecutingMove@, Pokemon@ pokemon, uint8) override {
|
|
|
|
auto script = cast<HealEachEndOfTurnEffect>(pokemon.AddVolatile("HealEachEndOfTurn"));
|
|
|
|
script.SetBaseHealAmount(_amount);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|