Gen7Data/Scripts/Abilities/PreventDefLowering.as

10 lines
372 B
ActionScript
Raw Normal View History

namespace Gen7 {
[Ability effect=PreventDefLowering]
class PreventDefLowering : PkmnScript {
void PreventStatBoostChange(Pokemon@, Statistic stat, int8 amount, bool selfInflicted, bool &inout prevent) override {
if (stat == Statistic::Defense && amount < 0 && !selfInflicted) {
prevent = true;
}
}
}
}