Module: GamePlay

Defined in:
docs/4_Systems_000_General.rb,
docs/4_Systems_101_Dex.rb,
docs/4_Systems_103_Bag.rb,
docs/4_Systems_901_GTS.rb,
docs/4_Systems_100_Menu.rb,
docs/4_Systems_203_Shop.rb,
docs/4_Systems_102_Party.rb,
docs/4_Systems_205_Input.rb,
docs/4_Systems_800_Quest.rb,
docs/4_Systems_900_Games.rb,
docs/4_Systems_950_Movie.rb,
docs/4_Systems_303_Evolve.rb,
docs/4_Systems_002_Credits.rb,
docs/4_Systems_004_Message.rb,
docs/4_Systems_104_Trainer.rb,
docs/4_Systems_105_Options.rb,
docs/4_Systems_200_Storage.rb,
docs/4_Systems_206_TownMap.rb,
docs/4_Systems_207_Shortcut.rb,
docs/4_Systems_106_Save_Load.rb,
docs/4_Systems_400_RSE_Clock.rb,
docs/4_Systems_304_HMBarScene.rb,
docs/4_Systems_801_Mining_Game.rb,
docs/4_Systems_300_Hall_of_fame.rb,
docs/4_Systems_301_MoveTeaching.rb,
docs/4_Systems_302_MoveReminder.rb,
docs/4_Systems_000_General_2_GamePlay__Base.rb

Overview

Module holding all the scenes of the game

Defined Under Namespace

Modules: BagMixin, Casino, DisplayMessage, EvolveMixin, MenuMixin, MoveReminderMixin, MoveTeachingMixin, NameInputMixin, OptionsMixin, PartyMenuMixin, PokemonTradeStorageMixin, RSEClockHelpers Classes: Bag, Base, BaseCleanUpdate, Battle_Bag, CreditScene, Dex, Evolve, HMBarScene, Hall_of_Fame, Hatch, KeyBinding, Language_Choice, Load, Menu, MiningGame, MoveTeaching, Move_Reminder, Movie, NameInput, NumberInput, Options, Party_Menu, PokemonStorage, PokemonTradeStorage, Pokemon_Shop, QuestUI, RSEClock, Save, Shop, Shortcut, StateMachine, Summary, TCard, WorldMap

Constant Summary collapse

Skill_Learn =

Compatibility with old PSDK version

MoveTeaching

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.bag_class ⇒ Class<Bag>

Get the current bag scene

Returns:



122
123
124
# File 'docs/4_Systems_000_General.rb', line 122

def bag_class
  @bag_class
end

.bag_mixin ⇒ Module<BagMixin>

Get the current bag scene mixin (telling IO)

Returns:



119
120
121
# File 'docs/4_Systems_000_General.rb', line 119

def bag_mixin
  @bag_mixin
end

.battle_bag_class ⇒ Class<Battle_Bag>

Get the current battle bag class

Returns:



125
126
127
# File 'docs/4_Systems_000_General.rb', line 125

def battle_bag_class
  @battle_bag_class
end

.dex_class ⇒ Class<Dex>

Get the Dex class

Returns:



167
168
169
# File 'docs/4_Systems_000_General.rb', line 167

def dex_class
  @dex_class
end

.evolve_class ⇒ Class<Evolve>

Get the evolve scene

Returns:



355
356
357
# File 'docs/4_Systems_000_General.rb', line 355

def evolve_class
  @evolve_class
end

.evolve_mixin ⇒ Class<EvolveMixin>

Get the evolve scene mixin

Returns:



352
353
354
# File 'docs/4_Systems_000_General.rb', line 352

def evolve_mixin
  @evolve_mixin
end

.hall_of_fame_class ⇒ Class<Hall_of_Fame>

Get the hall of fame scene

Returns:



294
295
296
# File 'docs/4_Systems_000_General.rb', line 294

def hall_of_fame_class
  @hall_of_fame_class
end

.hatch_class ⇒ Class<Hatch>

Get the hatch scene

Returns:



358
359
360
# File 'docs/4_Systems_000_General.rb', line 358

def hatch_class
  @hatch_class
end

.hm_bar_scene_class ⇒ Class<HMBarScene>

Get the HMBarScene scene

Returns:



397
398
399
# File 'docs/4_Systems_000_General.rb', line 397

def hm_bar_scene_class
  @hm_bar_scene_class
end

Get the menu scene

Returns:



112
113
114
# File 'docs/4_Systems_000_General.rb', line 112

def menu_class
  @menu_class
end

Get the menu scene mixin

Returns:



109
110
111
# File 'docs/4_Systems_000_General.rb', line 109

def menu_mixin
  @menu_mixin
end

.move_reminder_class ⇒ Class<Move_Reminder>

Get the move reminder scene

Returns:



343
344
345
# File 'docs/4_Systems_000_General.rb', line 343

def move_reminder_class
  @move_reminder_class
end

.move_reminder_mixin ⇒ Class<MoveReminderMixin>

Get the move reminder scene mixin

Returns:



340
341
342
# File 'docs/4_Systems_000_General.rb', line 340

def move_reminder_mixin
  @move_reminder_mixin
end

.move_teaching_class ⇒ Class<MoveTeaching>

Get the move teaching scene

Returns:



331
332
333
# File 'docs/4_Systems_000_General.rb', line 331

def move_teaching_class
  @move_teaching_class
end

.move_teaching_mixin ⇒ Class<MoveTeachingMixin>

Get the move teaching scene mixin

Returns:



328
329
330
# File 'docs/4_Systems_000_General.rb', line 328

def move_teaching_mixin
  @move_teaching_mixin
end

.options_class ⇒ Class<Options>

Get the option setting scene

Returns:



256
257
258
# File 'docs/4_Systems_000_General.rb', line 256

def options_class
  @options_class
end

.options_mixin ⇒ Class<OptionsMixin>

Get the option setting scene mixin

Returns:



253
254
255
# File 'docs/4_Systems_000_General.rb', line 253

def options_mixin
  @options_mixin
end

.party_menu_class ⇒ Class<Party_Menu>

Get the party menu scene

Returns:



184
185
186
# File 'docs/4_Systems_000_General.rb', line 184

def party_menu_class
  @party_menu_class
end

.party_menu_mixin ⇒ Class<PartyMenuMixin>

Get the party menu scene mixin

Returns:



181
182
183
# File 'docs/4_Systems_000_General.rb', line 181

def party_menu_mixin
  @party_menu_mixin
end

.player_info_class ⇒ Class<TCard>

Get the payer information scene

Returns:



247
248
249
# File 'docs/4_Systems_000_General.rb', line 247

def player_info_class
  @player_info_class
end

.pokemon_shop_class ⇒ Class<Pokemon_Shop>

Get the pokemon shop scene

Returns:



266
267
268
# File 'docs/4_Systems_000_General.rb', line 266

def pokemon_shop_class
  @pokemon_shop_class
end

.pokemon_storage_class ⇒ Class<PokemonStorage>

Get the storage class

Returns:



151
152
153
# File 'docs/4_Systems_000_General.rb', line 151

def pokemon_storage_class
  @pokemon_storage_class
end

.pokemon_trade_storage_class ⇒ Class<PokemonTradeStorageMixin>

Get the storage class for trading

Returns:



157
158
159
# File 'docs/4_Systems_000_General.rb', line 157

def pokemon_trade_storage_class
  @pokemon_trade_storage_class
end

.pokemon_trade_storage_mixin ⇒ Class<PokemonTradeStorage>

Get the storage scene mixin for trading

Returns:



154
155
156
# File 'docs/4_Systems_000_General.rb', line 154

def pokemon_trade_storage_mixin
  @pokemon_trade_storage_mixin
end

.quest_ui_class ⇒ Class<QuestUI>

Get the Quest scene

Returns:



391
392
393
# File 'docs/4_Systems_000_General.rb', line 391

def quest_ui_class
  @quest_ui_class
end

.shop_class ⇒ Class<Shop>

Get the item shop scene

Returns:



263
264
265
# File 'docs/4_Systems_000_General.rb', line 263

def shop_class
  @shop_class
end

.shortcut_class ⇒ Class<Shortcut>

Get the shortcut scene

Returns:



385
386
387
# File 'docs/4_Systems_000_General.rb', line 385

def shortcut_class
  @shortcut_class
end

.string_input_class ⇒ Class<NameInput>

Get the string input scene

Returns:



305
306
307
# File 'docs/4_Systems_000_General.rb', line 305

def string_input_class
  @string_input_class
end

.string_input_mixin ⇒ Class<NameInputMixin>

Get the string input scene mixin

Returns:



302
303
304
# File 'docs/4_Systems_000_General.rb', line 302

def string_input_mixin
  @string_input_mixin
end

.summary_class ⇒ Class<Summary>

Get the Summary scene

Returns:



239
240
241
# File 'docs/4_Systems_000_General.rb', line 239

def summary_class
  @summary_class
end

.town_map_class ⇒ Class<WorldMap>

Get the town map scene

Returns:



373
374
375
# File 'docs/4_Systems_000_General.rb', line 373

def town_map_class
  @town_map_class
end

Class Method Details

.current_scene ⇒ Base

Get the current scene

Returns:

Raises:

  • (TypeError) —

    if the current scene is not a Base (should not happen under normal circumstance)



105
106
# File 'docs/4_Systems_000_General.rb', line 105

def current_scene
end

.make_egg_hatch(pokemon)

Open the hatch scene

Parameters:



369
370
# File 'docs/4_Systems_000_General.rb', line 369

def make_egg_hatch(pokemon)
end

.make_pokemon_evolve(pokemon, id, form = nil, forced = false) {|| ... }

Open the evolve scene

Parameters:

  • pokemon (PFM::Pokemon) —

    pokemon to evolve

  • id (Integer) —

    ID of the evolution

  • form (Integer, nil) (defaults to: nil) —

    form of the evolution

  • forced (Boolean) (defaults to: false) —

    if the evolution is forced

Yield Parameters:



365
366
# File 'docs/4_Systems_000_General.rb', line 365

def make_pokemon_evolve(pokemon, id, form = nil, forced = false, &block)
end

.open_bag

Open the Bag UI (let the player manage what he wants to do in the bag)



127
128
# File 'docs/4_Systems_000_General.rb', line 127

def open_bag
end

.open_bag_to_choose_item {|bag_scene| ... }

Open the bag UI to choose any item

Yield Parameters:



147
148
# File 'docs/4_Systems_000_General.rb', line 147

def open_bag_to_choose_item(&block)
end

.open_bag_to_give_item_to_pokemon {|bag_scene| ... }

Open the Bag UI to give an item to a Pokemon

Yield Parameters:



136
137
# File 'docs/4_Systems_000_General.rb', line 136

def open_bag_to_give_item_to_pokemon(&block)
end

.open_bag_to_plant_berry {|bag_scene| ... }

Open the Bag UI to plant a berry

Yield Parameters:



140
141
# File 'docs/4_Systems_000_General.rb', line 140

def open_bag_to_plant_berry(&block)
end

.open_bag_to_sell_item

Open the Bag UI to sell item



143
144
# File 'docs/4_Systems_000_General.rb', line 143

def open_bag_to_sell_item
end

.open_battle_bag(team) {|battle_bag_scene| ... }

Open the Battle Bag UI (and let the player choose an item)

Parameters:

Yield Parameters:



132
133
# File 'docs/4_Systems_000_General.rb', line 132

def open_battle_bag(team, &block)
end

.open_box_name_input(box_name, max_char = 12, box_filename = 'pc_psdk') {|| ... }

Open the name input for a box

Parameters:

  • box_name (String)
  • max_char (Integer) (defaults to: 12)
  • box_filename (String) (defaults to: 'pc_psdk')

Yield Parameters:



324
325
# File 'docs/4_Systems_000_General.rb', line 324

def open_box_name_input(box_name, max_char = 12, box_filename = 'pc_psdk', &block)
end

.open_character_name_input(default_name, max_char, character_filename, custom_message = nil) {|| ... }

Open the name input for a character/player

Parameters:

  • default_name (String)
  • max_char (Integer)
  • character_filename (String, nil)

Yield Parameters:



311
312
# File 'docs/4_Systems_000_General.rb', line 311

def open_character_name_input(default_name, max_char, character_filename, custom_message = nil, &block)
end

.open_dex

Open the dex (to view any Pokemon)



169
170
# File 'docs/4_Systems_000_General.rb', line 169

def open_dex
end

.open_dex_to_show_page(page_id)

Open the dex to show a specific page

Parameters:

  • page_id (Integer)


177
178
# File 'docs/4_Systems_000_General.rb', line 177

def open_dex_to_show_page(page_id)
end

.open_dex_to_show_pokemon(pokemon)

Open the dex to show a specific Pokemon

Parameters:



173
174
# File 'docs/4_Systems_000_General.rb', line 173

def open_dex_to_show_pokemon(pokemon)
end

.open_existing_pokemon_shop(shop_symbol, price_overwrites = {}, show_background: true)

Open the Pokemon shop scene using a limited shop stored in game_state.shop

Parameters:

  • shop_symbol (Symbol) —

    symbol of the shop in game_state.shop

  • price_overwrites (Hash{ Integer => Integer }) (defaults to: {}) —

    price for each Pokemon (id)

  • show_background (Boolean) (defaults to: true) —

    if background is shown



290
291
# File 'docs/4_Systems_000_General.rb', line 290

def open_existing_pokemon_shop(shop_symbol, price_overwrites = {}, show_background: true)
end

.open_existing_shop(shop_symbol, price_overwrites = {}, show_background: true)

Open the shop using a limited shop stored in game_state.shop

Parameters:

  • shop_symbol (Symbol) —

    symbol of the shop in game_state.shop

  • price_overwrites (Hash{ Integer => Integer }) (defaults to: {}) —

    price for each items (id)

  • show_background (Boolean) (defaults to: true) —

    if background is shown



277
278
# File 'docs/4_Systems_000_General.rb', line 277

def open_existing_shop(shop_symbol, price_overwrites = {}, show_background: true)
end

.open_hall_of_fame(filename_bgm = 'audio/bgm/Hall-of-Fame', context_of_victory = :league)

Open the hall of fame scene

Parameters:

  • filename_bgm (String) (defaults to: 'audio/bgm/Hall-of-Fame') —

    the bgm to play during the Hall of Fame

  • context_of_victory (Symbol) (defaults to: :league) —

    the symbol to put as the context of victory



298
299
# File 'docs/4_Systems_000_General.rb', line 298

def open_hall_of_fame(filename_bgm = 'audio/bgm/Hall-of-Fame', context_of_victory = :league)
end

.open_hm_bar_scene(reason, scene_to_update = nil)

Open the HM Bar scene

Parameters:

  • reason (Symbol) —

    reason for opening the HM Bar

  • scene_to_update (Base, nil) (defaults to: nil) —

    scene to update during the HM Bar usage



401
402
# File 'docs/4_Systems_000_General.rb', line 401

def open_hm_bar_scene(reason, scene_to_update = nil)
end

.open_menu {|menu_scene| ... }

Open the menu class

Yield Parameters:



115
116
# File 'docs/4_Systems_000_General.rb', line 115

def open_menu(&block)
end

.open_move_reminder(pokemon, mode = 0) {|move_teaching_scene| ... }

Open the move reminder scene

Parameters:

  • pokemon (PFM::Pokemon) —

    pokemon to remind a move

  • mode (Integer) (defaults to: 0) —

    0 = bread_moves + learnt + potentially_learnt, 2 = all moves, other = learnt + potentially_learnt

Yield Parameters:



348
349
# File 'docs/4_Systems_000_General.rb', line 348

def open_move_reminder(pokemon, mode = 0, &block)
end

.open_move_teaching(pokemon, skill) {|move_teaching_scene| ... }

Open the move teaching scene

Parameters:

  • pokemon (PFM::Pokemon) —

    pokemon to teach the move

  • skill (Symbol, Integer) —

    db_symbol of the skill to learn

Yield Parameters:



336
337
# File 'docs/4_Systems_000_General.rb', line 336

def open_move_teaching(pokemon, skill, &block)
end

.open_options {|option_scene| ... }

Open the option scene

Yield Parameters:



259
260
# File 'docs/4_Systems_000_General.rb', line 259

def open_options(&block)
end

.open_party_menu(party = PFM.game_state.actors) {|party_menu_scene| ... }

Open the party menu to see the Pokemon and manage them

Parameters:

  • party (Array<PFM::Pokemon>) (defaults to: PFM.game_state.actors) —

    party to manage

Yield Parameters:



188
189
# File 'docs/4_Systems_000_General.rb', line 188

def open_party_menu(party = PFM.game_state.actors, &block)
end

.open_party_menu_to_absofusion_pokemon(party, pokemon_db_symbol, allowed_db_symbol)

Open the party menu to absofusion Pokemons

Parameters:

  • party (Array<PFM::Pokemon>) —

    party that contains the Pokemon to absofusion

  • pokemon_db_symbol (Symbol) —

    db_symbol of the Pokemon to fusion

  • allowed_db_symbol (Array<Symbol>) —

    list of Pokemon allowed to fusion with the Pokemon to fusion



225
226
# File 'docs/4_Systems_000_General.rb', line 225

def open_party_menu_to_absofusion_pokemon(party, pokemon_db_symbol, allowed_db_symbol)
end

.open_party_menu_to_give_item_to_pokemon(item_db_symbol, party = PFM.game_state.actors) {|party_menu_scene| ... }

Open the party menu to give a item to a Pokemon

Parameters:

  • item_db_symbol (Symbol, Integer) —

    db_symbol of the item to use

  • party (Array<PFM::Pokemon>) (defaults to: PFM.game_state.actors) —

    party to manage

Yield Parameters:



200
201
# File 'docs/4_Systems_000_General.rb', line 200

def open_party_menu_to_give_item_to_pokemon(item_db_symbol, party = PFM.game_state.actors, &block)
end

.open_party_menu_to_revive_pokemon(party) {|party_menu_scene| ... }

Open the party menu to revive Pokemons

Parameters:

  • party (Array<PFM::Pokemon>) —

    party that contains the Pokemon to revive

Yield Parameters:



235
236
# File 'docs/4_Systems_000_General.rb', line 235

def open_party_menu_to_revive_pokemon(party, &block)
end

.open_party_menu_to_select_a_party(party, amount, excluded_pokemon = nil) {|party_menu_scene| ... }

Open the party menu to select a party

Parameters:

  • party (Array<PFM::Pokemon>) —

    party to in which you want to pick Pokemon

  • amount (Integer) —

    amount of Pokemon to select

  • excluded_pokemon (Array<Symbol>, nil) (defaults to: nil) —

    list of Pokemon db_symbol that are not allowed

Yield Parameters:



219
220
# File 'docs/4_Systems_000_General.rb', line 219

def open_party_menu_to_select_a_party(party, amount, excluded_pokemon = nil, &block)
end

.open_party_menu_to_select_pokemon(party) {|party_menu_scene| ... }

Open the party menu to select a Pokemon

Parameters:

Yield Parameters:



212
213
# File 'docs/4_Systems_000_General.rb', line 212

def open_party_menu_to_select_pokemon(party, &block)
end

.open_party_menu_to_separate_pokemon(party, pokemon_db_symbol)

Open the party menu to separate Pokemons

Parameters:

  • party (Array<PFM::Pokemon>) —

    party that contains the Pokemon to separate

  • pokemon_db_symbol (Symbol) —

    db_symbol of the Pokemon to separate



230
231
# File 'docs/4_Systems_000_General.rb', line 230

def open_party_menu_to_separate_pokemon(party, pokemon_db_symbol)
end

.open_party_menu_to_switch(party, forced_switch, cannot_switch_index) {|party_menu_scene| ... }

Open the party menu to switch a Pokemon into battle

Parameters:

  • party (Array<PFM::Pokemon>) —

    party to manage

  • forced_switch (Boolean) —

    if the switch is forced

  • cannot_switch_index (Integer, nil) —

    Index of the trapped party member if a switch cannot happen

Yield Parameters:



207
208
# File 'docs/4_Systems_000_General.rb', line 207

def open_party_menu_to_switch(party, forced_switch, cannot_switch_index, &block)
end

.open_party_menu_to_use_item(item_wrapper, party = PFM.game_state.actors) {|party_menu_scene| ... }

Open the party menu to use an item over a Pokemon

Parameters:

Yield Parameters:



194
195
# File 'docs/4_Systems_000_General.rb', line 194

def open_party_menu_to_use_item(item_wrapper, party = PFM.game_state.actors, &block)
end

.open_player_information

Open the player information scene



249
250
# File 'docs/4_Systems_000_General.rb', line 249

def open_player_information
end

.open_pokemon_name_input(pokemon, num_char = 12) {|| ... }

Open the name input for a Pokemon

Parameters:

  • pokemon (PFM::Pokemon)
  • num_char (Integer) (defaults to: 12) —

    the number of character the Pokemon can have in its name.

Yield Parameters:



317
318
# File 'docs/4_Systems_000_General.rb', line 317

def open_pokemon_name_input(pokemon, num_char = 12, &block)
end

.open_pokemon_shop(pokemon_ids, pokemon_prices, pokemon_levels, show_background: true)

Open the pokemon shop scene

Parameters:

  • pokemon_ids (Array<Integer>)
  • pokemon_prices (Array<Integer>)
  • pokemon_levels (Array<Integer, Hash>)
  • show_background (Boolean) (defaults to: true) —

    if background is shown



284
285
# File 'docs/4_Systems_000_General.rb', line 284

def open_pokemon_shop(pokemon_ids, pokemon_prices, pokemon_levels, show_background: true)
end

.open_pokemon_storage_system

Open the Pokemon Storage System UI



159
160
# File 'docs/4_Systems_000_General.rb', line 159

def open_pokemon_storage_system
end

.open_pokemon_storage_system_for_trade {|pss_scene| ... }

Open the Pokemon Storage System UI for trade

Yield Parameters:



163
164
# File 'docs/4_Systems_000_General.rb', line 163

def open_pokemon_storage_system_for_trade(&block)
end

.open_quest_ui(quests = PFM.game_state.quests)

Open the QuestUI scene



393
394
# File 'docs/4_Systems_000_General.rb', line 393

def open_quest_ui(quests = PFM.game_state.quests)
end

.open_shop(item_list, price_overwrites = {}, show_background: true)

Open the shop scene

Parameters:

  • item_list (Array<Integer>) —

    list of item to sell

  • price_overwrites (Hash{ Integer => Integer }) (defaults to: {}) —

    price for each items (id)

  • show_background (Boolean) (defaults to: true) —

    if background is shown



271
272
# File 'docs/4_Systems_000_General.rb', line 271

def open_shop(item_list, price_overwrites = {}, show_background: true)
end

.open_shortcut

Open the shortcut scene



387
388
# File 'docs/4_Systems_000_General.rb', line 387

def open_shortcut
end

.open_summary(pokemon, party = [pokemon])

Open the summary of a Pokemon

Parameters:

  • pokemon (PFM::Pokemon) —

    pokemon to view

  • party (Array<PFM::Pokemon>) (defaults to: [pokemon]) —

    party of the pokemon to view



243
244
# File 'docs/4_Systems_000_General.rb', line 243

def open_summary(pokemon, party = [pokemon])
end

.open_town_map(world_map_id = PFM.game_state.env.get_worldmap)

Open the town map

Parameters:

  • world_map_id (Integer) (defaults to: PFM.game_state.env.get_worldmap) —

    ID of the worldmap to view



376
377
# File 'docs/4_Systems_000_General.rb', line 376

def open_town_map(world_map_id = PFM.game_state.env.get_worldmap)
end

.open_town_map_to_fly(world_map_id = PFM.game_state.env.get_worldmap, pokemon = :map)

Open the town map to use fly

Parameters:

  • world_map_id (Integer) (defaults to: PFM.game_state.env.get_worldmap) —

    ID of the worldmap to view

  • pokemon (PFM::Pokemon, Symbol) (defaults to: :map) —

    Pokemon that uses fly



381
382
# File 'docs/4_Systems_000_General.rb', line 381

def open_town_map_to_fly(world_map_id = PFM.game_state.env.get_worldmap, pokemon = :map)
end