Split PokeBattle_Trainer into PlayerTrainer and NPCTrainer

This commit is contained in:
Maruno17
2021-01-24 17:55:39 +00:00
parent 7de034957b
commit 4098b1cd11
60 changed files with 748 additions and 648 deletions

View File

@@ -174,13 +174,13 @@ class PokeBattle_Battle
else # Trainer battle
case @opponent.length
when 1
pbDisplayPaused(_INTL("You are challenged by {1}!",@opponent[0].fullname))
pbDisplayPaused(_INTL("You are challenged by {1}!",@opponent[0].full_name))
when 2
pbDisplayPaused(_INTL("You are challenged by {1} and {2}!",@opponent[0].fullname,
@opponent[1].fullname))
pbDisplayPaused(_INTL("You are challenged by {1} and {2}!",@opponent[0].full_name,
@opponent[1].full_name))
when 3
pbDisplayPaused(_INTL("You are challenged by {1}, {2} and {3}!",
@opponent[0].fullname,@opponent[1].fullname,@opponent[2].fullname))
@opponent[0].full_name,@opponent[1].full_name,@opponent[2].full_name))
end
end
# Send out Pokémon (opposing trainers first)
@@ -196,12 +196,12 @@ class PokeBattle_Battle
sent = sendOuts[side][i]
case sent.length
when 1
msg += _INTL("{1} sent out {2}!",t.fullname,@battlers[sent[0]].name)
msg += _INTL("{1} sent out {2}!",t.full_name,@battlers[sent[0]].name)
when 2
msg += _INTL("{1} sent out {2} and {3}!",t.fullname,
msg += _INTL("{1} sent out {2} and {3}!",t.full_name,
@battlers[sent[0]].name,@battlers[sent[1]].name)
when 3
msg += _INTL("{1} sent out {2}, {3} and {4}!",t.fullname,
msg += _INTL("{1} sent out {2}, {3} and {4}!",t.full_name,
@battlers[sent[0]].name,@battlers[sent[1]].name,@battlers[sent[2]].name)
end
toSendOut.concat(sent)
@@ -339,7 +339,7 @@ class PokeBattle_Battle
if trainerBattle?
tMoney = 0
@opponent.each_with_index do |t,i|
tMoney += pbMaxLevelInTeam(1,i)*t.moneyEarned
tMoney += pbMaxLevelInTeam(1, i) * t.base_money
end
tMoney *= 2 if @field.effects[PBEffects::AmuletCoin]
tMoney *= 2 if @field.effects[PBEffects::HappyHour]
@@ -368,7 +368,7 @@ class PokeBattle_Battle
return if $game_switches[NO_MONEY_LOSS]
maxLevel = pbMaxLevelInTeam(0,0) # Player's Pokémon only, not partner's
multiplier = [8,16,24,36,48,64,80,100,120]
idxMultiplier = [pbPlayer.numbadges,multiplier.length-1].min
idxMultiplier = [pbPlayer.badge_count, multiplier.length - 1].min
tMoney = maxLevel*multiplier[idxMultiplier]
tMoney = pbPlayer.money if tMoney>pbPlayer.money
oldMoney = pbPlayer.money
@@ -395,13 +395,13 @@ class PokeBattle_Battle
@scene.pbTrainerBattleSuccess
case @opponent.length
when 1
pbDisplayPaused(_INTL("You defeated {1}!",@opponent[0].fullname))
pbDisplayPaused(_INTL("You defeated {1}!",@opponent[0].full_name))
when 2
pbDisplayPaused(_INTL("You defeated {1} and {2}!",@opponent[0].fullname,
@opponent[1].fullname))
pbDisplayPaused(_INTL("You defeated {1} and {2}!",@opponent[0].full_name,
@opponent[1].full_name))
when 3
pbDisplayPaused(_INTL("You defeated {1}, {2} and {3}!",@opponent[0].fullname,
@opponent[1].fullname,@opponent[2].fullname))
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|
@scene.pbShowOpponent(i)
@@ -423,13 +423,13 @@ class PokeBattle_Battle
if trainerBattle?
case @opponent.length
when 1
pbDisplayPaused(_INTL("You lost against {1}!",@opponent[0].fullname))
pbDisplayPaused(_INTL("You lost against {1}!",@opponent[0].full_name))
when 2
pbDisplayPaused(_INTL("You lost against {1} and {2}!",
@opponent[0].fullname,@opponent[1].fullname))
@opponent[0].full_name,@opponent[1].full_name))
when 3
pbDisplayPaused(_INTL("You lost against {1}, {2} and {3}!",
@opponent[0].fullname,@opponent[1].fullname,@opponent[2].fullname))
@opponent[0].full_name,@opponent[1].full_name,@opponent[2].full_name))
end
end
# Lose money from losing a battle