From 623e7c5f25f79599ff1de98704258f79e8c28ab2 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Sat, 22 Apr 2023 18:23:08 +0200 Subject: [PATCH] Add Frostbite status --- graphics/battle_interface/status.png | Bin 531 -> 559 bytes graphics/battle_interface/status2.png | Bin 531 -> 559 bytes graphics/battle_interface/status3.png | Bin 530 -> 559 bytes graphics/battle_interface/status4.png | Bin 530 -> 559 bytes graphics/interface/status_icons.png | Bin 455 -> 458 bytes include/constants/battle.h | 3 ++- include/constants/party_menu.h | 1 + src/battle_debug.c | 3 +++ src/battle_interface.c | 27 ++++++++++++++++++++++++++ src/data/party_menu.h | 4 ++-- src/party_menu.c | 2 ++ src/pokemon_summary_screen.c | 7 ++++++- 12 files changed, 43 insertions(+), 4 deletions(-) diff --git a/graphics/battle_interface/status.png b/graphics/battle_interface/status.png index 9fae45b71fff0c44e11746fb80c8f84dd1fba71a..0b212907e5574725f3c8f3d4f95a713b44fc02e2 100644 GIT binary patch delta 282 zcmV+#0piOO9{9gpz?RJ4K~n(wnoPh+X_5m2y1{`i ze@>w7Qtc=;!MvPzLzHzd7qBPucl6GYoz0XK+5%mj$9@7jcVH@>&nH~W0IpK&<=1in zM>2oM7!=&eP^n={brQz}bF-iY=;kSvz(@dhskr=F?q@%G{K-Q<;Ls1xy!zp-I(Kjd g7;W1xzm@v~WH5Z2Ai(eI00000NkvXX1g=70g10z=BLDyZ delta 253 zcmVdlu^|irf6+-qK~yM_g^$@01R)4St>)Jd48af# z!TjS{P7iiwmr_6;wpc(l89}UYokJDRTbGhj{b){Oy?|9JE}*BA?;EF{19I^7`0Kc! zmMs3!8iyu6GLw>$tnHNl0j>gY=m6Hdq!O43&@Htee;fA$d!=Esamg_Z00000NkvXXu0mjf DVL5SM diff --git a/graphics/battle_interface/status2.png b/graphics/battle_interface/status2.png index af7ce05d3bad0de62d22a478535e5939fde21c01..0b212907e5574725f3c8f3d4f95a713b44fc02e2 100644 GIT binary patch delta 282 zcmV+#0piOO9{9gpz?RJ4K~n(wnoPh+X_5m2y1{`i ze@>w7Qtc=;!MvPzLzHzd7qBPucl6GYoz0XK+5%mj$9@7jcVH@>&nH~W0IpK&<=1in zM>2oM7!=&eP^n={brQz}bF-iY=;kSvz(@dhskr=F?q@%G{K-Q<;Ls1xy!zp-I(Kjd g7;W1xzm@v~WH5Z2Ai(eI00000NkvXX1g=70g10z=BLDyZ delta 253 zcmVdlu^|irf6+-qK~yM_g^$@01R)4St>)Vh48af# z!Ti%%P7iiwmr_6;wpc(l89}UYokJDRTbGhj{b){Oy?|9JE}*BA?;EF{19I^7`0Kc! zmMs3!8iyu6GLw>$tnHNl0j>gY=m6Hdq!O43&@Htee;fA$zBOaqp_a-h00000NkvXXu0mjf DVMlTU diff --git a/graphics/battle_interface/status3.png b/graphics/battle_interface/status3.png index d0febfb17c501b1f65d1e835c79d7dfede349004..0b212907e5574725f3c8f3d4f95a713b44fc02e2 100644 GIT binary patch delta 282 zcmV+#0piOO9{9gpz?RJ4K~n(wnoPh+X_5m2y1{`i ze@>w7Qtc=;!MvPzLzHzd7qBPucl6GYoz0XK+5%mj$9@7jcVH@>&nH~W0IpK&<=1in zM>2oM7!=&eP^n={brQz}bF-iY=;kSvz(@dhskr=F?q@%G{K-Q<;Ls1xy!zp-I(Kjd g7;W1xzm@v~WH5Z2Ai(eI00000NkvXX1g=70g0>!lA^-pY delta 252 zcmVdlu^|irf6z%pK~yM_g^$@010V=Qo#o#WEWr{i z!T!q$r&ly#6p)82CQv?%AeOk!A&cj&OG(OpG^a6dz$zIV(9_E2jaAP9Irw_~IWDLi z7XK)PLlGaDNl8i8bjtq#SAk2dH^#LIXa}XSp0)ifOpjdK~mKk99TmDJKR9s zW~J&?YJl;$bYqV79v9ROi+{8xQJiN+61Sk4i`Z_!@&K+9_47uEIiOW)ef&8ts2>*p z=$%72T_)B2Xij4vU^FXQfHe=Pevw)L?Namc*SH@6AZ7&y4`C<(0000iOO9{9gpz?RJ4K~n(wnoPh+X_5m2y1{`i ze@>w7Qtc=;!MvPzLzHzd7qBPucl6GYoz0XK+5%mj$9@7jcVH@>&nH~W0IpK&<=1in zM>2oM7!=&eP^n={brQz}bF-iY=;kSvz(@dhskr=F?q@%G{K-Q<;Ls1xy!zp-I(Kjd g7;W1xzm@v~WH5Z2Ai(eI00000NkvXX1g=70g0>!lA^-pY delta 252 zcmVdlu^|irf6z%pK~yM_g^!6510V^lJa`5%|b6ik4 zEdEgnhax^Qlai9G>6HHgt^$`@Z;Wdb&<Bb!EJuavn7XN5XqBzftByK@77qQ)dgSCRb3m)q`uKBPP(LjG z(L0B5x=gD3(VWIUz-U&q0Basn{UWsh+NI{>uW>&^v1l#_UZ~0d0000${ZUD;vcm>pd`DI!0Cy|}jT zBY@5ZsM%XQ%Fv1^;NT^^CSS))*Qx9>@tn6gT9P>Hb#b(x2I!9oae(r;mk59}04`a= zHu*ZH(GR5{T_(9)a-yr7kTC_2d;*g}4HN}sa_IpqzbsK-hhQbNP|h8Qgz~wSJtmGn zv>WnHCs4$V0d&NavkxE=0YLd*GX%h60XxQU%%AmP|Nesq`TzrcDCz*QJ~Rm#D~tym ey+qJtJmw$h<04&U&$ZzI0000 delta 381 zcmV-@0fPR@1IGi97zqRe0001qplF?uEf$}&4cPmsZ^Og%s*voSJvbQfmE%tqn>opOM{2`ZkO=hUgi&Xe-w{PaGSR}@9D z(j1S)6dMJtgwo=HLDO3(C4^2uX_7NQ2TCjGKY9Ah5OM+y7J#wIDpEK`h(oir b{~>+>lF0pSLPH5(00000NkvXXu0mjf?VP2v diff --git a/include/constants/battle.h b/include/constants/battle.h index 61c3776c6..7682b851e 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -115,8 +115,9 @@ #define STATUS1_TOXIC_POISON (1 << 7) #define STATUS1_TOXIC_COUNTER (1 << 8 | 1 << 9 | 1 << 10 | 1 << 11) #define STATUS1_TOXIC_TURN(num) ((num) << 8) +#define STATUS1_FROSTBITE (1 << 12) #define STATUS1_PSN_ANY (STATUS1_POISON | STATUS1_TOXIC_POISON) -#define STATUS1_ANY (STATUS1_SLEEP | STATUS1_POISON | STATUS1_BURN | STATUS1_FREEZE | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON) +#define STATUS1_ANY (STATUS1_SLEEP | STATUS1_POISON | STATUS1_BURN | STATUS1_FREEZE | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON | STATUS1_FROSTBITE) // Volatile status ailments // These are removed after exiting the battle or switching out diff --git a/include/constants/party_menu.h b/include/constants/party_menu.h index f28b75122..fd94afe54 100644 --- a/include/constants/party_menu.h +++ b/include/constants/party_menu.h @@ -11,6 +11,7 @@ #define AILMENT_BRN 5 #define AILMENT_PKRS 6 #define AILMENT_FNT 7 +#define AILMENT_FSB 8 #define PARTY_LAYOUT_SINGLE 0 #define PARTY_LAYOUT_DOUBLE 1 diff --git a/src/battle_debug.c b/src/battle_debug.c index 1d690caaa..0549cf91e 100644 --- a/src/battle_debug.c +++ b/src/battle_debug.c @@ -181,6 +181,7 @@ static const u8 sText_SideStatus[] = _("Side Status"); static const u8 sText_MaxHp[] = _("HP Max"); static const u8 sText_CurrHp[] = _("HP Current"); static const u8 sText_Freeze[] = _("Freeze"); +static const u8 sText_Frostbite[] = _("Frostbite"); static const u8 sText_ToxicPoison[] = _("Toxic Poison"); static const u8 sText_ToxicCounter[] = _("Toxic Counter"); static const u8 sText_Flinch[] = _("Flinch"); @@ -258,6 +259,7 @@ static const struct BitfieldInfo sStatus1Bitfield[] = {/*Paralysis*/1, 6}, {/*Toxic Poison*/ 1, 7}, {/*Toxic Counter*/ 4, 8}, + {/*Frostbite*/ 1, 12}, }; static const struct BitfieldInfo sStatus2Bitfield[] = @@ -397,6 +399,7 @@ static const struct ListMenuItem sStatus1ListItems[] = {gText_Paralysis, 4}, {sText_ToxicPoison, 5}, {sText_ToxicCounter, 6}, + {sText_Frostbite, 7}, }; static const struct ListMenuItem sStatus2ListItems[] = diff --git a/src/battle_interface.c b/src/battle_interface.c index bbe61a372..eec4e50f0 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -73,6 +73,9 @@ enum HEALTHBOX_GFX_STATUS_BRN_BATTLER0, //status brn HEALTHBOX_GFX_34, HEALTHBOX_GFX_35, + HEALTHBOX_GFX_STATUS_FSB_BATTLER0, //status fsb + HEALTHBOX_GFX_116, + HEALTHBOX_GFX_117, HEALTHBOX_GFX_36, //misc [Black section] HEALTHBOX_GFX_37, //misc [Black section] HEALTHBOX_GFX_38, //misc [Black section] @@ -123,6 +126,9 @@ enum HEALTHBOX_GFX_STATUS_BRN_BATTLER1, //status2 "BRN" HEALTHBOX_GFX_84, HEALTHBOX_GFX_85, + HEALTHBOX_GFX_STATUS_FSB_BATTLER1, //status2 "FSB" + HEALTHBOX_GFX_118, + HEALTHBOX_GFX_119, HEALTHBOX_GFX_STATUS_PSN_BATTLER2, //status3 "PSN" HEALTHBOX_GFX_87, HEALTHBOX_GFX_88, @@ -138,6 +144,9 @@ enum HEALTHBOX_GFX_STATUS_BRN_BATTLER2, //status3 "BRN" HEALTHBOX_GFX_99, HEALTHBOX_GFX_100, + HEALTHBOX_GFX_STATUS_FSB_BATTLER2, //status3 "FSB" + HEALTHBOX_GFX_120, + HEALTHBOX_GFX_121, HEALTHBOX_GFX_STATUS_PSN_BATTLER3, //status4 "PSN" HEALTHBOX_GFX_102, HEALTHBOX_GFX_103, @@ -153,6 +162,9 @@ enum HEALTHBOX_GFX_STATUS_BRN_BATTLER3, //status4 "BRN" HEALTHBOX_GFX_114, HEALTHBOX_GFX_115, + HEALTHBOX_GFX_STATUS_FSB_BATTLER3, //status4 "FSB" + HEALTHBOX_GFX_122, + HEALTHBOX_GFX_123, HEALTHBOX_GFX_FRAME_END, HEALTHBOX_GFX_FRAME_END_BAR, }; @@ -2208,6 +2220,11 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId) statusGfxPtr = GetHealthboxElementGfxPtr(GetStatusIconForBattlerId(HEALTHBOX_GFX_STATUS_FRZ_BATTLER0, battlerId)); statusPalId = PAL_STATUS_FRZ; } + else if (status & STATUS1_FROSTBITE) + { + statusGfxPtr = GetHealthboxElementGfxPtr(GetStatusIconForBattlerId(HEALTHBOX_GFX_STATUS_FSB_BATTLER0, battlerId)); + statusPalId = PAL_STATUS_FRZ; + } else if (status & STATUS1_PARALYSIS) { statusGfxPtr = GetHealthboxElementGfxPtr(GetStatusIconForBattlerId(HEALTHBOX_GFX_STATUS_PRZ_BATTLER0, battlerId)); @@ -2290,6 +2307,16 @@ static u8 GetStatusIconForBattlerId(u8 statusElementId, u8 battlerId) else ret = HEALTHBOX_GFX_STATUS_FRZ_BATTLER3; break; + case HEALTHBOX_GFX_STATUS_FSB_BATTLER0: + if (battlerId == 0) + ret = HEALTHBOX_GFX_STATUS_FSB_BATTLER0; + else if (battlerId == 1) + ret = HEALTHBOX_GFX_STATUS_FSB_BATTLER1; + else if (battlerId == 2) + ret = HEALTHBOX_GFX_STATUS_FSB_BATTLER2; + else + ret = HEALTHBOX_GFX_STATUS_FSB_BATTLER3; + break; case HEALTHBOX_GFX_STATUS_BRN_BATTLER0: if (battlerId == 0) ret = HEALTHBOX_GFX_STATUS_BRN_BATTLER0; diff --git a/src/data/party_menu.h b/src/data/party_menu.h index 4a06fa135..e7ebf9893 100644 --- a/src/data/party_menu.h +++ b/src/data/party_menu.h @@ -1054,7 +1054,7 @@ static const union AnimCmd sSpriteAnim_StatusFaint[] = ANIMCMD_END }; -static const union AnimCmd sSpriteAnim_Blank[] = +static const union AnimCmd sSpriteAnim_StatusFrostbite[] = { ANIMCMD_FRAME(28, 0), ANIMCMD_END @@ -1069,7 +1069,7 @@ static const union AnimCmd *const sSpriteTemplate_StatusCondition[] = sSpriteAnim_StatusBurn, sSpriteAnim_StatusPokerus, sSpriteAnim_StatusFaint, - sSpriteAnim_Blank + sSpriteAnim_StatusFrostbite }; static const struct CompressedSpriteSheet sSpriteSheet_StatusIcons = diff --git a/src/party_menu.c b/src/party_menu.c index 3cc3efdcd..43ed5818a 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -1941,6 +1941,8 @@ u8 GetAilmentFromStatus(u32 status) return AILMENT_FRZ; if (status & STATUS1_BURN) return AILMENT_BRN; + if (status & STATUS1_FROSTBITE) + return AILMENT_FSB; return AILMENT_NONE; } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 331307626..f7106b875 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -1112,6 +1112,10 @@ static const union AnimCmd sSpriteAnim_StatusFaint[] = { ANIMCMD_FRAME(24, 0, FALSE, FALSE), ANIMCMD_END }; +static const union AnimCmd sSpriteAnim_StatusFrostbite[] = { + ANIMCMD_FRAME(28, 0, FALSE, FALSE), + ANIMCMD_END +}; static const union AnimCmd *const sSpriteAnimTable_StatusCondition[] = { sSpriteAnim_StatusPoison, sSpriteAnim_StatusParalyzed, @@ -1120,11 +1124,12 @@ static const union AnimCmd *const sSpriteAnimTable_StatusCondition[] = { sSpriteAnim_StatusBurn, sSpriteAnim_StatusPokerus, sSpriteAnim_StatusFaint, + sSpriteAnim_StatusFrostbite, }; static const struct CompressedSpriteSheet sStatusIconsSpriteSheet = { .data = gStatusGfx_Icons, - .size = 0x380, + .size = 0x400, .tag = TAG_MON_STATUS }; static const struct CompressedSpritePalette sStatusIconsSpritePalette =