mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-17 03:57:38 +01:00
Merge pull request #2353 from LOuroboros/siTypes
Fixed Z-Moves showing the wrong type in battle
This commit is contained in:
commit
bb564d805f
@ -54,6 +54,7 @@ static void ZMoveSelectionDisplayPower(u16 move, u16 zMove);
|
||||
static void ShowZMoveTriggerSprite(void);
|
||||
static bool32 AreStatsMaxed(u8 battlerId, u8 n);
|
||||
static u8 GetZMoveScore(u8 battlerAtk, u8 battlerDef, u16 baseMove, u16 zMove);
|
||||
static void ZMoveSelectionDisplayMoveType(u16 zMove);
|
||||
|
||||
// Const Data
|
||||
static const struct SignatureZMove sSignatureZMoves[] =
|
||||
@ -520,6 +521,7 @@ bool32 MoveSelectionDisplayZMove(u16 zmove)
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MOVE_NAME_1);
|
||||
|
||||
ZMoveSelectionDisplayPpNumber();
|
||||
ZMoveSelectionDisplayMoveType(zmove);
|
||||
MoveSelectionCreateCursorAt(0, 0);
|
||||
return TRUE;
|
||||
}
|
||||
@ -559,6 +561,23 @@ static void ZMoveSelectionDisplayPpNumber(void)
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_PP_REMAINING);
|
||||
}
|
||||
|
||||
static void ZMoveSelectionDisplayMoveType(u16 zMove)
|
||||
{
|
||||
u8 *txtPtr;
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleResources->bufferA[gActiveBattler][4]);
|
||||
u8 zMoveType;
|
||||
|
||||
GET_MOVE_TYPE(zMove, zMoveType);
|
||||
|
||||
txtPtr = StringCopy(gDisplayedStringBattle, gText_MoveInterfaceType);
|
||||
*(txtPtr)++ = EXT_CTRL_CODE_BEGIN;
|
||||
*(txtPtr)++ = EXT_CTRL_CODE_FONT;
|
||||
*(txtPtr)++ = FONT_NORMAL;
|
||||
|
||||
StringCopy(txtPtr, gTypeNames[zMoveType]);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MOVE_TYPE);
|
||||
}
|
||||
|
||||
const u8 *GetZMoveName(u16 move)
|
||||
{
|
||||
if (IsZMove(move))
|
||||
|
Loading…
Reference in New Issue
Block a user