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

@@ -538,7 +538,7 @@ class TargetMenuDisplay < BattleMenuBase
@overlay.bitmap.clear
textpos = []
@buttons.each_with_index do |button,i|
next if !button || @texts[i].nil? || @texts[i]==""
next if !button || nil_or_empty?(@texts[i])
x = button.x-self.x+button.src_rect.width/2
y = button.y-self.y+2
textpos.push([@texts[i],x,y,2,TEXT_BASE_COLOR,TEXT_SHADOW_COLOR])

View File

@@ -480,7 +480,7 @@ class PokeBattle_Scene
# Plays a common animation.
def pbCommonAnimation(animName,user=nil,target=nil)
return if !animName || animName==""
return if nil_or_empty?(animName)
target = target[0] if target && target.is_a?(Array)
animations = pbLoadBattleAnimations
return if !animations