Class: PFM::Quests
Overview
The quest management
The main object is stored in $quests and PFM.game_state.quests
Defined Under Namespace
Classes: Quest
Constant Summary collapse
- AUTO_CHECK_SIGNAL_ON_TEST =
Tell if the system should check the signal when we test finished?(id) or failed?(id)
true
- AUTO_CHECK_SIGNAL_ON_ALL_OBJECTIVE_VALIDATED =
Tell if the system should check the signal when we check the quest termination
false
Instance Attribute Summary collapse
-
#active_quests ⇒ Hash<Integer => Quest>
The list of active_quests.
-
#failed_quests ⇒ Hash<Integer => Quest>
The list of failed_quests.
-
#finished_quests ⇒ Hash<Integer => Quest>
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
-
#active_quest(quest_id) ⇒ Quest
Return an active quest by its id.
-
#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_symbol)
Inform the manager that a Pokemon has been beaten.
-
#catch_pokemon(pokemon)
Inform the manager that a Pokemon has been captured.
-
#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.
-
#fail_quest(quest_id) ⇒ Quest
Fail a quest Return a failed quest by its id.
-
#failed?(quest_id) ⇒ Boolean
Is a quest failed ?.
- #failed_quest(quest_id)
-
#finished?(quest_id) ⇒ Boolean
Is a quest finished ?.
-
#finished_quest(quest_id) ⇒ Quest
Return a finished quest by its id.
-
#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).
-
#goal_shown?(quest_id, goal_index) ⇒ Boolean
Tell if a goal is shown or not.
-
#hatch_egg
Inform the manager an egg has hatched.
-
#import_from_dot24
Import the quest data from dot 24 version of PSDK.
-
#initialize ⇒ Quests
constructor
Create a new Quest management object.
-
#see_pokemon(pokemon_symbol)
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.
-
#update_quest_data_for_studio
Update teh quest data for Studio.
Constructor Details
#initialize ⇒ Quests
Create a new Quest management object
23 24 |
# File 'docs/01450_Systems_08000_Quest.rb', line 23 def initialize end |
Instance Attribute Details
#active_quests ⇒ Hash<Integer => Quest>
The list of active_quests
12 13 14 |
# File 'docs/01450_Systems_08000_Quest.rb', line 12 def active_quests @active_quests end |
#failed_quests ⇒ Hash<Integer => Quest>
The list of failed_quests
18 19 20 |
# File 'docs/01450_Systems_08000_Quest.rb', line 18 def failed_quests @failed_quests end |
#finished_quests ⇒ Hash<Integer => Quest>
The list of finished_quests
15 16 17 |
# File 'docs/01450_Systems_08000_Quest.rb', line 15 def finished_quests @finished_quests end |
#signal ⇒ Hash<start: Array<Integer>, finish: Array<Integer>, failed: Array<Integer>>
The signals that inform the game what quest started or has been finished
21 22 23 |
# File 'docs/01450_Systems_08000_Quest.rb', line 21 def signal @signal end |
Instance Method Details
#active_quest(quest_id) ⇒ Quest
Return an active quest by its id
33 34 |
# File 'docs/01450_Systems_08000_Quest.rb', line 33 def active_quest(quest_id) end |
#add_item(item_id)
Inform the manager that an item has been added to the bag of the Player
80 81 |
# File 'docs/01450_Systems_08000_Quest.rb', line 80 def add_item(item_id) end |
#beat_npc(quest_id, npc_name_index) ⇒ Boolean
Inform the manager that a NPC has been beaten
70 71 |
# File 'docs/01450_Systems_08000_Quest.rb', line 70 def beat_npc(quest_id, npc_name_index) end |
#beat_pokemon(pokemon_symbol)
Inform the manager that a Pokemon has been beaten
84 85 |
# File 'docs/01450_Systems_08000_Quest.rb', line 84 def beat_pokemon(pokemon_symbol) end |
#catch_pokemon(pokemon)
Inform the manager that a Pokemon has been captured
88 89 |
# File 'docs/01450_Systems_08000_Quest.rb', line 88 def catch_pokemon(pokemon) end |
#check_quest(quest_id)
Check if a quest is done or not
106 107 |
# File 'docs/01450_Systems_08000_Quest.rb', line 106 def check_quest(quest_id) end |
#check_up_signal
Check the signals and display them
102 103 |
# File 'docs/01450_Systems_08000_Quest.rb', line 102 def check_up_signal end |
#earnings_got?(quest_id) ⇒ Boolean
Does the earning of a quest has been taken
125 126 |
# File 'docs/01450_Systems_08000_Quest.rb', line 125 def earnings_got?(quest_id) end |
#egg_found Also known as: get_egg
Inform the manager an egg has been found
95 96 |
# File 'docs/01450_Systems_08000_Quest.rb', line 95 def egg_found end |
#fail_quest(quest_id) ⇒ Quest
Fail a quest Return a failed quest by its id
44 45 |
# File 'docs/01450_Systems_08000_Quest.rb', line 44 def fail_quest(quest_id) end |
#failed?(quest_id) ⇒ Boolean
Is a quest failed ?
116 117 |
# File 'docs/01450_Systems_08000_Quest.rb', line 116 def failed?(quest_id) end |
#failed_quest(quest_id)
46 47 |
# File 'docs/01450_Systems_08000_Quest.rb', line 46 def failed_quest(quest_id) end |
#finished?(quest_id) ⇒ Boolean
Is a quest finished ?
111 112 |
# File 'docs/01450_Systems_08000_Quest.rb', line 111 def finished?(quest_id) end |
#finished_quest(quest_id) ⇒ Quest
Return a finished quest by its id
38 39 |
# File 'docs/01450_Systems_08000_Quest.rb', line 38 def finished_quest(quest_id) end |
#get_earnings(quest_id) ⇒ Boolean
Get the earnings of a quest
121 122 |
# File 'docs/01450_Systems_08000_Quest.rb', line 121 def get_earnings(quest_id) end |
#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)
64 65 |
# File 'docs/01450_Systems_08000_Quest.rb', line 64 def get_goal_data_index(quest_id, goal_index) end |
#goal_shown?(quest_id, goal_index) ⇒ Boolean
Tell if a goal is shown or not
57 58 |
# File 'docs/01450_Systems_08000_Quest.rb', line 57 def goal_shown?(quest_id, goal_index) end |
#hatch_egg
Inform the manager an egg has hatched
99 100 |
# File 'docs/01450_Systems_08000_Quest.rb', line 99 def hatch_egg end |
#import_from_dot24
Import the quest data from dot 24 version of PSDK
128 129 |
# File 'docs/01450_Systems_08000_Quest.rb', line 128 def import_from_dot24 end |
#see_pokemon(pokemon_symbol)
Inform the manager that a Pokemon has been seen
92 93 |
# File 'docs/01450_Systems_08000_Quest.rb', line 92 def see_pokemon(pokemon_symbol) end |
#show_goal(quest_id, goal_index)
Show a goal of a quest
51 52 |
# File 'docs/01450_Systems_08000_Quest.rb', line 51 def show_goal(quest_id, goal_index) end |
#speak_to_npc(quest_id, npc_name_index) ⇒ Boolean
Inform the manager that a NPC has been spoken to
76 77 |
# File 'docs/01450_Systems_08000_Quest.rb', line 76 def speak_to_npc(quest_id, npc_name_index) end |
#start(quest_id) ⇒ Boolean
Start a new quest if possible
28 29 |
# File 'docs/01450_Systems_08000_Quest.rb', line 28 def start(quest_id) end |
#update_quest_data_for_studio
Update teh quest data for Studio
131 132 |
# File 'docs/01450_Systems_08000_Quest.rb', line 131 def update_quest_data_for_studio end |