mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-28 14:23:54 +01:00
commit
30a4ef3723
@ -239,7 +239,7 @@ struct WishFutureKnock
|
|||||||
u8 futureSightAttacker[MAX_BATTLERS_COUNT];
|
u8 futureSightAttacker[MAX_BATTLERS_COUNT];
|
||||||
u16 futureSightMove[MAX_BATTLERS_COUNT];
|
u16 futureSightMove[MAX_BATTLERS_COUNT];
|
||||||
u8 wishCounter[MAX_BATTLERS_COUNT];
|
u8 wishCounter[MAX_BATTLERS_COUNT];
|
||||||
u8 wishMonId[MAX_BATTLERS_COUNT];
|
u8 wishPartyId[MAX_BATTLERS_COUNT];
|
||||||
u8 weatherDuration;
|
u8 weatherDuration;
|
||||||
u8 knockedOffMons[2]; // Each battler is represented by a bit. The array entry is dependent on the battler's side.
|
u8 knockedOffMons[2]; // Each battler is represented by a bit. The array entry is dependent on the battler's side.
|
||||||
};
|
};
|
||||||
|
@ -12335,7 +12335,7 @@ static void Cmd_trywish(void)
|
|||||||
if (gWishFutureKnock.wishCounter[gBattlerAttacker] == 0)
|
if (gWishFutureKnock.wishCounter[gBattlerAttacker] == 0)
|
||||||
{
|
{
|
||||||
gWishFutureKnock.wishCounter[gBattlerAttacker] = 2;
|
gWishFutureKnock.wishCounter[gBattlerAttacker] = 2;
|
||||||
gWishFutureKnock.wishMonId[gBattlerAttacker] = gBattlerPartyIndexes[gBattlerAttacker];
|
gWishFutureKnock.wishPartyId[gBattlerAttacker] = gBattlerPartyIndexes[gBattlerAttacker];
|
||||||
gBattlescriptCurrInstr += 6;
|
gBattlescriptCurrInstr += 6;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -12344,9 +12344,12 @@ static void Cmd_trywish(void)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1: // heal effect
|
case 1: // heal effect
|
||||||
PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff1, gBattlerTarget, gWishFutureKnock.wishMonId[gBattlerTarget])
|
PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff1, gBattlerTarget, gWishFutureKnock.wishPartyId[gBattlerTarget])
|
||||||
#if B_WISH_HP_SOURCE >= GEN_5
|
#if B_WISH_HP_SOURCE >= GEN_5
|
||||||
gBattleMoveDamage = max(1, gBattleMons[gWishFutureKnock.wishMonId[gBattlerTarget]].maxHP / 2);
|
if (GetBattlerSide(gBattlerTarget) == B_SIDE_PLAYER)
|
||||||
|
gBattleMoveDamage = max(1, GetMonData(&gPlayerParty[gWishFutureKnock.wishPartyId[gBattlerTarget]], MON_DATA_MAX_HP) / 2);
|
||||||
|
else
|
||||||
|
gBattleMoveDamage = max(1, GetMonData(&gEnemyParty[gWishFutureKnock.wishPartyId[gBattlerTarget]], MON_DATA_MAX_HP) / 2);
|
||||||
#else
|
#else
|
||||||
gBattleMoveDamage = max(1, gBattleMons[gBattlerTarget].maxHP / 2);
|
gBattleMoveDamage = max(1, gBattleMons[gBattlerTarget].maxHP / 2);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user