Module: PFM

Defined in:
scripts/01450 Systems/00000 General/00200 PFM.rb,
scripts/01450 Systems/09000 GTS/09000 GTS.rb,
scripts/01450 Systems/00103 Bag/00001 PFM/00300 Bag.rb,
scripts/01450 Systems/00203 Shop/00001 PFM/00700 Shop.rb,
scripts/01450 Systems/00101 Dex/00001 PFM/00100 Pokedex.rb,
scripts/01450 Systems/99991 Wild/00300 Wild_RoamingInfo.rb,
scripts/01450 Systems/99990 Global Systems/01500 HoneyTree.rb,
scripts/01450 Systems/00004 Message/00001 Logic/00090 State.rb,
scripts/01450 Systems/00104 Trainer/00001 PFM/00400 Trainer.rb,
scripts/01450 Systems/00105 Options/00001 PFM/00500 Options.rb,
scripts/01450 Systems/00201 Daycare/00001 PFM/01100 Daycare.rb,
scripts/01450 Systems/00004 Message/00001 Logic/00001 Parser.rb,
scripts/01450 Systems/99991 Wild/00100 Wild Battle (manager).rb,
scripts/01450 Systems/00204 Nuzlocke/00001 PFM/01600 Nuzlocke.rb,
scripts/00800 Studio/00001 Data/00002 Item/00000 ItemDescriptor.rb,
scripts/01450 Systems/00200 Storage/00001 PFM_Storage/00002 Box.rb,
scripts/01450 Systems/00202 Environment/00001 PFM/01201 Weather.rb,
scripts/01450 Systems/00004 Message/00001 Logic/00002 Properties.rb,
scripts/01450 Systems/00200 Storage/00001 PFM_Storage/00001 Main.rb,
scripts/02000 Nuri Yuri/00001 DynamicLight/00003 DL PokemonParty.rb,
scripts/01450 Systems/00004 Message/00001 Logic/00003 Instructions.rb,
scripts/01450 Systems/08000 Quest/00001 PFM_Quest/00001 PFM Quests.rb,
scripts/01450 Systems/99991 Wild/00101 Wild Battle (configuration).rb,
scripts/01450 Systems/00000 General/00010 GameState/00200 Accessors.rb,
scripts/01450 Systems/00004 Message/00001 Logic/00004 WitdhComputer.rb,
scripts/01450 Systems/00000 General/00010 GameState/00201 Management.rb,
scripts/01450 Systems/00200 Storage/00001 PFM_Storage/00003 BattleBox.rb,
scripts/01450 Systems/00202 Environment/00001 PFM/01200 Environnement.rb,
scripts/01450 Systems/00300 Hall of fame/00001 PFM/02000 Hall_of_Fame.rb,
scripts/01450 Systems/00000 General/00001 PFM/00200 Helpers/00100 Text.rb,
scripts/01450 Systems/00000 General/00001 PFM/00300 Pokemon/90000 Skill.rb,
scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/00500 Effects.rb,
scripts/01450 Systems/08000 Quest/00001 PFM_Quest/00002 PFM Quests Quest.rb,
scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/00400 Grounded.rb,
scripts/01450 Systems/00000 General/00001 PFM/00300 Pokemon/00401 ExpList.rb,
scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/00200 Properties.rb,
scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/00300 Statistics.rb,
scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/01000 MoveHistory.rb,
scripts/01450 Systems/00000 General/00001 PFM/00300 Pokemon/00001 Initialize.rb,
scripts/01450 Systems/00000 General/00001 PFM/00300 Pokemon/00002 Properties.rb,
scripts/01450 Systems/00000 General/00001 PFM/00300 Pokemon/00300 Pokemon EV.rb,
scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/01100 DamageHistory.rb,
scripts/01450 Systems/00000 General/00001 PFM/00200 Helpers/03100 SkillProcess.rb,
scripts/01450 Systems/00000 General/00001 PFM/00300 Pokemon/01100 Pokemon Text.rb,
scripts/01450 Systems/08001 Mining Game/00020 PFM_Mining_Game/00001 MiningGame.rb,
scripts/01600 Alpha 25 Battle Engine/00100 PokemonBattler/00100 PokemonBattler.rb,
scripts/01450 Systems/00000 General/00001 PFM/00200 Helpers/00200 Choice_Helper.rb,
scripts/01450 Systems/00000 General/00001 PFM/00300 Pokemon/00500 Pokemon Forms.rb,
scripts/01450 Systems/00000 General/00001 PFM/00300 Pokemon/00700 Pokemon Stats.rb,
scripts/01450 Systems/00000 General/00001 PFM/00300 Pokemon/00900 Pokemon Types.rb,
scripts/01450 Systems/00000 General/00001 PFM/00300 Pokemon/00600 Pokemon Skills.rb,
scripts/01450 Systems/00000 General/00001 PFM/00300 Pokemon/00800 Pokemon Status.rb,
scripts/01450 Systems/00000 General/00001 PFM/00300 Pokemon/02000 Pokemon Flavors.rb,
scripts/01450 Systems/00000 General/00001 PFM/00300 Pokemon/00200 Pokemon Graphics.rb,
scripts/01450 Systems/00000 General/00001 PFM/00300 Pokemon/00400 Pokemon exp & evolve.rb,
scripts/01450 Systems/08001 Mining Game/00020 PFM_Mining_Game/00002 MiningGame_GridHandler.rb,
scripts/01450 Systems/00000 General/00001 PFM/00300 Pokemon/01000 Pokemon Params (generate).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
Pokemon_Party =

Alias for old saves

GameState
Environnement =
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
      # Put heal animation here
      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
}

Class Attribute Summary collapse

Class Attribute Details

.bag_classClass<Bag>

Get the class handling the bag data in the game

Returns:



9
10
11
# File 'scripts/01450 Systems/00000 General/00200 PFM.rb', line 9

def bag_class
  @bag_class
end

.daycare_classClass<Daycare>

Get the class handling the daycare in the game

Returns:



24
25
26
# File 'scripts/01450 Systems/00000 General/00200 PFM.rb', line 24

def daycare_class
  @daycare_class
end

.dex_classClass<Pokedex>

Get the class handling the Dex data in the game

Returns:



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

def dex_class
  @dex_class
end

.environment_classClass<Environment>

Get the class handling the environment in the game

Returns:



27
28
29
# File 'scripts/01450 Systems/00000 General/00200 PFM.rb', line 27

def environment_class
  @environment_class
end

.game_stateGameState

Get the game state

Returns:



6
7
8
# File 'scripts/01450 Systems/00000 General/00200 PFM.rb', line 6

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:



36
37
38
# File 'scripts/01450 Systems/00000 General/00200 PFM.rb', line 36

def hall_of_fame_class
  @hall_of_fame_class
end

.nuzlocke_classClass<Nuzlocke>

Get the class handling the nuzlocke in the game

Returns:



33
34
35
# File 'scripts/01450 Systems/00000 General/00200 PFM.rb', line 33

def nuzlocke_class
  @nuzlocke_class
end

.options_classClass<Options>

Get the class handling the option in the game

Returns:



21
22
23
# File 'scripts/01450 Systems/00000 General/00200 PFM.rb', line 21

def options_class
  @options_class
end

.player_info_classClass<Trainer>

Get the class handling the player info in the game

Returns:



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

def player_info_class
  @player_info_class
end

.shop_classClass<Shop>

Get the class handling the shop in the game

Returns:



30
31
32
# File 'scripts/01450 Systems/00000 General/00200 PFM.rb', line 30

def shop_class
  @shop_class
end

.storage_classClass<Storage>

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

Returns:



12
13
14
# File 'scripts/01450 Systems/00000 General/00200 PFM.rb', line 12

def storage_class
  @storage_class
end