Class: PFM::Quests
- Defined in:
- scripts/01200 PFM/00100 Global Systems/01400 Quest.rb
Overview
The quest management
The main object is stored in $quests and $pokemon_party.quests
Instance Attribute Summary collapse
-
#active_quests ⇒ Hash<Integer => Hash>
The list of active_quests.
-
#failed_quests ⇒ Hash<Integer => Hash>
The list of failed_quests.
-
#finished_quests ⇒ Hash<Integer => Hash>
The list of finished_quests.
-
#signal ⇒ Hash<start: Array<Integer>, finish: Array<Integer>, failed: Array<Integer>>
The signals that inform the game what quest started or has been finished.
Instance Method Summary collapse
-
#__convert
Convert the quest object for PSDK Alpha 23.0.
-
#add_item(item_id)
Inform the manager that an item has been added to the bag of the Player.
-
#beat_npc(quest_id, npc_name_index) ⇒ Boolean
Inform the manager that a NPC has been beaten.
-
#beat_pokemon(pokemon_id)
Inform the manager that a Pokemon has been beaten.
-
#catch_pokemon(pokemon)
Inform the manager that a Pokemon has been captured.
-
#check_pokemon_criterion(pkm, pokemon) ⇒ Boolean
Check the specific pokemon criterion in catch_pokemon.
-
#check_quest(quest_id)
Check if a quest is done or not.
-
#check_up_signal
Check the signals and display them.
-
#earnings_got?(quest_id) ⇒ Boolean
Does the earning of a quest has been taken.
-
#egg_found
(also: #get_egg)
Inform the manager an egg has been found.
-
#failed?(quest_id) ⇒ Boolean
Is a quest failed ?.
-
#finished?(quest_id) ⇒ Boolean
Is a quest finished ?.
-
#get_earnings(quest_id) ⇒ Boolean
Get the earnings of a quest.
-
#get_goal_data_index(quest_id, goal_index) ⇒ Integer
Get the goal data index (if array like items / speak_to return the index of the goal in the array info from data/quest data).
-
#get_goal_type(quest_id, goal_index) ⇒ Symbol
Get the goal type.
-
#goal_shown?(quest_id, goal_index) ⇒ Boolean
Tell if a goal is shown or not.
-
#hatch_egg
Inform the manager an egg has hatched.
-
#initialize ⇒ Quests
constructor
Create a new Quest management object.
-
#see_pokemon(pokemon_id)
Inform the manager that a Pokemon has been seen.
-
#show_goal(quest_id, goal_index)
Show a goal of a quest.
-
#speak_to_npc(quest_id, npc_name_index) ⇒ Boolean
Inform the manager that a NPC has been spoken to.
-
#start(quest_id) ⇒ Boolean
Start a new quest if possible.
Constructor Details
#initialize ⇒ Quests
Create a new Quest management object
Instance Attribute Details
#active_quests ⇒ Hash<Integer => Hash>
The list of active_quests
#failed_quests ⇒ Hash<Integer => Hash>
The list of failed_quests
#finished_quests ⇒ Hash<Integer => Hash>
The list of finished_quests
Instance Method Details
#__convert
Convert the quest object for PSDK Alpha 23.0
#add_item(item_id)
Inform the manager that an item has been added to the bag of the Player
#beat_npc(quest_id, npc_name_index) ⇒ Boolean
Inform the manager that a NPC has been beaten
#beat_pokemon(pokemon_id)
Inform the manager that a Pokemon has been beaten
#catch_pokemon(pokemon)
Inform the manager that a Pokemon has been captured
#check_pokemon_criterion(pkm, pokemon) ⇒ Boolean
Check the specific pokemon criterion in catch_pokemon
#check_quest(quest_id)
Check if a quest is done or not
#check_up_signal
Check the signals and display them
#earnings_got?(quest_id) ⇒ Boolean
Does the earning of a quest has been taken
#egg_found Also known as: get_egg
Inform the manager an egg has been found
#failed?(quest_id) ⇒ Boolean
Is a quest failed ?
#finished?(quest_id) ⇒ Boolean
Is a quest finished ?
#get_earnings(quest_id) ⇒ Boolean
Get the earnings of a quest
#get_goal_data_index(quest_id, goal_index) ⇒ Integer
Get the goal data index (if array like items / speak_to return the index of the goal in the array info from data/quest data)
#get_goal_type(quest_id, goal_index) ⇒ Symbol
Get the goal type
#goal_shown?(quest_id, goal_index) ⇒ Boolean
Tell if a goal is shown or not
#hatch_egg
Inform the manager an egg has hatched
#see_pokemon(pokemon_id)
Inform the manager that a Pokemon has been seen
#show_goal(quest_id, goal_index)
Show a goal of a quest
#speak_to_npc(quest_id, npc_name_index) ⇒ Boolean
Inform the manager that a NPC has been spoken to
#start(quest_id) ⇒ Boolean
Start a new quest if possible