Gen7Data/Scripts/Moves/ChangeTargetSpDef.as

14 lines
459 B
ActionScript
Raw Normal View History

2020-04-10 22:23:17 +00:00
namespace Gen7 {
[Move effect=ChangeTargetSpDef]
shared class ChangeTargetSpecialDefense : PkmnScript{
int8 _amount;
void OnInitialize(const array<EffectParameter@> &in parameters) override{
_amount = int8(parameters[0].AsInt());
}
void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit) override{
target.ChangeStatBoost(Statistic::SpecialDefense, _amount);
}
}
}