Gen7Data/Scripts/Battle/AuraBreak.as

12 lines
492 B
ActionScript
Raw Normal View History

2021-11-20 14:31:52 +00:00
namespace Gen7 {
class AuraBreak : PkmnScript {
void OverrideBasePower(ExecutingMove@ move, Pokemon@, uint8, uint8 &inout power){
auto typeLib = move.User.Battle.Library.StaticLibrary.TypeLibrary;
auto fairyType = typeLib.GetTypeId("fairy");
auto darkType = typeLib.GetTypeId("dark");
if (move.UseMove.Type == fairyType || move.UseMove.Type == darkType){
power = uint8(power * 0.75f);
}
}
}
}