mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
General tidying up
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonPauseMenu_Scene
|
||||
def pbStartScene
|
||||
@viewport = Viewport.new(0,0,Graphics.width,Graphics.height)
|
||||
@@ -78,8 +81,9 @@ class PokemonPauseMenu_Scene
|
||||
def pbRefresh; end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonPauseMenu
|
||||
def initialize(scene)
|
||||
@scene = scene
|
||||
|
||||
@@ -31,8 +31,9 @@ class Window_DexesList < Window_CommandPokemon
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonPokedexMenu_Scene
|
||||
def pbUpdate
|
||||
pbUpdateSpriteHash(@sprites)
|
||||
@@ -81,8 +82,9 @@ class PokemonPokedexMenu_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonPokedexMenuScreen
|
||||
def initialize(scene)
|
||||
@scene = scene
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class Window_Pokedex < Window_DrawableCommand
|
||||
def initialize(x,y,width,height,viewport)
|
||||
@commands = []
|
||||
@@ -69,8 +72,9 @@ class Window_Pokedex < Window_DrawableCommand
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokedexSearchSelectionSprite < SpriteWrapper
|
||||
attr_reader :index
|
||||
attr_accessor :cmds
|
||||
@@ -207,8 +211,6 @@ class PokedexSearchSelectionSprite < SpriteWrapper
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Pokédex main screen
|
||||
#===============================================================================
|
||||
@@ -236,8 +238,8 @@ class PokemonPokedex_Scene
|
||||
@viewport.z = 99999
|
||||
addBackgroundPlane(@sprites,"background","Pokedex/bg_list",@viewport)
|
||||
=begin
|
||||
# Suggestion for changing the background depending on region. You can change
|
||||
# the line above with the following:
|
||||
# Suggestion for changing the background depending on region. You can change
|
||||
# the line above with the following:
|
||||
if pbGetPokedexRegion==-1 # Using national Pokédex
|
||||
addBackgroundPlane(@sprites,"background","Pokedex/bg_national",@viewport)
|
||||
elsif pbGetPokedexRegion==0 # Using first regional Pokédex
|
||||
@@ -1174,8 +1176,9 @@ class PokemonPokedex_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonPokedexScreen
|
||||
def initialize(scene)
|
||||
@scene = scene
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
def pbFindEncounter(encounter,species)
|
||||
return false if !encounter
|
||||
for i in 0...encounter.length
|
||||
next if !encounter[i]
|
||||
for j in 0...encounter[i].length
|
||||
return true if encounter[i][j][0]==species
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonPokedexInfo_Scene
|
||||
def pbStartScene(dexlist,index,region)
|
||||
@viewport = Viewport.new(0,0,Graphics.width,Graphics.height)
|
||||
@@ -286,6 +276,17 @@ class PokemonPokedexInfo_Scene
|
||||
pbDrawImagePositions(overlay, imagepos)
|
||||
end
|
||||
|
||||
def pbFindEncounter(encounter,species)
|
||||
return false if !encounter
|
||||
for i in 0...encounter.length
|
||||
next if !encounter[i]
|
||||
for j in 0...encounter[i].length
|
||||
return true if encounter[i][j][0]==species
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
def drawPageArea
|
||||
@sprites["background"].setBitmap(_INTL("Graphics/Pictures/Pokedex/bg_area"))
|
||||
overlay = @sprites["overlay"].bitmap
|
||||
@@ -539,8 +540,9 @@ class PokemonPokedexInfo_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonPokedexInfoScreen
|
||||
def initialize(scene)
|
||||
@scene = scene
|
||||
|
||||
@@ -75,32 +75,36 @@ class PokemonPartyConfirmCancelSprite < SpriteWrapper
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonPartyCancelSprite < PokemonPartyConfirmCancelSprite
|
||||
def initialize(viewport=nil)
|
||||
super(_INTL("CANCEL"),398,328,false,viewport)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonPartyConfirmSprite < PokemonPartyConfirmCancelSprite
|
||||
def initialize(viewport=nil)
|
||||
super(_INTL("CONFIRM"),398,308,true,viewport)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonPartyCancelSprite2 < PokemonPartyConfirmCancelSprite
|
||||
def initialize(viewport=nil)
|
||||
super(_INTL("CANCEL"),398,346,true,viewport)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class Window_CommandPokemonColor < Window_CommandPokemon
|
||||
def initialize(commands,width=nil)
|
||||
@colorKey = []
|
||||
@@ -127,10 +131,8 @@ class Window_CommandPokemonColor < Window_CommandPokemon
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Pokémon party panels
|
||||
# Blank party panel
|
||||
#===============================================================================
|
||||
class PokemonPartyBlankPanel < SpriteWrapper
|
||||
attr_accessor :text
|
||||
@@ -158,8 +160,9 @@ class PokemonPartyBlankPanel < SpriteWrapper
|
||||
def refresh; end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Pokémon party panel
|
||||
#===============================================================================
|
||||
class PokemonPartyPanel < SpriteWrapper
|
||||
attr_reader :pokemon
|
||||
attr_reader :active
|
||||
@@ -423,8 +426,6 @@ class PokemonPartyPanel < SpriteWrapper
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Pokémon party visuals
|
||||
#===============================================================================
|
||||
@@ -820,8 +821,6 @@ class PokemonParty_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Pokémon party mechanics
|
||||
#===============================================================================
|
||||
@@ -941,7 +940,7 @@ class PokemonPartyScreen
|
||||
def pbChooseMove(pokemon,helptext,index=0)
|
||||
movenames = []
|
||||
for i in pokemon.moves
|
||||
break if i.id==0
|
||||
next if !i || !i.id
|
||||
if i.total_pp<=0
|
||||
movenames.push(_INTL("{1} (PP: ---)",i.name))
|
||||
else
|
||||
@@ -1324,8 +1323,6 @@ class PokemonPartyScreen
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Open the party screen
|
||||
#===============================================================================
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class MoveSelectionSprite < SpriteWrapper
|
||||
attr_reader :preselected
|
||||
attr_reader :index
|
||||
@@ -52,8 +55,9 @@ class MoveSelectionSprite < SpriteWrapper
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class RibbonSelectionSprite < MoveSelectionSprite
|
||||
def initialize(viewport=nil)
|
||||
super(viewport)
|
||||
@@ -94,8 +98,9 @@ class RibbonSelectionSprite < MoveSelectionSprite
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonSummary_Scene
|
||||
def pbUpdate
|
||||
pbUpdateSpriteHash(@sprites)
|
||||
@@ -1305,8 +1310,9 @@ class PokemonSummary_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonSummaryScreen
|
||||
def initialize(scene,inbattle=false)
|
||||
@scene = scene
|
||||
@@ -1347,8 +1353,6 @@ class PokemonSummaryScreen
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class Window_PokemonBag < Window_DrawableCommand
|
||||
attr_reader :pocket
|
||||
attr_accessor :sorting
|
||||
@@ -117,8 +120,6 @@ class Window_PokemonBag < Window_DrawableCommand
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Bag visuals
|
||||
#===============================================================================
|
||||
@@ -319,7 +320,6 @@ class PokemonBag_Scene
|
||||
# Set the selected item's description
|
||||
@sprites["itemtext"].text =
|
||||
(itemlist.item) ? GameData::Item.get(itemlist.item).description : _INTL("Close bag.")
|
||||
|
||||
end
|
||||
|
||||
def pbRefreshFilter
|
||||
@@ -443,8 +443,6 @@ class PokemonBag_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Bag mechanics
|
||||
#===============================================================================
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokegearButton < SpriteWrapper
|
||||
attr_reader :index
|
||||
attr_reader :name
|
||||
@@ -49,8 +52,9 @@ class PokegearButton < SpriteWrapper
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonPokegear_Scene
|
||||
def pbUpdate
|
||||
for i in 0...@commands.length
|
||||
@@ -111,8 +115,9 @@ class PokemonPokegear_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonPokegearScreen
|
||||
def initialize(scene)
|
||||
@scene = scene
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class MapBottomSprite < SpriteWrapper
|
||||
attr_reader :mapname
|
||||
attr_reader :maplocation
|
||||
@@ -52,8 +55,9 @@ class MapBottomSprite < SpriteWrapper
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonRegionMap_Scene
|
||||
LEFT = 0
|
||||
TOP = 0
|
||||
@@ -339,8 +343,9 @@ class PokemonRegionMap_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonRegionMapScreen
|
||||
def initialize(scene)
|
||||
@scene = scene
|
||||
@@ -360,8 +365,9 @@ class PokemonRegionMapScreen
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
def pbShowMap(region=-1,wallmap=true)
|
||||
pbFadeOutIn {
|
||||
scene = PokemonRegionMap_Scene.new(region,wallmap)
|
||||
|
||||
@@ -17,8 +17,9 @@ class Window_PhoneList < Window_CommandPokemon
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonPhoneScene
|
||||
def start
|
||||
commands = []
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonJukebox_Scene
|
||||
def pbUpdate
|
||||
pbUpdateSpriteHash(@sprites)
|
||||
@@ -49,8 +52,9 @@ class PokemonJukebox_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonJukeboxScreen
|
||||
def initialize(scene)
|
||||
@scene = scene
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonTrainerCard_Scene
|
||||
def pbUpdate
|
||||
pbUpdateSpriteHash(@sprites)
|
||||
@@ -95,8 +98,9 @@ class PokemonTrainerCard_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonTrainerCardScreen
|
||||
def initialize(scene)
|
||||
@scene = scene
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonLoadPanel < SpriteWrapper
|
||||
attr_reader :selected
|
||||
|
||||
@@ -91,8 +94,9 @@ class PokemonLoadPanel < SpriteWrapper
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonLoad_Scene
|
||||
def pbStartScene(commands,showContinue,trainer,framecount,mapid)
|
||||
@commands = commands
|
||||
@@ -202,8 +206,9 @@ class PokemonLoad_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonLoadScreen
|
||||
def initialize(scene)
|
||||
@scene = scene
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
def pbSave(safesave=false)
|
||||
$Trainer.metaID=$PokemonGlobal.playerID
|
||||
begin
|
||||
@@ -55,8 +58,9 @@ def pbEmergencySave
|
||||
$scene=oldscene
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonSave_Scene
|
||||
def pbStartScreen
|
||||
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
|
||||
@@ -93,8 +97,9 @@ class PokemonSave_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonSaveScreen
|
||||
def initialize(scene)
|
||||
@scene=scene
|
||||
@@ -146,8 +151,9 @@ class PokemonSaveScreen
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
def pbSaveScreen
|
||||
scene = PokemonSave_Scene.new
|
||||
screen = PokemonSaveScreen.new(scene)
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonSystem
|
||||
attr_accessor :textspeed
|
||||
attr_accessor :battlescene
|
||||
@@ -36,8 +39,6 @@ class PokemonSystem
|
||||
def tilemap; return MAP_VIEW_MODE; end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Stores game options
|
||||
# Default options are at the top of script section SpriteWindow.
|
||||
@@ -113,8 +114,9 @@ def pbSettingToTextSpeed(speed)
|
||||
return MessageConfig::TextSpeed || 1
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
module MessageConfig
|
||||
def self.pbDefaultSystemFrame
|
||||
begin
|
||||
@@ -153,8 +155,6 @@ module MessageConfig
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
@@ -168,8 +168,9 @@ module PropertyMixin
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class EnumOption
|
||||
include PropertyMixin
|
||||
attr_reader :values
|
||||
@@ -195,8 +196,9 @@ class EnumOption
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class EnumOption2
|
||||
include PropertyMixin
|
||||
attr_reader :values
|
||||
@@ -222,8 +224,9 @@ class EnumOption2
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class NumberOption
|
||||
include PropertyMixin
|
||||
attr_reader :name
|
||||
@@ -253,8 +256,9 @@ class NumberOption
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class SliderOption
|
||||
include PropertyMixin
|
||||
attr_reader :name
|
||||
@@ -285,8 +289,6 @@ class SliderOption
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Main options list
|
||||
#===============================================================================
|
||||
@@ -403,8 +405,6 @@ class Window_PokemonOption < Window_DrawableCommand
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Options main screen
|
||||
#===============================================================================
|
||||
@@ -587,8 +587,6 @@ class PokemonOption_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class ReadyMenuButton < SpriteWrapper
|
||||
attr_reader :index # ID of button
|
||||
attr_reader :selected
|
||||
@@ -91,8 +94,9 @@ class ReadyMenuButton < SpriteWrapper
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonReadyMenu_Scene
|
||||
attr_reader :sprites
|
||||
|
||||
@@ -217,8 +221,9 @@ class PokemonReadyMenu_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonReadyMenu
|
||||
def initialize(scene)
|
||||
@scene = scene
|
||||
@@ -290,8 +295,6 @@ class PokemonReadyMenu
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Using a registered item
|
||||
#===============================================================================
|
||||
|
||||
@@ -41,8 +41,6 @@ class PokemonBoxIcon < IconSprite
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Pokémon sprite
|
||||
#===============================================================================
|
||||
@@ -106,8 +104,9 @@ class MosaicPokemonSprite < PokemonSprite
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class AutoMosaicPokemonSprite < MosaicPokemonSprite
|
||||
def update
|
||||
super
|
||||
@@ -115,8 +114,6 @@ class AutoMosaicPokemonSprite < MosaicPokemonSprite
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Cursor
|
||||
#===============================================================================
|
||||
@@ -288,8 +285,6 @@ class PokemonBoxArrow < SpriteWrapper
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Box
|
||||
#===============================================================================
|
||||
@@ -444,8 +439,6 @@ class PokemonBoxSprite < SpriteWrapper
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Party pop-up panel
|
||||
#===============================================================================
|
||||
@@ -565,8 +558,6 @@ class PokemonBoxPartySprite < SpriteWrapper
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Pokémon storage visuals
|
||||
#===============================================================================
|
||||
@@ -1452,8 +1443,6 @@ class PokemonStorageScene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Pokémon storage mechanics
|
||||
#===============================================================================
|
||||
@@ -1469,8 +1458,7 @@ class PokemonStorageScreen
|
||||
|
||||
def pbStartScreen(command)
|
||||
@heldpkmn = nil
|
||||
if command==0
|
||||
### ORGANISE ###################################################################
|
||||
if command==0 # Organise
|
||||
@scene.pbStartBox(self,command)
|
||||
loop do
|
||||
selected = @scene.pbSelectBox(@storage.party)
|
||||
@@ -1551,8 +1539,7 @@ class PokemonStorageScreen
|
||||
end
|
||||
end
|
||||
@scene.pbCloseBox
|
||||
elsif command==1
|
||||
### WITHDRAW ###################################################################
|
||||
elsif command==1 # Withdraw
|
||||
@scene.pbStartBox(self,command)
|
||||
loop do
|
||||
selected = @scene.pbSelectBox(@storage.party)
|
||||
@@ -1592,8 +1579,7 @@ class PokemonStorageScreen
|
||||
end
|
||||
end
|
||||
@scene.pbCloseBox
|
||||
elsif command==2
|
||||
### DEPOSIT ####################################################################
|
||||
elsif command==2 # Deposit
|
||||
@scene.pbStartBox(self,command)
|
||||
loop do
|
||||
selected = @scene.pbSelectParty(@storage.party)
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class Window_PokemonItemStorage < Window_DrawableCommand
|
||||
attr_reader :bag
|
||||
attr_reader :pocket
|
||||
@@ -47,8 +50,9 @@ class Window_PokemonItemStorage < Window_DrawableCommand
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class ItemStorage_Scene
|
||||
ITEMLISTBASECOLOR = Color.new(88,88,80)
|
||||
ITEMLISTSHADOWCOLOR = Color.new(168,184,184)
|
||||
@@ -169,24 +173,24 @@ class ItemStorage_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class WithdrawItemScene < ItemStorage_Scene
|
||||
def initialize
|
||||
super(_INTL("Withdraw\nItem"))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class TossItemScene < ItemStorage_Scene
|
||||
def initialize
|
||||
super(_INTL("Toss\nItem"))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Common UI functions used in both the Bag and item storage screens.
|
||||
# Displays messages and allows the user to choose a number/command.
|
||||
|
||||
@@ -1,3 +1,113 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class TrainerPC
|
||||
def shouldShow?
|
||||
return true
|
||||
end
|
||||
|
||||
def name
|
||||
return _INTL("{1}'s PC",$Trainer.name)
|
||||
end
|
||||
|
||||
def access
|
||||
pbMessage(_INTL("\\se[PC access]Accessed {1}'s PC.",$Trainer.name))
|
||||
pbTrainerPCMenu
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class StorageSystemPC
|
||||
def shouldShow?
|
||||
return true
|
||||
end
|
||||
|
||||
def name
|
||||
if $PokemonGlobal.seenStorageCreator
|
||||
return _INTL("{1}'s PC",pbGetStorageCreator)
|
||||
else
|
||||
return _INTL("Someone's PC")
|
||||
end
|
||||
end
|
||||
|
||||
def access
|
||||
pbMessage(_INTL("\\se[PC access]The Pokémon Storage System was opened."))
|
||||
command = 0
|
||||
loop do
|
||||
command = pbShowCommandsWithHelp(nil,
|
||||
[_INTL("Organize Boxes"),
|
||||
_INTL("Withdraw Pokémon"),
|
||||
_INTL("Deposit Pokémon"),
|
||||
_INTL("See ya!")],
|
||||
[_INTL("Organize the Pokémon in Boxes and in your party."),
|
||||
_INTL("Move Pokémon stored in Boxes to your party."),
|
||||
_INTL("Store Pokémon in your party in Boxes."),
|
||||
_INTL("Return to the previous menu.")],-1,command
|
||||
)
|
||||
if command>=0 && command<3
|
||||
if command==1 # Withdraw
|
||||
if $PokemonStorage.party.length>=6
|
||||
pbMessage(_INTL("Your party is full!"))
|
||||
next
|
||||
end
|
||||
elsif command==2 # Deposit
|
||||
count=0
|
||||
for p in $PokemonStorage.party
|
||||
count += 1 if p && !p.egg? && p.hp>0
|
||||
end
|
||||
if count<=1
|
||||
pbMessage(_INTL("Can't deposit the last Pokémon!"))
|
||||
next
|
||||
end
|
||||
end
|
||||
pbFadeOutIn {
|
||||
scene = PokemonStorageScene.new
|
||||
screen = PokemonStorageScreen.new(scene,$PokemonStorage)
|
||||
screen.pbStartScreen(command)
|
||||
}
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
module PokemonPCList
|
||||
@@pclist = []
|
||||
|
||||
def self.registerPC(pc)
|
||||
@@pclist.push(pc)
|
||||
end
|
||||
|
||||
def self.getCommandList
|
||||
commands = []
|
||||
for pc in @@pclist
|
||||
commands.push(pc.name) if pc.shouldShow?
|
||||
end
|
||||
commands.push(_INTL("Log Off"))
|
||||
return commands
|
||||
end
|
||||
|
||||
def self.callCommand(cmd)
|
||||
return false if cmd<0 || cmd>=@@pclist.length
|
||||
i = 0
|
||||
for pc in @@pclist
|
||||
next if !pc.shouldShow?
|
||||
if i==cmd
|
||||
pc.access
|
||||
return true
|
||||
end
|
||||
i += 1
|
||||
end
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# PC menus
|
||||
#===============================================================================
|
||||
@@ -118,90 +228,6 @@ def pbTrainerPCMenu
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
class TrainerPC
|
||||
def shouldShow?
|
||||
return true
|
||||
end
|
||||
|
||||
def name
|
||||
return _INTL("{1}'s PC",$Trainer.name)
|
||||
end
|
||||
|
||||
def access
|
||||
pbMessage(_INTL("\\se[PC access]Accessed {1}'s PC.",$Trainer.name))
|
||||
pbTrainerPCMenu
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
def pbGetStorageCreator
|
||||
creator = pbStorageCreator
|
||||
creator = _INTL("Bill") if !creator || creator==""
|
||||
return creator
|
||||
end
|
||||
|
||||
|
||||
|
||||
class StorageSystemPC
|
||||
def shouldShow?
|
||||
return true
|
||||
end
|
||||
|
||||
def name
|
||||
if $PokemonGlobal.seenStorageCreator
|
||||
return _INTL("{1}'s PC",pbGetStorageCreator)
|
||||
else
|
||||
return _INTL("Someone's PC")
|
||||
end
|
||||
end
|
||||
|
||||
def access
|
||||
pbMessage(_INTL("\\se[PC access]The Pokémon Storage System was opened."))
|
||||
command = 0
|
||||
loop do
|
||||
command = pbShowCommandsWithHelp(nil,
|
||||
[_INTL("Organize Boxes"),
|
||||
_INTL("Withdraw Pokémon"),
|
||||
_INTL("Deposit Pokémon"),
|
||||
_INTL("See ya!")],
|
||||
[_INTL("Organize the Pokémon in Boxes and in your party."),
|
||||
_INTL("Move Pokémon stored in Boxes to your party."),
|
||||
_INTL("Store Pokémon in your party in Boxes."),
|
||||
_INTL("Return to the previous menu.")],-1,command
|
||||
)
|
||||
if command>=0 && command<3
|
||||
if command==1 # Withdraw
|
||||
if $PokemonStorage.party.length>=6
|
||||
pbMessage(_INTL("Your party is full!"))
|
||||
next
|
||||
end
|
||||
elsif command==2 # Deposit
|
||||
count=0
|
||||
for p in $PokemonStorage.party
|
||||
count += 1 if p && !p.egg? && p.hp>0
|
||||
end
|
||||
if count<=1
|
||||
pbMessage(_INTL("Can't deposit the last Pokémon!"))
|
||||
next
|
||||
end
|
||||
end
|
||||
pbFadeOutIn {
|
||||
scene = PokemonStorageScene.new
|
||||
screen = PokemonStorageScreen.new(scene,$PokemonStorage)
|
||||
screen.pbStartScreen(command)
|
||||
}
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
def pbTrainerPC
|
||||
pbMessage(_INTL("\\se[PC open]{1} booted up the PC.",$Trainer.name))
|
||||
pbTrainerPCMenu
|
||||
@@ -220,40 +246,14 @@ def pbPokeCenterPC
|
||||
pbSEPlay("PC close")
|
||||
end
|
||||
|
||||
|
||||
|
||||
module PokemonPCList
|
||||
@@pclist = []
|
||||
|
||||
def self.registerPC(pc)
|
||||
@@pclist.push(pc)
|
||||
end
|
||||
|
||||
def self.getCommandList
|
||||
commands = []
|
||||
for pc in @@pclist
|
||||
commands.push(pc.name) if pc.shouldShow?
|
||||
end
|
||||
commands.push(_INTL("Log Off"))
|
||||
return commands
|
||||
end
|
||||
|
||||
def self.callCommand(cmd)
|
||||
return false if cmd<0 || cmd>=@@pclist.length
|
||||
i = 0
|
||||
for pc in @@pclist
|
||||
next if !pc.shouldShow?
|
||||
if i==cmd
|
||||
pc.access
|
||||
return true
|
||||
end
|
||||
i += 1
|
||||
end
|
||||
return false
|
||||
end
|
||||
def pbGetStorageCreator
|
||||
creator = pbStorageCreator
|
||||
creator = _INTL("Bill") if !creator || creator==""
|
||||
return creator
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
PokemonPCList.registerPC(StorageSystemPC.new)
|
||||
PokemonPCList.registerPC(TrainerPC.new)
|
||||
|
||||
@@ -162,8 +162,9 @@ class PokemonEggHatch_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonEggHatchScreen
|
||||
def initialize(scene)
|
||||
@scene=scene
|
||||
@@ -176,8 +177,9 @@ class PokemonEggHatchScreen
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
def pbHatchAnimation(pokemon)
|
||||
pbMessage(_INTL("Huh?\1"))
|
||||
pbFadeOutInWithMusic {
|
||||
|
||||
@@ -226,8 +226,9 @@ class SpriteMetafile
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class SpriteMetafilePlayer
|
||||
def initialize(metafile,sprite=nil)
|
||||
@metafile=metafile
|
||||
@@ -283,8 +284,9 @@ class SpriteMetafilePlayer
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
def pbSaveSpriteState(sprite)
|
||||
state=[]
|
||||
return state if !sprite || sprite.disposed?
|
||||
@@ -342,8 +344,6 @@ def pbRestoreSpriteStateAndBitmap(sprite,state)
|
||||
return state
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Evolution screen
|
||||
#===============================================================================
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonTrade_Scene
|
||||
def pbUpdate
|
||||
pbUpdateSpriteHash(@sprites)
|
||||
@@ -187,8 +190,9 @@ class PokemonTrade_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
def pbStartTrade(pokemonIndex,newpoke,nickname,trainerName,trainerGender=0)
|
||||
myPokemon = $Trainer.party[pokemonIndex]
|
||||
opponent = PokeBattle_Trainer.new(trainerName,trainerGender)
|
||||
@@ -220,9 +224,6 @@ def pbStartTrade(pokemonIndex,newpoke,nickname,trainerName,trainerGender=0)
|
||||
$Trainer.party[pokemonIndex] = yourPokemon
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Evolution methods
|
||||
#===============================================================================
|
||||
def pbTradeCheckEvolution(pkmn, other_pkmn)
|
||||
return pbCheckEvolutionEx(pkmn) { |pkmn, method, parameter, new_species|
|
||||
success = PBEvolution.call("tradeCheck", method, pkmn, parameter, other_pkmn)
|
||||
|
||||
@@ -1,30 +1,6 @@
|
||||
# Unused
|
||||
def pbHasRelearnableMove?(pokemon)
|
||||
return pbGetRelearnableMoves(pokemon).length>0
|
||||
end
|
||||
|
||||
def pbGetRelearnableMoves(pokemon)
|
||||
return [] if !pokemon || pokemon.egg? || pokemon.shadowPokemon?
|
||||
moves=[]
|
||||
pokemon.getMoveList.each do |m|
|
||||
next if m[0] > pokemon.level || pokemon.hasMove?(m[1])
|
||||
moves.push(m[1]) if !moves.include?(m[1])
|
||||
end
|
||||
tmoves=[]
|
||||
if pokemon.firstmoves
|
||||
for i in pokemon.firstmoves
|
||||
tmoves.push(i) if !pokemon.hasMove?(i) && !moves.include?(i)
|
||||
end
|
||||
end
|
||||
moves=tmoves+moves
|
||||
return moves|[] # remove duplicates
|
||||
end
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
# Scene class for handling appearance of the screen
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
class MoveRelearner_Scene
|
||||
VISIBLEMOVES = 4
|
||||
|
||||
@@ -168,27 +144,44 @@ class MoveRelearner_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Screen class for handling game logic
|
||||
#===============================================================================
|
||||
class MoveRelearnerScreen
|
||||
def initialize(scene)
|
||||
@scene = scene
|
||||
end
|
||||
|
||||
def pbStartScreen(pokemon)
|
||||
moves=pbGetRelearnableMoves(pokemon)
|
||||
@scene.pbStartScene(pokemon,moves)
|
||||
def pbGetRelearnableMoves(pkmn)
|
||||
return [] if !pkmn || pkmn.egg? || pkmn.shadowPokemon?
|
||||
moves = []
|
||||
pkmn.getMoveList.each do |m|
|
||||
next if m[0] > pkmn.level || pkmn.hasMove?(m[1])
|
||||
moves.push(m[1]) if !moves.include?(m[1])
|
||||
end
|
||||
tmoves = []
|
||||
if pkmn.firstmoves
|
||||
for i in pkmn.firstmoves
|
||||
tmoves.push(i) if !pkmn.hasMove?(i) && !moves.include?(i)
|
||||
end
|
||||
end
|
||||
moves = tmoves + moves
|
||||
return moves | [] # remove duplicates
|
||||
end
|
||||
|
||||
def pbStartScreen(pkmn)
|
||||
moves = pbGetRelearnableMoves(pkmn)
|
||||
@scene.pbStartScene(pkmn, moves)
|
||||
loop do
|
||||
move=@scene.pbChooseMove
|
||||
move = @scene.pbChooseMove
|
||||
if move
|
||||
if @scene.pbConfirm(_INTL("Teach {1}?",GameData::Move.get(move).name))
|
||||
if pbLearnMove(pokemon,move)
|
||||
if @scene.pbConfirm(_INTL("Teach {1}?", GameData::Move.get(move).name))
|
||||
if pbLearnMove(pkmn, move)
|
||||
@scene.pbEndScene
|
||||
return true
|
||||
end
|
||||
end
|
||||
elsif @scene.pbConfirm(_INTL("Give up trying to teach a new move to {1}?",pokemon.name))
|
||||
elsif @scene.pbConfirm(_INTL("Give up trying to teach a new move to {1}?", pkmn.name))
|
||||
@scene.pbEndScene
|
||||
return false
|
||||
end
|
||||
@@ -196,14 +189,15 @@ class MoveRelearnerScreen
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
def pbRelearnMoveScreen(pokemon)
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
def pbRelearnMoveScreen(pkmn)
|
||||
retval = true
|
||||
pbFadeOutIn {
|
||||
scene = MoveRelearner_Scene.new
|
||||
screen = MoveRelearnerScreen.new(scene)
|
||||
retval = screen.pbStartScreen(pokemon)
|
||||
retval = screen.pbStartScreen(pkmn)
|
||||
}
|
||||
return retval
|
||||
end
|
||||
|
||||
@@ -1,3 +1,42 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonGlobalMetadata
|
||||
attr_writer :purifyChamber
|
||||
attr_accessor :seenPurifyChamber
|
||||
|
||||
def purifyChamber
|
||||
@purifyChamber = PurifyChamber.new() if !@purifyChamber
|
||||
return @purifyChamber
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# General purpose utilities
|
||||
#===============================================================================
|
||||
def pbDrawGauge(bitmap,rect,color,value,maxValue)
|
||||
return if !bitmap
|
||||
bitmap.fill_rect(rect.x,rect.y,rect.width,rect.height,Color.new(0,0,0))
|
||||
width=(maxValue<=0) ? 0 : (rect.width-4)*value/maxValue
|
||||
if rect.width>=4 && rect.height>=4
|
||||
bitmap.fill_rect(rect.x+2,rect.y+2,rect.width-4,rect.height-4,Color.new(248,248,248))
|
||||
bitmap.fill_rect(rect.x+2,rect.y+2,width,rect.height-4,color)
|
||||
end
|
||||
end
|
||||
|
||||
def calcPoint(x,y,distance,angle) # angle in degrees
|
||||
angle -=(angle/360.0).floor*360 # normalize
|
||||
angle = (angle/360.0)*(2*Math::PI) # convert to radians
|
||||
angle = -angle % (2*Math::PI) # normalize radians
|
||||
point = [(Math.cos(angle) * distance), (Math.sin(angle) * distance)]
|
||||
point[0] += x
|
||||
point[1] += y
|
||||
return point
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PurifyChamberSet
|
||||
attr_reader :facing
|
||||
attr_reader :shadow
|
||||
@@ -27,11 +66,9 @@ class PurifyChamberSet
|
||||
end
|
||||
end
|
||||
|
||||
=begin
|
||||
Main component is tempo
|
||||
Boosted if center has advantage over facing Pokemon
|
||||
Boosted based on number of best circles
|
||||
=end
|
||||
# Main component is tempo
|
||||
# Boosted if center has advantage over facing Pokemon
|
||||
# Boosted based on number of best circles
|
||||
def flow
|
||||
ret=0
|
||||
return 0 if !@shadow
|
||||
@@ -54,8 +91,8 @@ Boosted based on number of best circles
|
||||
return (PurifyChamberSet.isSuperEffective(@list[i],@list[(i+1)%@list.length])) ? 2 : 1
|
||||
end
|
||||
|
||||
# Tempo refers to the type advantages of each Pokemon in a certain set in a
|
||||
# clockwise direction. Tempo also depends on the number of Pokemon in the set
|
||||
# Tempo refers to the type advantages of each Pokemon in a certain set in a
|
||||
# clockwise direction. Tempo also depends on the number of Pokemon in the set
|
||||
def tempo
|
||||
ret=0
|
||||
for i in 0...@list.length
|
||||
@@ -103,9 +140,10 @@ Boosted based on number of best circles
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
class PurifyChamber # German: der Kryptorbis
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PurifyChamber
|
||||
NUMSETS=9
|
||||
SETSIZE=4
|
||||
attr_reader :currentSet # German: das Forum
|
||||
@@ -231,68 +269,9 @@ class PurifyChamber # German: der Kryptorbis
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
class PokemonGlobalMetadata
|
||||
attr_writer :purifyChamber
|
||||
attr_accessor :seenPurifyChamber
|
||||
|
||||
def purifyChamber
|
||||
@purifyChamber = PurifyChamber.new() if !@purifyChamber
|
||||
return @purifyChamber
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
class PurifyChamberPC
|
||||
def shouldShow?
|
||||
return $PokemonGlobal.seenPurifyChamber
|
||||
end
|
||||
|
||||
def name
|
||||
return _INTL("Purify Chamber")
|
||||
end
|
||||
|
||||
def access
|
||||
pbMessage(_INTL("\\se[PC access]Accessed the Purify Chamber."))
|
||||
pbPurifyChamber()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
PokemonPCList.registerPC(PurifyChamberPC.new)
|
||||
|
||||
#####################
|
||||
#===============================================================================
|
||||
#
|
||||
# General purpose utilities
|
||||
#
|
||||
|
||||
def pbDrawGauge(bitmap,rect,color,value,maxValue)
|
||||
return if !bitmap
|
||||
bitmap.fill_rect(rect.x,rect.y,rect.width,rect.height,Color.new(0,0,0))
|
||||
width=(maxValue<=0) ? 0 : (rect.width-4)*value/maxValue
|
||||
if rect.width>=4 && rect.height>=4
|
||||
bitmap.fill_rect(rect.x+2,rect.y+2,rect.width-4,rect.height-4,Color.new(248,248,248))
|
||||
bitmap.fill_rect(rect.x+2,rect.y+2,width,rect.height-4,color)
|
||||
end
|
||||
end
|
||||
|
||||
def calcPoint(x,y,distance,angle) # angle in degrees
|
||||
angle -=(angle/360.0).floor*360 # normalize
|
||||
angle = (angle/360.0)*(2*Math::PI) # convert to radians
|
||||
angle = -angle % (2*Math::PI) # normalize radians
|
||||
point = [(Math.cos(angle) * distance), (Math.sin(angle) * distance)]
|
||||
point[0] += x
|
||||
point[1] += y
|
||||
return point
|
||||
end
|
||||
|
||||
|
||||
#####################
|
||||
|
||||
|
||||
#===============================================================================
|
||||
module PurifyChamberHelper
|
||||
def self.pbGetPokemon2(chamber,set,position)
|
||||
if position==0
|
||||
@@ -349,19 +328,20 @@ module PurifyChamberHelper
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PurifyChamberScreen
|
||||
def initialize(scene)
|
||||
@scene=scene
|
||||
@chamber=$PokemonGlobal.purifyChamber
|
||||
# for j in 0...PurifyChamber::NUMSETS
|
||||
# @chamber.debugAddShadow(j,rand(100)+1)
|
||||
# @chamber[j].shadow.heartgauge=0
|
||||
# for i in 0...PurifyChamber::SETSIZE
|
||||
# @chamber.debugAddNormal(j,rand(100)+1)
|
||||
# end
|
||||
# end
|
||||
# for j in 0...PurifyChamber::NUMSETS
|
||||
# @chamber.debugAddShadow(j,rand(100)+1)
|
||||
# @chamber[j].shadow.heartgauge=0
|
||||
# for i in 0...PurifyChamber::SETSIZE
|
||||
# @chamber.debugAddNormal(j,rand(100)+1)
|
||||
# end
|
||||
# end
|
||||
end
|
||||
|
||||
def pbPlace(pkmn,position)
|
||||
@@ -637,10 +617,9 @@ class PurifyChamberScreen
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
################################################
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class Window_PurifyChamberSets < Window_DrawableCommand
|
||||
attr_reader :switching
|
||||
|
||||
@@ -682,8 +661,9 @@ class Window_PurifyChamberSets < Window_DrawableCommand
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class DirectFlowDiagram
|
||||
def initialize(viewport=nil)
|
||||
@points=[]
|
||||
@@ -756,8 +736,9 @@ class DirectFlowDiagram
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class FlowDiagram
|
||||
def initialize(viewport=nil)
|
||||
@points=[]
|
||||
@@ -844,8 +825,9 @@ class FlowDiagram
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PurifyChamberSetView < SpriteWrapper
|
||||
attr_reader :set
|
||||
attr_reader :cursor
|
||||
@@ -1085,8 +1067,9 @@ class PurifyChamberSetView < SpriteWrapper
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PurifyChamberScene
|
||||
def pbUpdate()
|
||||
pbUpdateSpriteHash(@sprites)
|
||||
@@ -1297,8 +1280,9 @@ class PurifyChamberScene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
def pbPurifyChamber
|
||||
$PokemonGlobal.seenPurifyChamber = true
|
||||
pbFadeOutIn {
|
||||
@@ -1307,3 +1291,26 @@ def pbPurifyChamber
|
||||
screen.pbStartPurify
|
||||
}
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PurifyChamberPC
|
||||
def shouldShow?
|
||||
return $PokemonGlobal.seenPurifyChamber
|
||||
end
|
||||
|
||||
def name
|
||||
return _INTL("Purify Chamber")
|
||||
end
|
||||
|
||||
def access
|
||||
pbMessage(_INTL("\\se[PC access]Accessed the Purify Chamber."))
|
||||
pbPurifyChamber()
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
PokemonPCList.registerPC(PurifyChamberPC.new)
|
||||
|
||||
@@ -81,8 +81,6 @@ class PokemonMartAdapter
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Abstraction layer for RPG Maker XP
|
||||
# Won't be used if $PokemonBag exists
|
||||
@@ -216,7 +214,6 @@ class RpgxpMartAdapter
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Buy and Sell adapters
|
||||
#===============================================================================
|
||||
@@ -238,8 +235,9 @@ class BuyAdapter
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class SellAdapter
|
||||
def initialize(adapter)
|
||||
@adapter = adapter
|
||||
@@ -262,8 +260,6 @@ class SellAdapter
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Pokémon Mart
|
||||
#===============================================================================
|
||||
@@ -305,8 +301,9 @@ class Window_PokemonMart < Window_DrawableCommand
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonMart_Scene
|
||||
def update
|
||||
pbUpdateSpriteHash(@sprites)
|
||||
@@ -657,10 +654,9 @@ class PokemonMart_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#######################################################
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonMartScreen
|
||||
def initialize(scene,stock)
|
||||
@scene=scene
|
||||
@@ -786,8 +782,9 @@ class PokemonMartScreen
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
def pbPokemonMart(stock,speech=nil,cantsell=false)
|
||||
for i in 0...stock.length
|
||||
stock[i] = GameData::Item.get(stock[i]).id
|
||||
@@ -822,64 +819,3 @@ def pbPokemonMart(stock,speech=nil,cantsell=false)
|
||||
end
|
||||
$game_temp.clear_mart_prices
|
||||
end
|
||||
|
||||
|
||||
|
||||
class Game_Temp
|
||||
attr_writer :mart_prices
|
||||
|
||||
def mart_prices
|
||||
@mart_prices = [] if !@mart_prices
|
||||
return @mart_prices
|
||||
end
|
||||
|
||||
def clear_mart_prices
|
||||
@mart_prices = []
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
class Interpreter
|
||||
def getItem(p)
|
||||
if p[0]==0; return $data_items[p[1]]
|
||||
elsif p[0]==1; return $data_weapons[p[1]]
|
||||
elsif p[0]==2; return $data_armors[p[1]]
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
def command_302
|
||||
$game_temp.battle_abort = true
|
||||
shop_goods = [getItem(@parameters)]
|
||||
# Loop
|
||||
loop do
|
||||
# Advance index
|
||||
@index += 1
|
||||
# If next event command has shop on second line or after
|
||||
if @list[@index].code == 605
|
||||
# Add goods list to new item
|
||||
shop_goods.push(getItem(@list[@index].parameters))
|
||||
else
|
||||
# End
|
||||
pbPokemonMart(shop_goods.compact)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def setPrice(item,buyprice=-1,sellprice=-1)
|
||||
item = GameData::Item.get(item).id
|
||||
$game_temp.mart_prices[item] = [-1,-1] if !$game_temp.mart_prices[item]
|
||||
$game_temp.mart_prices[item][0] = buyprice if buyprice>0
|
||||
if sellprice>=0 # 0=can't sell
|
||||
$game_temp.mart_prices[item][1] = sellprice*2
|
||||
else
|
||||
$game_temp.mart_prices[item][1] = buyprice if buyprice>0
|
||||
end
|
||||
end
|
||||
|
||||
def setSellPrice(item,sellprice)
|
||||
setPrice(item,-1,sellprice)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
MYSTERY_GIFT_URL = "http://images1.wikia.nocookie.net/pokemonessentials/images/e/e7/MysteryGift.txt"
|
||||
# MYSTERY_GIFT_URL = "http://pastebin.com/raw/w6BqqUsm"
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokeBattle_Trainer
|
||||
attr_writer :mysterygiftaccess # Whether MG can be used from load screen
|
||||
attr_writer :mysterygift # Variable that stores downloaded MG data
|
||||
@@ -24,8 +25,6 @@ class PokeBattle_Trainer
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Creating a new Mystery Gift for the Master file, and editing an existing one.
|
||||
#===============================================================================
|
||||
|
||||
@@ -437,8 +437,9 @@ class HallOfFame_Scene
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class HallOfFameScreen
|
||||
def initialize(scene)
|
||||
@scene = scene
|
||||
@@ -457,8 +458,9 @@ class HallOfFameScreen
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class HallOfFamePC
|
||||
def shouldShow?
|
||||
return $PokemonGlobal.hallOfFameLastNumber>0
|
||||
@@ -474,12 +476,14 @@ class HallOfFamePC
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
PokemonPCList.registerPC(HallOfFamePC.new)
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonGlobalMetadata
|
||||
attr_writer :hallOfFame
|
||||
# Number necessary if hallOfFame array reach in its size limit
|
||||
@@ -495,8 +499,9 @@ class PokemonGlobalMetadata
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
def pbHallOfFameEntry
|
||||
scene=HallOfFame_Scene.new
|
||||
screen=HallOfFameScreen.new(scene)
|
||||
|
||||
Reference in New Issue
Block a user