16 lines
681 B
ActionScript
16 lines
681 B
ActionScript
namespace Gen7 {
|
|
class Automize : PkmnScript {
|
|
void OnSecondaryEffect(ExecutingMove@ move, Pokemon@ target, uint8 hit) override {
|
|
auto originalSpeed = move.User.GetBoostedStat(Statistic::Speed);
|
|
auto originalWeight = move.User.Weight;
|
|
move.User.ChangeStatBoost(Statistic::Speed, 2);
|
|
if (move.User.GetBoostedStat(Statistic::Speed) != originalSpeed){
|
|
// This setter function protects against going below 0.1
|
|
move.User.Weight -= 100;
|
|
if (move.User.Weight != originalWeight){
|
|
// {Pokemon} became nimble text
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |