Added: Changed: PokemonSafari @@ -89,12 +89,1 @@ - genwildpoke=PokeBattle_Pokemon.new(species,level,$Trainer) - dexdata=pbOpenDexData - itemrnd=rand(100) - if itemrnd<50 - pbDexDataOffset(dexdata,species,48) - genwildpoke.item=dexdata.fgetw - elsif itemrnd<55 - pbDexDataOffset(dexdata,species,50) - genwildpoke.item=dexdata.fgetw - end - dexdata.close - wildpoke=[genwildpoke] + genwildpoke=pbGenerateWildPokemon(species,level) @@ -102,1 +91,1 @@ - battle=PokeBattle_SafariZone.new(scene,$Trainer,wildpoke) + battle=PokeBattle_SafariZone.new(scene,$Trainer,[genwildpoke]) @@ -107,2 +96,0 @@ - $game_system.bgm_stop - $game_system.bgs_stop @@ -110,1 +97,4 @@ - restorebgm=true + playingBGS=$game_system.getPlayingBGS + playingBGM=$game_system.getPlayingBGM + $game_system.bgm_pause + $game_system.bgs_pause @@ -116,4 +106,4 @@ - if restorebgm - $game_system.bgm_play(playingBGM) - $game_system.bgs_play(playingBGS) - end + $game_system.bgm_resume(playingBGM) + $game_system.bgs_resume(playingBGS) + $PokemonGlobal.nextBattleBGM=nil + $PokemonGlobal.nextBattleME=nil @@ -129,2 +119,0 @@ - $PokemonGlobal.nextBattleBGM=nil - $PokemonGlobal.nextBattleME=nil Changed: PokemonBerryTag @@ -2,1 +2,2 @@ -begin +begin + @@ -11,1 +12,1 @@ - @viewport=Viewport.new(0,0,480,320) + @viewport=Viewport.new(0,0,Graphics.width,Graphics.height) @@ -18,1 +19,1 @@ - @sprites["overlay"].bitmap=Bitmap.new(480,320) + @sprites["overlay"].bitmap=Bitmap.new(Graphics.width,Graphics.height) @@ -94,7 +95,13 @@ - -rescue Exception -if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" -raise $! -else -end -end + + +rescue Exception + +if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" + +raise $! + +else + +end + +end Changed: PokemonOption @@ -59,1 +59,2 @@ - pbDrawShadow(self.contents,16,ypos,192,32,optionname) + optionwidth=(Graphics.width-96)/2 + pbDrawShadow(self.contents,16,ypos,optionwidth,32,optionname) @@ -61,1 +62,1 @@ - self.contents.draw_text(16,ypos,192,32,optionname) + self.contents.draw_text(16,ypos,optionwidth,32,optionname) @@ -69,1 +70,1 @@ - spacing=(192-totalwidth)/(@options[i].values.length-1) + spacing=(optionwidth-totalwidth)/(@options[i].values.length-1) @@ -71,1 +72,1 @@ - xpos=208 + xpos=16+optionwidth @@ -75,1 +76,1 @@ - pbDrawShadow(self.contents,xpos,ypos,192,32,value) + pbDrawShadow(self.contents,xpos,ypos,optionwidth,32,value) @@ -77,1 +78,1 @@ - self.contents.draw_text(xpos,ypos,192,32,value) + self.contents.draw_text(xpos,ypos,optionwidth,32,value) @@ -84,1 +85,1 @@ - pbDrawShadow(self.contents,208,ypos,192,32,optionname) + pbDrawShadow(self.contents,optionwidth+16,ypos,optionwidth,32,optionname) @@ -86,1 +87,1 @@ - self.contents.draw_text(208,ypos,192,32,optionname) + self.contents.draw_text(optionwidth+16,ypos,optionwidth,32,optionname) @@ -90,1 +91,1 @@ - xpos=208 + xpos=16+optionwidth @@ -92,1 +93,1 @@ - pbDrawShadow(self.contents,xpos,ypos,192,32,value) + pbDrawShadow(self.contents,xpos,ypos,optionwidth,32,value) @@ -94,1 +95,1 @@ - self.contents.draw_text(xpos,ypos,192,32,value) + self.contents.draw_text(xpos,ypos,optionwidth,32,value) @@ -97,1 +98,1 @@ - xpos=208 + xpos=16+optionwidth @@ -99,1 +100,1 @@ - pbDrawShadow(self.contents,xpos,ypos,192,32,value) + pbDrawShadow(self.contents,xpos,ypos,optionwidth,32,value) @@ -101,1 +102,1 @@ - self.contents.draw_text(xpos,ypos,192,32,value) + self.contents.draw_text(xpos,ypos,optionwidth,32,value) @@ -223,1 +224,1 @@ - @viewport=Viewport.new(0,0,480,320) + @viewport=Viewport.new(0,0,Graphics.width,Graphics.height) @@ -225,8 +226,2 @@ - @sprites["title"]=Window_SimpleTextPokemon.new(_INTL("OPTION")) - @sprites["title"].x=0 - @sprites["title"].y=0 - @sprites["title"].width=480 - @sprites["title"].height=64 - @sprites["title"].visible=true - @sprites["title"].letterbyletter=false - @sprites["title"].viewport=@viewport + @sprites["title"]=Window_SimpleTextPokemon.newWithSize( + _INTL("OPTION"),0,0,Graphics.width,64,@viewport) @@ -243,1 +238,3 @@ - @sprites["option"]=Window_PokemonOption.new(@PokemonOptions,0,64,480,256) + @sprites["option"]=Window_PokemonOption.new(@PokemonOptions,0, + @sprites["title"].height,Graphics.width, + Graphics.height-@sprites["title"].height) Changed: PokemonAnimEditor @@ -1,13 +1,1 @@ -#33192567 -begin - -def screen_to_client(x, y) - return nil unless x and y - screenToClient = Win32API.new('user32', 'ScreenToClient', %w(l p), 'i') - pos = [x, y].pack('ll') - if screenToClient.call(Win32API.pbFindRgssWindow, pos) != 0 - return pos.unpack('ll') - else - return nil - end -end + @@ -28,0 +16,10 @@ + def screen_to_client(x, y) + return nil unless x and y + screenToClient = Win32API.new('user32', 'ScreenToClient', %w(l p), 'i') + pos = [x, y].pack('ll') + if screenToClient.call(Win32API.pbFindRgssWindow, pos) != 0 + return pos.unpack('ll') + else + return nil + end + end @@ -50,6 +48,0 @@ - end -end - - -class Window_CommandPokemon - def disable_item(index) @@ -1425,1 +1417,1 @@ - Input.updateex + Input.update @@ -1453,1 +1445,1 @@ - Input.updateex + Input.update @@ -1477,1 +1469,1 @@ - Input.updateex + Input.update @@ -1512,1 +1504,1 @@ - Input.updateex + Input.update @@ -1597,1 +1589,1 @@ - Input.updateex + Input.update @@ -1660,1 +1652,1 @@ - Input.updateex + Input.update @@ -1721,1 +1713,1 @@ - Input.updateex + Input.update @@ -1748,1 +1740,1 @@ - Input.updateex + Input.update @@ -1781,1 +1773,1 @@ - Input.updateex + Input.update @@ -1868,1 +1860,1 @@ - Input.updateex + Input.update @@ -1936,1 +1928,1 @@ - Input.updateex + Input.update @@ -2019,1 +2011,1 @@ - Input.updateex + Input.update @@ -2038,1 +2030,1 @@ - Input.updateex + Input.update @@ -2083,1 +2075,1 @@ - Input.updateex + Input.update @@ -2110,1 +2102,1 @@ - Input.updateex + Input.update @@ -2145,1 +2137,1 @@ - Input.updateex + Input.update @@ -2250,1 +2242,1 @@ - Input.updateex + Input.update @@ -2296,1 +2288,1 @@ - Input.updateex + Input.update @@ -2366,1 +2358,1 @@ - Input.updateex + Input.update @@ -2410,1 +2402,1 @@ - Input.updateex + Input.update @@ -2430,1 +2422,1 @@ -class AnimationNameWindow < Window_SimpleTextPokemon +class AnimationNameWindow @@ -2433,2 +2425,3 @@ - super(_INTL("Name: {1}",@canvas.animation.name),240,416,400,64) - end + @window=Window_SimpleTextPokemon.newWithSize(_INTL("Name: {1}",@canvas.animation.name),240,416,400,64) + end + def viewport=(value); @window.viewport=value; end @@ -2436,3 +2429,6 @@ - self.text=_INTL("Name: {1}",@canvas.animation.name) - super - end + @window.text=_INTL("Name: {1}",@canvas.animation.name) + @window.update + end + def refresh; @window.refresh; end + def dispose; @window.dispose; end + def disposed; @window.disposed?; end @@ -2583,1 +2579,1 @@ - Input.updateex + Input.update @@ -2741,12 +2737,0 @@ - -rescue Exception - -if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" - -raise $! - -else - -end - -end Changed: PokemonMenu @@ -10,1 +10,1 @@ - cmdwindow.x=480-cmdwindow.width + cmdwindow.x=Graphics.width-cmdwindow.width @@ -32,1 +32,1 @@ - @sprites["infowindow"].resizeToFit(text,320) + @sprites["infowindow"].resizeToFit(text,Graphics.height) @@ -39,1 +39,1 @@ - @sprites["helpwindow"].resizeToFit(text,320) + @sprites["helpwindow"].resizeToFit(text,Graphics.height) @@ -47,1 +47,1 @@ - @viewport=Viewport.new(0,0,480,360) + @viewport=Viewport.new(0,0,Graphics.width,Graphics.height) Changed: PBIntl @@ -12,0 +12,2 @@ + Graphics.update +begin @@ -112,0 +114,2 @@ +rescue Hangup +end Changed: PokemonPhone @@ -329,1 +329,1 @@ - @viewport=Viewport.new(0,0,480,320) + @viewport=Viewport.new(0,0,Graphics.width,Graphics.height) @@ -331,4 +331,6 @@ - @sprites["list"]=Window_CommandPokemon.newEmpty(160,0,320,256,@viewport) - @sprites["icon"]=IconWindow.new(0,160,160,160,@viewport) - @sprites["header"]=Window_SimpleTextPokemon.newWithSize(_INTL("PHONE"),0,0,160,64,@viewport) - @sprites["bottom"]=Window_SimpleTextPokemon.newWithSize(_INTL(""),160,256,320,64,@viewport) + @sprites["list"]=Window_CommandPokemon.newEmpty(160,0,Graphics.width-160,Graphics.height-64,@viewport) + @sprites["icon"]=IconWindow.new(0,Graphics.height-160,160,160,@viewport) + @sprites["header"]=Window_SimpleTextPokemon.newWithSize(_INTL("PHONE"), + 0,0,160,64,@viewport) + @sprites["bottom"]=Window_SimpleTextPokemon.newWithSize(_INTL(""), + 160,Graphics.height-64,Graphics.width-160,64,@viewport) Changed: Resolution* @@ -31,1 +31,0 @@ -if Graphics.height / 32.0 < self.height - 1 @@ -33,3 +32,0 @@ -else - self.display_y+=distance -end @@ -49,1 +45,0 @@ -if Graphics.width / 32.0 < self.width - 1 @@ -51,3 +46,0 @@ -else - self.display_x+=distance -end Changed: EventScene @@ -672,3 +672,3 @@ - addLabel(52*2,24,360,_INTL("Moves the main character. Also used to choose various data headings.")), - addLabel(52*2,(24+48)*2,360,_INTL("Used to confirm a choice, check things, and talk to people.")), - addLabel(52*2,(24+48+32)*2,360,_INTL("Used to exit, cancel a choice or mode, and open the menu.")), + addLabel(52*2,24,Graphics.width*3/4,_INTL("Moves the main character. Also used to choose various data headings.")), + addLabel(52*2,(24+48)*2,Graphics.width*3/4,_INTL("Used to confirm a choice, check things, and talk to people.")), + addLabel(52*2,(24+48+32)*2,Graphics.width*3/4,_INTL("Used to exit, cancel a choice or mode, and open the menu.")), @@ -676,1 +676,1 @@ - addLabel(52*2,(24+64)*2,360,_INTL("As you advance in the game, you can use this key to run while moving.")) + addLabel(52*2,(24+64)*2,Graphics.width*3/4,_INTL("As you advance in the game, you can use this key to run while moving.")) @@ -725,1 +725,1 @@ -end +end Changed: PerspectiveTilemap @@ -55,101 +55,0 @@ -end - -class TileDrawingHelper - Autotiles = [ - [ [27, 28, 33, 34], [ 5, 28, 33, 34], [27, 6, 33, 34], [ 5, 6, 33, 34], - [27, 28, 33, 12], [ 5, 28, 33, 12], [27, 6, 33, 12], [ 5, 6, 33, 12] ], - [ [27, 28, 11, 34], [ 5, 28, 11, 34], [27, 6, 11, 34], [ 5, 6, 11, 34], - [27, 28, 11, 12], [ 5, 28, 11, 12], [27, 6, 11, 12], [ 5, 6, 11, 12] ], - [ [25, 26, 31, 32], [25, 6, 31, 32], [25, 26, 31, 12], [25, 6, 31, 12], - [15, 16, 21, 22], [15, 16, 21, 12], [15, 16, 11, 22], [15, 16, 11, 12] ], - [ [29, 30, 35, 36], [29, 30, 11, 36], [ 5, 30, 35, 36], [ 5, 30, 11, 36], - [39, 40, 45, 46], [ 5, 40, 45, 46], [39, 6, 45, 46], [ 5, 6, 45, 46] ], - [ [25, 30, 31, 36], [15, 16, 45, 46], [13, 14, 19, 20], [13, 14, 19, 12], - [17, 18, 23, 24], [17, 18, 11, 24], [41, 42, 47, 48], [ 5, 42, 47, 48] ], - [ [37, 38, 43, 44], [37, 6, 43, 44], [13, 18, 19, 24], [13, 14, 43, 44], - [37, 42, 43, 48], [17, 18, 47, 48], [13, 18, 43, 48], [ 1, 2, 7, 8] ] - ] - - # converts neighbors returned from tableNeighbors to tile indexes - NeighborsToTiles=[ - 46, 44, 46, 44, 43, 41, 43, 40, 46, 44, 46, 44, 43, 41, 43, 40, - 42, 32, 42, 32, 35, 19, 35, 18, 42, 32, 42, 32, 34, 17, 34, 16, - 46, 44, 46, 44, 43, 41, 43, 40, 46, 44, 46, 44, 43, 41, 43, 40, - 42, 32, 42, 32, 35, 19, 35, 18, 42, 32, 42, 32, 34, 17, 34, 16, - 45, 39, 45, 39, 33, 31, 33, 29, 45, 39, 45, 39, 33, 31, 33, 29, - 37, 27, 37, 27, 23, 15, 23, 13, 37, 27, 37, 27, 22, 11, 22, 9, - 45, 39, 45, 39, 33, 31, 33, 29, 45, 39, 45, 39, 33, 31, 33, 29, - 36, 26, 36, 26, 21, 7, 21, 5, 36, 26, 36, 26, 20, 3, 20, 1, 46, - 44, 46, 44, 43, 41, 43, 40, 46, 44, 46, 44, 43, 41, 43, 40, 42, - 32, 42, 32, 35, 19, 35, 18, 42, 32, 42, 32, 34, 17, 34, 16, 46, - 44, 46, 44, 43, 41, 43, 40, 46, 44, 46, 44, 43, 41, 43, 40, 42, - 32, 42, 32, 35, 19, 35, 18, 42, 32, 42, 32, 34, 17, 34, 16, 45, - 38, 45, 38, 33, 30, 33, 28, 45, 38, 45, 38, 33, 30, 33, 28, 37, - 25, 37, 25, 23, 14, 23, 12, 37, 25, 37, 25, 22, 10, 22, 8, 45, - 38, 45, 38, 33, 30, 33, 28, 45, 38, 45, 38, 33, 30, 33, 28, 36, - 24, 36, 24, 21, 6, 21, 4, 36, 24, 36, 24, 20, 2, 20, 0 - ] - def self.tableNeighbors(data,x,y) - return 0 if x>=data.xsize || x<0 - return 0 if y>=data.ysize || y<0 - t=data[x,y] - xp1=[x+1,data.xsize-1].min - yp1=[y+1,data.ysize-1].min - xm1=[x-1,0].max - ym1=[y-1,0].max - i=0 - i|=0x01 if data[x ,ym1]==t - i|=0x02 if data[xp1,ym1]==t - i|=0x04 if data[xp1,y ]==t - i|=0x08 if data[xp1,yp1]==t - i|=0x10 if data[x ,yp1]==t - i|=0x20 if data[xm1,yp1]==t - i|=0x40 if data[xm1,y ]==t - i|=0x80 if data[xm1,ym1]==t - return i - end - -attr_accessor :tileset -attr_accessor :autotiles - -def initialize(tileset,autotiles) - @tileset=tileset - @autotiles=autotiles -end - -def bltAutotile(bitmap,x,y,id,frame) - return if frame<0 || !@autotiles || id>=384 - autotile=@autotiles[id/48-1] - return if !autotile || autotile.disposed? - if autotile.height==32 - anim=frame*32 - src_rect=Rect.new(anim,0,32,32) - bitmap.blt(x,y,autotile,src_rect) - else - anim=frame*96 - id%=48 - tiles = Autotiles[id>>3][id&7] - src=Rect.new(0,0,0,0) - for i in 0...4 - tile_position = tiles[i] - 1 - src.set(tile_position % 6 * 16 + anim, - tile_position / 6 * 16, 16, 16) - bitmap.blt(i%2*16+x,i/2*16+y, autotile, src) - end - end -end - -def bltRegularTile(bitmap,x,y,id) - return if !@tileset || id<384 || @tileset.disposed? - rect=Rect.new((id - 384) % 8 * 32, (id - 384) / 8 * 32,32,32) - bitmap.blt(x,y,@tileset,rect) -end - -def bltTile(bitmap,x,y,id,frame=0) - if id>=384 - bltRegularTile(bitmap,x,y,id) - elsif id>0 - bltAutotile(bitmap,x,y,id,frame) - end -end - Changed: PokemonField @@ -167,18 +167,2 @@ -def pbWildBattle(species,level,variable=nil,canescape=true) - if pbInSafari? - return pbSafariBattle(species,level) - end - if pbInBugContest? - return pbBugContestBattle(species,level) - end - if Input.press?(Input::CTRL) && $DEBUG - Kernel.pbMessage(_INTL("SKIPPING BATTLE...")) - $game_variables[variable]=1 if variable - $PokemonGlobal.nextBattleBGM=nil - $PokemonGlobal.nextBattleME=nil - return true - end - currentlevels=[] - for i in $Trainer.party - currentlevels.push(i.level) - end + +def pbGenerateWildPokemon(species,level) @@ -201,4 +185,4 @@ - wildpoke=[genwildpoke] - scene=PokeBattle_Scene.new - battle=PokeBattle_Battle.new(scene,$Trainer.party,wildpoke,$Trainer,nil) - battle.internalbattle=true + return genwildpoke +end + +def pbPrepareBattle(battle) @@ -218,1 +202,1 @@ - battle.cantescape=!canescape + battle.cantescape=false @@ -222,13 +206,3 @@ - playingBGS=$game_system.getPlayingBGS - playingBGM=$game_system.getPlayingBGM - $game_system.bgm_stop - $game_system.bgs_stop - wildbgm=pbGetWildBattleBGM(species) - restorebgm=true - decision=0 - pbBattleAnimation(wildbgm) { - decision=battle.pbStartBattle - if decision==2 - Kernel.pbStartOver - restorebgm=false - else +end + +def pbEvolutionCheck(currentlevels) @@ -249,6 +223,4 @@ - if decision==1 - for pkmn in $Trainer.party - Kernel.pbPickup(pkmn) - end - end - if pokerus && rand(3)==0 +end + +def pbPokerusCheck + if rand(3)==0 @@ -266,0 +238,50 @@ +end + + +def pbWildBattle(species,level,variable=nil,canescape=true) + if pbInSafari? + return pbSafariBattle(species,level) + end + if pbInBugContest? + return pbBugContestBattle(species,level) + end + if Input.press?(Input::CTRL) && $DEBUG + Kernel.pbMessage(_INTL("SKIPPING BATTLE...")) + $game_variables[variable]=1 if variable + $PokemonGlobal.nextBattleBGM=nil + $PokemonGlobal.nextBattleME=nil + return true + end + currentlevels=[] + for i in $Trainer.party + currentlevels.push(i.level) + end + genwildpoke=pbGenerateWildPokemon(species,level) + pokerus=(genwildpoke.pokerus==1) + scene=PokeBattle_Scene.new + battle=PokeBattle_Battle.new(scene,$Trainer.party,[genwildpoke],$Trainer,nil) + battle.internalbattle=true + pbPrepareBattle(battle) + wildbgm=pbGetWildBattleBGM(species) + playingBGS=$game_system.getPlayingBGS + playingBGM=$game_system.getPlayingBGM + $game_system.bgm_pause + $game_system.bgs_pause + restorebgm=true + decision=0 + pbBattleAnimation(wildbgm) { + decision=battle.pbStartBattle + if decision==2 + $game_system.bgm_stop + $game_system.bgs_stop + Kernel.pbStartOver + restorebgm=false + else + # Check conditions for evolution + pbEvolutionCheck(currentlevels) + if decision==1 + for pkmn in $Trainer.party + Kernel.pbPickup(pkmn) + end + end + pbPokerusCheck if pokerus @@ -269,2 +291,2 @@ - $game_system.bgm_play(playingBGM) - $game_system.bgs_play(playingBGS) + $game_system.bgm_resume(playingBGM) + $game_system.bgs_resume(playingBGS) @@ -272,2 +294,0 @@ - $PokemonEncounters.clearStepCount - Input.update @@ -276,0 +296,2 @@ + $PokemonEncounters.clearStepCount + Input.update @@ -1615,1 +1637,1 @@ - viewport=Viewport.new(0,0,480,360) + viewport=Viewport.new(0,0,Graphics.width,Graphics.height) Changed: Game_Map* @@ -142,1 +142,2 @@ - $game_system.bgm_play(@map.bgm.name+"n") # Plays it + $game_system.bgm_play(@map.bgm.name+"n", + @map.bgm.volume,@map.bgm.pitch) # Plays it @@ -169,4 +170,0 @@ - #-------------------------------------------------------------------------- - # ● 下にスクロール - # distance : スクロールする距離 - #-------------------------------------------------------------------------- @@ -176,4 +173,0 @@ - #-------------------------------------------------------------------------- - # ● 左にスクロール - # distance : スクロールする距離 - #-------------------------------------------------------------------------- @@ -183,4 +176,0 @@ - #-------------------------------------------------------------------------- - # ● 右にスクロール - # distance : スクロールする距離 - #-------------------------------------------------------------------------- @@ -190,4 +179,0 @@ - #-------------------------------------------------------------------------- - # ● 上にスクロール - # distance : スクロールする距離 - #-------------------------------------------------------------------------- @@ -197,8 +182,0 @@ - #-------------------------------------------------------------------------- - # ● 通行可能判定 - # x : X 座標 - # y : Y 座標 - # d : 方向 (0,2,4,6,8,10) - # ※ 0,10 = 全方向通行不可の場合を判定 (ジャンプなど) - # self_event : 自分 (イベントが通行判定をする場合) - #-------------------------------------------------------------------------- @@ -257,5 +234,0 @@ - #-------------------------------------------------------------------------- - # ● 茂み判定 - # x : X 座標 - # y : Y 座標 - #-------------------------------------------------------------------------- @@ -275,5 +247,0 @@ - #-------------------------------------------------------------------------- - # ● カウンター判定 - # x : X 座標 - # y : Y 座標 - #-------------------------------------------------------------------------- @@ -293,5 +260,0 @@ - #-------------------------------------------------------------------------- - # ● 地形タグの取得 - # x : X 座標 - # y : Y 座標 - #-------------------------------------------------------------------------- @@ -311,5 +273,0 @@ - #-------------------------------------------------------------------------- - # ● 指定位置のイベント ID 取得 - # x : X 座標 - # y : Y 座標 - #-------------------------------------------------------------------------- @@ -323,6 +280,0 @@ - #-------------------------------------------------------------------------- - # ● スクロールの開始 - # direction : スクロールする方向 - # distance : スクロールする距離 - # speed : スクロールする速度 - #-------------------------------------------------------------------------- @@ -334,3 +285,0 @@ - #-------------------------------------------------------------------------- - # ● スクロール中判定 - #-------------------------------------------------------------------------- @@ -340,5 +288,0 @@ - #-------------------------------------------------------------------------- - # ● フォグの色調変更の開始 - # tone : 色調 - # duration : 時間 - #-------------------------------------------------------------------------- @@ -352,5 +295,0 @@ - #-------------------------------------------------------------------------- - # ● フォグの不透明度変更の開始 - # opacity : 不透明度 - # duration : 時間 - #-------------------------------------------------------------------------- @@ -372,1 +310,1 @@ - screne_width += 2816 + screne_width += Graphics.width*4+256 # 2816 @@ -374,1 +312,1 @@ - screne_height += 2176 + screne_height += Graphics.height*4+256 # 2176 @@ -383,1 +321,0 @@ - # 必要ならマップをリフレッシュ @@ -390,1 +327,0 @@ - # スクロール中の場合 @@ -392,1 +328,0 @@ - # スクロール速度からマップ座標系での距離に変換 @@ -394,1 +329,0 @@ - # スクロールを実行 @@ -396,1 +330,1 @@ - when 2 # 下 + when 2 @@ -398,1 +332,1 @@ - when 4 # 左 + when 4 @@ -400,1 +334,1 @@ - when 6 # 右 + when 6 @@ -402,1 +336,1 @@ - when 8 # 上 + when 8 @@ -405,1 +339,0 @@ - # スクロールした距離を減算 @@ -408,1 +341,0 @@ - # マップイベントを更新 @@ -414,1 +346,0 @@ - # コモンイベントを更新 @@ -418,1 +349,0 @@ - # フォグのスクロール処理 @@ -421,1 +351,0 @@ - # フォグの色調変更処理 @@ -431,1 +360,0 @@ - # フォグの不透明度変更処理 Changed: PokemonNetwork @@ -484,1 +484,1 @@ - Input.updateex + Input.update @@ -566,1 +566,1 @@ - Input.updateex + Input.update Changed: PokemonMart @@ -177,1 +177,1 @@ - @viewport=Viewport.new(0,0,480,320) + @viewport=Viewport.new(0,0,Graphics.width,Graphics.height) @@ -220,1 +220,1 @@ - @viewport=Viewport.new(0,0,480,320) + @viewport=Viewport.new(0,0,Graphics.width,Graphics.height) Changed: PokeBattle_ActualScene @@ -46,2 +46,1 @@ - -class Window_CommandMenu < SpriteWindow_Base +class Window_CommandMenuInner < SpriteWindow_Base @@ -49,4 +48,0 @@ - attr_reader :baseColor - attr_reader :shadowColor - attr_reader :menuBaseColor - attr_reader :menuShadowColor @@ -58,1 +53,0 @@ - @title=value[0] @@ -66,1 +60,1 @@ - super(0,0,480,96) + super(Graphics.width-240,Graphics.height-96,240,96) @@ -69,4 +63,0 @@ - self.windowskin=nil - self.x=0 - self.y=224 - @title="" @@ -79,2 +69,0 @@ - @baseColor=PokeBattle_Scene::MESSAGEBASECOLOR - @shadowColor=PokeBattle_Scene::MESSAGESHADOWCOLOR @@ -91,43 +79,134 @@ - textmsg=@title - textmsg=textmsg.clone - x=y=0 - while ((c = textmsg.slice!(/\n|\S*[ \r\t\f]?/)) != nil) - break if c=="" - if c=="\n" - # Add 1 to y - y += 1 - x = 0 - next - end - textwidth=self.contents.text_size(c).width - if x>0 && x+textwidth>=self.contents.width - # Add 1 to y - y += 1 - x = 0 - end - # Draw text - self.contents.font.color=self.shadowColor - pbDrawShadow(self.contents,4+x, 32 * y, textwidth, 32, c) - self.contents.font.color=self.baseColor - self.contents.draw_text(4+x, 32 * y, textwidth, 32, c) - # Add x to drawn text width - x += textwidth - end - pbCopyBitmap(self.contents,@selarrow,244,0) if @index==0 - pbCopyBitmap(self.contents,@selarrow,354,0) if @index==1 - pbCopyBitmap(self.contents,@selarrow,244,32) if @index==2 - pbCopyBitmap(self.contents,@selarrow,354,32) if @index==3 - self.contents.font.color=self.menuShadowColor - pbDrawShadow(self.contents,256,0,96,32,@choice1) - pbDrawShadow(self.contents,256,32,96,32,@choice2) - pbDrawShadow(self.contents,366,0,96,32,@choice3) - pbDrawShadow(self.contents,366,32,96,32,@choice4) - self.contents.font.color=self.menuBaseColor - self.contents.draw_text(256,0,96,32,@choice1) - self.contents.draw_text(256,32,96,32,@choice2) - self.contents.draw_text(366,0,96,32,@choice3) - self.contents.draw_text(366,32,96,32,@choice4) - end -end - -class Window_FightMenu < SpriteWindow_Base + pbCopyBitmap(self.contents,@selarrow,4,0) if @index==0 + pbCopyBitmap(self.contents,@selarrow,116,0) if @index==1 + pbCopyBitmap(self.contents,@selarrow,4,32) if @index==2 + pbCopyBitmap(self.contents,@selarrow,116,32) if @index==3 + self.contents.font.color=@menuShadowColor + pbDrawShadow(self.contents,20,0,96,32,@choice1) + pbDrawShadow(self.contents,20,32,96,32,@choice2) + pbDrawShadow(self.contents,132,0,96,32,@choice3) + pbDrawShadow(self.contents,132,32,96,32,@choice4) + self.contents.font.color=@menuBaseColor + self.contents.draw_text(20,0,96,32,@choice1) + self.contents.draw_text(20,32,96,32,@choice2) + self.contents.draw_text(132,0,96,32,@choice3) + self.contents.draw_text(132,32,96,32,@choice4) + end +end + +class TwoColumnWindow < SpriteWindow_Base + attr_reader :index + def index=(value) + @index=value + refresh + end + def setChoices(array) + @choices[0]=array[0] + @choices[1]=array[1] + @choices[2]=array[2] + @choices[3]=array[3] + refresh + end + def initialize(x,y,width,height,viewport=nil) + super(x,y,width,height) + self.viewport=viewport + @choices=["","","",""] + self.contents=Bitmap.new(self.width-32,self.height-32) + pbSetNarrowFont(self.contents) + @selarrow=BitmapCache.load_bitmap("Graphics/Pictures/selarrow.png") + @index=0 + @menuBaseColor=PokeBattle_Scene::MENUBASECOLOR + @menuShadowColor=PokeBattle_Scene::MENUSHADOWCOLOR + refresh + end + def dispose + @selarrow.dispose + super + end + def refresh + self.contents.clear + pbCopyBitmap(self.contents,@selarrow,0,0) if @index==0 + pbCopyBitmap(self.contents,@selarrow,144,0) if @index==1 + pbCopyBitmap(self.contents,@selarrow,0,32) if @index==2 + pbCopyBitmap(self.contents,@selarrow,144,32) if @index==3 + self.contents.font.color=@menuShadowColor + pbDrawShadow(self.contents,16,0,128,32,@choices[0]) + pbDrawShadow(self.contents,160,0,128,32,@choices[1]) + pbDrawShadow(self.contents,16,32,128,32,@choices[2]) + pbDrawShadow(self.contents,160,32,128,32,@choices[3]) + self.contents.font.color=@menuBaseColor + self.contents.draw_text(16,0,128,32,@choices[0]) + self.contents.draw_text(160,0,128,32,@choices[1]) + self.contents.draw_text(16,32,128,32,@choices[2]) + self.contents.draw_text(160,32,128,32,@choices[3]) + end +end +class CommandMenuDisplay + def initialize(viewport=nil) + @window=Window_CommandMenuInner.new + @window.viewport=viewport + @msgbox=Window_SimpleTextPokemon.newWithSize( + "",0,Graphics.height-96,@window.width,96,viewport) + @msgbox.baseColor=PokeBattle_Scene::MESSAGEBASECOLOR + @msgbox.shadowColor=PokeBattle_Scene::MESSAGESHADOWCOLOR + @msgbox.windowskin=nil + @title="" + end + def index; @window.index; end + def index=(value); @window.index=value; end + def setTexts(value) + @msgbox.text=value[0] + @window.setTexts(value) + end + def visible; @window.visible; end + def visible=(value) + @window.visible=value + @msgbox.visible=value + end + def x; @window.x; end + def x=(value) + @window.x=value + @msgbox.x=value + end + def y; @window.y; end + def y=(value) + @window.y=value + @msgbox.y=value + end + def oy; @window.oy; end + def oy=(value) + @window.oy=value + @msgbox.oy=value + end + def color; @window.color; end + def color=(value) + @window.color=value + @msgbox.color=value + end + def ox; @window.ox; end + def ox=(value) + @window.ox=value + @msgbox.ox=value + end + def z; @window.z; end + def z=(value) + @window.z=value + @msgbox.z=value + end + def disposed? + return @msgbox.disposed? || @window.disposed? + end + def dispose + @msgbox.dispose + @window.dispose + end + def update + @msgbox.update + @window.update + end + def refresh + @msgbox.refresh + @window.refresh + end +end + +class FightMenuDisplay @@ -136,4 +215,0 @@ - attr_reader :baseColor - attr_reader :shadowColor - attr_reader :menuBaseColor - attr_reader :menuShadowColor @@ -147,0 +222,1 @@ + @window.index=value @@ -154,8 +230,53 @@ - def initialize(battler) - super(0,0,480,96) - self.contents=Bitmap.new(self.width-32,self.height-32) - self.windowskin=nil - pbSetNarrowFont(self.contents) - self.x=0 - self.y=224 - @selarrow=BitmapCache.load_bitmap("Graphics/Pictures/selarrow.png") + def visible; @window.visible; end + def visible=(value) + @window.visible=value + @info.visible=value + end + def x; @window.x; end + def x=(value) + @window.x=value + @info.x=value + end + def y; @window.y; end + def y=(value) + @window.y=value + @info.y=value + end + def oy; @window.oy; end + def oy=(value) + @window.oy=value + @info.oy=value + end + def color; @window.color; end + def color=(value) + @window.color=value + @info.color=value + end + def ox; @window.ox; end + def ox=(value) + @window.ox=value + @info.ox=value + end + def z; @window.z; end + def z=(value) + @window.z=value + @info.z=value + end + def disposed? + return @info.disposed? || @window.disposed? + end + def dispose + @info.dispose + @window.dispose + end + def update + @info.update + @window.update + end + def initialize(battler,viewport=nil) + @window=TwoColumnWindow.new(0,Graphics.height-96,320,96,viewport) + @info=Window_ColoredTextPokemon.newWithSize( + "",320,Graphics.height-96,Graphics.width-320,96,viewport) + @info.baseColor=PokeBattle_Scene::MENUBASECOLOR + @info.shadowColor=PokeBattle_Scene::MENUSHADOWCOLOR + @battler=battler @@ -163,5 +284,0 @@ - @battler=battler - @baseColor=PokeBattle_Scene::MESSAGEBASECOLOR - @shadowColor=PokeBattle_Scene::MESSAGESHADOWCOLOR - @menuBaseColor=PokeBattle_Scene::MENUBASECOLOR - @menuShadowColor=PokeBattle_Scene::MENUSHADOWCOLOR @@ -171,1 +287,0 @@ - self.contents.clear @@ -173,4 +288,6 @@ - pbCopyBitmap(self.contents,@selarrow,0,0) if @index==0 - pbCopyBitmap(self.contents,@selarrow,144,0) if @index==1 - pbCopyBitmap(self.contents,@selarrow,0,32) if @index==2 - pbCopyBitmap(self.contents,@selarrow,144,32) if @index==3 + @window.setChoices([ + @battler.moves[0].name, + @battler.moves[1].name, + @battler.moves[2].name, + @battler.moves[3].name + ]) @@ -178,5 +295,0 @@ - self.contents.font.color=self.menuShadowColor - pbDrawShadow(self.contents,16,0,128,32,@battler.moves[0].name) - pbDrawShadow(self.contents,160,0,128,32,@battler.moves[1].name) - pbDrawShadow(self.contents,16,32,128,32,@battler.moves[2].name) - pbDrawShadow(self.contents,160,32,128,32,@battler.moves[3].name) @@ -184,17 +296,5 @@ - pbDrawShadow(self.contents,320,0,64,32,_INTL("PP")) - pbDrawShadow(self.contents,384,0,72,32, - _ISPRINTF("{1: 2d}/{2: 2d}",selmove.pp,selmove.totalpp)) - pbDrawShadow(self.contents,320,32,128,32,_INTL("TYPE/{1}",movetype)) - self.contents.font.color=self.menuBaseColor - self.contents.draw_text(16,0,128,32,@battler.moves[0].name) - self.contents.draw_text(160,0,128,32,@battler.moves[1].name) - self.contents.draw_text(16,32,128,32,@battler.moves[2].name) - self.contents.draw_text(160,32,128,32,@battler.moves[3].name) - self.contents.draw_text(320,0,64,32,_INTL("PP")) - self.contents.draw_text(384,0,72,32, - _ISPRINTF("{1: 2d}/{2: 2d}",selmove.pp,selmove.totalpp)) - self.contents.draw_text(320,32,128,32,_INTL("TYPE/{1}",movetype)) - end -end - - + pbSetNarrowFont(@info.contents) + @info.text=_ISPRINTF("PP: {1: 2d}/{2: 2d}\r\nTYPE/{3:s}", + selmove.pp,selmove.totalpp,movetype) + end +end @@ -271,1 +371,1 @@ - @spriteY=148 + @spriteY=148+(Graphics.height-320) @@ -341,0 +441,1 @@ + yoffset=(Graphics.height-320) @@ -346,1 +447,1 @@ - @spriteY=124 + @spriteY=124+yoffset @@ -350,1 +451,1 @@ - @spriteY=10 + @spriteY=10+yoffset @@ -356,1 +457,1 @@ - @spriteY=174 + @spriteY=174+yoffset @@ -360,1 +461,1 @@ - @spriteY=60 + @spriteY=60+yoffset @@ -367,1 +468,1 @@ - @spriteY=148 + @spriteY=148+yoffset @@ -375,1 +476,1 @@ - @spriteY=32 + @spriteY=32+yoffset @@ -564,0 +665,1 @@ + @spritey+=(Graphics.height-320) @@ -572,0 +674,1 @@ + @endspritey+=(Graphics.height-320) @@ -748,0 +851,1 @@ + @spritey+=(Graphics.height-320) @@ -908,3 +1012,1 @@ - @sprites["messagebox"].visible=(windowtype==MESSAGEBOX||windowtype==BLANK) - @sprites["commandbox"].visible=(windowtype==COMMANDBOX) - @sprites["fightbox"].visible=(windowtype==FIGHTBOX) + @sprites["messagebox"].visible=(windowtype==MESSAGEBOX||windowtype==COMMANDBOX||windowtype==FIGHTBOX||windowtype==BLANK) @@ -924,2 +1026,1 @@ - msgwindow.y=224 - msgwindow.width=480 + msgwindow.width=Graphics.width @@ -927,0 +1028,1 @@ + msgwindow.y=Graphics.height-msgwindow.height @@ -932,2 +1034,1 @@ - msgwindow.y=224 - msgwindow.width=448 + msgwindow.width=Graphics.width-32 @@ -935,0 +1036,1 @@ + msgwindow.y=Graphics.height-msgwindow.height @@ -995,3 +1097,0 @@ - @sprites["messagebox"].visible=true - @sprites["commandbox"].visible=false - @sprites["fightbox"].visible=false @@ -1024,2 +1123,2 @@ - cw.x=368 - cw.y=128 + cw.x=Graphics.width-cw.width + cw.y=Graphics.height-cw.height-dw.height @@ -1145,1 +1244,1 @@ - pbAddSprite("trainer",480,16,trainerfile,@viewport) + pbAddSprite("trainer",480,16+@yoffset,trainerfile,@viewport) @@ -1203,2 +1302,2 @@ - pbAddSprite("enemybase",-256,96,enemybase,@viewport) # ends at (224,96) - pbAddSprite("playerbase",480,192,playerbase,@viewport) # ends at (0,192) + pbAddSprite("enemybase",-256,96+@yoffset,enemybase,@viewport) # ends at (224,96) + pbAddSprite("playerbase",480,192+@yoffset,playerbase,@viewport) # ends at (0,192) @@ -1222,1 +1321,1 @@ - @viewport=Viewport.new(0,160,480,0) + @viewport=Viewport.new(0,Graphics.height/2,Graphics.width,0) @@ -1224,1 +1323,1 @@ - @msgviewport=Viewport.new(0,160,480,0) + @msgviewport=Viewport.new(0,Graphics.height/2,Graphics.width,0) @@ -1228,0 +1327,1 @@ + @yoffset=(Graphics.height-320) @@ -1230,2 +1330,2 @@ - pbAddSprite("partybase1",-400,80,"Graphics/Pictures/pbarrow.png",@viewport) - pbAddSprite("partybase2",480,192,"Graphics/Pictures/pbarrow.png",@viewport) + pbAddSprite("partybase1",-400,80+@yoffset,"Graphics/Pictures/pbarrow.png",@viewport) + pbAddSprite("partybase2",480,192+@yoffset,"Graphics/Pictures/pbarrow.png",@viewport) @@ -1233,0 +1333,2 @@ + @sprites["partybase1"].visible=false + @sprites["partybase2"].visible=false @@ -1236,1 +1338,1 @@ - pbAddSprite("trainer",-144,16,trainerfile,@viewport) + pbAddSprite("trainer",-144,16+@yoffset,trainerfile,@viewport) @@ -1238,1 +1340,1 @@ - pbAddSprite("trainer2",-240,16,trainerfile,@viewport) + pbAddSprite("trainer2",-240,16+@yoffset,trainerfile,@viewport) @@ -1241,1 +1343,1 @@ - pbAddSprite("trainer",-176,16,trainerfile,@viewport) + pbAddSprite("trainer",-176,16+@yoffset,trainerfile,@viewport) @@ -1245,1 +1347,1 @@ - pbAddSprite("trainer",-176,16,trainerfile,@viewport) + pbAddSprite("trainer",-176,16+@yoffset,trainerfile,@viewport) @@ -1261,1 +1363,1 @@ - pbAddSprite("player",576,96,"Graphics/Pictures/#{meta[3]}",@viewport) + pbAddSprite("player",576,96+@yoffset,"Graphics/Pictures/#{meta[3]}",@viewport) @@ -1263,5 +1365,3 @@ - pbAddSprite("player",576,96,"Graphics/Pictures/trback.png",@viewport) - end - pbAddSprite("messagebox",0,224,"Graphics/Pictures/messagebox.png",@viewport) - pbAddSprite("commandbox",0,224,"Graphics/Pictures/commandbox.png",@viewport) - pbAddSprite("fightbox",0,224,"Graphics/Pictures/fightbox.png",@viewport) + pbAddSprite("player",576,96+@yoffset,"Graphics/Pictures/trback.png",@viewport) + end + pbAddSprite("messagebox",0,Graphics.height-96,"Graphics/Pictures/messagebox.png",@viewport) @@ -1271,2 +1371,2 @@ - @sprites["commandwindow"]=Window_CommandMenu.new - @sprites["fightwindow"]=Window_FightMenu.new(nil) + @sprites["commandwindow"]=CommandMenuDisplay.new(@viewport) + @sprites["fightwindow"]=FightMenuDisplay.new(nil,@viewport) @@ -1275,2 +1375,0 @@ - @sprites["commandwindow"].viewport=@viewport - @sprites["fightwindow"].viewport=@viewport @@ -1278,2 +1376,0 @@ - @sprites["commandbox"].z=50 - @sprites["fightbox"].z=50 @@ -1295,1 +1391,1 @@ - @sprites["pokemon1"].y=factor*2+16 + @sprites["pokemon1"].y=factor*2+16+@yoffset @@ -1300,1 +1396,1 @@ - if @viewport.rect.y>80 + if @viewport.rect.y>Graphics.height/4 @@ -1325,0 +1421,2 @@ + @sprites["partybase1"].visible=true + @sprites["partybase2"].visible=true @@ -1336,1 +1434,1 @@ - pbAddSprite("enemy#{i}",-28,64,"Graphics/Pictures/ballempty.png",@viewport) + pbAddSprite("enemy#{i}",-28,64+@yoffset,"Graphics/Pictures/ballempty.png",@viewport) @@ -1338,1 +1436,1 @@ - pbAddSprite("enemy#{i}",-28,64,"Graphics/Pictures/ballfainted.png",@viewport) + pbAddSprite("enemy#{i}",-28,64+@yoffset,"Graphics/Pictures/ballfainted.png",@viewport) @@ -1340,1 +1438,1 @@ - pbAddSprite("enemy#{i}",-28,64,"Graphics/Pictures/ballnormal.png",@viewport) + pbAddSprite("enemy#{i}",-28,64+@yoffset,"Graphics/Pictures/ballnormal.png",@viewport) @@ -1343,1 +1441,1 @@ - pbAddSprite("player#{i}",492,176,"Graphics/Pictures/ballempty.png",@viewport) + pbAddSprite("player#{i}",492,176+@yoffset,"Graphics/Pictures/ballempty.png",@viewport) @@ -1345,1 +1443,1 @@ - pbAddSprite("player#{i}",492,176,"Graphics/Pictures/ballfainted.png",@viewport) + pbAddSprite("player#{i}",492,176+@yoffset,"Graphics/Pictures/ballfainted.png",@viewport) @@ -1347,1 +1445,1 @@ - pbAddSprite("player#{i}",492,176,"Graphics/Pictures/ballnormal.png",@viewport) + pbAddSprite("player#{i}",492,176+@yoffset,"Graphics/Pictures/ballnormal.png",@viewport) @@ -1396,1 +1494,1 @@ - picturePoke.moveXY(15,delay,center[0],320-80) + picturePoke.moveXY(15,delay,center[0],Graphics.height-80) @@ -1612,3 +1710,0 @@ - @sprites["messagebox"].visible=false - @sprites["commandbox"].visible=false - @sprites["fightbox"].visible=true @@ -1923,1 +2018,1 @@ - tempvp=Viewport.new(0,0,480,144) + tempvp=Viewport.new(0,0,480,144+@yoffset) @@ -1925,1 +2020,1 @@ - tempvp=Viewport.new(0,0,480,224) + tempvp=Viewport.new(0,0,480,224+@yoffset) Changed: PokemonTrainers @@ -215,1 +215,0 @@ - scene=PokeBattle_Scene.new @@ -248,0 +247,1 @@ + scene=PokeBattle_Scene.new @@ -262,0 +262,1 @@ + scene=PokeBattle_Scene.new @@ -281,1 +282,0 @@ - battle.environment=pbGetEnvironment @@ -283,15 +283,1 @@ - if $game_screen.weather_type==1 || $game_screen.weather_type==2 - battle.weather=PBWeather::RAINDANCE - battle.weatherduration=-1 - elsif $game_screen.weather_type==3 - battle.weather=PBWeather::HAIL - battle.weatherduration=-1 - elsif $game_screen.weather_type==4 - battle.weather=PBWeather::SANDSTORM - battle.weatherduration=-1 - elsif $game_screen.weather_type==5 - battle.weather=PBWeather::SUNNYDAY - battle.weatherduration=-1 - end - battle.shiftStyle=($PokemonSystem.battlestyle==0) - battle.battlescene=($PokemonSystem.battlescene==0) + pbPrepareBattle(battle) @@ -300,4 +286,2 @@ - $game_system.bgm_stop - $game_system.bgs_stop - $game_system.bgm_play(playingBGM) - $game_system.bgs_play(playingBGS) + $game_system.bgm_pause + $game_system.bgs_pause @@ -309,0 +293,2 @@ + $game_system.bgm_stop + $game_system.bgs_stop @@ -312,14 +298,1 @@ - # Check conditions for evolution - for i in 0...currentlevels.length - pokemon=$Trainer.party[i] - if pokemon && pokemon.level!=currentlevels[i] - newspecies=Kernel.pbCheckEvolution(pokemon) - if newspecies>0 - # Start evolution scene - evo=PokemonEvolutionScene.new - evo.pbStartScreen(pokemon,newspecies) - evo.pbEvolution - evo.pbEndScreen - end - end - end + pbEvolutionCheck(currentlevels) @@ -339,2 +312,2 @@ - $game_system.bgm_play(playingBGM) - $game_system.bgs_play(playingBGS) + $game_system.bgm_resume(playingBGM) + $game_system.bgs_resume(playingBGS) @@ -342,0 +315,2 @@ + $PokemonGlobal.nextBattleBGM=nil + $PokemonGlobal.nextBattleME=nil @@ -344,2 +319,0 @@ - $PokemonGlobal.nextBattleBGM=nil - $PokemonGlobal.nextBattleME=nil Changed: SpriteResizer @@ -1,3 +1,0 @@ -#23719417 -begin - @@ -10,1 +7,0 @@ - @@ -370,14 +366,0 @@ - - - - - - - - -rescue Exception -if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" -raise $! -else -end -end Changed: PokemonDuel @@ -2,1 +2,2 @@ -begin +begin + @@ -39,1 +40,1 @@ - @viewport=Viewport.new(0,0,480,320) + @viewport=Viewport.new(0,0,Graphics.width,Graphics.height) @@ -43,2 +44,2 @@ - @sprites["player"]=IconSprite.new(-160,96,@viewport) - @sprites["opponent"]=IconSprite.new(512,96,@viewport) + @sprites["player"]=IconSprite.new(-128-32,96,@viewport) + @sprites["opponent"]=IconSprite.new(Graphics.width+32,96,@viewport) @@ -47,2 +48,2 @@ - @sprites["playerwindow"].x=-160 - @sprites["opponentwindow"].x=480 + @sprites["playerwindow"].x=-@sprites["playerwindow"].width + @sprites["opponentwindow"].x=Graphics.width @@ -400,7 +401,13 @@ - -rescue Exception -if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" -raise $! -else -end -end + + +rescue Exception + +if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" + +raise $! + +else + +end + +end Changed: PokemonTilesetEditor @@ -2,1 +2,2 @@ -begin +begin + @@ -63,1 +64,1 @@ - @viewport=Viewport.new(0,0,480,320) + @viewport=Viewport.new(0,0,Graphics.width,Graphics.height) @@ -186,7 +187,13 @@ - -rescue Exception -if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" -raise $! -else -end -end + + +rescue Exception + +if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" + +raise $! + +else + +end + +end Changed: PBFile @@ -118,0 +118,13 @@ +=begin +class << self +alias debugopen open +def open(f,m="r") + debugopen("debug.txt","ab"){|file| file.write([f,m].inspect+"\r\n") } + if block_given? + debugopen(f,m) {|file| yield file } + else + return debugopen(f,m) + end +end +end +=end Changed: PokemonLoad @@ -5,1 +5,1 @@ - @viewport=Viewport.new(0,0,480,320) + @viewport=Viewport.new(0,0,Graphics.width,Graphics.height) Changed: WindowAndTilemap @@ -1,0 +1,1 @@ + @@ -512,1 +513,0 @@ - @@ -529,1 +529,0 @@ - #-------------------------------------------------------------------------- @@ -531,1 +530,0 @@ - #-------------------------------------------------------------------------- @@ -547,1 +545,0 @@ - #-------------------------------------------------------------------------- @@ -557,1 +554,0 @@ - #-------------------------------------------------------------------------- @@ -632,2 +628,0 @@ -# echo("layer0 [#{@layer0.id}] #{@layer0.ox} #{@layer0.oy} #{@layer0.x} #{@layer0.y} [#{@oxLayer0} #{@oyLayer0}]\r\n") -# echo(" --- [#{@ox} #{@oy} #{@viewport.rect.x} #{@viewport.rect.y} #{@viewport.ox} #{@viewport.oy}]\r\n") @@ -1101,0 +1095,3 @@ +def getResizeFactor + return $ResizeFactor ? $ResizeFactor : 1.0 +end @@ -1102,2 +1099,2 @@ - val=(val*$ResizeFactor).round - val=(val/$ResizeFactor).to_i + val=(val*getResizeFactor).round + val=(val/getResizeFactor).to_i @@ -1109,2 +1106,2 @@ - val=(val*$ResizeFactor).round - val=(val/$ResizeFactor).to_i + val=(val*getResizeFactor).round + val=(val/getResizeFactor).to_i Changed: PokemonEntry @@ -1,2 +1,0 @@ - - @@ -4,8 +2,24 @@ - # Returns true when a key is pressed. - @GetAsyncKeyState=Win32API.new("user32", "GetAsyncKeyState", "i", "i") - @GetKeyState=Win32API.new("user32", "GetKeyState", "i", "i") - def Input.repeatex?(key) - (@GetAsyncKeyState.call(key)&0x0001)>0 - end - # Returns a key's state. - def Input.getstate(key) + DOWN=2 + LEFT=4 + RIGHT=6 + UP=8 + A=11 + B=12 + C=13 + X=14 + Y=15 + Z=16 + L=17 + R=18 + SHIFT=21 + CTRL=22 + ALT=23 + F5=25 + F6=26 + F7=27 + F8=28 + F9=29 + # GetAsyncKeyState or GetKeyState will work here + @GetKeyState=Win32API.new("user32", "GetAsyncKeyState", "i", "i") + # Returns whether a key is being pressed + def self.getstate(key) @@ -14,2 +28,1 @@ - def Input.updateex - Input.update + def self.update @@ -18,1 +31,1 @@ - @newstate=Input.getstate(i) + @newstate=self.getstate(i) @@ -28,1 +41,1 @@ - @keystate[i]=Input.getstate(i) ? 0 : 1 + @keystate[i]=self.getstate(i) ? 1 : 0 @@ -34,1 +47,129 @@ - def Input.repeatex?(key) + def self.buttonToKey(button) + case button + when Input::DOWN + return [0x28] # Down + when Input::LEFT + return [0x25] # Left + when Input::RIGHT + return [0x27] # Right + when Input::UP + return [0x26] # Up + when Input::A + return [0x5A,0x10] # Z, Shift + when Input::B + return [0x58,0x1B] # X, ESC + when Input::C + return [0x43,0x0d,0x20] # C, ENTER, Space + when Input::X + return [0x41] # A + when Input::Y + return [0x53] # S + when Input::Z + return [0x44] # D + when Input::L + return [0x51,0x21] # Q, Page Up + when Input::R + return [0x57,0x22] # W, Page Up + when Input::SHIFT + return [0x10] # Shift + when Input::CTRL + return [0x11] # Ctrl + when Input::ALT + return [0x12] # Alt + when Input::F5 + return [0x74] # F5 + when Input::F6 + return [0x75] # F6 + when Input::F7 + return [0x76] # F7 + when Input::F8 + return [0x77] # F8 + when Input::F9 + return [0x78] # F9 + else + return [] + end + end + def self.dir4 + button=0 + repeatcount=0 + if self.press?(Input::DOWN) && self.press?(Input::UP) + return 0 + end + if self.press?(Input::LEFT) && self.press?(Input::RIGHT) + return 0 + end + for b in [Input::DOWN,Input::LEFT,Input::RIGHT,Input::UP] + rc=self.count(b) + if rc>0 + if repeatcount==0 || rc0 + buttons.push([b,rc]) + end + end + if buttons.length==0 + return 0 + elsif buttons.length==1 + return buttons[0][0] + elsif buttons.length==2 + # since buttons sorted by button, no need to sort here + if (buttons[0][0]==Input::DOWN && buttons[1][0]==Input::UP) + return 0 + end + if (buttons[0][0]==Input::LEFT && buttons[1][0]==Input::RIGHT) + return 0 + end + end + buttons.sort!{|a,b| a[1]<=>b[1]} + updown=0 + leftright=0 + for b in buttons + if updown==0 && (b[0]==Input::UP || b[0]==Input::DOWN) + updown=b[0] + end + if leftright==0 && (b[0]==Input::LEFT || b[0]==Input::RIGHT) + leftright=b[0] + end + end + if updown==Input::DOWN + return 1 if leftright==Input::LEFT + return 3 if leftright==Input::RIGHT + return 2 + elsif updown==Input::UP + return 7 if leftright==Input::LEFT + return 9 if leftright==Input::RIGHT + return 8 + else + return 4 if leftright==Input::LEFT + return 6 if leftright==Input::RIGHT + return 0 + end + end + def self.count(button) + for btn in self.buttonToKey(button) + c=self.repeatcount(btn) + return c if c>0 + end + return 0 + end + def self.trigger?(button) + return self.buttonToKey(button).any? {|item| self.triggerex?(item) } + end + def self.repeat?(button) + return self.buttonToKey(button).any? {|item| self.repeatex?(item) } + end + def self.press?(button) + return self.count(button)>0 + end + def self.repeatex?(key) @@ -38,1 +179,1 @@ - def Input.releaseex?(key) + def self.releaseex?(key) @@ -42,1 +183,1 @@ - def Input.triggerex?(key) + def self.triggerex?(key) @@ -46,1 +187,1 @@ - def Input.repeatcount(key) + def self.repeatcount(key) @@ -49,0 +190,3 @@ + end + def self.pressex?(key) + return self.repeatcount(key)>0 @@ -517,1 +661,1 @@ - Input.updateex + Input.update @@ -547,1 +691,1 @@ - @viewport=Viewport.new(0,0,480,320) + @viewport=Viewport.new(0,0,Graphics.width,Graphics.height) @@ -586,1 +730,1 @@ - Input.updateex + Input.update @@ -606,1 +750,1 @@ - Input.updateex + Input.update Changed: Game_System @@ -29,17 +29,3 @@ - @use_me=false - end - attr_accessor :use_me - def use_me=(value) - if !value - Audio.me_stop - @use_me=false - else - @use_me=true - end - end - def audioBgmPlay(str,vol,pitch) - if @use_me - Audio.me_play(str,vol,pitch) - else - Audio.bgm_play(str,vol,pitch) - end + end + def audioBgmPlay(str,vol,pitch,position) + Audio.bgm_play(str,vol,pitch,position) @@ -48,5 +34,1 @@ - if @use_me - Audio.me_fade(time) - else - Audio.bgm_fade(time) - end + Audio.bgm_fade(time) @@ -55,7 +37,3 @@ - if @use_me - Audio.me_stop - else - Audio.bgm_stop - end - end - def bgm_play_ex(bgm,volume,pitch,setplaying) + Audio.bgm_stop + end + def bgm_play_ex(bgm,volume,pitch,setplaying,position=0) @@ -67,0 +45,1 @@ + echo "#{@playing_bgm}\r\n" @@ -72,1 +51,2 @@ - audioBgmPlay("Audio/BGM/" + bgm.name, bgm.volume, bgm.pitch) if !@defaultBGM + audioBgmPlay("Audio/BGM/" + bgm.name, + bgm.volume, bgm.pitch,position) if !@defaultBGM @@ -79,1 +59,1 @@ - @defaultBGM.volume,@defaultBGM.pitch) + @defaultBGM.volume,@defaultBGM.pitch,position) @@ -83,3 +63,7 @@ - def bgm_play(bgm,volume=100,pitch=100) - bgm_play_ex(bgm,volume,pitch,true) - end + def bgm_play(bgm,volume=100,pitch=100,position=0) + bgm_play_ex(bgm,volume,pitch,true,position) + end + def bgm_pause; end + def bgs_pause; end + def bgm_resume(bgm,volume=100,pitch=100); end + def bgs_resume(bgm,volume=100,pitch=100); end @@ -87,0 +71,1 @@ + @bgm_position=0 @@ -124,0 +109,1 @@ + @bgs_position=0 Added: TileDrawingHelper Changed: Compiler @@ -14,1 +14,1 @@ - s="" + btrace="" @@ -16,1 +16,1 @@ - s=s+"#{i}\r\n" + btrace=btrace+"#{i}\r\n" @@ -18,2 +18,2 @@ - s.gsub!(/Section(\d+)/){$RGSS_SCRIPTS[$1.to_i][1]} - message="Exception: #{e.class}\r\nMessage: #{emessage}\r\n#{s}" + btrace.gsub!(/Section(\d+)/){$RGSS_SCRIPTS[$1.to_i][1]} + message="Exception: #{e.class}\r\nMessage: #{emessage}\r\n#{btrace}" @@ -21,5 +21,0 @@ - s="" - e.backtrace[0,10].each do |i| - s=s+"#{i}\r\n" - end - message="Exception: #{e.class}\r\nMessage: #{emessage}\r\n#{s}" @@ -1202,1 +1197,1 @@ - raise _INTL("Expected a section at the beginning of the file\r\n{1}",FileLineData.linereport) + raise _INTL("Expected a section at the beginning of the file. This error may also occur if the file was not saved in UTF-8.\r\n{1}",FileLineData.linereport) @@ -1209,1 +1204,3 @@ - sec[sec.length]=PBSpecies.const_get(species) + if constDef?(PBSpecies,species) + sec[sec.length]=PBSpecies.const_get(species) + end @@ -1683,1 +1680,1 @@ - raise _INTL("Expected a section at the beginning of the file\r\n{1}",FileLineData.linereport) + raise _INTL("Expected a section at the beginning of the file. This error may also occur if the file was not saved in UTF-8.\r\n{1}",FileLineData.linereport) Changed: PokemonTrainerCard @@ -2,1 +2,2 @@ -begin +begin + @@ -11,1 +12,1 @@ - @viewport=Viewport.new(0,0,480,320) + @viewport=Viewport.new(0,0,Graphics.width,Graphics.height) @@ -18,1 +19,1 @@ - @sprites["overlay"].bitmap=Bitmap.new(480,320) + @sprites["overlay"].bitmap=Bitmap.new(Graphics.width,Graphics.height) @@ -92,7 +93,13 @@ - -rescue Exception -if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" -raise $! -else -end -end + + +rescue Exception + +if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" + +raise $! + +else + +end + +end Changed: PBAnimation @@ -283,1 +283,1 @@ - frame=[] + frame=pbanim.addFrame @@ -290,1 +290,1 @@ - -160,80,160,80, + -160,80,160,-80, @@ -316,1 +316,0 @@ - pbanim[i]=frame @@ -411,0 +410,1 @@ + return @array[pos] Added: Audio Changed: PokemonEvolution @@ -2,1 +2,1 @@ -class SpriteMetafile < Sprite +class SpriteMetafile Changed: Spriteset_Map @@ -193,1 +193,1 @@ - [@tilemap.map_data.xsize*32-tmox,480].min + [@tilemap.map_data.xsize*32-tmox,Graphics.width].min @@ -195,1 +195,1 @@ - [@tilemap.map_data.ysize*32-tmoy,320].min + [@tilemap.map_data.ysize*32-tmoy,Graphics.height].min Changed: PokemonEditor @@ -2,39 +2,0 @@ -def bltSmallAutotile(autotiles,bitmap,x,y,id,frame) - return if frame<0 || !autotiles || id>=384 - autotile=autotiles[id/48-1] - return if !autotile || autotile.disposed? - cxTile=2 - cyTile=2 - if autotile.height==32 - anim=frame*32 - src_rect=Rect.new(anim,0,32,32) - bitmap.stretch_blt(Rect.new(x,y,cxTile*2,cyTile*2),autotile,src_rect) - else - anim=frame*96 - id%=48 - tiles = TileDrawingHelper::Autotiles[id>>3][id&7] - src=Rect.new(0,0,0,0) - for i in 0...4 - tile_position = tiles[i] - 1 - src.set(tile_position % 6 * 16 + anim, - tile_position / 6 * 16, 16, 16) - bitmap.stretch_blt(Rect.new(i%2*cxTile+x,i/2*cyTile+y,cxTile,cyTile), - autotile, src) - end - end -end - - -def bltSmallRegularTile(tileset,bitmap,x,y,id) - return if !tileset || id<384 || tileset.disposed? - rect=Rect.new((id - 384) % 8 * 32, (id - 384) / 8 * 32,32,32) - bitmap.stretch_blt(Rect.new(x,y,4,4),tileset,rect) -end - -def bltSmallTile(tileset,autotiles,bitmap,x,y,id,frame=0) - if id>=384 - bltSmallRegularTile(tileset,bitmap,x,y,id) - elsif id>0 - bltSmallAutotile(autotiles,bitmap,x,y,id,frame) - end -end @@ -47,6 +8,1 @@ - tileset=tilesets[map.tileset_id] - bmtileset=RPG::Cache.tileset(tileset.tileset_name) - bmautotiles=[] - for i in 0...7 - bmautotiles.push(RPG::Cache.autotile(tileset.autotile_names[i])) - end + helper=TileDrawingHelper.fromTileset(tilesets[map.tileset_id]) @@ -60,2 +16,1 @@ - bltSmallTile(bmtileset,bmautotiles, - bitmap,x*4,y*4,id) + helper.bltSmallTile(bitmap,x*4,y*4,4,4,id) @@ -600,1 +555,1 @@ - Input.updateex + Input.update @@ -661,1 +616,1 @@ - Input.updateex + Input.update @@ -692,1 +647,1 @@ - Input.updateex + Input.update @@ -709,1 +664,1 @@ - Input.updateex + Input.update @@ -741,1 +696,1 @@ - Input.updateex + Input.update @@ -768,1 +723,1 @@ - Input.updateex + Input.update @@ -998,1 +953,1 @@ - viewport=Viewport.new(0,0,480,320) + viewport=Viewport.new(0,0,Graphics.width,Graphics.height) @@ -1016,1 +971,1 @@ - Input.updateex + Input.update @@ -1314,2 +1269,2 @@ - list.width=256 - list.height=320 + list.width=Graphics.width*6/10 + list.height=Graphics.height @@ -1318,1 +1273,1 @@ - title.x=256 + title.x=list.width @@ -1320,1 +1275,1 @@ - title.width=224 + title.width=Graphics.width*4/10 @@ -1325,4 +1280,4 @@ - desc.x=256 - desc.y=64 - desc.width=224 - desc.height=256 + desc.x=list.width + desc.y=title.height + desc.width=Graphics.width*4/10 + desc.height=Graphics.height-title.height @@ -1344,1 +1299,1 @@ - Input.updateex + Input.update @@ -1391,1 +1346,1 @@ - Input.updateex + Input.update @@ -1601,1 +1556,1 @@ - @viewport=Viewport.new(0,0,480,320) + @viewport=Viewport.new(0,0,Graphics.width,Graphics.height) @@ -1702,2 +1657,2 @@ - title.width=400 - title.height=320 + title.width=Graphics.width*8/10 + title.height=Graphics.height @@ -1708,1 +1663,1 @@ - Input.updateex + Input.update @@ -1712,1 +1667,1 @@ - Input.updateex + Input.update @@ -1947,1 +1902,1 @@ - Input.updateex + Input.update Changed: SpriteWindow @@ -460,1 +460,5 @@ - def self.transition(duration = 8, filename = "", vague = 20) + class << Graphics + alias update_KGC_SpecialTransition update + end + end + def self.transition(duration = 8, filename = "", vague = 20) @@ -471,5 +475,21 @@ - end - class << Graphics - alias update_KGC_SpecialTransition update - end - def self.update + end + def self.snap_to_bitmap + takescreen=Win32API.new("rubyscreen.dll","TakeScreenshot","%w(p)","i") + takescreen.call("./tempscreen.bmp") + bm=nil + if FileTest.exist?("./tempscreen.bmp") + bm=Bitmap.new("./tempscreen.bmp") + File.delete("./tempscreen.bmp") + end + if bm && (bm.width320-msgwindow.height + cmdwindow.height=Graphics.height-msgwindow.height if cmdwindow.height>Graphics.height-msgwindow.height @@ -1899,1 +1899,1 @@ - msgwindow.resizeHeightToFit(message,320) + msgwindow.resizeHeightToFit(message,Graphics.height) Changed: PokemonDebug @@ -650,1 +650,1 @@ - cmdwindow.height=320 + cmdwindow.height=Graphics.height @@ -652,1 +652,1 @@ - cmdwindow.height=320 if cmdwindow.height>320 + cmdwindow.height=Graphics.height if cmdwindow.height>Graphics.height @@ -700,1 +700,1 @@ - viewport=Viewport.new(0,0,480,320) + viewport=Viewport.new(0,0,Graphics.width,Graphics.height) @@ -725,1 +725,2 @@ - _INTL("ADD POKéMON") + _INTL("ADD POKéMON"), + _INTL("USE PC") @@ -730,1 +731,1 @@ - cmdwindow.height=320 if cmdwindow.height>320 + cmdwindow.height=Graphics.height if cmdwindow.height>Graphics.height @@ -956,0 +957,2 @@ + elsif ret==22 + pbPokeCenterPC @@ -966,1 +969,1 @@ - super(0, 0, 480, 320) + super(0, 0, Graphics.width, Graphics.height) @@ -1066,1 +1069,1 @@ - viewport=Viewport.new(0,0,480,320) + viewport=Viewport.new(0,0,Graphics.width,Graphics.height) Changed: PokemonBugContest @@ -367,0 +367,2 @@ + $PokemonGlobal.nextBattleBGM=nil + $PokemonGlobal.nextBattleME=nil @@ -373,17 +375,2 @@ - genwildpoke=PokeBattle_Pokemon.new(species,level,$Trainer) - dexdata=pbOpenDexData - itemrnd=rand(100) - if itemrnd<50 - pbDexDataOffset(dexdata,species,48) - genwildpoke.item=dexdata.fgetw - elsif itemrnd<55 - pbDexDataOffset(dexdata,species,50) - genwildpoke.item=dexdata.fgetw - end - dexdata.close - pokerus=(rand(8192)==0) - if pokerus - genwildpoke.pokerus=1 - genwildpoke.pokerusTime=Time.now.to_i - end - wildpoke=[genwildpoke] + genwildpoke=pbGenerateWildPokemon(species,level) + pokerus=(genwildpoke.pokerus==1) @@ -391,1 +378,1 @@ - battle=PokeBattle_BugContestBattle.new(scene,$Trainer.party,wildpoke,$Trainer,nil) + battle=PokeBattle_BugContestBattle.new(scene,$Trainer.party,[genwildpoke],$Trainer,nil) @@ -394,17 +381,1 @@ - if $game_screen.weather_type==1 || $game_screen.weather_type==2 - battle.weather=PBWeather::RAINDANCE - battle.weatherduration=-1 - elsif $game_screen.weather_type==3 - battle.weather=PBWeather::HAIL - battle.weatherduration=-1 - elsif $game_screen.weather_type==4 - battle.weather=PBWeather::SANDSTORM - battle.weatherduration=-1 - elsif $game_screen.weather_type==5 - battle.weather=PBWeather::SUNNYDAY - battle.weatherduration=-1 - end - battle.cantescape=false - battle.shiftStyle=($PokemonSystem.battlestyle==0) - battle.battlescene=($PokemonSystem.battlescene==0) - battle.environment=pbGetEnvironment + wildbgm=pbGetWildBattleBGM(species) @@ -413,3 +384,2 @@ - $game_system.bgm_stop - $game_system.bgs_stop - wildbgm=pbGetWildBattleBGM(species) + $game_system.bgm_pause + $game_system.bgs_pause @@ -421,0 +391,2 @@ + $game_system.bgm_stop + $game_system.bgs_stop @@ -424,14 +396,1 @@ - # Check conditions for evolution - for i in 0...currentlevels.length - pokemon=$Trainer.party[i] - if pokemon && pokemon.level!=currentlevels[i] - newspecies=Kernel.pbCheckEvolution(pokemon) - if newspecies>0 - # Start evolution scene - evo=PokemonEvolutionScene.new - evo.pbStartScreen(pokemon,newspecies) - evo.pbEvolution - evo.pbEndScreen - end - end - end + pbEvolutionCheck(currentlevels) @@ -443,12 +402,1 @@ - if pokerus && rand(3)==0 - first=0 - last=$Trainer.party.length-1 - if $Trainer.party[first].pokerus==0 && !$Trainer.party[first].egg? - $Trainer.party[first].pokerus=1 - $Trainer.party[first].pokerusTime=Time.now.to_i - end - if $Trainer.party[last].pokerus==0 && !$Trainer.party[last].egg? - $Trainer.party[last].pokerus=1 - $Trainer.party[last].pokerusTime=Time.now.to_i - end - end + pbPokerusCheck if pokerus @@ -457,1 +405,0 @@ - pbBugContestState.ballcount=battle.ballcount @@ -459,2 +406,2 @@ - $game_system.bgm_play(playingBGM) - $game_system.bgs_play(playingBGS) + $game_system.bgm_resume(playingBGM) + $game_system.bgs_resume(playingBGS) @@ -462,2 +409,0 @@ - $PokemonEncounters.clearStepCount - Input.update @@ -466,0 +411,3 @@ + pbBugContestState.ballcount=battle.ballcount + $PokemonEncounters.clearStepCount + Input.update Changed: PokemonOrgBattle @@ -54,1 +54,5 @@ - species=PBSpecies.const_get(pieces[0]) + if constDef?(PBSpecies,pieces[0]) + species=PBSpecies.const_get(pieces[0]) + else + species=1 + end @@ -426,2 +430,2 @@ - $game_system.bgm_stop - $game_system.bgs_stop + $game_system.bgm_pause + $game_system.bgs_pause @@ -432,2 +436,2 @@ - $game_system.bgm_play(playingBGM) - $game_system.bgs_play(playingBGS) + $game_system.bgm_resume(playingBGM) + $game_system.bgs_resume(playingBGS) @@ -515,0 +519,1 @@ + # Determine eligibility of all Pokemon @@ -517,1 +522,1 @@ - eligibility.push(2) + eligibility.push(2) # banned @@ -519,1 +524,1 @@ - eligibility.push(1) + eligibility.push(1) # ineligible @@ -521,1 +526,1 @@ - eligibility.push(0) + eligibility.push(0) # eligible @@ -524,0 +529,1 @@ + # Open entry screen @@ -525,0 +531,1 @@ + # Set party @@ -526,0 +533,1 @@ + # Continue (return true) if Pokemon were chosen @@ -592,1 +600,0 @@ - battle.environment=pbGetEnvironment @@ -594,15 +601,1 @@ - if $game_screen.weather_type==1 || $game_screen.weather_type==2 - battle.weather=PBWeather::RAINDANCE - battle.weatherduration=-1 - elsif $game_screen.weather_type==3 - battle.weather=PBWeather::HAIL - battle.weatherduration=-1 - elsif $game_screen.weather_type==4 - battle.weather=PBWeather::SANDSTORM - battle.weatherduration=-1 - elsif $game_screen.weather_type==5 - battle.weather=PBWeather::SUNNYDAY - battle.weatherduration=-1 - end - battle.shiftStyle=($PokemonSystem.battlestyle==0) - battle.battlescene=($PokemonSystem.battlescene==0) + pbPrepareBattle(battle) @@ -611,2 +604,2 @@ - $game_system.bgm_stop - $game_system.bgs_stop + $game_system.bgm_pause + $game_system.bgs_pause @@ -618,2 +611,4 @@ - $game_system.bgm_play(playingBGM) - $game_system.bgs_play(playingBGS) + $game_system.bgm_resume(playingBGM) + $game_system.bgs_resume(playingBGS) + $PokemonGlobal.nextBattleBGM=nil + $PokemonGlobal.nextBattleME=nil @@ -626,2 +621,0 @@ - $PokemonGlobal.nextBattleBGM=nil - $PokemonGlobal.nextBattleME=nil Added: Changed: PokemonSafari Changed: PokemonBerryTag Changed: PokemonOption Changed: PokemonAnimEditor Changed: PokemonMenu Changed: PBIntl Changed: PokemonPhone Changed: Resolution* Changed: EventScene Changed: PerspectiveTilemap Changed: PokemonField Changed: Game_Map* Changed: PokemonNetwork Changed: PokemonMart Changed: PokeBattle_ActualScene Changed: PokemonTrainers Changed: SpriteResizer Changed: PokemonDuel Changed: PokemonTilesetEditor Changed: PBFile Changed: PokemonLoad Changed: WindowAndTilemap Changed: PokemonEntry Changed: Game_System Added: TileDrawingHelper Changed: Compiler Changed: PokemonTrainerCard Changed: PBAnimation Added: Audio Changed: PokemonEvolution Changed: Spriteset_Map Changed: PokemonEditor Changed: SpriteWindow Changed: PokemonSummary Changed: PokemonUtilities Changed: PokemonBag Changed: PokemonScreen Changed: PokemonStorage Changed: PokemonDebug Changed: PokemonBugContest Changed: PokemonOrgBattle