Gen7Data/Scripts/Abilities/Analytic.as

15 lines
638 B
ActionScript

namespace Gen7 {
[Ability effect=Analytic]
class Analytic : PkmnScript {
void OverrideBasePower(ExecutingMove@ move, Pokemon@, uint8, uint8 &inout damage) override {
// If the turnqueue of the battle is empty now, we don't have any choices to execute after this.
// This means this is the last move in the turn.
if (!move.User.Battle.TurnQueue.HasNext()){
float expectedDamage = damage;
expectedDamage *= 1.3f;
if (expectedDamage > 255) expectedDamage = 255;
damage = uint8(expectedDamage);
}
}
}
}