Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def CanSwitch(mon_idx):
- if TrappedStatus[mon_idx]:return False
- if Battler[1 - mon_idx].Ability == "Shadow Tag":return False
- if (Battler[1 - mon_idx].Ability == "Arena Trap") && (("Flying" not in Battler[mon_idx].Type) || (Battler[mon_idx].Ability != "Levitate") || ("Magnet Rise" not Battler[mon_idx].Substatus) || ("Gravity" in FieldEffects)):return False
- return True
- def CanUseMove(mon_idx, move_idx):
- if Battler[mon_idx].Moves[move_idx].PP == 0:return False
- if ("Disabled" in Battler[mon_idx].Substatus) && (move_idx == LockedMove[mon_idx]):return False
- if ("Encore" in Battler[mon_idx].Substatus) && (move_idx != LockedMove[mon_idx]):return False
- if ("Taunt" in Battler[mon_idx].Substatus) && (Battler[mon_idx].Moves[move_idx].Type2 == "Status"):return False
- if ("Torment" in Battler[mon_idx].Substatus) && (Battler[mon_idx].LastMove == move_idx):return False
- if ("Imprison" in Battler[mon_idx].Substatus) && (Battler[mon_idx].Moves[move_idx].Name in [x.Name for x in Battler[1 - mon_idx].Moves]):return False
- return True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement