From c496e0ce6ccadb54d18296a8d89a5a954ad215a7 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Tue, 8 Dec 2020 16:20:04 -0300 Subject: [PATCH 1/4] Tweaked the X Items' effects' entries in src/data/pokemon/item_effects.h --- src/data/pokemon/item_effects.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/data/pokemon/item_effects.h b/src/data/pokemon/item_effects.h index 9d9f05023..25cee98e9 100644 --- a/src/data/pokemon/item_effects.h +++ b/src/data/pokemon/item_effects.h @@ -325,42 +325,66 @@ const u8 gItemEffect_DireHit[8] = { }; const u8 gItemEffect_XAttack[8] = { +#if X_ITEMS_REWORK == TRUE + [1] = ITEM1_X_ATTACK, +#else [0] = 1, +#endif [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, [6] = 1, [7] = 1, }; const u8 gItemEffect_XDefend[8] = { +#if X_ITEMS_REWORK == TRUE + [1] = ITEM1_X_DEFEND, +#else [1] = 1 << 4, +#endif [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, [6] = 1, [7] = 1, }; const u8 gItemEffect_XSpeed[8] = { +#if X_ITEMS_REWORK == TRUE + [1] = ITEM1_X_SPEED, +#else [1] = 1, +#endif [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, [6] = 1, [7] = 1, }; const u8 gItemEffect_XAccuracy[8] = { +#if X_ITEMS_REWORK == TRUE + [1] = ITEM1_X_ACCURACY, +#else [2] = 1 << 4, +#endif [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, [6] = 1, [7] = 1, }; const u8 gItemEffect_XSpecialAttack[8] = { +#if X_ITEMS_REWORK == TRUE + [1] = ITEM1_X_SPATK, +#else [2] = 1, +#endif [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, [6] = 1, [7] = 1, }; const u8 gItemEffect_XSpecialDefense[8] = { +#if X_ITEMS_REWORK == TRUE + [1] = ITEM1_X_SPDEF, +#else [2] = 1, +#endif [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, [6] = 1, [7] = 1, From 91c92e9c045024feae939b6afb99b717611468a6 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 4 Jan 2021 03:36:33 -0300 Subject: [PATCH 2/4] #if X_ITEMS_REWORK == TRUE -> #ifdef BATTLE_ENGINE --- src/data/pokemon/item_effects.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/data/pokemon/item_effects.h b/src/data/pokemon/item_effects.h index 25cee98e9..edf22e6e5 100644 --- a/src/data/pokemon/item_effects.h +++ b/src/data/pokemon/item_effects.h @@ -325,7 +325,7 @@ const u8 gItemEffect_DireHit[8] = { }; const u8 gItemEffect_XAttack[8] = { -#if X_ITEMS_REWORK == TRUE +#ifdef BATTLE_ENGINE [1] = ITEM1_X_ATTACK, #else [0] = 1, @@ -336,7 +336,7 @@ const u8 gItemEffect_XAttack[8] = { }; const u8 gItemEffect_XDefend[8] = { -#if X_ITEMS_REWORK == TRUE +#ifdef BATTLE_ENGINE [1] = ITEM1_X_DEFEND, #else [1] = 1 << 4, @@ -347,7 +347,7 @@ const u8 gItemEffect_XDefend[8] = { }; const u8 gItemEffect_XSpeed[8] = { -#if X_ITEMS_REWORK == TRUE +#ifdef BATTLE_ENGINE [1] = ITEM1_X_SPEED, #else [1] = 1, @@ -358,7 +358,7 @@ const u8 gItemEffect_XSpeed[8] = { }; const u8 gItemEffect_XAccuracy[8] = { -#if X_ITEMS_REWORK == TRUE +#ifdef BATTLE_ENGINE [1] = ITEM1_X_ACCURACY, #else [2] = 1 << 4, @@ -369,7 +369,7 @@ const u8 gItemEffect_XAccuracy[8] = { }; const u8 gItemEffect_XSpecialAttack[8] = { -#if X_ITEMS_REWORK == TRUE +#ifdef BATTLE_ENGINE [1] = ITEM1_X_SPATK, #else [2] = 1, @@ -380,7 +380,7 @@ const u8 gItemEffect_XSpecialAttack[8] = { }; const u8 gItemEffect_XSpecialDefense[8] = { -#if X_ITEMS_REWORK == TRUE +#ifdef BATTLE_ENGINE [1] = ITEM1_X_SPDEF, #else [2] = 1, From db37c4f25c4456948d489acf203e67ea5e82761b Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sat, 9 Jan 2021 21:47:58 -0300 Subject: [PATCH 3/4] Review correction to src/data/pokemon/item_effects.h --- src/data/pokemon/item_effects.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/data/pokemon/item_effects.h b/src/data/pokemon/item_effects.h index edf22e6e5..bbc88cac7 100644 --- a/src/data/pokemon/item_effects.h +++ b/src/data/pokemon/item_effects.h @@ -382,8 +382,6 @@ const u8 gItemEffect_XSpecialAttack[8] = { const u8 gItemEffect_XSpecialDefense[8] = { #ifdef BATTLE_ENGINE [1] = ITEM1_X_SPDEF, -#else - [2] = 1, #endif [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, [6] = 1, From f4d34f70c42dc5fd4bb152fb67f06c37656edf3a Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 10 Jan 2021 01:54:41 -0300 Subject: [PATCH 4/4] Renamed some X Defend labels to reflect its new name --- src/data/pokemon/item_effects.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/pokemon/item_effects.h b/src/data/pokemon/item_effects.h index bbc88cac7..eebdf5223 100644 --- a/src/data/pokemon/item_effects.h +++ b/src/data/pokemon/item_effects.h @@ -335,9 +335,9 @@ const u8 gItemEffect_XAttack[8] = { [7] = 1, }; -const u8 gItemEffect_XDefend[8] = { +const u8 gItemEffect_XDefense[8] = { #ifdef BATTLE_ENGINE - [1] = ITEM1_X_DEFEND, + [1] = ITEM1_X_DEFENSE, #else [1] = 1 << 4, #endif @@ -539,7 +539,7 @@ const u8 *const gItemEffectTable[] = [ITEM_GUARD_SPEC - ITEM_POTION] = gItemEffect_GuardSpec, [ITEM_DIRE_HIT - ITEM_POTION] = gItemEffect_DireHit, [ITEM_X_ATTACK - ITEM_POTION] = gItemEffect_XAttack, - [ITEM_X_DEFENSE - ITEM_POTION] = gItemEffect_XDefend, + [ITEM_X_DEFENSE - ITEM_POTION] = gItemEffect_XDefense, [ITEM_X_SPEED - ITEM_POTION] = gItemEffect_XSpeed, [ITEM_X_ACCURACY - ITEM_POTION] = gItemEffect_XAccuracy, [ITEM_X_SP_ATK - ITEM_POTION] = gItemEffect_XSpecialAttack,