Adds a bunch of abilities
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2021-11-19 18:12:10 +01:00
parent 67762af0e7
commit 6302ca9809
14 changed files with 378 additions and 3 deletions

View File

@@ -12,9 +12,11 @@ type Battle {
ref@ AddVolatile(const constString &in name);
ref@ GetVolatile(const constString &in name);
void RemoveVolatile(const constString &in name) const;
void SetWeather(const constString &in name) const;
bool SetWeather(const constString &in name) const;
void ClearWeather(const constString &in name) const;
const constString& GetWeatherName() const;
void SuppressWeather() const;
void UnsuppressWeather() const;
BattleSide@ GetBattleSide(uint8 index);
BattleParty@ GetParty(uint8 index);
BattleParty@ FindPartyForPokemon(Pokemon@ pokemon);

View File

@@ -1,5 +1,6 @@
type BattleHistory {
const HistoryElement@ TopElement { get const; };
const AttackUseHistory@ GetLastUsedAttack(uint maxTurns = 0) const;
const AttackUseHistory@ GetLastUsedAttackOnTarget(Pokemon@ target, uint maxTurns = 0) const;
const DamageHistory@ GetLastDamageOnTarget(Pokemon@ target, uint maxTurns = 0) const;
}

View File

@@ -1,4 +1,5 @@
type ChoiceQueue {
bool MovePokemonChoiceNext(Pokemon@ target);
const BaseTurnChoice@ Peek() const;
bool HasNext() const;
}

View File

@@ -1,4 +1,5 @@
enum DamageSource {
AttackDamage = 0,
Struggle = 1,
Misc = 1,
Struggle = 2,
}

View File

@@ -17,6 +17,7 @@ shared abstract class PkmnScript {
void OnAttackMiss(ExecutingMove@, Pokemon@){};
void ChangeAttackType(ExecutingMove@, Pokemon@, uint8, uint8 &inout){};
void ChangeEffectiveness(ExecutingMove@, Pokemon@, uint8, float &inout){};
void OnIncomingHit(ExecutingMove@, Pokemon@, uint8){};
void PreventSecondaryEffects(ExecutingMove@, Pokemon@, uint8, bool &inout){};
void OnSecondaryEffect(ExecutingMove@, Pokemon@, uint8){};
void OnAfterHits(ExecutingMove@, Pokemon@){};
@@ -38,9 +39,12 @@ shared abstract class PkmnScript {
void PreventOpponentRunAway(FleeTurnChoice@, bool &inout){};
void PreventOpponentSwitch(SwitchTurnChoice@, bool &inout){};
void OnEndTurn(){};
void OnFaint(Pokemon@, DamageSource){};
void ModifyCriticalStage(ExecutingMove@, Pokemon@, uint8, uint8 &inout){};
void OverrideCriticalModifier(ExecutingMove@, Pokemon@, uint8, float &inout){};
void OverrideSTABModifier(ExecutingMove@, Pokemon@, uint8, float &inout){};
void ModifyExperienceGain(Pokemon@, Pokemon@, uint &inout){};
void DoesShareExperience(Pokemon@, Pokemon@, bool &inout){};
void BlockWeather(Battle@, bool &inout){};
void OnSwitchIn(Pokemon@){};
}

View File

@@ -8,7 +8,6 @@ type Pokemon {
bool Shiny { get const; };
const Item@ HeldItem { get const; };
uint CurrentHealth { get const; };
const constString& ActiveAbility { get const; };
bool IsFainted { get const; };
uint MaxHealth { get const; };
const Species@ DisplaySpecies { get const; };
@@ -19,6 +18,7 @@ type Pokemon {
const narray<LearnedMove@>@ Moves { get const; };
float Weight { get const; set; };
float Height { get const; set; };
const constString& ActiveAbility { get const; };
bool HasHeldItem(const constString &in name) const;
void SetHeldItem(const constString &in name);
void SetHeldItem(const Item@ item);