More abilities
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-11-21 17:54:16 +01:00
parent 8d6ee4008c
commit 669a0094d5
10 changed files with 113 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
namespace Gen7 {
[Side effect=Battery]
class BatteryEffect : PkmnScript {
int num = 1;
void Stack() override {
num++;
}
void Unstack() {
num--;
if (num == 0){
cast<BattleSide@>(GetOwner()).RemoveVolatile("Battery");
}
}
void OverrideBasePower(ExecutingMove@ move, Pokemon@, uint8, uint8 &inout power) override {
if (move.UseMove.Category == MoveCategory::Special) {
auto p = power * 1.3f;
if (p > 255) p = 255;
power = uint8(p);
}
}
}
}