Module: PFM

Defined in:
docs/4_Systems_000_General.rb,
docs/3_Studio.rb,
docs/4_Systems_101_Dex.rb,
docs/4_Systems_103_Bag.rb,
docs/4_Systems_901_GTS.rb,
docs/4_Systems_203_Shop.rb,
docs/4_Systems_999_Wild.rb,
docs/4_Systems_800_Quest.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_201_Daycare.rb,
docs/4_Systems_204_Nuzlocke.rb,
docs/4_Systems_952_MapOverlay.rb,
docs/4_Systems_202_Environment.rb,
docs/4_Systems_801_Mining_Game.rb,
docs/4_Systems_300_Hall_of_fame.rb,
docs/4_Systems_951_DynamicLight.rb,
docs/5_Battle_03_PokemonBattler.rb,
docs/4_Systems_000_General_1_PFM.rb,
docs/4_Systems_998_Global_Systems.rb,
docs/6_Contest_03_Contest_Creature.rb,
docs/4_Systems_000_General_3_GameState.rb

Overview

Module that define inGame data / script interface

Defined Under Namespace

Modules: HoneyTree, ItemDescriptor, Message, Text Classes: Bag, Choice_Helper, ContestCreature, Daycare, Environment, GameState, Hall_of_Fame, MapOverlay, MiningGame, Nuzlocke, Options, Pokedex, Pokemon, PokemonBattler, Quests, Ribbon, 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}
RIBBONS_DATA =

Hash containing the ribbons data

Returns:

{}
Pokemon_Party =

Alias for old saves

GameState

Class Attribute Summary collapse

Class Attribute Details

.bag_class ⇒ Class<Bag>

Get the class handling the bag data in the game

Returns:



413
414
415
# File 'docs/4_Systems_000_General.rb', line 413

def bag_class
  @bag_class
end

.daycare_class ⇒ Class<Daycare>

Get the class handling the daycare in the game

Returns:



428
429
430
# File 'docs/4_Systems_000_General.rb', line 428

def daycare_class
  @daycare_class
end

.dex_class ⇒ Class<Pokedex>

Get the class handling the Dex data in the game

Returns:



419
420
421
# File 'docs/4_Systems_000_General.rb', line 419

def dex_class
  @dex_class
end

.environment_class ⇒ Class<Environment>

Get the class handling the environment in the game

Returns:



431
432
433
# File 'docs/4_Systems_000_General.rb', line 431

def environment_class
  @environment_class
end

.game_state ⇒ GameState

Get the game state

Returns:



410
411
412
# File 'docs/4_Systems_000_General.rb', line 410

def game_state
  @game_state
end

.hall_of_fame_class ⇒ Class<Hall_of_Fame>

Get the class handling the hall of fame in the game

Returns:



440
441
442
# File 'docs/4_Systems_000_General.rb', line 440

def hall_of_fame_class
  @hall_of_fame_class
end

.map_overlay_class ⇒ Class

Accessor for the MapOverlay class

Returns:

  • (Class)


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

def map_overlay_class
  @map_overlay_class
end

.nuzlocke_class ⇒ Class<Nuzlocke>

Get the class handling the nuzlocke in the game

Returns:



437
438
439
# File 'docs/4_Systems_000_General.rb', line 437

def nuzlocke_class
  @nuzlocke_class
end

.options_class ⇒ Class<Options>

Get the class handling the option in the game

Returns:



425
426
427
# File 'docs/4_Systems_000_General.rb', line 425

def options_class
  @options_class
end

.player_info_class ⇒ Class<Trainer>

Get the class handling the player info in the game

Returns:



422
423
424
# File 'docs/4_Systems_000_General.rb', line 422

def player_info_class
  @player_info_class
end

.shop_class ⇒ Class<Shop>

Get the class handling the shop in the game

Returns:



434
435
436
# File 'docs/4_Systems_000_General.rb', line 434

def shop_class
  @shop_class
end

.storage_class ⇒ Class<Storage>

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

Returns:



416
417
418
# File 'docs/4_Systems_000_General.rb', line 416

def storage_class
  @storage_class
end