#ifndef GUARD_CONSTANTS_ITEMS_H
#define GUARD_CONSTANTS_ITEMS_H

#define ITEM_NONE 0

// Balls
#define ITEM_MASTER_BALL 1
#define ITEM_ULTRA_BALL 2
#define ITEM_GREAT_BALL 3
#define ITEM_POKE_BALL 4
#define ITEM_SAFARI_BALL 5
#define ITEM_NET_BALL 6
#define ITEM_DIVE_BALL 7
#define ITEM_NEST_BALL 8
#define ITEM_REPEAT_BALL 9
#define ITEM_TIMER_BALL 10
#define ITEM_LUXURY_BALL 11
#define ITEM_PREMIER_BALL 12

// Pokemon Items
#define ITEM_POTION 13
#define ITEM_ANTIDOTE 14
#define ITEM_BURN_HEAL 15
#define ITEM_ICE_HEAL 16
#define ITEM_AWAKENING 17
#define ITEM_PARALYZE_HEAL 18
#define ITEM_FULL_RESTORE 19
#define ITEM_MAX_POTION 20
#define ITEM_HYPER_POTION 21
#define ITEM_SUPER_POTION 22
#define ITEM_FULL_HEAL 23
#define ITEM_REVIVE 24
#define ITEM_MAX_REVIVE 25
#define ITEM_FRESH_WATER 26
#define ITEM_SODA_POP 27
#define ITEM_LEMONADE 28
#define ITEM_MOOMOO_MILK 29
#define ITEM_ENERGY_POWDER 30
#define ITEM_ENERGY_ROOT 31
#define ITEM_HEAL_POWDER 32
#define ITEM_REVIVAL_HERB 33
#define ITEM_ETHER 34
#define ITEM_MAX_ETHER 35
#define ITEM_ELIXIR 36
#define ITEM_MAX_ELIXIR 37
#define ITEM_LAVA_COOKIE 38
#define ITEM_BLUE_FLUTE 39
#define ITEM_YELLOW_FLUTE 40
#define ITEM_RED_FLUTE 41
#define ITEM_BLACK_FLUTE 42
#define ITEM_WHITE_FLUTE 43
#define ITEM_BERRY_JUICE 44
#define ITEM_SACRED_ASH 45
#define ITEM_SHOAL_SALT 46
#define ITEM_SHOAL_SHELL 47
#define ITEM_RED_SHARD 48
#define ITEM_BLUE_SHARD 49
#define ITEM_YELLOW_SHARD 50
#define ITEM_GREEN_SHARD 51
#define ITEM_034 52
#define ITEM_035 53
#define ITEM_036 54
#define ITEM_037 55
#define ITEM_038 56
#define ITEM_039 57
#define ITEM_03A 58
#define ITEM_03B 59
#define ITEM_03C 60
#define ITEM_03D 61
#define ITEM_03E 62
#define ITEM_HP_UP 63
#define ITEM_PROTEIN 64
#define ITEM_IRON 65
#define ITEM_CARBOS 66
#define ITEM_CALCIUM 67
#define ITEM_RARE_CANDY 68
#define ITEM_PP_UP 69
#define ITEM_ZINC 70
#define ITEM_PP_MAX 71
#define ITEM_048 72
#define ITEM_GUARD_SPEC 73
#define ITEM_DIRE_HIT 74
#define ITEM_X_ATTACK 75
#define ITEM_X_DEFEND 76
#define ITEM_X_SPEED 77
#define ITEM_X_ACCURACY 78
#define ITEM_X_SPECIAL 79
#define ITEM_POKE_DOLL 80
#define ITEM_FLUFFY_TAIL 81
#define ITEM_052 82
#define ITEM_SUPER_REPEL 83
#define ITEM_MAX_REPEL 84
#define ITEM_ESCAPE_ROPE 85
#define ITEM_REPEL 86
#define ITEM_057 87
#define ITEM_058 88
#define ITEM_059 89
#define ITEM_05A 90
#define ITEM_05B 91
#define ITEM_05C 92
#define ITEM_SUN_STONE 93
#define ITEM_MOON_STONE 94
#define ITEM_FIRE_STONE 95
#define ITEM_THUNDER_STONE 96
#define ITEM_WATER_STONE 97
#define ITEM_LEAF_STONE 98
#define ITEM_063 99
#define ITEM_064 100
#define ITEM_065 101
#define ITEM_066 102
#define ITEM_TINY_MUSHROOM 103
#define ITEM_BIG_MUSHROOM 104
#define ITEM_069 105
#define ITEM_PEARL 106
#define ITEM_BIG_PEARL 107
#define ITEM_STARDUST 108
#define ITEM_STAR_PIECE 109
#define ITEM_NUGGET 110
#define ITEM_HEART_SCALE 111
#define ITEM_070 112
#define ITEM_071 113
#define ITEM_072 114
#define ITEM_073 115
#define ITEM_074 116
#define ITEM_075 117
#define ITEM_076 118
#define ITEM_077 119
#define ITEM_078 120
#define ITEM_ORANGE_MAIL 121
#define ITEM_HARBOR_MAIL 122
#define ITEM_GLITTER_MAIL 123
#define ITEM_MECH_MAIL 124
#define ITEM_WOOD_MAIL 125
#define ITEM_WAVE_MAIL 126
#define ITEM_BEAD_MAIL 127
#define ITEM_SHADOW_MAIL 128
#define ITEM_TROPIC_MAIL 129
#define ITEM_DREAM_MAIL 130
#define ITEM_FAB_MAIL 131
#define ITEM_RETRO_MAIL 132
#define ITEM_CHERI_BERRY 133
#define ITEM_CHESTO_BERRY 134
#define ITEM_PECHA_BERRY 135
#define ITEM_RAWST_BERRY 136
#define ITEM_ASPEAR_BERRY 137
#define ITEM_LEPPA_BERRY 138
#define ITEM_ORAN_BERRY 139
#define ITEM_PERSIM_BERRY 140
#define ITEM_LUM_BERRY 141
#define ITEM_SITRUS_BERRY 142
#define ITEM_FIGY_BERRY 143
#define ITEM_WIKI_BERRY 144
#define ITEM_MAGO_BERRY 145
#define ITEM_AGUAV_BERRY 146
#define ITEM_IAPAPA_BERRY 147
#define ITEM_RAZZ_BERRY 148
#define ITEM_BLUK_BERRY 149
#define ITEM_NANAB_BERRY 150
#define ITEM_WEPEAR_BERRY 151
#define ITEM_PINAP_BERRY 152
#define ITEM_POMEG_BERRY 153
#define ITEM_KELPSY_BERRY 154
#define ITEM_QUALOT_BERRY 155
#define ITEM_HONDEW_BERRY 156
#define ITEM_GREPA_BERRY 157
#define ITEM_TAMATO_BERRY 158
#define ITEM_CORNN_BERRY 159
#define ITEM_MAGOST_BERRY 160
#define ITEM_RABUTA_BERRY 161
#define ITEM_NOMEL_BERRY 162
#define ITEM_SPELON_BERRY 163
#define ITEM_PAMTRE_BERRY 164
#define ITEM_WATMEL_BERRY 165
#define ITEM_DURIN_BERRY 166
#define ITEM_BELUE_BERRY 167
#define ITEM_LIECHI_BERRY 168
#define ITEM_GANLON_BERRY 169
#define ITEM_SALAC_BERRY 170
#define ITEM_PETAYA_BERRY 171
#define ITEM_APICOT_BERRY 172
#define ITEM_LANSAT_BERRY 173
#define ITEM_STARF_BERRY 174
#define ITEM_ENIGMA_BERRY 175
#define ITEM_0B0 176
#define ITEM_0B1 177
#define ITEM_0B2 178

// hold items
#define ITEM_BRIGHT_POWDER 179
#define ITEM_WHITE_HERB 180
#define ITEM_MACHO_BRACE 181
#define ITEM_EXP_SHARE 182
#define ITEM_QUICK_CLAW 183
#define ITEM_SOOTHE_BELL 184
#define ITEM_MENTAL_HERB 185
#define ITEM_CHOICE_BAND 186
#define ITEM_KINGS_ROCK 187
#define ITEM_SILVER_POWDER 188
#define ITEM_AMULET_COIN 189
#define ITEM_CLEANSE_TAG 190
#define ITEM_SOUL_DEW 191
#define ITEM_DEEP_SEA_TOOTH 192
#define ITEM_DEEP_SEA_SCALE 193
#define ITEM_SMOKE_BALL 194
#define ITEM_EVERSTONE 195
#define ITEM_FOCUS_BAND 196
#define ITEM_LUCKY_EGG 197
#define ITEM_SCOPE_LENS 198
#define ITEM_METAL_COAT 199
#define ITEM_LEFTOVERS 200
#define ITEM_DRAGON_SCALE 201
#define ITEM_LIGHT_BALL 202
#define ITEM_SOFT_SAND 203
#define ITEM_HARD_STONE 204
#define ITEM_MIRACLE_SEED 205
#define ITEM_BLACK_GLASSES 206
#define ITEM_BLACK_BELT 207
#define ITEM_MAGNET 208
#define ITEM_MYSTIC_WATER 209
#define ITEM_SHARP_BEAK 210
#define ITEM_POISON_BARB 211
#define ITEM_NEVER_MELT_ICE 212
#define ITEM_SPELL_TAG 213
#define ITEM_TWISTED_SPOON 214
#define ITEM_CHARCOAL 215
#define ITEM_DRAGON_FANG 216
#define ITEM_SILK_SCARF 217
#define ITEM_UP_GRADE 218
#define ITEM_SHELL_BELL 219
#define ITEM_SEA_INCENSE 220
#define ITEM_LAX_INCENSE 221
#define ITEM_LUCKY_PUNCH 222
#define ITEM_METAL_POWDER 223
#define ITEM_THICK_CLUB 224
#define ITEM_STICK 225
#define ITEM_0E2 226
#define ITEM_0E3 227
#define ITEM_0E4 228
#define ITEM_0E5 229
#define ITEM_0E6 230
#define ITEM_0E7 231
#define ITEM_0E8 232
#define ITEM_0E9 233
#define ITEM_0EA 234
#define ITEM_0EB 235
#define ITEM_0EC 236
#define ITEM_0ED 237
#define ITEM_0EE 238
#define ITEM_0EF 239
#define ITEM_0F0 240
#define ITEM_0F1 241
#define ITEM_0F2 242
#define ITEM_0F3 243
#define ITEM_0F4 244
#define ITEM_0F5 245
#define ITEM_0F6 246
#define ITEM_0F7 247
#define ITEM_0F8 248
#define ITEM_0F9 249
#define ITEM_0FA 250
#define ITEM_0FB 251
#define ITEM_0FC 252
#define ITEM_0FD 253
#define ITEM_RED_SCARF 254
#define ITEM_BLUE_SCARF 255
#define ITEM_PINK_SCARF 256
#define ITEM_GREEN_SCARF 257
#define ITEM_YELLOW_SCARF 258

// Key Items
#define ITEM_MACH_BIKE 259
#define ITEM_COIN_CASE 260
#define ITEM_ITEMFINDER 261
#define ITEM_OLD_ROD 262
#define ITEM_GOOD_ROD 263
#define ITEM_SUPER_ROD 264
#define ITEM_SS_TICKET 265
#define ITEM_CONTEST_PASS 266
#define ITEM_10B 267
#define ITEM_WAILMER_PAIL 268
#define ITEM_DEVON_GOODS 269
#define ITEM_SOOT_SACK 270
#define ITEM_BASEMENT_KEY 271
#define ITEM_ACRO_BIKE 272
#define ITEM_POKEBLOCK_CASE 273
#define ITEM_LETTER 274
#define ITEM_EON_TICKET 275
#define ITEM_RED_ORB 276
#define ITEM_BLUE_ORB 277
#define ITEM_SCANNER 278
#define ITEM_GO_GOGGLES 279
#define ITEM_METEORITE 280
#define ITEM_ROOM_1_KEY 281
#define ITEM_ROOM_2_KEY 282
#define ITEM_ROOM_4_KEY 283
#define ITEM_ROOM_6_KEY 284
#define ITEM_STORAGE_KEY 285
#define ITEM_ROOT_FOSSIL 286
#define ITEM_CLAW_FOSSIL 287
#define ITEM_DEVON_SCOPE 288

// TMs/HMs
#define ITEM_TM01_FOCUS_PUNCH 289
#define ITEM_TM02_DRAGON_CLAW 290
#define ITEM_TM03_WATER_PULSE 291
#define ITEM_TM04_CALM_MIND 292
#define ITEM_TM05_ROAR 293
#define ITEM_TM06_TOXIC 294
#define ITEM_TM07_HAIL 295
#define ITEM_TM08_BULK_UP 296
#define ITEM_TM09_BULLET_SEED 297
#define ITEM_TM10_HIDDEN_POWER 298
#define ITEM_TM11_SUNNY_DAY 299
#define ITEM_TM12_TAUNT 300
#define ITEM_TM13_ICE_BEAM 301
#define ITEM_TM14_BLIZZARD 302
#define ITEM_TM15_HYPER_BEAM 303
#define ITEM_TM16_LIGHT_SCREEN 304
#define ITEM_TM17_PROTECT 305
#define ITEM_TM18_RAIN_DANCE 306
#define ITEM_TM19_GIGA_DRAIN 307
#define ITEM_TM20_SAFEGUARD 308
#define ITEM_TM21_FRUSTRATION 309
#define ITEM_TM22_SOLARBEAM 310
#define ITEM_TM23_IRON_TAIL 311
#define ITEM_TM24_THUNDERBOLT 312
#define ITEM_TM25_THUNDER 313
#define ITEM_TM26_EARTHQUAKE 314
#define ITEM_TM27_RETURN 315
#define ITEM_TM28_DIG 316
#define ITEM_TM29_PSYCHIC 317
#define ITEM_TM30_SHADOW_BALL 318
#define ITEM_TM31_BRICK_BREAK 319
#define ITEM_TM32_DOUBLE_TEAM 320
#define ITEM_TM33_REFLECT 321
#define ITEM_TM34_SHOCK_WAVE 322
#define ITEM_TM35_FLAMETHROWER 323
#define ITEM_TM36_SLUDGE_BOMB 324
#define ITEM_TM37_SANDSTORM 325
#define ITEM_TM38_FIRE_BLAST 326
#define ITEM_TM39_ROCK_TOMB 327
#define ITEM_TM40_AERIAL_ACE 328
#define ITEM_TM41_TORMENT 329
#define ITEM_TM42_FACADE 330
#define ITEM_TM43_SECRET_POWER 331
#define ITEM_TM44_REST 332
#define ITEM_TM45_ATTRACT 333
#define ITEM_TM46_THIEF 334
#define ITEM_TM47_STEEL_WING 335
#define ITEM_TM48_SKILL_SWAP 336
#define ITEM_TM49_SNATCH 337
#define ITEM_TM50_OVERHEAT 338
#define ITEM_HM01_CUT 339
#define ITEM_HM02_FLY 340
#define ITEM_HM03_SURF 341
#define ITEM_HM04_STRENGTH 342
#define ITEM_HM05_FLASH 343
#define ITEM_HM06_ROCK_SMASH 344
#define ITEM_HM07_WATERFALL 345
#define ITEM_HM08_DIVE 346

// Unknown
#define ITEM_15B 347
#define ITEM_15C 348

#define ITEMS_COUNT 349
#define ITEM_FIELD_ARROW ITEMS_COUNT

#define NUM_TECHNICAL_MACHINES 50
#define NUM_HIDDEN_MACHINES     8

#define MAX_BAG_ITEM_CAPACITY  99
#define MAX_PC_ITEM_CAPACITY   999
#define MAX_BERRY_CAPACITY     999

#define FIRST_BERRY_INDEX             ITEM_CHERI_BERRY
#define LAST_BERRY_INDEX              ITEM_ENIGMA_BERRY

#define ITEM_TO_BERRY(itemId)(((itemId - FIRST_BERRY_INDEX) + 1))

// Check if the item is one that can be used on a Pokemon.
#define ITEM_HAS_EFFECT(item) ((item) >= ITEM_POTION && (item) <= ITEM_0B2)

#define IS_ITEM_MAIL(item) ((item) >= ITEM_ORANGE_MAIL && (item) <= ITEM_RETRO_MAIL)

#endif  // GUARD_CONSTANTS_ITEMS_H
