mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 22:54:59 +00:00
Pokémon sent into battle now default to the Fight option, fixed bugs in Instruct, fixed some AI bugs, fixed parameter mixup for def pbMoveCanTarget?, renamed function to function_code everywhere, fixed black party Pokémon icons in storage, added some more AI testing code
This commit is contained in:
@@ -293,7 +293,7 @@ class Battle::Battler
|
||||
end
|
||||
# "But it failed!" checks
|
||||
if move.pbMoveFailed?(user, targets)
|
||||
PBDebug.log(sprintf("[Move failed] In function code %s's def pbMoveFailed?", move.function))
|
||||
PBDebug.log(sprintf("[Move failed] In function code %s's def pbMoveFailed?", move.function_code))
|
||||
user.lastMoveFailed = true
|
||||
pbCancelMoves
|
||||
pbEndTurn(choice)
|
||||
@@ -356,7 +356,7 @@ class Battle::Battler
|
||||
# Pokémon which becomes Ghost-type because of Protean, it should
|
||||
# target and curse itself. I think this is silly, so I'm making it
|
||||
# choose a random opponent to curse instead.
|
||||
if move.function == "CurseTargetOrLowerUserSpd1RaiseUserAtkDef1" && targets.length == 0
|
||||
if move.function_code == "CurseTargetOrLowerUserSpd1RaiseUserAtkDef1" && targets.length == 0
|
||||
choice[3] = -1
|
||||
targets = pbFindTargets(choice, move, user)
|
||||
end
|
||||
@@ -528,7 +528,7 @@ class Battle::Battler
|
||||
oldLastRoundMoved = b.lastRoundMoved
|
||||
@battle.pbDisplay(_INTL("{1} used the move instructed by {2}!", b.pbThis, user.pbThis(true)))
|
||||
b.effects[PBEffects::Instructed] = true
|
||||
if b.pbCanChooseMove?(@moves[idxMove], false)
|
||||
if b.pbCanChooseMove?(b.moves[idxMove], false)
|
||||
PBDebug.logonerr do
|
||||
b.pbUseMoveSimple(b.lastMoveUsed, b.lastRegularMoveTarget, idxMove, false)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user