Made more use of nil_or_empty?, fixed incorrect default species body shape, fixed Illusion, fixed potential foreign Pokémon with blank names

This commit is contained in:
Maruno17
2021-05-03 17:34:19 +01:00
parent 8e6ee21c20
commit 474281712b
30 changed files with 71 additions and 73 deletions

View File

@@ -401,7 +401,7 @@ class PokeBattle_Battle
party.each_with_index do |pkmn,i|
next if i<idxPartyStart || i>=idxPartyEnd # Check the team only
next if !pkmn || !pkmn.able? # Can't copy a non-fainted Pokémon or egg
ret = i if partyOrders[i]>partyOrders[ret]
ret = i if ret < 0 || partyOrders[i] > partyOrders[ret]
end
return ret
end

View File

@@ -170,7 +170,7 @@ class PokeBattle_Battle
enemyParty = pbParty(idxBattler)
if enemyParty[idxPartyNew].ability == :ILLUSION
new_index = pbLastInTeam(idxBattler)
idxPartyForName = new_index if new_index >= 0
idxPartyForName = new_index if new_index >= 0 && new_index != idxPartyNew
end
if pbDisplayConfirm(_INTL("{1} is about to send in {2}. Will you switch your Pokémon?",
opponent.full_name, enemyParty[idxPartyForName].name))
@@ -257,7 +257,7 @@ class PokeBattle_Battle
newPkmnName = party[idxParty].name
if party[idxParty].ability == :ILLUSION
new_index = pbLastInTeam(idxBattler)
newPkmnName = party[new_index].name if new_index >= 0
newPkmnName = party[new_index].name if new_index >= 0 && new_index != idxParty
end
if pbOwnedByPlayer?(idxBattler)
opposing = @battlers[idxBattler].pbDirectOpposing

View File

@@ -147,9 +147,7 @@ class PokeBattle_Battle
@scene.pbRefreshOne(idxBattler)
pbCommonAnimation("MegaEvolution2",battler)
megaName = battler.pokemon.megaName
if !megaName || megaName==""
megaName = _INTL("Mega {1}", battler.pokemon.speciesName)
end
megaName = _INTL("Mega {1}", battler.pokemon.speciesName) nil_or_empty?(megaName)
pbDisplay(_INTL("{1} has Mega Evolved into {2}!",battler.pbThis,megaName))
side = battler.idxOwnSide
owner = pbGetOwnerIndexFromBattlerIndex(idxBattler)