mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-11 23:24:59 +00:00
Merge branch 'ai' into dev
This commit is contained in:
@@ -189,7 +189,7 @@ class Battle::Scene
|
||||
pbShowWindow(MESSAGE_BOX)
|
||||
cw = @sprites["messageWindow"]
|
||||
cw.setText(msg)
|
||||
PBDebug.log(msg)
|
||||
PBDebug.log_message(msg)
|
||||
yielded = false
|
||||
timer = 0.0
|
||||
loop do
|
||||
@@ -235,7 +235,7 @@ class Battle::Scene
|
||||
pbShowWindow(MESSAGE_BOX)
|
||||
cw = @sprites["messageWindow"]
|
||||
cw.text = msg + "\1"
|
||||
PBDebug.log(msg)
|
||||
PBDebug.log_message(msg)
|
||||
yielded = false
|
||||
timer = 0.0
|
||||
loop do
|
||||
@@ -283,7 +283,7 @@ class Battle::Scene
|
||||
cw.z = dw.z + 1
|
||||
cw.index = 0
|
||||
cw.viewport = @viewport
|
||||
PBDebug.log(msg)
|
||||
PBDebug.log_message(msg)
|
||||
loop do
|
||||
cw.visible = (!dw.busy?)
|
||||
pbUpdate(cw)
|
||||
|
||||
@@ -410,7 +410,7 @@ class Battle::Scene
|
||||
# Returns the animation ID to use for a given move/user. Returns nil if that
|
||||
# move has no animations defined for it.
|
||||
def pbFindMoveAnimDetails(move2anim, moveID, idxUser, hitNum = 0)
|
||||
real_move_id = GameData::Move.get(moveID).id
|
||||
real_move_id = GameData::Move.try_get(moveID)&.id || moveID
|
||||
noFlip = false
|
||||
if (idxUser & 1) == 0 # On player's side
|
||||
anim = move2anim[0][real_move_id]
|
||||
@@ -440,7 +440,7 @@ class Battle::Scene
|
||||
moveType = moveData.type
|
||||
moveKind = moveData.category
|
||||
moveKind += 3 if target_data.num_targets > 1 || target_data.affects_foe_side
|
||||
moveKind += 3 if moveKind == 2 && target_data.num_targets > 0
|
||||
moveKind += 3 if moveData.status? && target_data.num_targets > 0
|
||||
# [one target physical, one target special, user status,
|
||||
# multiple targets physical, multiple targets special, non-user status]
|
||||
typeDefaultAnim = {
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#===============================================================================
|
||||
# Used when generating new trainers for battle challenges
|
||||
#===============================================================================
|
||||
class Battle::DebugSceneNoLogging
|
||||
def initialize
|
||||
@battle = nil
|
||||
@lastCmd = [0, 0, 0, 0]
|
||||
@lastMove = [0, 0, 0, 0]
|
||||
class Battle::DebugSceneNoVisuals
|
||||
def initialize(log_messages = false)
|
||||
@battle = nil
|
||||
@lastCmd = [0, 0, 0, 0]
|
||||
@lastMove = [0, 0, 0, 0]
|
||||
@log_messages = log_messages
|
||||
end
|
||||
|
||||
# Called whenever the battle begins.
|
||||
@@ -42,11 +43,24 @@ class Battle::DebugSceneNoLogging
|
||||
def pbRefresh; end
|
||||
def pbRefreshOne(idxBattler); end
|
||||
|
||||
def pbDisplayMessage(msg, brief = false); end
|
||||
def pbDisplayMessage(msg, brief = false)
|
||||
PBDebug.log_message(msg) if @log_messages
|
||||
end
|
||||
alias pbDisplay pbDisplayMessage
|
||||
def pbDisplayPausedMessage(msg); end
|
||||
def pbDisplayConfirmMessage(msg); return true; end
|
||||
def pbShowCommands(msg, commands, defaultValue); return 0; end
|
||||
|
||||
def pbDisplayPausedMessage(msg)
|
||||
PBDebug.log_message(msg) if @log_messages
|
||||
end
|
||||
|
||||
def pbDisplayConfirmMessage(msg)
|
||||
PBDebug.log_message(msg) if @log_messages
|
||||
return true
|
||||
end
|
||||
|
||||
def pbShowCommands(msg, commands, defaultValue)
|
||||
PBDebug.log_message(msg) if @log_messages
|
||||
return 0
|
||||
end
|
||||
|
||||
def pbSendOutBattlers(sendOuts, startBattle = false); end
|
||||
def pbRecall(idxBattler); end
|
||||
|
||||
Reference in New Issue
Block a user