18 lines
494 B
ActionScript
18 lines
494 B
ActionScript
|
namespace Gen7 {
|
||
|
[Pokemon effect=HealEachEndOfTurn]
|
||
|
shared class HealEachEndOfTurnEffect : PkmnScript {
|
||
|
float _factor;
|
||
|
|
||
|
void OnEndTurn(Pokemon@ pokemon) override {
|
||
|
auto healAmount = pokemon.MaxHealth * _factor;
|
||
|
if (pokemon.HasHeldItem("big_root")){
|
||
|
healAmount *= 1.3;
|
||
|
}
|
||
|
pokemon.Heal(uint(healAmount));
|
||
|
}
|
||
|
|
||
|
void SetBaseHealAmount(float factor){
|
||
|
_factor = factor;
|
||
|
}
|
||
|
}
|
||
|
}
|