Adds Battle Armor effect

This commit is contained in:
Deukhoofd 2022-02-12 14:28:05 +01:00
parent 669a0094d5
commit 6f7b88ab19
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
4 changed files with 36 additions and 1 deletions

View File

@ -36,7 +36,9 @@
"battery": {
"effect": "Battery"
},
"battle_armor": {},
"battle_armor": {
"effect": "PreventCritical"
},
"battle_bond": {},
"beast_boost": {},
"berserk": {},

View File

@ -0,0 +1,8 @@
namespace Gen7 {
[Ability effect=PreventCritical]
class PreventCriticalAbility : PkmnScript {
void PreventIncomingCritical(ExecutingMove@, Pokemon@, uint8, bool &inout prevent) override {
prevent = true;
};
}
}

View File

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

View File

@ -4,6 +4,30 @@ func string formatFloat(double val, const string&in options = "", uint width = 0
func int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0);
func uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0);
func double parseFloat(const string&in, uint&out byteCount = 0);
func float fpFromIEEE(uint);
func uint fpToIEEE(float);
func double fpFromIEEE(uint64);
func uint64 fpToIEEE(double);
func bool closeTo(float, float, float = 0.00001f);
func bool closeTo(double, double, double = 0.0000000001);
func float cos(float);
func float sin(float);
func float tan(float);
func float acos(float);
func float asin(float);
func float atan(float);
func float atan2(float, float);
func float cosh(float);
func float sinh(float);
func float tanh(float);
func float log(float);
func float log10(float);
func float pow(float, float);
func float sqrt(float);
func float ceil(float);
func float abs(float);
func float floor(float);
func float fraction(float);
func void print(const string&in);
func void print(const constString&in);
func void throw(const string&in);