Skip to content

Commit

Permalink
Add thunder cage case to trap anim IDs (rh-hideout#2941)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoulslash authored and fdeblasio committed Oct 1, 2023
1 parent 675add1 commit 4f20300
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion include/constants/battle_string_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,9 @@
#define STRINGID_ITEMRESTOREDSPECIESHEALTH 649
#define STRINGID_ITEMCUREDSPECIESSTATUS 650
#define STRINGID_ITEMRESTOREDSPECIESPP 651
#define STRINGID_THUNDERCAGETRAPPED 652

#define BATTLESTRINGS_COUNT 652
#define BATTLESTRINGS_COUNT 653

// This is the string id that gBattleStringsTable starts with.
// String ids before this (e.g. STRINGID_INTROMSG) are not in the table,
Expand Down
2 changes: 1 addition & 1 deletion src/battle_anim_throw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2771,7 +2771,7 @@ void AnimTask_GetTrappedMoveAnimId(u8 taskId)
gBattleAnimArgs[0] = TRAP_ANIM_BIND;
break;
}

DestroyAnimVisualTask(taskId);
}

Expand Down
8 changes: 5 additions & 3 deletions src/battle_message.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,12 +795,14 @@ static const u8 sText_ShellTrapDidntWork[] = _("{B_ATK_NAME_WITH_PREFIX}'s shell
static const u8 sText_CouldntFullyProtect[] = _("{B_DEF_NAME_WITH_PREFIX} couldn't fully protect\nitself and got hurt!");
static const u8 sText_StockpiledEffectWoreOff[] = _("{B_ATK_NAME_WITH_PREFIX}'s stockpiled\neffect wore off!");
static const u8 sText_PkmnRevivedReadyToFight[] = _("{B_BUFF1} was revived and\nis ready to fight again!");
static const u8 sText_ItemRestoredSpeciesHealth[] = _("{B_LAST_ITEM} restored\n{B_BUFF1}'s health!");
static const u8 sText_ItemCuredSpeciesStatus[] = _("{B_LAST_ITEM} cured\n{B_BUFF1}'s status!");
static const u8 sText_ItemRestoredSpeciesPP[] = _("{B_LAST_ITEM} restored\n{B_BUFF1}'s PP!");
static const u8 sText_ItemRestoredSpeciesHealth[] = _("{B_BUFF1} had its\nHP restored!");
static const u8 sText_ItemCuredSpeciesStatus[] = _("{B_BUFF1} had\nits status healed!");
static const u8 sText_ItemRestoredSpeciesPP[] = _("{B_BUFF1} had its\nPP restored!");
static const u8 sText_AtkTrappedDef[] = _("{B_ATK_NAME_WITH_PREFIX} trapped\nthe {B_DEF_NAME_WITH_PREFIX}!");

const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
{
[STRINGID_THUNDERCAGETRAPPED - BATTLESTRINGS_TABLE_START] = sText_AtkTrappedDef,
[STRINGID_ITEMRESTOREDSPECIESHEALTH - BATTLESTRINGS_TABLE_START] = sText_ItemRestoredSpeciesHealth,
[STRINGID_ITEMCUREDSPECIESSTATUS - BATTLESTRINGS_TABLE_START] = sText_ItemCuredSpeciesStatus,
[STRINGID_ITEMRESTOREDSPECIESPP - BATTLESTRINGS_TABLE_START] = sText_ItemRestoredSpeciesPP,
Expand Down

0 comments on commit 4f20300

Please sign in to comment.