summaryrefslogtreecommitdiff
path: root/world/map/db/const-quest.txt
blob: 7500046697e86f9c1bcb7cd8bdd3fd9d5f13251b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
// Variables related to quests
TWOBIT_0_SHIFT 0
TWOBIT_0_MASK 3

TWOBIT_1_SHIFT 2
TWOBIT_1_MASK 12

TWOBIT_2_SHIFT 4
TWOBIT_2_MASK 48

TWOBIT_3_SHIFT 6
TWOBIT_3_MASK 192

TWOBIT_4_SHIFT 8
TWOBIT_4_MASK 768

TWOBIT_5_SHIFT 10
TWOBIT_5_MASK 3072

TWOBIT_6_SHIFT 12
TWOBIT_6_MASK 12288

TWOBIT_7_SHIFT 14
TWOBIT_7_MASK 49152

TWOBIT_8_SHIFT 16
TWOBIT_8_MASK 196608

TWOBIT_9_SHIFT 18
TWOBIT_9_MASK 786432

TWOBIT_10_SHIFT 20
TWOBIT_10_MASK 3145728

TWOBIT_11_SHIFT 22
TWOBIT_11_MASK 12582912

TWOBIT_12_SHIFT 24
TWOBIT_12_MASK 50331648

TWOBIT_13_SHIFT 26
TWOBIT_13_MASK 201326592

TWOBIT_14_SHIFT 28
TWOBIT_14_MASK 805306368

// Not enough space in CONST to store
//TWOBIT_15_SHIFT 30
//TWOBIT_15_MASK 3221225472

NIBBLE_0_SHIFT 0
NIBBLE_0_MASK 15

NIBBLE_1_SHIFT 4
NIBBLE_1_MASK 240

NIBBLE_2_SHIFT 8
NIBBLE_2_MASK 3840

NIBBLE_3_SHIFT 12
NIBBLE_3_MASK 61440

NIBBLE_4_SHIFT 16
NIBBLE_4_MASK 983040

NIBBLE_5_SHIFT 20
NIBBLE_5_MASK 15728640

NIBBLE_6_SHIFT 24
NIBBLE_6_MASK 251658240

NIBBLE_7_SHIFT 28        // Only three bits available in this one
NIBBLE_7_MASK 1879048192 // should be 4026531840

BYTE_0_SHIFT 0
BYTE_0_MASK  255

BYTE_1_SHIFT 8
BYTE_1_MASK  65280

BYTE_2_SHIFT 16
BYTE_2_MASK  16711680

BYTE_3_SHIFT 24         // only 7 bits in this one
BYTE_3_MASK  2130706432 // should be 4278190080

// Wedding Variables
WEDDING_FEE           100
DIVORCE_FEE_PER_LEVEL 500
WEDDING_MIN_LEVEL     32

// Flags for the magic quests.
MFLAG_DRANK_POTION         1      // Character drank at least one magic potion as prerequisite for the Mana Seed quest.
MFLAG_KNOWS_MANASEED       2      // Character has found the Mana Seed.
MFLAG_TOUCHED_MANASEED     4      // Character has touched the Mana Seed.
MFLAG_MANASEED_MAXEDOUT    8      // Character has touched the Mana Seed while maxed out on magic.

MFLAG_KNOWS_AULDSBEL       16     // Character has met Auldsbel.
MFLAG_KNOWS_WYARA          32     // Character has met Wyara.
MFLAG_KNOWS_SAGATHA        64     // Character has met Sagatha.
MFLAG_KNOWS_MANAPOTION     128    // Has heard about the Mana Potion.

MFLAG_MANASEED_RUMOUR      256    // Has heard rumour about Mana Seed.
MFLAG_KNOWS_CUTTREE        512    // Knows about the 'cut the tree' quest.
MFLAG_DID_CUTTREE          1024   // Did cut off a branch from the druid tree.
MFLAG_KNOWS_DRUIDTREE      2048   // Knows about the druid tree quest.

MFLAG_KNOWS_IMP            4096   // Knows about the imprisoned forest spirit.
MFLAG_KNOWS_OLD_WIZARD     8192   // Knows Bjorn's old wizard.
MFLAG_MADE_CONC_POTION     16384  // Made a concentration potion with T15 and/or T16.
MFLAG_ELANORE_OMAR         32768  // Told Omar about Elanore's involvement.

MFLAG_KNOWS_UNFOCUS_RECIPE 65536  // Has been told about unfocus by Luca.

MFLAG_GOT_MANA_PEARL       131072 // Had enough magic exp to get the Mana Pearl.

// Flags set in the FLAGS variable:
FLAG_HAS_BOWLER_BURNSDAY 1        // every year's poem at burns day, shannon gives you a bowler hat
FLAG_OPENED_UNDERGROUND  2        // this flag is a replacement for variable Open_Underground_Palace_Barrier, which was used only as bool
FLAG_GOT_NAEM_GLOVES     4        // this replaces Naem_Quest_Done, which was used as a bool variable
FLAG_GOT_GRADUATIONCAP   8        // this is a bit which was to be found in Tut_var second bit
FLAG_TOWEL_HELPED        16       // gave the towel npc the stuff he wants
FLAG_TOWEL_COMPLETED     32       // got the towel from the towel npc
FLAG_ANDRA_HELPED        64       // Knows Andra and agreed to help her
FLAG_ROSSI_COMPLETED     128      // Completed the Rossi Quest
FLAG_TUTORIAL_DONE       256      // player completed tutorial (or entered the tutorial area from outside after it was added)
FLAG_SNOWMAN             512      // player gave candy to the snowman
FLAG_SANTAS_HELPER       1024     // player gave presents to Santa's helper
FLAG_HURNSMINE_CHEST     2048     // player opened the chest with the short sword in Hurnscald mines
FLAG_GOT_BEANIEHAT       4096     // player got Beanie Copter Hat from Milly
FLAG_DECLINED_BEANIEHAT  8192     // player declined Beanie Copter Hat from Milly
//FLAG_ 16384   // not used at the moment
//FLAG_ 32768   // not used at the moment
FLAG_BEHEADER_MASK       65536    // traded with The Beheader
FLAG_GOT_BEHEADER_SWORD  131072   // Obtained the Beheader Sword
FLAG_LUCA_GOT_SIX_SKILLS 262144   // player learned all six Focus Skills
FLAG_LUCA_2SKILLS_MAXED  524288   // player got 2 Focus Skills at lvl 9
FLAG_LUCA_4SKILLS_MAXED  1048576  // player got 4 Focus Skills at lvl 9
FLAG_LUCA_6SKILLS_MAXED  2097152  // player got 6 Focus Skills at lvl 9
FLAG_LUCA_FIX            4194304  // fixed a bug
FLAG_XMAS21              8388608  // Christmas 2021 Rewards
FLAG_KESHLAM_REPACKED    16777216 // Moved FLAG_KESHLAM_FLAWEDLENS (16384) and FLAG_KESHLAM_RAREDROP (32768) to KESHLAM_STATE

// Flags set in the HURNS1_STATE variable:
// Pink Petal Shop Quest is using bits 1-8 (BYTE_0_SHIFT, BYTE_0_MASK)
// Constants Related to Blossom
PINK_FLOWER_SEEDS_NEEDED               250 // 1-253 possible, PINK_PETAL_SHOP_FOUND_FLOWER_SEEDS and PINK_PETAL_SHOP_DELIVERED_FLOWER_SEEDS need to be adjusted to this
PINK_FLOWER_SEEDS_CHANCE               50
PINK_PETAL_SHOP_ASKED_FOR_PETALS       1   // player asked Blossom if she sells petals
PINK_PETAL_SHOP_FOUND_FLOWER_SEEDS     251 // player found the needed amount of Pink Flower Seeds
PINK_PETAL_SHOP_DELIVERED_FLOWER_SEEDS 252 // player delivered the needed amount of Pink Flower Seeds

// Flags set in the KESHLAM_STATE variable:
FLAG_KESHLAM_FLAWEDLENS  65536      // player got the Flawed Lens from Keshlam's Chest
FLAG_KESHLAM_RAREDROP    131072     // player got the super rare from Keshlam's Chest
// Constants related to Chronos
// BOSS_MEDALS is using bits 1-8 (BYTE_0_SHIFT, BYTE_0_MASK)
// BOSS_MEDALS_AVAILABLE is using bits 9-16 (BYTE_1_SHIFT, BYTE_1_MASK)
CHRONOS_BOSS_MEDALS_MAX 255

// constants can only be -2147483648 till 2147483647 so its not possible to make the mask 4293918720

// Bif rarity constants:
GEM_BIF_CHANCE    5
NORMAL_BIF_CHANCE 4
BIG_BIF_CHANCE    8

// Anchor Stone constants:
// biggest maps use 520 tiles (012-3, 012-4) so 1023 is good atm but if maps ever grow bigger these values need to be changed
AS_X_MASK  1023
AS_X_SHIFT 0
AS_Y_MASK  1047552
AS_Y_SHIFT 10

// Flags for the battle caves.
BATTLE_CAVE1 1
BATTLE_CAVE2 2
BATTLE_CAVE3 4
BATTLE_CAVE4 8
BATTLE_CAVE5 16
BATTLE_CAVE6 32
BATTLE_CAVE7 64
BATTLE_CAVE8 128
BATTLE_CAVE9 256

// Storage Options
OPT_STORAGE_CLOSE 1
OPT_BANK_CLOSE 2
OPT_BANK_GOTSHADE 4

// Currently used by the fluffy hunt (033-1).
// starts counting with 0
MAX_HIGH_SCORES 14
MAX_HIGH_SCORES_CRC 29
MAX_HIGH_SCORES_EVENT 29