Gen7Data/Scripts/Abilities/Analytic.as

15 lines
638 B
ActionScript
Raw Normal View History

2021-11-19 17:12:10 +00:00
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);
}
}
}
}