mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-11 07:04:59 +00:00
More AI code for deciding when to switch
This commit is contained in:
@@ -248,7 +248,7 @@ class Battle::Move::UserFaintsExplosive
|
||||
def pbMoveFailed?(user, targets)
|
||||
if @battle.rules["selfkoclause"]
|
||||
# Check whether no unfainted Pokemon remain in either party
|
||||
count = @battle.pbAbleNonActiveCount(user.idxOwnSide)
|
||||
count = @battle.pbAbleNonActiveCount(user.idxOwnSide)
|
||||
count += @battle.pbAbleNonActiveCount(user.idxOpposingSide)
|
||||
if count == 0
|
||||
@battle.pbDisplay("But it failed!")
|
||||
@@ -257,7 +257,7 @@ class Battle::Move::UserFaintsExplosive
|
||||
end
|
||||
if @battle.rules["selfdestructclause"]
|
||||
# Check whether no unfainted Pokemon remain in either party
|
||||
count = @battle.pbAbleNonActiveCount(user.idxOwnSide)
|
||||
count = @battle.pbAbleNonActiveCount(user.idxOwnSide)
|
||||
count += @battle.pbAbleNonActiveCount(user.idxOpposingSide)
|
||||
if count == 0
|
||||
@battle.pbDisplay(_INTL("{1}'s team was disqualified!", user.pbThis))
|
||||
|
||||
Reference in New Issue
Block a user