Module: PFM

Defined in:
docs/01450_Systems_00000_General.rb,
docs/00800_Studio.rb,
docs/02000_Nuri_Yuri.rb,
docs/01450_Systems_00101_Dex.rb,
docs/01450_Systems_00103_Bag.rb,
docs/01450_Systems_09000_GTS.rb,
docs/01450_Systems_00203_Shop.rb,
docs/01450_Systems_99991_Wild.rb,
docs/01450_Systems_08000_Quest.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_00201_Daycare.rb,
docs/01450_Systems_00204_Nuzlocke.rb,
docs/01450_Systems_00202_Environment.rb,
docs/01450_Systems_08001_Mining_Game.rb,
docs/01450_Systems_00300_Hall_of_fame.rb,
docs/01450_Systems_99990_Global_Systems.rb,
docs/01450_Systems_00000_General_00001_PFM.rb,
docs/01450_Systems_00000_General_00010_GameState.rb,
docs/01600_Alpha_25_Battle_Engine_00100_PokemonBattler.rb

Overview

Module that define inGame data / script interface

Defined Under Namespace

Modules: HoneyTree, ItemDescriptor, Message, Text Classes: Bag, Choice_Helper, Daycare, Environment, GameState, Hall_of_Fame, MiningGame, Nuzlocke, Options, Pokedex, Pokemon, PokemonBattler, Quests, Shop, Skill, Storage, Trainer, Wild_Battle, Wild_RoamingInfo

Constant Summary collapse

Wild_Info =

Retro compatibility with saves

Object
Environnement =

Constant for previous PSDK usage when the typo was there

Environment
SKILL_PROCESS =

List of Processes that are called when a skill is used in map Associate a skill id to a proc that take 3 parameter : pkmn(PFM::Pokemon), skill(PFM::Skill), test(Boolean)

{milk_drink: milk_drink = proc do |pkmn, _skill, test = false|
  next(:block) if pkmn.hp <= 0 && test
  next(:choice) if test
  if $actors[$scene.return_data] != pkmn && !pkmn.dead? && pkmn.hp != pkmn.max_hp
    heal_hp = pkmn.max_hp * 20 / 100
    $actors[$scene.return_data].hp -= heal_hp
    pkmn.hp += heal_hp
  else
    $scene.display_message(parse_text(22, 108))
  end
end, soft_boiled: milk_drink, sweet_scent: proc do |_pkmn, _skill, test = false|
  next(false) if test
  if $env.normal?
    if $wild_battle.available?
      $game_system.map_interpreter.launch_common_event(Game_CommonEvent::WILD_BATTLE)
    else
      $scene.display_message(parse_text(39, 7))
    end
  else
    $scene.display_message(parse_text(39, 8))
  end
end, fly: proc do |pkmn, _skill, test = false|
  next(false) if test
  if $game_switches[Yuki::Sw::Env_CanFly]
    GamePlay.open_town_map_to_fly($env.get_worldmap, pkmn)
    next(true)
  else
    next(:block)
  end
end, surf: proc do |_pkmn, _skill, test = false|
  d = $game_player.direction
  x = $game_player.x
  y = $game_player.y
  z = $game_player.z
  new_x, new_y = $game_player.front_tile
  sys_tag = $game_map.system_tag(new_x, new_y)
  next(:block) unless $game_map.passable?(x, y, d, nil) && $game_map.passable?(new_x, new_y, 10 - d, $game_player) && z <= 1 && !$game_player.surfing? && Game_Character::SurfTag.include?(sys_tag)
  next(false) if test
  $game_temp.common_event_id = Game_CommonEvent::SURF_ENTER
  next(true)
end}
Pokemon_Party =

Alias for old saves

GameState

Class Attribute Summary collapse

Class Attribute Details

.bag_classClass<Bag>

Get the class handling the bag data in the game

Returns:



301
302
303
# File 'docs/01450_Systems_00000_General.rb', line 301

def bag_class
  @bag_class
end

.daycare_classClass<Daycare>

Get the class handling the daycare in the game

Returns:



316
317
318
# File 'docs/01450_Systems_00000_General.rb', line 316

def daycare_class
  @daycare_class
end

.dex_classClass<Pokedex>

Get the class handling the Dex data in the game

Returns:



307
308
309
# File 'docs/01450_Systems_00000_General.rb', line 307

def dex_class
  @dex_class
end

.environment_classClass<Environment>

Get the class handling the environment in the game

Returns:



319
320
321
# File 'docs/01450_Systems_00000_General.rb', line 319

def environment_class
  @environment_class
end

.game_stateGameState

Get the game state

Returns:



298
299
300
# File 'docs/01450_Systems_00000_General.rb', line 298

def game_state
  @game_state
end

.hall_of_fame_classClass<Hall_of_Fame>

Get the class handling the hall of fame in the game

Returns:



328
329
330
# File 'docs/01450_Systems_00000_General.rb', line 328

def hall_of_fame_class
  @hall_of_fame_class
end

.nuzlocke_classClass<Nuzlocke>

Get the class handling the nuzlocke in the game

Returns:



325
326
327
# File 'docs/01450_Systems_00000_General.rb', line 325

def nuzlocke_class
  @nuzlocke_class
end

.options_classClass<Options>

Get the class handling the option in the game

Returns:



313
314
315
# File 'docs/01450_Systems_00000_General.rb', line 313

def options_class
  @options_class
end

.player_info_classClass<Trainer>

Get the class handling the player info in the game

Returns:



310
311
312
# File 'docs/01450_Systems_00000_General.rb', line 310

def player_info_class
  @player_info_class
end

.shop_classClass<Shop>

Get the class handling the shop in the game

Returns:



322
323
324
# File 'docs/01450_Systems_00000_General.rb', line 322

def shop_class
  @shop_class
end

.storage_classClass<Storage>

Get the class handling the Pokemon Storage System data in the game

Returns:



304
305
306
# File 'docs/01450_Systems_00000_General.rb', line 304

def storage_class
  @storage_class
end