Module: GamePlay

Defined in:
scripts/01450 Systems/00000 General/00100 GamePlay.rb,
scripts/01450 Systems/09000 GTS/09000 GTS.rb,
scripts/01450 Systems/10000 Movie/00099 Movie.rb,
scripts/01450 Systems/00400 RSE Clock/00004 RSEClock.rb,
scripts/01450 Systems/00002 Credits/00002 Credit Scene.rb,
scripts/01450 Systems/00400 RSE Clock/00002 RSEClockUI.rb,
scripts/01450 Systems/00101 Dex/00003 GamePlay/00100 Dex.rb,
scripts/01450 Systems/00103 Bag/00003 GamePlay/00300 Bag.rb,
scripts/01450 Systems/00400 RSE Clock/00001 RSEClockLogic.rb,
scripts/01450 Systems/00100 Menu/00003 GamePlay/00100 Menu.rb,
scripts/01450 Systems/00203 Shop/00003 GamePlay/00100 Shop.rb,
scripts/01450 Systems/00103 Bag/00003 GamePlay/00000 BagMixin.rb,
scripts/01450 Systems/00303 Evolve/00003 GamePlay/00200 Hatch.rb,
scripts/01450 Systems/00400 RSE Clock/00003 RSEClockQuestions.rb,
scripts/01450 Systems/00102 Party/00003 GamePlay/00200 Summary.rb,
scripts/01450 Systems/00103 Bag/00003 GamePlay/00340 Bag_Mouse.rb,
scripts/01450 Systems/00103 Bag/00003 GamePlay/00400 BattleBag.rb,
scripts/01450 Systems/00104 Trainer/00003 GamePlay/00100 TCard.rb,
scripts/01450 Systems/00303 Evolve/00003 GamePlay/00100 Evolve.rb,
scripts/01450 Systems/00100 Menu/00003 GamePlay/00099 MenuMixin.rb,
scripts/01450 Systems/00103 Bag/00003 GamePlay/00302 Bag_Inputs.rb,
scripts/01450 Systems/00106 Save Load/00003 GamePlay/00200 Load.rb,
scripts/01450 Systems/00106 Save Load/00003 GamePlay/00400 Save.rb,
scripts/01450 Systems/00103 Bag/00003 GamePlay/00320 Bag_Choices.rb,
scripts/01450 Systems/00103 Bag/00003 GamePlay/00330 Bag_Actions.rb,
scripts/01450 Systems/00203 Shop/00003 GamePlay/00140 Shop_Mouse.rb,
scripts/01450 Systems/00205 Input/00003 GamePlay/00700 NameInput.rb,
scripts/01450 Systems/00101 Dex/00003 GamePlay/00101 Dex_Graphics.rb,
scripts/01450 Systems/00102 Party/00003 GamePlay/00100 Party_Menu.rb,
scripts/01450 Systems/00103 Bag/00003 GamePlay/00301 Bag_Graphics.rb,
scripts/01450 Systems/00203 Shop/00003 GamePlay/00102 Shop_Inputs.rb,
scripts/01450 Systems/00206 TownMap/00003 GamePlay/00400 WorldMap.rb,
scripts/01450 Systems/08000 Quest/00003 GamePlay_Quest/00001 Main.rb,
scripts/01450 Systems/00203 Shop/00003 GamePlay/00130 Shop_Actions.rb,
scripts/01450 Systems/00203 Shop/00003 GamePlay/00200 Pokemon_Shop.rb,
scripts/01450 Systems/00205 Input/00003 GamePlay/00701 NumberInput.rb,
scripts/01450 Systems/00207 Shortcut/00003 GamePlay/01000 Shortcut.rb,
scripts/01450 Systems/08000 Quest/00003 GamePlay_Quest/00002 Logic.rb,
scripts/01450 Systems/08000 Quest/00003 GamePlay_Quest/00004 Mouse.rb,
scripts/01450 Systems/00103 Bag/00003 GamePlay/00310 Bag_Animations.rb,
scripts/01450 Systems/00105 Options/00003 GamePlay/04800 KeyBinding.rb,
scripts/01450 Systems/00203 Shop/00003 GamePlay/00101 Shop_Graphics.rb,
scripts/01450 Systems/00303 Evolve/00003 GamePlay/00001 EvolveMixin.rb,
scripts/01450 Systems/08000 Quest/00003 GamePlay_Quest/00003 Inputs.rb,
scripts/01450 Systems/00102 Party/00003 GamePlay/00202 Summary_Mouse.rb,
scripts/01450 Systems/00300 Hall of fame/00003 GamePlay/00006 Inputs.rb,
scripts/01450 Systems/00102 Party/00003 GamePlay/00001 PartyMenuMixin.rb,
scripts/01450 Systems/00102 Party/00003 GamePlay/00201 Summary_update.rb,
scripts/01450 Systems/00105 Options/00003 GamePlay/00001 OptionsMixin.rb,
scripts/01450 Systems/00106 Save Load/00003 GamePlay/00202 Load input.rb,
scripts/01450 Systems/00106 Save Load/00003 GamePlay/00203 Load logic.rb,
scripts/01450 Systems/00106 Save Load/00003 GamePlay/00401 Save input.rb,
scripts/01450 Systems/00106 Save Load/00003 GamePlay/00402 Save logic.rb,
scripts/01450 Systems/00200 Storage/00003 GamePlay_Storage/00001 Main.rb,
scripts/01450 Systems/00203 Shop/00003 GamePlay/00110 Shop_Animations.rb,
scripts/01450 Systems/00205 Input/00003 GamePlay/00001 NameInputMixin.rb,
scripts/01450 Systems/00105 Options/00003 GamePlay/00012 Options Scene.rb,
scripts/01450 Systems/00105 Options/00003 GamePlay/04801 KeyBinding_LS.rb,
scripts/01450 Systems/00200 Storage/00003 GamePlay_Storage/00002 Logic.rb,
scripts/01450 Systems/00200 Storage/00003 GamePlay_Storage/00004 Mouse.rb,
scripts/01450 Systems/00200 Storage/00003 GamePlay_Storage/00100 Trade.rb,
scripts/01450 Systems/00300 Hall of fame/00003 GamePlay/00002 Graphics.rb,
scripts/01450 Systems/00004 Message/00003 GamePlay/00001 DisplayMessage.rb,
scripts/01450 Systems/00102 Party/00003 GamePlay/00101 Party_Menu Input.rb,
scripts/01450 Systems/00105 Options/00003 GamePlay/00011 Options_Helper.rb,
scripts/01450 Systems/00200 Storage/00003 GamePlay_Storage/00003 Inputs.rb,
scripts/01450 Systems/00200 Storage/00003 GamePlay_Storage/00005 Choice.rb,
scripts/01450 Systems/00200 Storage/00003 GamePlay_Storage/00006 Actions.rb,
scripts/01450 Systems/00203 Shop/00003 GamePlay/00240 Pokemon_Shop_Mouse.rb,
scripts/01450 Systems/00300 Hall of fame/00003 GamePlay/00001 Initialize.rb,
scripts/01450 Systems/00203 Shop/00003 GamePlay/00220 Pokemon_Shop_Inputs.rb,
scripts/01450 Systems/00301 MoveTeaching/00003 GamePlay/00304 scene Mouse.rb,
scripts/01450 Systems/00106 Save Load/00003 GamePlay/00300 Language_Choice.rb,
scripts/01450 Systems/00203 Shop/00003 GamePlay/00230 Pokemon_Shop_Actions.rb,
scripts/01450 Systems/00301 MoveTeaching/00003 GamePlay/00302 scene Inputs.rb,
scripts/01450 Systems/00302 MoveReminder/00003 GamePlay/00600 MoveReminder.rb,
scripts/01450 Systems/00200 Storage/00003 GamePlay_Storage/00099 TradeMixin.rb,
scripts/01450 Systems/00203 Shop/00003 GamePlay/00210 Pokemon_Shop_Graphics.rb,
scripts/01450 Systems/00301 MoveTeaching/00003 GamePlay/00301 scene Graphics.rb,
scripts/01450 Systems/00000 General/00003 GamePlay__Base/00000 GamePlay__Base.rb,
scripts/01450 Systems/00301 MoveTeaching/00003 GamePlay/00303 scene Processes.rb,
scripts/01450 Systems/09000 Games/00002 VoltorbFlip/00001 Casino__VoltorbFlip.rb,
scripts/01450 Systems/00106 Save Load/00003 GamePlay/00201 Load load_all_saves.rb,
scripts/01450 Systems/00301 MoveTeaching/00003 GamePlay/00300 scene Initialize.rb,
scripts/01450 Systems/00300 Hall of fame/00003 GamePlay/00003 Animation_Phase_1.rb,
scripts/01450 Systems/00300 Hall of fame/00003 GamePlay/00004 Animation_Phase_2.rb,
scripts/01450 Systems/00300 Hall of fame/00003 GamePlay/00005 Animation_Phase_3.rb,
scripts/01450 Systems/00301 MoveTeaching/00003 GamePlay/00001 MoveTeachingMixin.rb,
scripts/01450 Systems/00302 MoveReminder/00003 GamePlay/00001 MoveReminderMixin.rb,
scripts/01450 Systems/09000 Games/00003 Ruine Alpha/00002 Ruine_Alpha_by_FL0RENT_.rb,
scripts/01450 Systems/00102 Party/00003 GamePlay/00102 Party_Menu Choice & Process.rb,
scripts/01450 Systems/00000 General/00003 GamePlay__Base/00001 GamePlay__StateMachine.rb,
scripts/01450 Systems/08001 Mining Game/00040 GamePlay_Mining_Game/00005 MiningGame_Logic.rb,
scripts/01450 Systems/08001 Mining Game/00040 GamePlay_Mining_Game/00006 MiningGame_Mouse.rb,
scripts/01450 Systems/08001 Mining Game/00040 GamePlay_Mining_Game/00003 MiningGame_Actions.rb,
scripts/01450 Systems/08001 Mining Game/00040 GamePlay_Mining_Game/00002 MiningGame_Graphics.rb,
scripts/01450 Systems/08001 Mining Game/00040 GamePlay_Mining_Game/00001 MiningGame_Initialize.rb,
scripts/01450 Systems/08001 Mining Game/00040 GamePlay_Mining_Game/00004 MiningGame_Animations.rb,
scripts/01450 Systems/09000 Games/00001 Slot Machines/00003 GamePlay/00003 Casino__SlotMachine.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: Alph_Ruins_Puzzle, 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:



31
32
33
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 31

def bag_class
  @bag_class
end

.bag_mixinModule<BagMixin>

Get the current bag scene mixin (telling IO)

Returns:



28
29
30
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 28

def bag_mixin
  @bag_mixin
end

.battle_bag_classClass<Battle_Bag>

Get the current battle bag class

Returns:



34
35
36
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 34

def battle_bag_class
  @battle_bag_class
end

.dex_classClass<Dex>

Get the Dex class

Returns:



94
95
96
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 94

def dex_class
  @dex_class
end

.evolve_classClass<Evolve>

Get the evolve scene

Returns:



345
346
347
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 345

def evolve_class
  @evolve_class
end

.evolve_mixinClass<EvolveMixin>

Get the evolve scene mixin

Returns:



342
343
344
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 342

def evolve_mixin
  @evolve_mixin
end

.hall_of_fame_classClass<Hall_of_Fame>

Get the hall of fame scene

Returns:



264
265
266
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 264

def hall_of_fame_class
  @hall_of_fame_class
end

.hatch_classClass<Hatch>

Get the hatch scene

Returns:



348
349
350
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 348

def hatch_class
  @hatch_class
end

Get the menu scene

Returns:



18
19
20
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 18

def menu_class
  @menu_class
end

Get the menu scene mixin

Returns:



15
16
17
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 15

def menu_mixin
  @menu_mixin
end

.move_reminder_classClass<Move_Reminder>

Get the move reminder scene

Returns:



330
331
332
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 330

def move_reminder_class
  @move_reminder_class
end

.move_reminder_mixinClass<MoveReminderMixin>

Get the move reminder scene mixin

Returns:



327
328
329
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 327

def move_reminder_mixin
  @move_reminder_mixin
end

.move_teaching_classClass<MoveTeaching>

Get the move teaching scene

Returns:



315
316
317
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 315

def move_teaching_class
  @move_teaching_class
end

.move_teaching_mixinClass<MoveTeachingMixin>

Get the move teaching scene mixin

Returns:



312
313
314
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 312

def move_teaching_mixin
  @move_teaching_mixin
end

.options_classClass<Options>

Get the option setting scene

Returns:



214
215
216
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 214

def options_class
  @options_class
end

.options_mixinClass<OptionsMixin>

Get the option setting scene mixin

Returns:



211
212
213
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 211

def options_mixin
  @options_mixin
end

.party_menu_classClass<Party_Menu>

Get the party menu scene

Returns:



118
119
120
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 118

def party_menu_class
  @party_menu_class
end

.party_menu_mixinClass<PartyMenuMixin>

Get the party menu scene mixin

Returns:



115
116
117
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 115

def party_menu_mixin
  @party_menu_mixin
end

.player_info_classClass<TCard>

Get the payer information scene

Returns:



202
203
204
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 202

def player_info_class
  @player_info_class
end

.pokemon_shop_classClass<Pokemon_Shop>

Get the pokemon shop scene

Returns:



227
228
229
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 227

def pokemon_shop_class
  @pokemon_shop_class
end

.pokemon_storage_classClass<PokemonStorage>

Get the storage class

Returns:



73
74
75
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 73

def pokemon_storage_class
  @pokemon_storage_class
end

.pokemon_trade_storage_classClass<PokemonTradeStorageMixin>

Get the storage class for trading

Returns:



79
80
81
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 79

def pokemon_trade_storage_class
  @pokemon_trade_storage_class
end

.pokemon_trade_storage_mixinClass<PokemonTradeStorage>

Get the storage scene mixin for trading

Returns:



76
77
78
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 76

def pokemon_trade_storage_mixin
  @pokemon_trade_storage_mixin
end

.shop_classClass<Shop>

Get the item shop scene

Returns:



224
225
226
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 224

def shop_class
  @shop_class
end

.shortcut_classClass<Shortcut>

Get the shortcut scene

Returns:



385
386
387
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 385

def shortcut_class
  @shortcut_class
end

.string_input_classClass<NameInput>

Get the string input scene

Returns:



278
279
280
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 278

def string_input_class
  @string_input_class
end

.string_input_mixinClass<NameInputMixin>

Get the string input scene mixin

Returns:



275
276
277
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 275

def string_input_mixin
  @string_input_mixin
end

.summary_classClass<Summary>

Get the Summary scene

Returns:



189
190
191
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 189

def summary_class
  @summary_class
end

.town_map_classClass<WorldMap>

Get the town map scene

Returns:



368
369
370
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 368

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
9
10
11
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 7

def current_scene
  raise TypeError, 'Current scene is not a GamePlay::Base' unless $scene.is_a?(Base)

  return $scene
end

.make_egg_hatch(pokemon)

Open the hatch scene

Parameters:



362
363
364
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 362

def make_egg_hatch(pokemon)
  current_scene.call_scene(hatch_class, 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:



356
357
358
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 356

def make_pokemon_evolve(pokemon, id, form = nil, forced = false, &block)
  current_scene.call_scene(evolve_class, pokemon, id, form, forced, &block)
end

.open_bag

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



37
38
39
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 37

def open_bag
  current_scene.call_scene(bag_class)
end

.open_bag_to_choose_item {|bag_scene| ... }

Open the bag UI to choose any item

Yield Parameters:



67
68
69
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 67

def open_bag_to_choose_item(&block)
  current_scene.call_scene(bag_class, :map, &block)
end

.open_bag_to_give_item_to_pokemon {|bag_scene| ... }

Open the Bag UI to give an item to a Pokemon

Yield Parameters:



50
51
52
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 50

def open_bag_to_give_item_to_pokemon(&block)
  current_scene.call_scene(bag_class, :hold, &block)
end

.open_bag_to_plant_berry {|bag_scene| ... }

Open the Bag UI to plant a berry

Yield Parameters:



56
57
58
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 56

def open_bag_to_plant_berry(&block)
  current_scene.call_scene(bag_class, :berry, &block)
end

.open_bag_to_sell_item

Open the Bag UI to sell item



61
62
63
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 61

def open_bag_to_sell_item
  current_scene.call_scene(bag_class, :shop)
end

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

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

Parameters:

Yield Parameters:



44
45
46
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 44

def open_battle_bag(team, &block)
  current_scene.call_scene(battle_bag_class, 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:



305
306
307
308
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 305

def open_box_name_input(box_name, max_char = 12, box_filename = 'pc_psdk', &block)
  phrase = text_get(43, 10)
  current_scene.call_scene(string_input_class, box_name, max_char, box_filename, phrase: phrase, &block)
end

.open_character_name_input(default_name, max_char, character_filename) {|| ... }

Open the name input for a character/player

Parameters:

Yield Parameters:



285
286
287
288
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 285

def open_character_name_input(default_name, max_char, character_filename, &block)
  phrase = PFM.game_state.game_temp.name_actor_id == 1 ? text_get(43, 0) : nil
  current_scene.call_scene(string_input_class, default_name, max_char, character_filename, phrase: phrase, &block)
end

.open_dex

Open the dex (to view any Pokemon)



97
98
99
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 97

def open_dex
  current_scene.call_scene(dex_class)
end

.open_dex_to_show_page(page_id)

Open the dex to show a specific page

Parameters:



109
110
111
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 109

def open_dex_to_show_page(page_id)
  current_scene.call_scene(dex_class, page_id)
end

.open_dex_to_show_pokemon(pokemon)

Open the dex to show a specific Pokemon

Parameters:



103
104
105
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 103

def open_dex_to_show_pokemon(pokemon)
  current_scene.call_scene(dex_class, 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



258
259
260
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 258

def open_existing_pokemon_shop(shop_symbol, price_overwrites = {}, show_background: true)
  current_scene.call_scene(pokemon_shop_class, shop_symbol, price_overwrites, show_background: show_background)
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



241
242
243
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 241

def open_existing_shop(shop_symbol, price_overwrites = {}, show_background: true)
  current_scene.call_scene(shop_class, shop_symbol, price_overwrites, show_background: show_background)
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



269
270
271
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 269

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

.open_menu {|menu_scene| ... }

Open the menu class

Yield Parameters:



22
23
24
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 22

def open_menu(&block)
  current_scene.call_scene(menu_class, &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:



336
337
338
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 336

def open_move_reminder(pokemon, mode = 0, &block)
  current_scene.call_scene(move_reminder_class, pokemon, mode, &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:



321
322
323
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 321

def open_move_teaching(pokemon, skill, &block)
  current_scene.call_scene(move_teaching_class, pokemon, skill, &block)
end

.open_options {|option_scene| ... }

Open the option scene

Yield Parameters:



218
219
220
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 218

def open_options(&block)
  current_scene.call_scene(options_class, &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:



123
124
125
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 123

def open_party_menu(party = PFM.game_state.actors, &block)
  current_scene.call_scene(party_menu_class, party, :menu, &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



176
177
178
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 176

def open_party_menu_to_absofusion_pokemon(party, pokemon_db_symbol, allowed_db_symbol)
  current_scene.call_scene(party_menu_class, party, :absofusion, [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:



139
140
141
142
143
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 139

def open_party_menu_to_give_item_to_pokemon(item_db_symbol, party = PFM.game_state.actors, &block)
  # LEGACY: Deep internal logic still use id :(:(:(
  item_id = data_item(item_db_symbol).id
  current_scene.call_scene(party_menu_class, party, :hold, item_id, &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:



165
166
167
168
169
170
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 165

def open_party_menu_to_select_a_party(party, amount, excluded_pokemon = nil, &block)
  PFM.game_state.game_variables[Yuki::Var::Max_Pokemon_Select] = amount
  # LEGACY: Deep internal logic still use id :(:(:(
  excluded_pokemon_ids = excluded_pokemon&.map { |symbol| data_creature(symbol).id }
  current_scene.call_scene(party_menu_class, party, :select, excluded_pokemon_ids, &block)
end

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

Open the party menu to select a Pokemon

Parameters:

Yield Parameters:



156
157
158
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 156

def open_party_menu_to_select_pokemon(party, &block)
  current_scene.call_scene(party_menu_class, party, :map, &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



183
184
185
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 183

def open_party_menu_to_separate_pokemon(party, pokemon_db_symbol)
  current_scene.call_scene(party_menu_class, party, :separate, 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:



149
150
151
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 149

def open_party_menu_to_switch(party, forced_switch, &block)
  current_scene.call_scene(party_menu_class, party, :battle, no_leave: 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:



131
132
133
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 131

def open_party_menu_to_use_item(item_wrapper, party = PFM.game_state.actors, &block)
  current_scene.call_scene(party_menu_class, party, :item, item_wrapper, &block)
end

.open_player_information

Open the player information scene



205
206
207
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 205

def open_player_information
  current_scene.call_scene(player_info_class)
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:



294
295
296
297
298
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 294

def open_pokemon_name_input(pokemon, num_char = 12, &block)
  PFM::Text.set_pkname(pokemon.name)
  phrase = PFM::Text.parse(43, 5)
  current_scene.call_scene(string_input_class, pokemon.given_name, num_char, pokemon, phrase: phrase, &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



250
251
252
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 250

def open_pokemon_shop(pokemon_ids, pokemon_prices, pokemon_levels, show_background: true)
  current_scene.call_scene(pokemon_shop_class, pokemon_ids, pokemon_prices, pokemon_levels, show_background: show_background)
end

.open_pokemon_storage_system

Open the Pokemon Storage System UI



82
83
84
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 82

def open_pokemon_storage_system
  current_scene.call_scene(pokemon_storage_class)
end

.open_pokemon_storage_system_for_trade {|pss_scene| ... }

Open the Pokemon Storage System UI for trade

Yield Parameters:



88
89
90
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 88

def open_pokemon_storage_system_for_trade(&block)
  current_scene.call_scene(pokemon_trade_storage_class, &block)
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



233
234
235
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 233

def open_shop(item_list, price_overwrites = {}, show_background: true)
  current_scene.call_scene(shop_class, item_list, price_overwrites, show_background: show_background)
end

.open_shortcut

Open the shortcut scene



388
389
390
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 388

def open_shortcut
  current_scene.call_scene(shortcut_class)
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



194
195
196
197
198
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 194

def open_summary(pokemon, party = [pokemon])
  party = party.compact
  party.insert(0, pokemon) unless party.include?(pokemon)
  current_scene.call_scene(summary_class, pokemon, :view, party)
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



372
373
374
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 372

def open_town_map(world_map_id = PFM.game_state.env.get_worldmap)
  current_scene.call_scene(town_map_class, :view, world_map_id, :map)
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



379
380
381
# File 'scripts/01450 Systems/00000 General/00100 GamePlay.rb', line 379

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