def refresh
self.bitmap.clear
return if !@battler.pokemon
if @playerpoke # Player Pokemon box
isOutsider=(@battler.pokemon.trainerID!=@player.id || (@battler.pokemon.language!=0 && @battler.pokemon.language!=@player.language))
y=0; y=1 if isOutsider;
self.bitmap.blt(22,0,pbBitmap("#{checkEBFolderPath}/bbtrans"),Rect.new(0,0,242,54))
y=0; y=32 if @doublebattle;
self.bitmap.blt(0,36,pbBitmap("#{checkEBFolderPath}/exparea"),Rect.new(0,y,262,32))
self.bitmap.blt(2,32,pbBitmap("#{checkEBFolderPath}/expbar"),Rect.new(0,y*34,self.exp,34)) if !@doublebattle
self.bitmap.blt(54,40,pbBitmap("#{checkEBFolderPath}/hparea"),Rect.new(0,0,180,16))
hpGaugeSize=PokeBattle_SceneConstants::HPGAUGESIZE
hpgauge=@battler.totalhp==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/3.5).floor
self.bitmap.blt(54,40,pbBitmap("#{checkEBFolderPath}/hpbars"),Rect.new(0,20*hpzone,6,20)) if self.hp > 0
self.bitmap.blt(60,40,pbBitmap("#{checkEBFolderPath}/hpbars"),Rect.new(6,20*hpzone,hpgauge,20))
self.bitmap.blt(60+hpgauge,40,pbBitmap("#{checkEBFolderPath}/hpbars"),Rect.new(174,20*hpzone,6,20)) if self.hp > 0
y=58; y-=26 if @doublebattle;
self.bitmap.blt(44,y,@statuses,Rect.new(0,17*(@battler.status-1),52,17)) if @battler.status > 0
self.bitmap.blt(22,34,pbBitmap("#{checkEBFolderPath}/mega_sym"),Rect.new(0,0,30,30)) if @battler.isMega?
if @battler.respond_to?(:isPrimal?) && @battler.isPrimal?
path=nil
path="Graphics/Pictures/battlePrimalKyogreBox.png" if @battler.species == getConst(PBSpecies,:KYOGRE)
path="Graphics/Pictures/battlePrimalGroudonBox.png" if @battler.species == getConst(PBSpecies,:GROUDON)
#define any custom Primal graphics here
self.bitmap.blt(22,34,pbBitmap(path),Rect.new(0,0,30,30))
end
self.bitmap.blt(148,52,pbBitmap("#{checkEBFolderPath}/hpind"),Rect.new(0,0,76,22)) if !@doublebattle
pbSetSmallFont(self.bitmap)
textpos=[
["#{self.hp}/#{@battler.totalhp}",152+34,50,2,Color.new(23,28,31),Color.new(185,185,185)]
]
pbDrawTextPositions(self.bitmap,textpos) if !@doublebattle
pbSetSystemFont(self.bitmap)
pokename=getBattler(@battler).name
textpos=[
[pokename,8+44,5,false,Color.new(255,255,255),Color.new(32,32,32)]
]
genderX=self.bitmap.text_size(pokename).width
genderX+=14+44
if getBattler(@battler).gender==0 # Male
textpos.push([_INTL("♂"),genderX,5,false,Color.new(48+30,96+30,216),Color.new(32,32,32)])
elsif getBattler(@battler).gender==1 # Female
textpos.push([_INTL("♀"),genderX,5,false,Color.new(248,88+30,40+30),Color.new(32,32,32)])
end
textpos.push([_INTL("Lv{1}",@battler.level),242,5,true,Color.new(255,255,255),Color.new(32,32,32)])
pbDrawTextPositions(self.bitmap,textpos)
else # Enemy Pokemon box
self.bitmap.blt(0,0,pbBitmap("#{checkEBFolderPath}/bbtrans_opp"),Rect.new(0,0,242,54))
y=0; y=32 if @doublebattle;
self.bitmap.blt(2,36,pbBitmap("#{checkEBFolderPath}/exparea_opp"),Rect.new(0,y,262,32))
self.bitmap.blt(30,40,pbBitmap("#{checkEBFolderPath}/hparea"),Rect.new(0,0,180,16))
hpGaugeSize=PokeBattle_SceneConstants::HPGAUGESIZE
hpgauge=@battler.totalhp==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/3.5).floor
self.bitmap.blt(30,40,pbBitmap("#{checkEBFolderPath}/hpbars"),Rect.new(0,20*hpzone,6,20)) if self.hp > 0
self.bitmap.blt(36,40,pbBitmap("#{checkEBFolderPath}/hpbars"),Rect.new(6,20*hpzone,hpgauge,20))
self.bitmap.blt(36+hpgauge,40,pbBitmap("#{checkEBFolderPath}/hpbars"),Rect.new(174,20*hpzone,6,20)) if self.hp > 0
self.bitmap.blt(214,34,pbBitmap("#{checkEBFolderPath}/battleBoxOwned.png"),Rect.new(0,0,14,14)) if @battler.owned
self.bitmap.blt(212,34,pbBitmap("#{checkEBFolderPath}/mega_sym"),Rect.new(0,0,30,30)) if @battler.isMega?
if @battler.respond_to?(:isPrimal?) && @battler.isPrimal?
path=nil
path="Graphics/Pictures/battlePrimalKyogreBox.png" if @battler.species == getConst(PBSpecies,:KYOGRE)
path="Graphics/Pictures/battlePrimalGroudonBox.png" if @battler.species == getConst(PBSpecies,:GROUDON)
#define any custom Primal graphics here
self.bitmap.blt(212,34,pbBitmap(path),Rect.new(0,0,30,30))
end
y=58; y-=26 if @doublebattle;
self.bitmap.blt(20,y,@statuses,Rect.new(0,17*(@battler.status-1),52,17)) if @battler.status > 0
pbSetSystemFont(self.bitmap)
pokename=getBattler(@battler).name
textpos=[
[pokename,8+20,5,false,Color.new(255,255,255),Color.new(32,32,32)]
]
genderX=self.bitmap.text_size(pokename).width
genderX+=14+20
if getBattler(@battler).gender==0 # Male
textpos.push([_INTL("♂"),genderX,5,false,Color.new(48+30,96+30,216),Color.new(32,32,32)])
elsif getBattler(@battler).gender==1 # Female
textpos.push([_INTL("♀"),genderX,5,false,Color.new(248,88+30,40+30),Color.new(32,32,32)])
end
textpos.push([_INTL("Lv{1}",@battler.level),218,5,true,Color.new(255,255,255),Color.new(32,32,32)])
pbDrawTextPositions(self.bitmap,textpos)
end
end