def refresh
self.bitmap.clear
return if [email protected]
self.bitmap.blt(0,0,@databox.bitmap,Rect.new(0,0,@databox.width,@databox.height))
if @dark
base=PokeBattle_SceneConstants::BOXTEXTBASECOLOR
shadow=PokeBattle_SceneConstants::BOXTEXTSHADOWCOLOR
outline=Color.new(7,16,39)
else
base=PokeBattle_SceneConstants::BOXTEXTBASECOLOR2
shadow=PokeBattle_SceneConstants::BOXTEXTSHADOWCOLOR2
outline=Color.new(248,248,216)
end
[email protected]
pbSetSystemFont(self.bitmap)
pbSetSmallFont2(self.bitmap)
textpos=[
[pokename,@spritebaseX+8,8,false,base]
]
imagepos=[]
genderX=self.bitmap.text_size(pokename).width
genderX+=@spritebaseX+14
case @battler.displayGender
when 0 # Male
# textpos.push([_INTL("♂"),genderX,6,false,outline,Color.new(48,96,216),1])
imagepos.push(["Graphics/Pictures/gender_male",genderX,14,0,0,-1,-1])
when 1 # Female
# textpos.push([_INTL("♀"),genderX,6,false,outline,Color.new(248,88,40),1])
imagepos.push(["Graphics/Pictures/gender_female",genderX,14,0,0,-1,-1])
end
pbDrawTextPositions(self.bitmap,textpos)
pbSetSmallFont(self.bitmap)
if @dark
imagepos.push(["Graphics/Pictures/white_lv2",
@spritebaseX+180-self.bitmap.text_size(@battler.level.to_s).width,16,0,0,-1,-1])
else
imagepos.push(["Graphics/Pictures/storage_lv2",
@spritebaseX+180-self.bitmap.text_size(@battler.level.to_s).width,16,0,0,-1,-1])
end
textpos=[
[_INTL("{1}",@battler.level),@spritebaseX+202,8,true,base,shadow]
]
if @showhp
hpstring=_ISPRINTF("{1: 2d}/{2: 2d}",self.hp,@battler.totalhp)
textpos.push([hpstring,@spritebaseX+8,48,false,base,shadow]) # Was 188
end
pbDrawTextPositions(self.bitmap,textpos)
if @battler.isShiny?
shinyX=206
shinyX=-6 if (@battler.index&1)==0 # If player's Pokémon
imagepos.push(["Graphics/Pictures/shiny.png",@spritebaseX+shinyX,12,0,0,-1,-1])
end
# CHANGE START
shinyX=206
shinyX=-6 if (@battler.index&1)==0 # If player's Pokémon
@iconx=@spritebaseX+shinyX
if @pokeicon
@pokeicon.x=@iconx
@pokeicon.y=36
@pokeicon.update
end
# CHANGE END
if @battler.isMega?
imagepos.push(["Graphics/Pictures/battleMegaEvoBox.png",@spritebaseX+8,34,0,0,-1,-1])
elsif @battler.isPrimal?
if isConst?(@battler.pokemon.species,PBSpecies,:KYOGRE)
imagepos.push(["Graphics/Pictures/battlePrimalKyogreBox.png",@spritebaseX+140,4,0,0,-1,-1])
elsif isConst?(@battler.pokemon.species,PBSpecies,:GROUDON)
imagepos.push(["Graphics/Pictures/battlePrimalGroudonBox.png",@spritebaseX+140,4,0,0,-1,-1])
end
end
if @battler.owned && (@battler.index&1)==1
imagepos.push(["Graphics/Pictures/battleBoxOwned.png",@spritebaseX+8,36,0,0,-1,-1])
end
pbDrawImagePositions(self.bitmap,imagepos)
if @battler.status>0
self.bitmap.blt(@spritebaseX+24,36,@statuses.bitmap,
Rect.new(0,(@battler.status-1)*16,44,16))
end
hpGaugeSize=PokeBattle_SceneConstants::HPGAUGESIZE
[email protected]==0 ? 0 : (self.hp*hpGaugeSize/@battler.totalhp)
hpgauge=2 if hpgauge==0 && self.hp>0
hpzone=0
hpzone=1 if self.hp<=(@battler.totalhp/2).floor
hpzone=2 if self.hp<=(@battler.totalhp/4).floor
hpcolors=[
PokeBattle_SceneConstants::HPCOLORGREENDARK,
PokeBattle_SceneConstants::HPCOLORGREEN,
PokeBattle_SceneConstants::HPCOLORYELLOWDARK,
PokeBattle_SceneConstants::HPCOLORYELLOW,
PokeBattle_SceneConstants::HPCOLORREDDARK,
PokeBattle_SceneConstants::HPCOLORRED
]
# fill with black (shows what the HP used to be)
hpGaugeX=PokeBattle_SceneConstants::HPGAUGE_X
hpGaugeY=PokeBattle_SceneConstants::HPGAUGE_Y
if @animatingHP && self.hp>0
self.bitmap.fill_rect(@spritebaseX+hpGaugeX,hpGaugeY,
@starthp*hpGaugeSize/@battler.totalhp,6,Color.new(0,0,0))
end
# fill with HP color
self.bitmap.fill_rect(@spritebaseX+hpGaugeX,hpGaugeY,hpgauge,2,hpcolors[hpzone*2])
self.bitmap.fill_rect(@spritebaseX+hpGaugeX,hpGaugeY+2,hpgauge,4,hpcolors[hpzone*2+1])
if @showexp
# fill with EXP color
expGaugeX=PokeBattle_SceneConstants::EXPGAUGE_X
expGaugeY=PokeBattle_SceneConstants::EXPGAUGE_Y
self.bitmap.fill_rect(@spritebaseX+expGaugeX,expGaugeY,self.exp,2,
PokeBattle_SceneConstants::EXPCOLORSHADOW)
self.bitmap.fill_rect(@spritebaseX+expGaugeX,expGaugeY+2,self.exp,2,
PokeBattle_SceneConstants::EXPCOLORBASE)
end
end