Implements cheek pouch
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2022-02-19 15:59:27 +01:00
parent 00e20953b8
commit 06d1da3d3c
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
5 changed files with 15 additions and 4 deletions

View File

@ -0,0 +1,10 @@
namespace Gen7 {
[Ability effect=CheekPouch]
class CheekPouch : PkmnScript {
void OnAfterHeldItemConsume(Pokemon@ pokemon, const Item@ item) override {
if (item.HasFlag("berry")){
pokemon.Heal(pokemon.MaxHealth / 4);
}
};
}
}

View File

@ -4,6 +4,6 @@ shared abstract class ItemUseScript {
bool IsPokemonUseItem(){ return false; };
bool IsUseValidForPokemon(Pokemon@){ return false; };
bool IsHoldable(){ return false; };
void OnUse(){};
void OnPokemonUse(Pokemon@){};
void OnUse(Battle@){};
void OnPokemonUse(Pokemon@, bool){};
}

View File

@ -45,6 +45,7 @@ shared abstract class PkmnScript {
void OnEndTurn(){};
void OnDamage(Pokemon@, DamageSource, uint, uint){};
void OnFaint(Pokemon@, DamageSource){};
void OnAfterHeldItemConsume(Pokemon@, const Item@){};
void PreventIncomingCritical(ExecutingMove@, Pokemon@, uint8, bool &inout){};
void ModifyCriticalStage(ExecutingMove@, Pokemon@, uint8, uint8 &inout){};
void OverrideCriticalModifier(ExecutingMove@, Pokemon@, uint8, float &inout){};

View File

@ -19,7 +19,7 @@ namespace Pokemon{
return pokemon.CurrentHealth < pokemon.MaxHealth;
}
void OnPokemonUse(Pokemon@ pkmn) override {
void OnPokemonUse(Pokemon@ pkmn, bool isBattleUse) override {
pkmn.Heal(_amount);
}
}

View File

@ -1,6 +1,6 @@
#!/bin/sh
TESTERVERSION=0.0.14
TESTERVERSION=0.0.15
# Get the release information from the api for the specified version
curl -X GET "https://git.p-epsilon.com/api/v1/repos/Deukhoofd/PokemonScriptTester/releases/tags/$TESTERVERSION" -H "accept: application/json" |