2020-04-10 22:23:17 +00:00
|
|
|
namespace Gen7 {
|
|
|
|
[Move effect=ChangeTargetDef]
|
|
|
|
shared class ChangeTargetDefense : PkmnScript{
|
|
|
|
int8 _amount;
|
|
|
|
|
2020-09-19 15:44:06 +00:00
|
|
|
void OnInitialize(const EffectParameter@[] &in parameters) override{
|
2020-04-10 22:23:17 +00:00
|
|
|
_amount = int8(parameters[0].AsInt());
|
|
|
|
}
|
|
|
|
|
|
|
|
void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit) override{
|
|
|
|
target.ChangeStatBoost(Statistic::Defense, _amount);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|