Implements clearbody, update changestatboost interface
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -2,7 +2,7 @@ namespace Gen7 {
|
||||
class AngerPoint : PkmnScript {
|
||||
void OnIncomingHit(ExecutingMove@ move, Pokemon@ target, uint8 hit) override {
|
||||
if (move.GetHitData(target, hit).IsCritical){
|
||||
target.ChangeStatBoost(Statistic::Attack, 12);
|
||||
target.ChangeStatBoost(Statistic::Attack, 12, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Gen7 {
|
||||
if (user.GetFlatStat(Statistic::Speed) > user.GetFlatStat(Statistic::HP)) {
|
||||
increaseStat = Statistic::Speed;
|
||||
}
|
||||
user.ChangeStatBoost(increaseStat, 1);
|
||||
user.ChangeStatBoost(increaseStat, 1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ namespace Gen7 {
|
||||
class Berserk : PkmnScript {
|
||||
void OnDamage(Pokemon@ pokemon, DamageSource, uint old, uint new) override {
|
||||
if (float(old) / pokemon.MaxHealth >= 0.5f && float(new) / pokemon.MaxHealth < 0.5f) {
|
||||
pokemon.ChangeStatBoost(Statistic::SpecialDefense, 1);
|
||||
pokemon.ChangeStatBoost(Statistic::SpecialDefense, 1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
namespace Gen7 {
|
||||
[Ability effect=PreventDefLowering]
|
||||
class PreventDefLowering : PkmnScript {
|
||||
void PreventStatBoostChange(Pokemon@, Statistic stat, int8 amount, bool &inout prevent) override {
|
||||
if (stat == Statistic::Defense && amount < 0) {
|
||||
void PreventStatBoostChange(Pokemon@, Statistic stat, int8 amount, bool selfInflicted, bool &inout prevent) override {
|
||||
if (stat == Statistic::Defense && amount < 0 && !selfInflicted) {
|
||||
prevent = true;
|
||||
}
|
||||
}
|
||||
|
||||
10
Scripts/Abilities/PreventStatLowering.as
Normal file
10
Scripts/Abilities/PreventStatLowering.as
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Gen7 {
|
||||
[Ability effect=PreventStatLowering]
|
||||
class PreventStatLowering : PkmnScript {
|
||||
void PreventStatBoostChange(Pokemon@, Statistic stat, int8 amount, bool selfInflicted, bool &inout prevent) override {
|
||||
if (amount < 0 && !selfInflicted) {
|
||||
prevent = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user