Gen7Data/Scripts/Moves/CurePartyStatus.as

20 lines
677 B
ActionScript
Raw Normal View History

2021-05-13 12:32:56 +00:00
namespace Gen7 {
[Move effect=CurePartyStatus]
shared class CurePartyStatus : PkmnScript{
void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit) override {
auto user = attack.User;
user.ClearStatus();
auto battleParty = user.Battle.FindPartyForPokemon(user);
if (battleParty !is null){
auto party = battleParty.Party;
for (int i = 0; i < party.Length; i++){
auto m = party.GetAtIndex(i);
if (m !is null){
m.ClearStatus();
}
}
}
}
}
}