Module: GamePlay

Defined in:
docs/01450_Systems_00000_General.rb,
docs/01450_Systems_00101_Dex.rb,
docs/01450_Systems_00103_Bag.rb,
docs/01450_Systems_09000_GTS.rb,
docs/01450_Systems_00100_Menu.rb,
docs/01450_Systems_00203_Shop.rb,
docs/01450_Systems_00102_Party.rb,
docs/01450_Systems_00205_Input.rb,
docs/01450_Systems_08000_Quest.rb,
docs/01450_Systems_09000_Games.rb,
docs/01450_Systems_10000_Movie.rb,
docs/01450_Systems_00303_Evolve.rb,
docs/01450_Systems_00002_Credits.rb,
docs/01450_Systems_00004_Message.rb,
docs/01450_Systems_00104_Trainer.rb,
docs/01450_Systems_00105_Options.rb,
docs/01450_Systems_00200_Storage.rb,
docs/01450_Systems_00206_TownMap.rb,
docs/01450_Systems_00207_Shortcut.rb,
docs/01450_Systems_00106_Save_Load.rb,
docs/01450_Systems_00400_RSE_Clock.rb,
docs/01450_Systems_08001_Mining_Game.rb,
docs/01450_Systems_00300_Hall_of_fame.rb,
docs/01450_Systems_00301_MoveTeaching.rb,
docs/01450_Systems_00302_MoveReminder.rb,
docs/01450_Systems_00000_General_00003_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:



24
25
26
# File 'docs/01450_Systems_00000_General.rb', line 24

def bag_class
  @bag_class
end

.bag_mixinModule<BagMixin>

Get the current bag scene mixin (telling IO)

Returns:



21
22
23
# File 'docs/01450_Systems_00000_General.rb', line 21

def bag_mixin
  @bag_mixin
end

.battle_bag_classClass<Battle_Bag>

Get the current battle bag class

Returns:



27
28
29
# File 'docs/01450_Systems_00000_General.rb', line 27

def battle_bag_class
  @battle_bag_class
end

.dex_classClass<Dex>

Get the Dex class

Returns:



69
70
71
# File 'docs/01450_Systems_00000_General.rb', line 69

def dex_class
  @dex_class
end

.evolve_classClass<Evolve>

Get the evolve scene

Returns:



251
252
253
# File 'docs/01450_Systems_00000_General.rb', line 251

def evolve_class
  @evolve_class
end

.evolve_mixinClass<EvolveMixin>

Get the evolve scene mixin

Returns:



248
249
250
# File 'docs/01450_Systems_00000_General.rb', line 248

def evolve_mixin
  @evolve_mixin
end

.hall_of_fame_classClass<Hall_of_Fame>

Get the hall of fame scene

Returns:



190
191
192
# File 'docs/01450_Systems_00000_General.rb', line 190

def hall_of_fame_class
  @hall_of_fame_class
end

.hatch_classClass<Hatch>

Get the hatch scene

Returns:



254
255
256
# File 'docs/01450_Systems_00000_General.rb', line 254

def hatch_class
  @hatch_class
end

Get the menu scene

Returns:



14
15
16
# File 'docs/01450_Systems_00000_General.rb', line 14

def menu_class
  @menu_class
end

Get the menu scene mixin

Returns:



11
12
13
# File 'docs/01450_Systems_00000_General.rb', line 11

def menu_mixin
  @menu_mixin
end

.move_reminder_classClass<Move_Reminder>

Get the move reminder scene

Returns:



239
240
241
# File 'docs/01450_Systems_00000_General.rb', line 239

def move_reminder_class
  @move_reminder_class
end

.move_reminder_mixinClass<MoveReminderMixin>

Get the move reminder scene mixin

Returns:



236
237
238
# File 'docs/01450_Systems_00000_General.rb', line 236

def move_reminder_mixin
  @move_reminder_mixin
end

.move_teaching_classClass<MoveTeaching>

Get the move teaching scene

Returns:



227
228
229
# File 'docs/01450_Systems_00000_General.rb', line 227

def move_teaching_class
  @move_teaching_class
end

.move_teaching_mixinClass<MoveTeachingMixin>

Get the move teaching scene mixin

Returns:



224
225
226
# File 'docs/01450_Systems_00000_General.rb', line 224

def move_teaching_mixin
  @move_teaching_mixin
end

.options_classClass<Options>

Get the option setting scene

Returns:



152
153
154
# File 'docs/01450_Systems_00000_General.rb', line 152

def options_class
  @options_class
end

.options_mixinClass<OptionsMixin>

Get the option setting scene mixin

Returns:



149
150
151
# File 'docs/01450_Systems_00000_General.rb', line 149

def options_mixin
  @options_mixin
end

.party_menu_classClass<Party_Menu>

Get the party menu scene

Returns:



86
87
88
# File 'docs/01450_Systems_00000_General.rb', line 86

def party_menu_class
  @party_menu_class
end

.party_menu_mixinClass<PartyMenuMixin>

Get the party menu scene mixin

Returns:



83
84
85
# File 'docs/01450_Systems_00000_General.rb', line 83

def party_menu_mixin
  @party_menu_mixin
end

.player_info_classClass<TCard>

Get the payer information scene

Returns:



143
144
145
# File 'docs/01450_Systems_00000_General.rb', line 143

def player_info_class
  @player_info_class
end

.pokemon_shop_classClass<Pokemon_Shop>

Get the pokemon shop scene

Returns:



162
163
164
# File 'docs/01450_Systems_00000_General.rb', line 162

def pokemon_shop_class
  @pokemon_shop_class
end

.pokemon_storage_classClass<PokemonStorage>

Get the storage class

Returns:



53
54
55
# File 'docs/01450_Systems_00000_General.rb', line 53

def pokemon_storage_class
  @pokemon_storage_class
end

.pokemon_trade_storage_classClass<PokemonTradeStorageMixin>

Get the storage class for trading

Returns:



59
60
61
# File 'docs/01450_Systems_00000_General.rb', line 59

def pokemon_trade_storage_class
  @pokemon_trade_storage_class
end

.pokemon_trade_storage_mixinClass<PokemonTradeStorage>

Get the storage scene mixin for trading

Returns:



56
57
58
# File 'docs/01450_Systems_00000_General.rb', line 56

def pokemon_trade_storage_mixin
  @pokemon_trade_storage_mixin
end

.quest_ui_classClass<QuestUI>

Get the Quest scene

Returns:



287
288
289
# File 'docs/01450_Systems_00000_General.rb', line 287

def quest_ui_class
  @quest_ui_class
end

.shop_classClass<Shop>

Get the item shop scene

Returns:



159
160
161
# File 'docs/01450_Systems_00000_General.rb', line 159

def shop_class
  @shop_class
end

.shortcut_classClass<Shortcut>

Get the shortcut scene

Returns:



281
282
283
# File 'docs/01450_Systems_00000_General.rb', line 281

def shortcut_class
  @shortcut_class
end

.string_input_classClass<NameInput>

Get the string input scene

Returns:



201
202
203
# File 'docs/01450_Systems_00000_General.rb', line 201

def string_input_class
  @string_input_class
end

.string_input_mixinClass<NameInputMixin>

Get the string input scene mixin

Returns:



198
199
200
# File 'docs/01450_Systems_00000_General.rb', line 198

def string_input_mixin
  @string_input_mixin
end

.summary_classClass<Summary>

Get the Summary scene

Returns:



135
136
137
# File 'docs/01450_Systems_00000_General.rb', line 135

def summary_class
  @summary_class
end

.town_map_classClass<WorldMap>

Get the town map scene

Returns:



269
270
271
# File 'docs/01450_Systems_00000_General.rb', line 269

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)



7
8
# File 'docs/01450_Systems_00000_General.rb', line 7

def current_scene
end

.make_egg_hatch(pokemon)

Open the hatch scene

Parameters:



265
266
# File 'docs/01450_Systems_00000_General.rb', line 265

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:



261
262
# File 'docs/01450_Systems_00000_General.rb', line 261

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)



29
30
# File 'docs/01450_Systems_00000_General.rb', line 29

def open_bag
end

.open_bag_to_choose_item {|bag_scene| ... }

Open the bag UI to choose any item

Yield Parameters:



49
50
# File 'docs/01450_Systems_00000_General.rb', line 49

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:



38
39
# File 'docs/01450_Systems_00000_General.rb', line 38

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:



42
43
# File 'docs/01450_Systems_00000_General.rb', line 42

def open_bag_to_plant_berry(&block)
end

.open_bag_to_sell_item

Open the Bag UI to sell item



45
46
# File 'docs/01450_Systems_00000_General.rb', line 45

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:



34
35
# File 'docs/01450_Systems_00000_General.rb', line 34

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:



220
221
# File 'docs/01450_Systems_00000_General.rb', line 220

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) {|| ... }

Open the name input for a character/player

Parameters:

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

Yield Parameters:



207
208
# File 'docs/01450_Systems_00000_General.rb', line 207

def open_character_name_input(default_name, max_char, character_filename, &block)
end

.open_dex

Open the dex (to view any Pokemon)



71
72
# File 'docs/01450_Systems_00000_General.rb', line 71

def open_dex
end

.open_dex_to_show_page(page_id)

Open the dex to show a specific page

Parameters:

  • page_id (Integer)


79
80
# File 'docs/01450_Systems_00000_General.rb', line 79

def open_dex_to_show_page(page_id)
end

.open_dex_to_show_pokemon(pokemon)

Open the dex to show a specific Pokemon

Parameters:



75
76
# File 'docs/01450_Systems_00000_General.rb', line 75

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



186
187
# File 'docs/01450_Systems_00000_General.rb', line 186

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



173
174
# File 'docs/01450_Systems_00000_General.rb', line 173

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



194
195
# File 'docs/01450_Systems_00000_General.rb', line 194

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:



17
18
# File 'docs/01450_Systems_00000_General.rb', line 17

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:



244
245
# File 'docs/01450_Systems_00000_General.rb', line 244

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:



232
233
# File 'docs/01450_Systems_00000_General.rb', line 232

def open_move_teaching(pokemon, skill, &block)
end

.open_options {|option_scene| ... }

Open the option scene

Yield Parameters:



155
156
# File 'docs/01450_Systems_00000_General.rb', line 155

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:



90
91
# File 'docs/01450_Systems_00000_General.rb', line 90

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



126
127
# File 'docs/01450_Systems_00000_General.rb', line 126

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:



102
103
# File 'docs/01450_Systems_00000_General.rb', line 102

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:



120
121
# File 'docs/01450_Systems_00000_General.rb', line 120

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:



113
114
# File 'docs/01450_Systems_00000_General.rb', line 113

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



131
132
# File 'docs/01450_Systems_00000_General.rb', line 131

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:



108
109
# File 'docs/01450_Systems_00000_General.rb', line 108

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:



96
97
# File 'docs/01450_Systems_00000_General.rb', line 96

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

.open_player_information

Open the player information scene



145
146
# File 'docs/01450_Systems_00000_General.rb', line 145

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:



213
214
# File 'docs/01450_Systems_00000_General.rb', line 213

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



180
181
# File 'docs/01450_Systems_00000_General.rb', line 180

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

.open_pokemon_storage_system

Open the Pokemon Storage System UI



61
62
# File 'docs/01450_Systems_00000_General.rb', line 61

def open_pokemon_storage_system
end

.open_pokemon_storage_system_for_trade {|pss_scene| ... }

Open the Pokemon Storage System UI for trade

Yield Parameters:



65
66
# File 'docs/01450_Systems_00000_General.rb', line 65

def open_pokemon_storage_system_for_trade(&block)
end

.open_quest_ui(quests = PFM.game_state.quests)

Open the QuestUI scene



289
290
# File 'docs/01450_Systems_00000_General.rb', line 289

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



167
168
# File 'docs/01450_Systems_00000_General.rb', line 167

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

.open_shortcut

Open the shortcut scene



283
284
# File 'docs/01450_Systems_00000_General.rb', line 283

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



139
140
# File 'docs/01450_Systems_00000_General.rb', line 139

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



272
273
# File 'docs/01450_Systems_00000_General.rb', line 272

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



277
278
# File 'docs/01450_Systems_00000_General.rb', line 277

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