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_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, 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_classClass<Bag>

Get the current bag scene

Returns:



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

def bag_class
  @bag_class
end

.bag_mixinModule<BagMixin>

Get the current bag scene mixin (telling IO)

Returns:



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

def bag_mixin
  @bag_mixin
end

.battle_bag_classClass<Battle_Bag>

Get the current battle bag class

Returns:



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

def battle_bag_class
  @battle_bag_class
end

.dex_classClass<Dex>

Get the Dex class

Returns:



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

def dex_class
  @dex_class
end

.evolve_classClass<Evolve>

Get the evolve scene

Returns:



338
339
340
# File 'docs/4_Systems_000_General.rb', line 338

def evolve_class
  @evolve_class
end

.evolve_mixinClass<EvolveMixin>

Get the evolve scene mixin

Returns:



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

def evolve_mixin
  @evolve_mixin
end

.hall_of_fame_classClass<Hall_of_Fame>

Get the hall of fame scene

Returns:



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

def hall_of_fame_class
  @hall_of_fame_class
end

.hatch_classClass<Hatch>

Get the hatch scene

Returns:



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

def hatch_class
  @hatch_class
end

Get the menu scene

Returns:



101
102
103
# File 'docs/4_Systems_000_General.rb', line 101

def menu_class
  @menu_class
end

Get the menu scene mixin

Returns:



98
99
100
# File 'docs/4_Systems_000_General.rb', line 98

def menu_mixin
  @menu_mixin
end

.move_reminder_classClass<Move_Reminder>

Get the move reminder scene

Returns:



326
327
328
# File 'docs/4_Systems_000_General.rb', line 326

def move_reminder_class
  @move_reminder_class
end

.move_reminder_mixinClass<MoveReminderMixin>

Get the move reminder scene mixin

Returns:



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

def move_reminder_mixin
  @move_reminder_mixin
end

.move_teaching_classClass<MoveTeaching>

Get the move teaching scene

Returns:



314
315
316
# File 'docs/4_Systems_000_General.rb', line 314

def move_teaching_class
  @move_teaching_class
end

.move_teaching_mixinClass<MoveTeachingMixin>

Get the move teaching scene mixin

Returns:



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

def move_teaching_mixin
  @move_teaching_mixin
end

.options_classClass<Options>

Get the option setting scene

Returns:



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

def options_class
  @options_class
end

.options_mixinClass<OptionsMixin>

Get the option setting scene mixin

Returns:



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

def options_mixin
  @options_mixin
end

.party_menu_classClass<Party_Menu>

Get the party menu scene

Returns:



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

def party_menu_class
  @party_menu_class
end

.party_menu_mixinClass<PartyMenuMixin>

Get the party menu scene mixin

Returns:



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

def party_menu_mixin
  @party_menu_mixin
end

.player_info_classClass<TCard>

Get the payer information scene

Returns:



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

def player_info_class
  @player_info_class
end

.pokemon_shop_classClass<Pokemon_Shop>

Get the pokemon shop scene

Returns:



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

def pokemon_shop_class
  @pokemon_shop_class
end

.pokemon_storage_classClass<PokemonStorage>

Get the storage class

Returns:



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

def pokemon_storage_class
  @pokemon_storage_class
end

.pokemon_trade_storage_classClass<PokemonTradeStorageMixin>

Get the storage class for trading

Returns:



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

def pokemon_trade_storage_class
  @pokemon_trade_storage_class
end

.pokemon_trade_storage_mixinClass<PokemonTradeStorage>

Get the storage scene mixin for trading

Returns:



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

def pokemon_trade_storage_mixin
  @pokemon_trade_storage_mixin
end

.quest_ui_classClass<QuestUI>

Get the Quest scene

Returns:



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

def quest_ui_class
  @quest_ui_class
end

.shop_classClass<Shop>

Get the item shop scene

Returns:



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

def shop_class
  @shop_class
end

.shortcut_classClass<Shortcut>

Get the shortcut scene

Returns:



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

def shortcut_class
  @shortcut_class
end

.string_input_classClass<NameInput>

Get the string input scene

Returns:



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

def string_input_class
  @string_input_class
end

.string_input_mixinClass<NameInputMixin>

Get the string input scene mixin

Returns:



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

def string_input_mixin
  @string_input_mixin
end

.summary_classClass<Summary>

Get the Summary scene

Returns:



222
223
224
# File 'docs/4_Systems_000_General.rb', line 222

def summary_class
  @summary_class
end

.town_map_classClass<WorldMap>

Get the town map scene

Returns:



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

def town_map_class
  @town_map_class
end

Class Method Details

.current_sceneBase

Get the current scene

Returns:

Raises:

  • (TypeError)

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



94
95
# File 'docs/4_Systems_000_General.rb', line 94

def current_scene
end

.make_egg_hatch(pokemon)

Open the hatch scene

Parameters:



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

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:



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

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)



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

def open_bag
end

.open_bag_to_choose_item {|bag_scene| ... }

Open the bag UI to choose any item

Yield Parameters:



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

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:



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

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:



129
130
# File 'docs/4_Systems_000_General.rb', line 129

def open_bag_to_plant_berry(&block)
end

.open_bag_to_sell_item

Open the Bag UI to sell item



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

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:



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

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:



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

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:



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

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)



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

def open_dex
end

.open_dex_to_show_page(page_id)

Open the dex to show a specific page

Parameters:

  • page_id (Integer)


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

def open_dex_to_show_page(page_id)
end

.open_dex_to_show_pokemon(pokemon)

Open the dex to show a specific Pokemon

Parameters:



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

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



273
274
# File 'docs/4_Systems_000_General.rb', line 273

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



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

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



281
282
# File 'docs/4_Systems_000_General.rb', line 281

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

.open_menu {|menu_scene| ... }

Open the menu class

Yield Parameters:



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

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:



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

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:



319
320
# File 'docs/4_Systems_000_General.rb', line 319

def open_move_teaching(pokemon, skill, &block)
end

.open_options {|option_scene| ... }

Open the option scene

Yield Parameters:



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

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:



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

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



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

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:



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

def open_party_menu_to_give_item_to_pokemon(item_db_symbol, party = PFM.game_state.actors, &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:



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

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:



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

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



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

def open_party_menu_to_separate_pokemon(party, pokemon_db_symbol)
end

.open_party_menu_to_switch(party, forced_switch) {|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

Yield Parameters:



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

def open_party_menu_to_switch(party, forced_switch, &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:



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

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

.open_player_information

Open the player information scene



232
233
# File 'docs/4_Systems_000_General.rb', line 232

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:



300
301
# File 'docs/4_Systems_000_General.rb', line 300

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



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

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

.open_pokemon_storage_system

Open the Pokemon Storage System UI



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

def open_pokemon_storage_system
end

.open_pokemon_storage_system_for_trade {|pss_scene| ... }

Open the Pokemon Storage System UI for trade

Yield Parameters:



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

def open_pokemon_storage_system_for_trade(&block)
end

.open_quest_ui(quests = PFM.game_state.quests)

Open the QuestUI scene



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

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



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

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

.open_shortcut

Open the shortcut scene



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

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



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

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



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

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



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

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