Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add power item config #3961

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/config/item.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define I_SELL_VALUE_FRACTION GEN_LATEST // In Gen9+, items sell for 1/4 of their value instead of 1/2.
#define I_PRICE GEN_LATEST // Some items have varied in value across generations.
#define I_BERRY_PRICE GEN_7 // Since Berries have become unplantable (Gen8+), their price has gone up.
#define I_POWER_ITEM_BOOST GEN_LATEST // In Gen7+, Power Items grant 8 EVs instead of 4 EVs.

// TM config
#define I_REUSABLE_TMS FALSE // In Gen5-8, TMs are reusable. Setting this to TRUE will make all vanilla TMs reusable, though they can also be cherry-picked by setting their importance to 1.
Expand Down
18 changes: 12 additions & 6 deletions src/data/items.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
#define TYPE_BOOST_PARAM 10
#endif

#if I_POWER_ITEM_BOOST >= GEN_7
#define POWER_ITEM_BOOST 8
#else
#define POWER_ITEM_BOOST 4
#endif

#define X_ITEM_STAGES (B_X_ITEMS_BUFF >= GEN_7) ? 2 : 1

#define TREASURE_FACTOR (I_SELL_VALUE_FRACTION >= GEN_9) ? 2: 1
Expand Down Expand Up @@ -6067,7 +6073,7 @@ const struct Item gItems[] =
.name = _("Power Weight"),
.price = (I_PRICE >= GEN_9) ? 10000 : 3000,
.holdEffect = HOLD_EFFECT_POWER_ITEM,
.holdEffectParam = 8,
.holdEffectParam = POWER_ITEM_BOOST,
.description = COMPOUND_STRING("A hold item that\n"
"promotes HP gain,\n"
"but reduces Speed."),
Expand All @@ -6083,7 +6089,7 @@ const struct Item gItems[] =
.name = _("Power Bracer"),
.price = (I_PRICE >= GEN_9) ? 10000 : 3000,
.holdEffect = HOLD_EFFECT_POWER_ITEM,
.holdEffectParam = 8,
.holdEffectParam = POWER_ITEM_BOOST,
.description = COMPOUND_STRING("A hold item that\n"
"promotes Atk gain,\n"
"but reduces Speed."),
Expand All @@ -6099,7 +6105,7 @@ const struct Item gItems[] =
.name = _("Power Belt"),
.price = (I_PRICE >= GEN_9) ? 10000 : 3000,
.holdEffect = HOLD_EFFECT_POWER_ITEM,
.holdEffectParam = 8,
.holdEffectParam = POWER_ITEM_BOOST,
.description = COMPOUND_STRING("A hold item that\n"
"promotes Def gain,\n"
"but reduces Speed."),
Expand All @@ -6115,7 +6121,7 @@ const struct Item gItems[] =
.name = _("Power Lens"),
.price = (I_PRICE >= GEN_9) ? 10000 : 3000,
.holdEffect = HOLD_EFFECT_POWER_ITEM,
.holdEffectParam = 8,
.holdEffectParam = POWER_ITEM_BOOST,
.description = COMPOUND_STRING("Hold item that pro-\n"
"motes Sp. Atk gain,\n"
"but reduces Speed."),
Expand All @@ -6131,7 +6137,7 @@ const struct Item gItems[] =
.name = _("Power Band"),
.price = (I_PRICE >= GEN_9) ? 10000 : 3000,
.holdEffect = HOLD_EFFECT_POWER_ITEM,
.holdEffectParam = 8,
.holdEffectParam = POWER_ITEM_BOOST,
.description = COMPOUND_STRING("Hold item that pro-\n"
"motes Sp. Def gain,\n"
"but reduces Speed."),
Expand All @@ -6147,7 +6153,7 @@ const struct Item gItems[] =
.name = _("Power Anklet"),
.price = (I_PRICE >= GEN_9) ? 10000 : 3000,
.holdEffect = HOLD_EFFECT_POWER_ITEM,
.holdEffectParam = 8,
.holdEffectParam = POWER_ITEM_BOOST,
.description = COMPOUND_STRING("A hold item that\n"
"promotes Spd gain,\n"
"but reduces Speed."),
Expand Down
Loading