Loads of work on getting data ready.

This commit is contained in:
2021-03-28 20:22:46 +02:00
parent d3262e924d
commit 82ac1061fa
27 changed files with 19683 additions and 12390 deletions

View File

@@ -0,0 +1,26 @@
namespace Pokemon{
[ItemUse effect=heal]
class HealItem : ItemUseScript {
uint _amount;
void OnInitialize(const array<EffectParameter@> &in parameters) override {
_amount = uint(parameters[0].AsInt());
}
bool IsItemUsable() override {
return true;
}
bool IsPokemonUseItem() override {
return true;
}
bool IsUseValidForPokemon(Pokemon@ pokemon) override {
return pokemon.CurrentHealth < pokemon.MaxHealth;
}
void OnPokemonUse(Pokemon@ pkmn) override {
pkmn.Heal(_amount);
}
}
}