mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 06:04:59 +00:00
NPC trainers' end of battle text is now read directly from the trainer object rather than extracted to an array
This commit is contained in:
@@ -412,9 +412,10 @@ class Battle
|
||||
pbDisplayPaused(_INTL("You defeated {1}, {2} and {3}!", @opponent[0].full_name,
|
||||
@opponent[1].full_name, @opponent[2].full_name))
|
||||
end
|
||||
@opponent.each_with_index do |_t, i|
|
||||
@opponent.each_with_index do |trainer, i|
|
||||
@scene.pbShowOpponent(i)
|
||||
msg = (@endSpeeches[i] && @endSpeeches[i] != "") ? @endSpeeches[i] : "..."
|
||||
msg = trainer.lose_text
|
||||
msg = "..." if !msg || msg.empty?
|
||||
pbDisplayPaused(msg.gsub(/\\[Pp][Nn]/, pbPlayer.name))
|
||||
end
|
||||
end
|
||||
@@ -444,11 +445,12 @@ class Battle
|
||||
# Lose money from losing a battle
|
||||
pbLoseMoney
|
||||
pbDisplayPaused(_INTL("You blacked out!")) if !@canLose
|
||||
elsif @decision == 2
|
||||
elsif @decision == 2 # Lost in a Battle Frontier battle
|
||||
if @opponent
|
||||
@opponent.each_with_index do |_t, i|
|
||||
@opponent.each_with_index do |trainer, i|
|
||||
@scene.pbShowOpponent(i)
|
||||
msg = (@endSpeechesWin[i] && @endSpeechesWin[i] != "") ? @endSpeechesWin[i] : "..."
|
||||
msg = trainer.win_text
|
||||
msg = "..." if !msg || msg.empty?
|
||||
pbDisplayPaused(msg.gsub(/\\[Pp][Nn]/, pbPlayer.name))
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user