Deleted: Changed: PokemonOption @@ -210,1 +210,1 @@ - o.setClass($ResizeFactor==1.0 ? Tilemap : CustomTilemap) + o.setClass($ResizeFactor==1.0 ? SynchronizedTilemap : CustomTilemap) Changed: PokemonDayCare @@ -267,1 +267,2 @@ - if isConst?(father.species,PBSpecies,:PIKACHU) && isConst?(father.item,PBItems,:LIGHTBALL) && + if isConst?(father.species,PBSpecies,:PIKACHU) && + isConst?(father.item,PBItems,:LIGHTBALL) && Changed: PokemonPokedex @@ -224,0 +224,8 @@ + +def setIconBitmap(file) + @sprites["icon"].setBitmap(file) + if @sprites["icon"].bitmap + @sprites["icon"].ox=@sprites["icon"].bitmap.width/2 + @sprites["icon"].oy=@sprites["icon"].bitmap.height/2 + end +end @@ -241,2 +249,2 @@ - @sprites["icon"]=IconWindow.new(0,0,160,160) - @sprites["icon"].viewport=@viewport + @sprites["iconback"]=IconWindow.new(0,0,160,160) + @sprites["iconback"].viewport=@viewport @@ -254,0 +262,1 @@ + @sprites["icon"]=IconSprite.new(80,80,@viewport) @@ -357,1 +366,1 @@ - @sprites["icon"].setBitmap(pbPokemonBitmapFile(iconspecies,false)) + setIconBitmap(pbPokemonBitmapFile(iconspecies,false)) @@ -491,1 +500,1 @@ - textpos.push([_ISPRINTF("{1:s} POKeMON",kind),100*2,40*2,0,basecolor,shadowcolor]) + textpos.push([_ISPRINTF("{1:s} POKéMON",kind),100*2,40*2,0,basecolor,shadowcolor]) @@ -499,1 +508,1 @@ - textpos.push([_INTL("????? POKeMON"),100*2,40*2,0,basecolor,shadowcolor]) + textpos.push([_INTL("????? POKéMON"),100*2,40*2,0,basecolor,shadowcolor]) @@ -504,3 +513,6 @@ - pbDrawImagePositions(@sprites["overlay"].bitmap,[ - [pbPokemonBitmapFile(species,false),40,48,0,0,-1,-1] - ]) + pkmnbitmap=BitmapCache.load_bitmap(pbPokemonBitmapFile(species,false)) + @sprites["overlay"].bitmap.blt( + 40-(pkmnbitmap.width-128)/2, + 48-(pkmnbitmap.height-128)/2, + pkmnbitmap,pkmnbitmap.rect) + pkmnbitmap.dispose @@ -593,2 +605,1 @@ - @sprites["icon"].setBitmap(pbPokemonBitmapFile(iconspecies,false)) - + setIconBitmap(pbPokemonBitmapFile(iconspecies,false)) @@ -692,1 +703,1 @@ - @sprites["icon"].setBitmap(pbPokemonBitmapFile(iconspecies,false)) + setIconBitmap(pbPokemonBitmapFile(iconspecies,false)) @@ -755,1 +766,1 @@ - @sprites["icon"].setBitmap(pbPokemonBitmapFile(iconspecies,false)) + setIconBitmap(pbPokemonBitmapFile(iconspecies,false)) Changed: PBTypes @@ -1,2 +1,0 @@ -#35032106 -begin @@ -24,-1 +22,35 @@ +def PBTypes.getCount + # Change this number if you add a new type + # This number doesn't include QMARKS + return 17 +end + +PBTypeChart=[ +# Rows indicate the attack's type +# Columns indicate the opponent's type +# 0 - Immune +# 1 - "Not very effective" +# 2 - Normal +# 4 - "Super effective" +# When you add a new type, add a number showing effect +# on opponents with that type to each line, then add a +# new line showing effect on attacks with the new type +# on opponents. +2,2,2,2,2,1,2,0,1,2,2,2,2,2,2,2,2, +4,2,1,1,2,4,1,0,4,2,2,2,2,1,4,2,4, +2,4,2,2,2,1,4,2,1,2,2,4,1,2,2,2,2, +2,2,2,1,1,1,2,1,0,2,2,4,2,2,2,2,2, +2,2,0,4,2,4,1,2,4,4,2,1,4,2,2,2,2, +2,1,4,2,1,2,4,2,1,4,2,2,2,2,4,2,2, +2,1,1,1,2,2,2,1,1,1,2,4,2,4,2,2,4, +0,2,2,2,2,2,2,4,1,2,2,2,2,4,2,2,1, +2,2,2,2,2,4,2,2,1,1,1,2,1,2,4,2,2, +2,2,2,2,2,1,4,2,4,1,1,4,2,2,4,1,2, +2,2,2,2,4,4,2,2,2,4,1,1,2,2,2,1,2, +2,2,1,1,4,4,1,2,1,1,4,1,2,2,2,1,2, +2,2,4,2,0,2,2,2,2,2,4,1,1,2,2,1,2, +2,4,2,4,2,2,2,2,1,2,2,2,2,1,2,2,0, +2,2,4,2,4,2,2,2,1,1,1,4,2,2,1,4,2, +2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,4,2, +2,1,2,2,2,2,2,4,1,2,2,2,2,4,2,2,1 + ] @@ -49,7 +83,1 @@ -end -rescue Exception -if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" -raise $! -else -end -end +end Changed: PokeBattle_Effects @@ -262,1 +262,1 @@ - if @ability==PBAbilities::FLASHFIRE && move.type==PBMoves::FIRE + if @ability==PBAbilities::FLASHFIRE && move.type==PBTypes::FIRE Changed: PBMove @@ -5,1 +5,2 @@ - def initialize(moveid) + attr_reader :contestType,:category + def initializeOld(moveid) @@ -18,-1 +19,15 @@ + end + def initialize(moveid) + movedata=pbRgssOpen("Data/moves.dat") + movedata.pos=moveid*13 + @function=movedata.fgetw + @basedamage=movedata.fgetb + @type=movedata.fgetb + @category=movedata.fgetb + @accuracy=movedata.fgetb + @totalpp=movedata.fgetb + @addlEffect=movedata.fgetb + @target=movedata.fgetw + @priority=movedata.fgetsb + @flags=movedata.fgetb + @contestType=movedata.fgetb Changed: PokeBattle_MoveEffects @@ -572,0 +572,2 @@ + else + @battle.pbDisplay(_INTL("{1} was trapped in the vortex!",opponent.pbThis)) Changed: PokeBattle_Move @@ -64,0 +64,1 @@ + @category=movedata.category @@ -68,0 +69,1 @@ +USECATEGORY=true @@ -70,1 +72,5 @@ - return (type<9) + if USECATEGORY + return @category==0 + else + return (type<9) + end @@ -74,22 +80,8 @@ - return (type>=9) -end - -PBTypeChart=[ -2,2,2,2,2,1,2,0,1,2,2,2,2,2,2,2,2, -4,2,1,1,2,4,1,0,4,2,2,2,2,1,4,2,4, -2,4,2,2,2,1,4,2,1,2,2,4,1,2,2,2,2, -2,2,2,1,1,1,2,1,0,2,2,4,2,2,2,2,2, -2,2,0,4,2,4,1,2,4,4,2,1,4,2,2,2,2, -2,1,4,2,1,2,4,2,1,4,2,2,2,2,4,2,2, -2,1,1,1,2,2,2,1,1,1,2,4,2,4,2,2,4, -0,2,2,2,2,2,2,4,1,2,2,2,2,4,2,2,1, -2,2,2,2,2,4,2,2,1,1,1,2,1,2,4,2,2, -2,2,2,2,2,1,4,2,4,1,1,4,2,2,4,1,2, -2,2,2,2,4,4,2,2,2,4,1,1,2,2,2,1,2, -2,2,1,1,4,4,1,2,1,1,4,1,2,2,2,1,2, -2,2,4,2,0,2,2,2,2,2,4,1,1,2,2,1,2, -2,4,2,4,2,2,2,2,1,2,2,2,2,1,2,2,0, -2,2,4,2,4,2,2,2,1,1,1,4,2,2,1,4,2, -2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,4,2, -2,1,2,2,2,2,2,4,1,2,2,2,2,4,2,2,1 - ] + if USECATEGORY + return @category==1 + else + return (type>=9) + end +end + + @@ -99,1 +91,1 @@ - atype=type + atype=type # attack type @@ -105,2 +97,2 @@ - mod1=PBTypeChart[atype*17+otype1] - mod2=(otype1==otype2) ? 2 : PBTypeChart[atype*17+otype2] + mod1=PBTypes::PBTypeChart[atype*PBTypes.getCount+otype1] + mod2=(otype1==otype2) ? 2 : PBTypes::PBTypeChart[atype*PBTypes.getCount+otype2] Changed: RTP and Registry @@ -477,0 +477,10 @@ +module FileTest + Image_ext = ['.bmp', '.png', '.jpg', '.jpeg'] + Audio_ext = ['.mp3', '.mid', '.midi', '.ogg', '.wav', '.wma'] + def self.audio_exist?(filename) + return !rtpGetPath(filename,Audio_ext).nil? + end + def self.image_exist?(filename) + return !rtpGetPath(filename,Image_ext).nil? + end +end Deleted: Module: File Test Deleted: RPGCache Changed: PokemonPhone @@ -185,3 +185,2 @@ - break - end - if !$PokemonGlobal.phoneTime || $PokemonGlobal.phoneTime<=0 + # do nothing + elsif !$PokemonGlobal.phoneTime || $PokemonGlobal.phoneTime<=0 Changed: Resolution* @@ -2,3 +2,0 @@ -#-------------------------------------------------------------------------- -# define constant -#-------------------------------------------------------------------------- Changed: EventScene @@ -434,1 +434,1 @@ - tmp=Bitmap.new(1,1) + tmp=Bitmap.new(maxwidth,Graphics.height) @@ -436,5 +436,1 @@ - normtext=getLineBrokenTextEx(tmp,text,maxwidth,dims,true) - tmp.dispose - tmp=Bitmap.new(dims[0],dims[1]) - pbSetSystemFont(tmp) - renderColoredLineBrokenText(tmp,0,0,normtext,nil,nil) + drawColoredTextEx(tmp,0,0,maxwidth,text) Changed: PokemonField @@ -749,1 +749,0 @@ - @@ -761,0 +760,57 @@ + + +def pbBatteryLow? + power="\0"*12 + begin + sps=Win32API.new('kernel32.dll','GetSystemPowerStatus','p','l') + rescue + return false + end + if sps.call(power)==1 + status=power.unpack("CCCCVV") + # Battery Flag + if status[1]!=255 && (status[1]&6)!=0 # Low or Critical + return true + end + # Battery Life Percent + if status[2]<5 # Less than 5 percent + return true + end + # Battery Life Time + if status[4]<300 # Less than 5 minutes + return true + end + end + return false +end + +class Game_Event +def cooledDown?(seconds) + if !(expired?(seconds) && tsOff?("A")) + self.need_refresh=true + return false + else + return true + end +end +end + +class PokemonTemp + attr_accessor :batterywarning +end + +Events.onMapUpdate+=proc {|sender,e| + if !$Trainer || !$PokemonGlobal || !$game_player || !$game_map + elsif Time.now.sec==0 && !$PokemonTemp.batterywarning && pbBatteryLow? && + !$game_player.move_route_forcing && + !$game_system.map_interpreter.running? && + !$game_temp.message_window_showing + $PokemonTemp.batterywarning=true + if Kernel.pbConfirmMessage(_INTL("The game has detected that the battery is low. Would you like to save the game now?")) + pbSaveScreen + elsif Kernel.pbConfirmMessage(_INTL("You may lose your progress if you don't save. Would you like to save now?")) + pbSaveScreen + end + end +} + Changed: PokeBattle_ActualScene @@ -673,1 +673,3 @@ - @endspritey=factor*2+64 # from center + halfY=(sprite.bitmap && + !sprite.bitmap.disposed?) ? sprite.bitmap.height/2 : 64 + @endspritey=factor*2+halfY # from center @@ -898,1 +900,3 @@ - currentY=@spritey-(64.0*@pokemonsprite.zoom_y) + halfY=(@pokemonsprite.bitmap && + !@pokemonsprite.bitmap.disposed?) ? @pokemonsprite.bitmap.height/2 : 64 + currentY=@spritey-(halfY*@pokemonsprite.zoom_y) @@ -1393,0 +1397,5 @@ + pbPositionPokemonSprite( + @sprites["pokemon1"], + @sprites["pokemon1"].x, + @sprites["pokemon1"].y + ) @@ -1557,0 +1566,4 @@ + if @sprites["pokemon#{battlerindex}"].bitmap + @sprites["pokemon#{battlerindex}"].bitmap.dispose + end + @sprites["pokemon#{battlerindex}"].bitmap=pbLoadPokemonBitmap(pkmn,true) @@ -1559,4 +1572,0 @@ - if @sprites["pokemon#{battlerindex}"].bitmap - @sprites["pokemon#{battlerindex}"].bitmap.dispose - end - @sprites["pokemon#{battlerindex}"].bitmap=pbLoadPokemonBitmap(pkmn,true) @@ -1760,0 +1769,1 @@ + pkmnscreen=PokemonScreen.new(pkmnlist,@battle.party1) @@ -1763,1 +1773,1 @@ - if pkmnid>=0 && @battle.pbUseItemOnPokemon(item,pkmnid,pkmnlist) + if pkmnid>=0 && @battle.pbUseItemOnPokemon(item,pkmnid,pkmnscreen) @@ -2142,2 +2152,4 @@ - user.x+64,user.y+64, - user.x+64,user.y+64 + user.x+(user.bitmap.width/2), + user.y+(user.bitmap.height/2), + user.x+(user.bitmap.width/2), + user.y+(user.bitmap.height/2) @@ -2151,2 +2163,4 @@ - user.x+64,user.y+64, - target.x+64,target.y+64 + user.x+(user.bitmap.width/2), + user.y+(user.bitmap.height/2), + target.x+(target.bitmap.width/2), + target.y+(target.bitmap.height/2) Changed: BitmapCache @@ -1,2 +1,141 @@ -#43945848 -begin + + +def strsplit(str,re) + ret=[] + tstr=str + while re=~tstr + ret[ret.length]=$~.pre_match + tstr=$~.post_match + end + ret[ret.length]=tstr if ret.length + return ret +end + + +def canonicalize(c) + csplit=strsplit(c,/[\/\\]/) + pos=-1 + ret=[] + retstr="" + for x in csplit + if x=="." + elsif x==".." + if pos>=0 + ret.delete_at(pos) + pos-=1 + end + else + ret.push(x) + pos+=1 + end + end + for i in 0...ret.length + retstr+="/" if i>0 + retstr+=ret[i] + end + return retstr +end + + +##################################################################### + +module RPG + module Cache + @cache = {} + def self.load_bitmap(folder_name, filename, hue = 0) + path = folder_name + filename + path=canonicalize(path) + if not @cache.include?(path) or @cache[path].disposed? + for i in @cache.keys + if @cache[i] && @cache[i].disposed? + @cache[i]=nil + @cache.delete(i) + end + end + if filename != "" + begin + @cache[path] = Bitmap.new(path) + rescue Hangup + begin + @cache[path] = Bitmap.new(path) + rescue + @cache[path] = Bitmap.new(32, 32) + raise _INTL("Failed to load bitmap: {1}",path) + end + rescue + @cache[path] = Bitmap.new(32, 32) + raise _INTL("Failed to load bitmap: {1}",path) + end + else + @cache[path] = Bitmap.new(32, 32) + end + end + if hue == 0 + @cache[path] + else + key = [path, hue] + if not @cache.include?(key) or @cache[key].disposed? + @cache[key] = @cache[path].clone + @cache[key].hue_change(hue) + end + @cache[key] + end + end + def self.animation(filename, hue) + self.load_bitmap("Graphics/Animations/", filename, hue) + end + def self.autotile(filename) + self.load_bitmap("Graphics/Autotiles/", filename) + end + def self.battleback(filename) + self.load_bitmap("Graphics/Battlebacks/", filename) + end + def self.battler(filename, hue) + self.load_bitmap("Graphics/Battlers/", filename, hue) + end + def self.character(filename, hue) + self.load_bitmap("Graphics/Characters/", filename, hue) + end + def self.fog(filename, hue) + self.load_bitmap("Graphics/Fogs/", filename, hue) + end + def self.gameover(filename) + self.load_bitmap("Graphics/Gameovers/", filename) + end + def self.icon(filename) + self.load_bitmap("Graphics/Icons/", filename) + end + def self.panorama(filename, hue) + self.load_bitmap("Graphics/Panoramas/", filename, hue) + end + def self.picture(filename) + self.load_bitmap("Graphics/Pictures/", filename) + end + def self.tileset(filename) + self.load_bitmap("Graphics/Tilesets/", filename) + end + def self.title(filename) + self.load_bitmap("Graphics/Titles/", filename) + end + def self.windowskin(filename) + self.load_bitmap("Graphics/Windowskins/", filename) + end + def self.tile(filename, tile_id, hue) + key = [filename, tile_id, hue] + if not @cache.include?(key) or @cache[key].disposed? + @cache[key] = Bitmap.new(32, 32) + x = (tile_id - 384) % 8 * 32 + y = (tile_id - 384) / 8 * 32 + rect = Rect.new(x, y, 32, 32) + @cache[key].blt(0, 0, self.tileset(filename), rect) + @cache[key].hue_change(hue) + end + @cache[key] + end + def self.clear + @cache = {} + GC.start + end + end +end + @@ -160,7 +299,1 @@ -end -rescue Exception -if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" -raise $! -else -end -end +end Changed: PokeBattle_AI @@ -12,2 +12,2 @@ - mod1=PokeBattle_Move::PBTypeChart[atype*17+otype1] - mod2=(otype1==otype2) ? 2 : PokeBattle_Move::PBTypeChart[atype*17+otype2] + mod1=PBTypes::PBTypeChart[atype*PBTypes.getCount+otype1] + mod2=(otype1==otype2) ? 2 : PBTypes::PBTypeChart[atype*PBTypes.getCount+otype2] Changed: WindowAndTilemap @@ -246,2 +246,2 @@ - @cursoropacity-=5 - @cursorblink=1 if @cursoropacity<=180 + @cursoropacity-=8 + @cursorblink=1 if @cursoropacity<=128 @@ -249,1 +249,1 @@ - @cursoropacity+=5 + @cursoropacity+=8 @@ -253,1 +253,1 @@ - @cursoropacity=180 + @cursoropacity=128 @@ -263,0 +263,1 @@ + @@ -1042,1 +1043,1 @@ - Graphics.frame_reset if overallcount>20 + Graphics.frame_reset if overallcount>2000 @@ -1099,1 +1100,1 @@ - val=(val*getResizeFactor).round + val=(val*getResizeFactor).to_i @@ -1106,1 +1107,1 @@ - val=(val*getResizeFactor).round + val=(val*getResizeFactor).to_i @@ -1184,0 +1185,100 @@ +class SynchronizedTilemapAutotilesInternal + def initialize(oldat) + @atdisposables=[[],[],[],[],[],[],[]] + @atframes=[[],[],[],[],[],[],[]] + @autotiles=[] + @oldat=oldat + end + def dispose + for i in 0...7 + for bitmap in @atdisposables[i] + bitmap.dispose + end + @atdisposables[i].clear + @atframes[i].clear + end + end + def [](i) + return @autotiles[i] + end + def []=(i,value) + for frame in @atdisposables[i] + frame.dispose + end + @atframes[i].clear + @atdisposables[i].clear + if value && !value.disposed? + if value.height==32 + frames=value.width/32 + for j in 0...frames + @atdisposables[i][j]=Bitmap.new(32,32) + @atdisposables[i][j].blt(0,0,value,Rect.new(j*32,0,32,32)) + @atframes[i][j]=@atdisposables[i][j] + end + elsif value.height==128 + frames=value.width/96 + for j in 0...frames + @atdisposables[i][j]=Bitmap.new(96,128) + @atdisposables[i][j].blt(0,0,value,Rect.new(j*96,0,96,128)) + @atframes[i][j]=@atdisposables[i][j] + end + else + @atframes[i][0]=value + end + else + @atframes[i][0]=value + end + @autotiles[i]=value + sync + end + def sync + frameused=[] + for i in 0...7 + frames=[1,@atframes[i].length].max + frame=(Graphics.frame_count/15)%frames + @oldat[i]=@atframes[i][frame] + end + end +end + +class SynchronizedTilemapAutotiles + def initialize(autotiles) + @autotiles=autotiles + end + def [](i) + @autotiles[i] + end + def []=(i,value) + @autotiles[i]=value + end +end + +class SynchronizedTilemap < Tilemap + # This class derives from Tilemap just to synchronize + # the tilemap animation. + attr_accessor :numupdates + def initialize(viewport=nil) + super(viewport) + @updating=true + @autotiles=SynchronizedTilemapAutotilesInternal.new(self.autotiles) + @autos=SynchronizedTilemapAutotiles.new(@autotiles) + @updating=false + end + def dispose + @autotiles.dispose + super + end + def autotiles + if @updating + super + else + return @autos + end + end + def update + return if disposed? + @autotiles.sync + super + end +end + @@ -1190,1 +1291,1 @@ - setClass($ResizeFactor==1.0 ? Tilemap : CustomTilemap) + setClass($ResizeFactor==1.0 ? SynchronizedTilemap : CustomTilemap) @@ -1196,1 +1297,1 @@ - setClass($ResizeFactor==1.0 ? Tilemap : CustomTilemap) + setClass($ResizeFactor==1.0 ? SynchronizedTilemap : CustomTilemap) @@ -1214,1 +1315,1 @@ - newtilemap.update if cls!=Tilemap + newtilemap.update if cls!=SynchronizedTilemap Changed: Compiler @@ -366,1 +366,1 @@ - when "u", "i" + when "u" @@ -368,0 +368,2 @@ + when "i" + record.push(csvInt!(rec,lineno)) @@ -377,0 +379,6 @@ + when "x" + field=csvfield!(rec) + if !field[/^[A-Fa-f0-9]+$/] + raise _INTL("Field {1} is not a hexadecimal number\r\n{2}",field,FileLineData.linereport) + end + record.push(field.hex) @@ -896,0 +904,4 @@ + if j==lines.length && k255 + raise _INTL("The value \"{1}\" must be from 0 through 255 (0x0000-0xFFFF in hex), got a value of {2}\r\n{3}", + value,x,FileLineData.linereport) + end +end + +def pbCheckWord(x,valuename) + if x<0||x>65535 + raise _INTL("The value \"{1}\" must be from 0 through 65535 (0x0000-0xFFFF in hex), got a value of {2}\r\n{3}", + value,x,FileLineData.linereport) + end +end + +def pbCheckSignedByte(x,valuename) + if x<-128||x>127 + raise _INTL("The value \"{1}\" must be from -128 through 127, got a value of {2}\r\n{3}", + value,x,FileLineData.linereport) + end +end + + @@ -924,0 +958,1 @@ +movedata=[] @@ -925,1 +960,38 @@ - record=pbGetCsvRecord(line,lineno,[0,"usss"]) + record=pbGetCsvRecord(line,lineno,[0,"ussxueeuuuxises", + nil,nil,nil,nil,nil,PBTypes,["Physical","Special","Status"], + nil,nil,nil,nil,nil,nil,["Cool","Beauty","Cute","Smart","Tough"],nil + ]) + pbCheckWord(record[3],_INTL("Function code")) + pbCheckByte(record[4],_INTL("Base damage")) + if record[6]==2 && record[4]!=0 + raise _INTL("Status moves must have a base damage of 0, use either Physical or Special\r\n{1}",FileLineData.linereport) + end + if record[6]!=2 && record[4]==0 + print _INTL("Warning: Physical and special moves can't have a base damage of 0, changing to a Status move\r\n{1}",FileLineData.linereport) + record[6]=2 + end + pbCheckByte(record[7],_INTL("Accuracy")) + pbCheckByte(record[8],_INTL("Total PP")) + pbCheckByte(record[9],_INTL("Additional Effect")) + pbCheckWord(record[10],_INTL("Target")) + pbCheckSignedByte(record[11],_INTL("Priority")) + flags=0 + flags|=1 if record[12][/a/] + flags|=2 if record[12][/b/] + flags|=4 if record[12][/c/] + flags|=8 if record[12][/d/] + flags|=16 if record[12][/e/] + flags|=32 if record[12][/f/] + movedata[record[0]]=[ + record[3], + record[4], + record[5], + record[6], + record[7], + record[8], + record[9], + record[10], + record[11], + flags, + record[13] #Contest type + ].pack("vCCCCCCvCCC") @@ -927,1 +999,1 @@ - movedescs[record[0]]=record[3] + movedescs[record[0]]=record[14] @@ -930,-1 +1002,5 @@ +defaultdata=[0,0,0,0,0,0,0,0,0,0,0].pack("vCCCCCCvCCC") +File.open("Data/moves.dat","wb"){|file| +for i in 0...movedata.length + file.write(movedata[i] ? movedata[i] : defaultdata) +end @@ -1634,1 +1712,1 @@ - raise _INTL("Undefined value {1} (section {2}, key {3})",ret,section,key) + raise _INTL("Undefined value {1} (expected one of: {2}) (section {3}, key {4})",ret,enumer,section,key) @@ -1640,1 +1718,1 @@ - raise _INTL("Undefined value {1} (section {2}, key {3})",ret,section,key) + raise _INTL("Undefined value {1} (expected one of: {2}) (section {3}, key {4})",ret,enumer.keys,section,key) Changed: Spriteset_Map @@ -19,10 +19,0 @@ -=begin - flash=@map.data.clone - flash.resize(flash.xsize,flash.ysize,1) - for x in 0...flash.xsize - for y in 0...flash.ysize - flash[x,y]=rand(0x1000) - end - end - @tilemap.flash_data = flash -=end Changed: PokemonMessages @@ -1,1 +1,0 @@ - @@ -3,0 +2,19 @@ + +class Scene_Map + def miniupdateOriginal + loop do + $game_map.update + $game_player.update + $game_system.update + $game_screen.update + unless $game_temp.player_transferring + break + end + transfer_player + if $game_temp.transition_processing + break + end + end + @spriteset.update + end +end @@ -11,1 +29,1 @@ - $scene.update + $scene.miniupdateOriginal @@ -17,0 +35,1 @@ + Changed: PBDebug @@ -12,8 +12,1 @@ - backtrace="" - $!.backtrace.each do |i| - backtrace+="#{i}\r\n" - end - s="Exception: #{$!.class}\r\nMessage: #{$!.message}\r\n#{backtrace}" - s.gsub!(/Section(\d+)/){$RGSS_SCRIPTS[$1.to_i][1]} - print("#{s}\r\nThis exception was logged in errorlog.txt.") - File.open("errorlog.txt", "a+b") { |f| f.write("#{s}\r\n") } + pbPrintException($!) Changed: SpriteWindow @@ -20,1 +20,0 @@ -######################### @@ -59,0 +58,2 @@ + +######################### @@ -1163,2 +1164,136 @@ - def renderColoredLineBrokenText(bitmap,xDst,yDst,normtext,baseColor,shadowColor,maxlines=0) - textchars=normtext.scan(/./m) +def colorToRgb16(color) + ret=(color.red.to_i>>3) + ret|=((color.green.to_i>>3)<<5) + ret|=((color.blue.to_i>>3)<<10) + return sprintf("%04X",ret) +end + +def ctag(color) + ret=(color.red.to_i<<24) + ret|=((color.green.to_i)<<16) + ret|=((color.blue.to_i)<<8) + ret|=((color.alpha.to_i)) + return sprintf("",ret) +end + +def RgbToColor(param) + baseint=param.to_i(16) + if param.length==8 # 32-bit hex + return Color.new( + (baseint>>24)&0xFF, + (baseint>>16)&0xFF, + (baseint>>8)&0xFF, + (baseint)&0xFF + ) + elsif param.length==6 # 24-bit hex + return Color.new( + (baseint>>16)&0xFF, + (baseint>>8)&0xFF, + (baseint)&0xFF + ) + elsif param.length==4 # 16-bit hex + return Color.new( + ((baseint)&0x1F)<<3, + ((baseint>>5)&0x1F)<<3, + ((baseint>>10)&0x1F)<<3 + ) + elsif param.length==1 # Color number + i=param.to_i + return Font.default_color if i>=8 + return [ + Color.new(255, 255, 255, 255), + Color.new(128, 128, 255, 255), + Color.new(255, 128, 128, 255), + Color.new(128, 255, 128, 255), + Color.new(128, 255, 255, 255), + Color.new(255, 128, 255, 255), + Color.new(255, 255, 128, 255), + Color.new(192, 192, 192, 255) + ][i] + else + return Font.default_color + end +end + +def Rgb16ToColor(param) + baseint=param.to_i(16) + return Color.new( + ((baseint)&0x1F)<<3, + ((baseint>>5)&0x1F)<<3, + ((baseint>>10)&0x1F)<<3 + ) +end + +class Color + def inspect + return [self.red.to_i,self.green.to_i,self.blue.to_i].inspect + end +end + +def getLastParam(array,default) + i=array.length-1 + while i>=0 + return array[i] if array[i] + i-=1 + end + return default +end + +=begin + +Formats a string of text and returns an array containing a list +of formatted characters. + +Parameters: +bitmap: Source bitmap. Will be used to determine the default font of the text. +xDst: X coordinate of the text's top left corner. +yDst: Y coordinate of the text's top left corner. +widthDst: Width of the text. Used to determine line breaks. +heightDst: Height of the text. If -1, there is no height restriction. If 1 + or greater, any characters exceeding the height are removed from the returned + list. +newLineBreaks: If true, newline characters will be treated as line breaks. + The default is true. + +Return Values: +A list of formatted characters. Returns an empty array if _bitmap_ is nil +or disposed, or if _widthDst_ is 0 or less or _heightDst_ is 0. + +Formatting Specification: +This function uses the following syntax when formatting the text. + ... - Formats the text in bold. + ... - Formats the text in italics. + ... - Underlines the text. + ... - Draws a strikeout line over the text. + - Right-aligns the text until the next line break. +
- Causes a line break. + ... - Color specification. A total of four formats are supported: + RRGGBBAA, RRGGBB, 16-bit RGB, and Window_Base color numbers. + ... - Color specification where the first half is the base color and + the second half is the shadow color. 16-bit RGB is supported. + ... - Formats the text in the specified font, or Arial + if the font doesn't exist. + ... - Changes the font size to X. + ... - Centers the text. Causes line breaks before and + after the text. + ... - Left-aligns the text. Causes line breaks before and + after the text. + ... - Right-aligns the text. Causes line breaks before and + after the text. + - Displays the icon X (in Graphics/Icons/). +In addition, the syntax supports the following: +' - Converted to "'". +< - Converted to "<". +> - Converted to ">". +& - Converted to "&". +" - Converted to double quotation mark. + + +To draw the characters, pass the returned array to the +_drawFormattedChars_ function. +=end +def getFormattedText( + bitmap,xDst,yDst,widthDst,heightDst,text,newlineBreaks=true) + if !bitmap||bitmap.disposed?||widthDst<=0||heightDst==0 + return [] + end @@ -1167,47 +1302,330 @@ - totalwidth=0 - numtextchars=textchars.length - base=!baseColor ? Color.new(12*8,12*8,12*8) : baseColor.clone - shadow=!shadowColor ? Color.new(26*8,26*8,25*8) : shadowColor.clone - i=0; loop do break unless i>5)&0x1F)<<3, - ((baseint>>10)&0x1F)<<3, - 255 - ) - shadow.set( - (shadowint&0x1F)<<3, - ((shadowint>>5)&0x1F)<<3, - ((shadowint>>10)&0x1F)<<3, - 255 - ) - i+=11 - next - end - if textchars[i]=="\n" - y += 1 - x = 0 - i+=1 - next - end - width=bitmap.text_size(textchars[i]).width - textx=x+xDst - texty=(32*y)+yDst - if shadow - bitmap.font.color=shadow - pbDrawShadow(bitmap,textx,texty,width+2,32,textchars[i]) - end - bitmap.font.color=base - bitmap.draw_text(textx,texty,width+2,32,textchars[i]) - totalwidth+=width - x+=width - i+=1 - end - end + characters=[] + charactersInternal=[] + textchunks=[] + controls=[] + charsonline=0 + while text[/<(\/?)([Cc]|[Cc][2]|[Ff][Nn]|[Bb][Rr]|[Ff][Ss]|[Ii]|[Bb]|[Uu]|[Ss]|[Ii][Cc][Oo][Nn]|[Aa][Cc]|[Aa][Rr]|[Aa][Ll]|[Rr])(\s*\=\s*([^>]*))?>/] + textchunks.push($~.pre_match) + if $~[3] + controls.push([$~[2].downcase,$~[4],-1,$~[1]=="/" ? true : false]) + else + controls.push([$~[2].downcase,"",-1,$~[1]=="/" ? true : false]) + end + text=$~.post_match + end + textchunks.push(text) + for chunk in textchunks + chunk.gsub!(/</,"<") + chunk.gsub!(/>/,">") + chunk.gsub!(/'/,"'") + chunk.gsub!(/"/,"\"") + chunk.gsub!(/&/,"&") + end + textlen=0 + for i in 0...controls.length + textlen+=textchunks[i].scan(/./m).length + controls[i][2]=textlen + end + text=textchunks.join("") + textchars=text.scan(/./m) + colorstack=[] + boldcount=0 + italiccount=0 + underlinecount=0 + strikecount=0 + rightalign=0 + oldfont=bitmap.font.clone + fontname=bitmap.font.name.clone + fontsize=bitmap.font.size + defaultcolors=[bitmap.font.color.clone,nil] + if fontname.is_a?(Array) + fontname.push("Arial") + else + fontname=[fontname,"Arial"] + end + alignstack=[] + lastword=[0,0] # position of last word + hadspace=false + hadnonspace=false + position=0;while position0 && nextline==0 + else + alignstack.pop; + nextline=1 if x>0 && nextline==0 + end + elsif control=="al" # Left align + if !endtag + alignstack.push(0) + nextline=1 if x>0 && nextline==0 + else + alignstack.pop; + nextline=1 if x>0 && nextline==0 + end + elsif control=="ac" # Center align + if !endtag + alignstack.push(2) + nextline=1 if x>0 && nextline==0 + else + alignstack.pop; + nextline=1 if x>0 && nextline==0 + end + elsif control=="icon" # Icon + if !endtag + param=param.sub(/\s+$/,"") + graphic="Graphics/Icons/#{param}" + end + elsif control=="br" # Line break + if !endtag + nextline+=1 + end + elsif control=="r" # Right align this line + if !endtag + x=0 + rightalign=1;lastword=[characters.length,x] + end + end + controls[i]=nil + end + end + bitmap.font.bold=(boldcount>0) + bitmap.font.italic=(italiccount>0) + if graphic + tempgraphic=Bitmap.new(graphic) + width=tempgraphic.width+8 + yStart=4 + xStart=[(32-tempgraphic.height)/2,0].max + tempgraphic.dispose + else + yStart=0 + xStart=0 + width=bitmap.text_size(textchars[position]).width + end + if rightalign==1 && nextline==0 + alignment=1 + else + alignment=getLastParam(alignstack,0) + end + nextline.times do + characters.push(["\n",x,y*32+yDst,0,32, + false,false,false,defaultcolors[0],defaultcolors[1],false,false,"",8]) + charactersInternal.push([alignment,y,0]) + y+=1; + x=0; + rightalign=0; + lastword=[characters.length,x] + hadspace=false + hadnonspace=false + end + if textchars[position]=="\n" + if newlineBreaks + if nextline==0 + characters.push(["\n",x,y*32+yDst,0,32, + false,false,false,defaultcolors[0],defaultcolors[1],false,false,"",8]) + charactersInternal.push([alignment,y,0]) + y+=1 + x=0 + end + rightalign=0 + hadspace=true + hadnonspace=false + position+=1 + next + else + textchars[position]=" " + if !graphic + width=bitmap.text_size(textchars[position]).width + end + end + end + isspace=(textchars[position][/\s/]) ? true : false + if hadspace && !isspace + # set last word to here + lastword[0]=characters.length + lastword[1]=x + hadspace=false + hadnonspace=true + elsif isspace + hadspace=true + end + textx=x+xStart + texty=(32*y)+yDst+yStart + colors=getLastParam(colorstack,defaultcolors) + oldx=x + # Push character, textx will be calculated later + if heightDst<0 || texty+yStart0),(italiccount>0),colors[0],colors[1], + (underlinecount>0),(strikecount>0),fontname,fontsize]) + charactersInternal.push([alignment,y,xStart]) + end + x+=width + if x+2>widthDst && lastword[1]!=0 && (!hadnonspace || !hadspace) + characters.insert(lastword[0],["\n",x,y*32+yDst,0,32, + false,false,false,defaultcolors[0],defaultcolors[1],false,false,"",8]) + charactersInternal.insert(lastword[0],[alignment,y,0]) + lastword[0]+=1 + y+=1 + x=0 + for i in lastword[0]...characters.length + characters[i][2]+=32 + charwidth=characters[i][3]-2 + characters[i][1]=x+charactersInternal[i][2] + x+=charwidth + end + lastword[1]=0 + end + position+=1 if !graphic + end + # Eliminate spaces before newlines and pause character + firstspace=-1 + for i in 0...characters.length + if characters[i][5]!=false # If not a character + firstspace=-1 + elsif (characters[i][0]=="\n" || characters[i][0]=="\1") && + firstspace>=0 + for j in firstspace...i + characters[j]=nil + end + firstspace=-1 + elsif characters[i][0][/[ \r\t]/] && firstspace<0 + firstspace=i + else + firstspace=-1 + end + end + if firstspace>0 + for j in firstspace...characters.length + characters[j]=nil + end + end + characters.compact! + # Calculate Xs based on alignment + # First, find all text runs with + # the same alignment on the same line + totalwidth=0 + widthblocks=[] + lastalign=0 + lasty=0 + runstart=0 + for i in 0...characters.length + c=characters[i] + if i>0 && (charactersInternal[i][0]!=lastalign || + charactersInternal[i][1]!=lasty) + # Found end of run + widthblocks.push([runstart,i,lastalign,totalwidth]) + runstart=i + totalwidth=0 + end + lastalign=charactersInternal[i][0] + lasty=charactersInternal[i][1] + totalwidth+=c[3]-2 + end + widthblocks.push([runstart,characters.length,lastalign,totalwidth]) + # Now, based on the text runs found, + # recalculate Xs + for block in widthblocks + next if block[0]>=block[1] + for i in block[0]...block[1] + case block[2] + when 1;characters[i][1]=xDst+(widthDst-block[3]-4)+characters[i][1] + when 2;characters[i][1]=xDst+((widthDst/2)-(block[3]/2))+characters[i][1] + else;characters[i][1]=xDst+characters[i][1] + end + end + end + # Remove all characters with Y + # greater or equal to _heightDst_ + if heightDst>=0 + for i in 0...characters.length + if characters[i][2]>=heightDst + characters[i]=nil + end + end + characters.compact! + end + bitmap.font=oldfont + return characters +end + +def drawFormattedChars(bitmap,chars) + if chars.length==0||!bitmap||bitmap.disposed? + return + end + oldfont=bitmap.font.clone + for ch in chars + if ch[5] # If a graphic + graphic=Bitmap.new(ch[0]) + bitmap.blt(ch[1], ch[2], graphic,graphic.rect,ch[8].alpha) + graphic.dispose + elsif ch[0]!="\n" + bitmap.font.bold=ch[6] + bitmap.font.italic=ch[7] + if bitmap.font.size!=ch[13] + bitmap.font.size=ch[13] + end + if bitmap.font.name!=ch[12] + bitmap.font.name=ch[12] + end + if ch[9] # shadow + bitmap.font.color=ch[9] + pbDrawShadow(bitmap,ch[1],ch[2],ch[3],ch[4],ch[0]) + end + bitmap.font.color=ch[8] + bitmap.draw_text(ch[1],ch[2],ch[3],ch[4],ch[0]) + if ch[10] # underline + bitmap.fill_rect(ch[1],ch[2]+32-[(32-bitmap.font.size)/2,0].max-2, + ch[3]-2,2,ch[8]) + end + if ch[11] # strikeout + bitmap.fill_rect(ch[1],ch[2]+16,ch[3]-2,2,ch[8]) + end + end + end + bitmap.font=oldfont +end @@ -1220,5 +1638,19 @@ -def drawColoredTextEx(bitmap,x,y,width,numlines,text, - baseColor=nil,shadowColor=nil) - normtext=getLineBrokenTextEx(bitmap,text,width,nil,true) - renderColoredLineBrokenText(bitmap,x,y,normtext,baseColor,shadowColor,numlines) -end +def drawColoredTextEx(bitmap,x,y,width,text,baseColor=nil,shadowColor=nil) + base=!baseColor ? Color.new(12*8,12*8,12*8) : baseColor.clone + shadow=!shadowColor ? Color.new(26*8,26*8,25*8) : shadowColor.clone + text.gsub!(/&/,"&") + text.gsub!(//,">") + text=text.gsub(/\\\[([A-Fa-f0-9]{8,8})\]/){ "" } + text=""+text + text.gsub!(/\\\\/,"\\") + chars=getFormattedText(bitmap,x,y,width,-1,text) + drawFormattedChars(bitmap,chars) +end + +def drawFormattedTextOnWindow(window,text) + chars=getFormattedText( + window.contents,0,0,window.width-32,window.height-32,text) + drawFormattedChars(window.contents,chars) +end + @@ -1524,2 +1956,2 @@ - @cursoropacity-=3 - @cursorblink=1 if @cursoropacity<=180 + @cursoropacity-=8 + @cursorblink=1 if @cursoropacity<=128 @@ -1527,1 +1959,1 @@ - @cursoropacity+=3 + @cursoropacity+=8 @@ -1531,1 +1963,1 @@ - @cursoropacity=180 + @cursoropacity=128 @@ -2344,1 +2776,1 @@ - @frameskip=[3,2,1][pbGetSystemTextSpeed] + @frameskip=[3,2,1,-2][pbGetSystemTextSpeed] @@ -2431,1 +2863,1 @@ - numchars=@curchar if self.letterbyletter + numchars=[@curchar,@numtextchars].min if self.letterbyletter @@ -2460,0 +2892,8 @@ + def curcharSkip(skip) + skip.times do + @curchar+=1 + break if @textchars[@curchar]=="\n" || + @textchars[@curchar]=="\1" || + @textchars[@curchar]==nil + end + end @@ -2464,0 +2904,1 @@ + curcharskip=@frameskip<0 ? @frameskip.abs : 1 @@ -2467,2 +2908,2 @@ - if @realframes==@frameskip - @curchar+=1 + if @realframes==@frameskip || @frameskip<0 + curcharSkip(curcharskip) @@ -2480,2 +2921,2 @@ - if @realframes==@frameskip - @curchar+=1 + if @realframes==@frameskip || @frameskip<0 + curcharSkip(curcharskip) @@ -2489,2 +2930,2 @@ - if @realframes==@frameskip - @curchar+=1 + if @realframes==@frameskip || @frameskip<0 + curcharSkip(curcharskip) @@ -2497,2 +2938,2 @@ - if @realframes==@frameskip - @curchar+=1 + if @realframes==@frameskip || @frameskip<0 + curcharSkip(curcharskip) Changed: PokemonSystem @@ -60,2 +60,7 @@ - if $Trainer - end + playingbgm=$game_system.playing_bgm + $game_system.bgm_fade(1.0) + if playingbgm.name!="022-Field05.mid" + $game_system.bgm_play("022-Field05.mid") + else + $game_system.bgm_play("018-Field01.mid") + end @@ -70,1 +75,2 @@ - def self.update + end + def self.update @@ -78,1 +84,0 @@ - end Changed: PokemonSummary @@ -98,2 +98,1 @@ - @sprites["pokemon"].x=16 - @sprites["pokemon"].y=64 + pbPositionPokemonSprite(@sprites["pokemon"],16,64) @@ -175,2 +174,2 @@ - drawColoredTextEx(overlay,176,64,300,0,_INTL("\\[7FFF318C]OT/\\[7F285E20]{1}",pokemon.ot)) - drawColoredTextEx(overlay,176,228,300,0,_INTL("\\[043C3AFF]{1}\\[0000675A] nature",naturename)) + drawColoredTextEx(overlay,176,64,300,_INTL("\\[7FFF318C]OT/\\[7F285E20]{1}",pokemon.ot)) + drawColoredTextEx(overlay,176,228,300,_INTL("\\[043C3AFF]{1}\\[0000675A] nature",naturename)) @@ -213,3 +212,3 @@ - drawColoredTextEx(overlay,176,64,300,0,_INTL("\\[7FFF318C]OT/?????")) - drawColoredTextEx(overlay,176,144,300,0,_INTL("\\[0000675A]{1}",eggstate)) - drawColoredTextEx(overlay,176,228,300,0,_INTL("\\[0000675A]Pokemon Egg")) + drawColoredTextEx(overlay,176,64,300,_INTL("\\[7FFF318C]OT/?????")) + drawColoredTextEx(overlay,176,144,300,_INTL("\\[0000675A]{1}",eggstate)) + drawColoredTextEx(overlay,176,228,300,_INTL("\\[0000675A]Pokemon Egg")) @@ -648,0 +647,1 @@ + pbPositionPokemonSprite(@sprites["pokemon"],16,64) @@ -659,0 +659,1 @@ + pbPositionPokemonSprite(@sprites["pokemon"],16,64) Changed: PokemonUtilities @@ -201,0 +201,10 @@ + +def pbPositionPokemonSprite(sprite,left,top) + if sprite.bitmap && !sprite.bitmap.disposed? + sprite.x=left+(sprite.bitmap.width-128)/2 + sprite.y=top+(sprite.bitmap.height-128)/2 + else + sprite.x=left + sprite.y=top + end +end Changed: PokeBattle_Battle @@ -2137,1 +2137,2 @@ - if thismove.id==PBMoves::CURSE && !@battlers[i].pbHasType?(PBTypes::GHOST) + if thismove.function==0x6D && # CURSE + !@battlers[i].pbHasType?(PBTypes::GHOST) Changed: PokemonItems @@ -151,1 +151,1 @@ - ret=pbRestorePP(pokemon.move.pp) + ret=pbRestorePP(pokemon,move,pp) Changed: PokeBattle_Battler @@ -1004,1 +1004,2 @@ - (move.id==PBMoves::SNORE || move.id==PBMoves::SLEEPTALK) + (move.function==0x5C || # SNORE + move.function==0x61) # SLEEP TALK @@ -1060,1 +1061,2 @@ - if (target.status!=PBStatuses::SLEEP || target.effects[PBEffects::Substitute]>0) && thismove.id==PBMoves::DREAMEATER + if (target.status!=PBStatuses::SLEEP || target.effects[PBEffects::Substitute]>0) && + thismove.function==0x08 # DREAM EATER @@ -1064,1 +1066,1 @@ - if thismove.id==PBMoves::MEMENTO + if thismove.function==0xA8 # MEMENTO @@ -1071,1 +1073,2 @@ - if thismove.id==PBMoves::SPITUP && user.effects[PBEffects::Stockpile]==0 + if thismove.function==0xA1 && user.effects[PBEffects::Stockpile]==0 + # SPIT UP @@ -1079,1 +1082,1 @@ - if thismove.id==PBMoves::RAGE + if thismove.function==0x51 # RAGE @@ -1089,1 +1092,1 @@ - thismove.id!=PBMoves::BEATUP && + thismove.function!=0x9A && # BEAT UP @@ -1091,2 +1094,1 @@ - thismove.id!=PBMoves::FUTURESIGHT && - thismove.id!=PBMoves::DOOMDESIRE + thismove.function!=0x94 # FUTURE SIGHT @@ -1122,1 +1124,2 @@ - if target.effects[PBEffects::TwoTurnAttack]==PBMoves::FLY || target.effects[PBEffects::TwoTurnAttack]==PBMoves::BOUNCE + if target.effects[PBEffects::TwoTurnAttack]==PBMoves::FLY || + target.effects[PBEffects::TwoTurnAttack]==PBMoves::BOUNCE @@ -1132,1 +1135,1 @@ - elsif thismove.id==PBMoves::LEECHSEED + elsif thismove.function==0x54 # LEECH SEED @@ -1182,1 +1185,1 @@ - if thismove.id==PBMoves::JUMPKICK||thismove.id==PBMoves::HIJUMPKICK + if thismove.function==0x2D # JUMP KICK @@ -1198,3 +1201,3 @@ - user.effects[PBEffects::Rollout]=0 if thismove.id==PBMoves::ROLLOUT || thismove.id==PBMoves::ICEBALL - user.effects[PBEffects::FuryCutter]=0 if thismove.id==PBMoves::FURYCUTTER - user.effects[PBEffects::Stockpile]=0 if thismove.id==PBMoves::SPITUP + user.effects[PBEffects::Rollout]=0 if thismove.function==0x75 # ROLLOUT + user.effects[PBEffects::FuryCutter]=0 if thismove.function==0x77 # FURY CUTTER + user.effects[PBEffects::Stockpile]=0 if thismove.function==0xA1 # SPIT UP @@ -1205,1 +1208,1 @@ - if thismove.id==PBMoves::ROLLOUT || thismove.id==PBMoves::ICEBALL + if thismove.function==0x75 # ROLLOUT @@ -1210,1 +1213,1 @@ - if thismove.id==PBMoves::FURYCUTTER + if thismove.function==0x77 # FURY CUTTER @@ -1215,1 +1218,1 @@ - if user.hp<=0 && thismove.id!=PBMoves::EXPLOSION && thismove.id!=PBMoves::SELFDESTRUCT + if user.hp<=0 && thismove.function!=0x07 # SELFDESTRUCT @@ -1249,1 +1252,1 @@ - thismove.id!=PBMoves::HIDDENPOWER && + thismove.function!=0x87 && # HIDDEN POWER @@ -1260,1 +1263,2 @@ - if thismove!=PBMoves::BEATUP && target.effects[PBEffects::DestinyBond] && target.hp<=0 && user.hp>0 + if thismove.function!=0x9A && # BEAT UP + target.effects[PBEffects::DestinyBond] && target.hp<=0 && user.hp>0 @@ -1288,1 +1292,1 @@ - if !pbSuccessCheck(thismove,user,target,i==0||thismove.id==PBMoves::TRIPLEKICK) + if !pbSuccessCheck(thismove,user,target,i==0||thismove.function==0x68) # TRIPLE KICK @@ -1416,2 +1420,1 @@ - selffaint=thismove.id==PBMoves::EXPLOSION|| - thismove.id==PBMoves::SELFDESTRUCT + selffaint=(thismove.function==0x07) # SELFDESTRUCT @@ -1448,1 +1451,1 @@ - if thismove.id==PBMoves::BEATUP + if thismove.function==0x9A # BEATUP @@ -1459,1 +1462,3 @@ - if thismove.id==PBMoves::MIMIC||thismove.id==PBMoves::SKETCH||thismove.id==PBMoves::TRANSFORM + if thismove.function==0x52|| # MIMIC + thismove.function==0x5F|| # SKETCH + thismove.function==0x39 # TRANSFORM @@ -1560,2 +1565,2 @@ - if thismove.id!=PBMoves::SNORE && - thismove.id!=PBMoves::SLEEPTALK + if thismove.function!=0x5C && # SNORE + thismove.function!=0x61 # SLEEP TALK @@ -1566,3 +1571,1 @@ - if self.status==PBStatuses::FROZEN && - thismove.id!=PBMoves::FLAMEWHEEL && - thismove.id!=PBMoves::SACREDFIRE + if self.status==PBStatuses::FROZEN && thismove.function!=0x7D # FLAME WHEEL @@ -1650,3 +1653,1 @@ - if status==PBStatuses::FROZEN && - (thismove.id==PBMoves::FLAMEWHEEL || - thismove.id==PBMoves::SACREDFIRE) + if status==PBStatuses::FROZEN && thismove.function==0x7D # FLAME WHEEL Changed: PokemonStorage @@ -1612,1 +1612,4 @@ - overlay.blt(8*2,16*2,pkmnbitmap,Rect.new(0,0,128,128)) + overlay.blt( + 16-(pkmnbitmap.width-128)/2, + 32-(pkmnbitmap.height-128)/2, + pkmnbitmap,pkmnbitmap.rect) Changed: PokemonBugContest @@ -333,3 +333,2 @@ - break - end - if !$game_player.move_route_forcing && + # do nothing + elsif !$game_player.move_route_forcing && Added: RandomMaps Changed: Scene_Movie @@ -13,3 +13,0 @@ -########################################################### -########################################################### - Deleted: Changed: PokemonOption Changed: PokemonDayCare Changed: PokemonPokedex Changed: PBTypes Changed: PokeBattle_Effects Changed: PBMove Changed: PokeBattle_MoveEffects Changed: PokeBattle_Move Changed: RTP and Registry Deleted: Module: File Test Deleted: RPGCache Changed: PokemonPhone Changed: Resolution* Changed: EventScene Changed: PokemonField Changed: PokeBattle_ActualScene Changed: BitmapCache Changed: PokeBattle_AI Changed: WindowAndTilemap Changed: Compiler Changed: Spriteset_Map Changed: PokemonMessages Changed: PBDebug Changed: SpriteWindow Changed: PokemonSystem Changed: PokemonSummary Changed: PokemonUtilities Changed: PokeBattle_Battle Changed: PokemonItems Changed: PokeBattle_Battler Changed: PokemonStorage Changed: PokemonBugContest Added: RandomMaps Changed: Scene_Movie