Adds missing Friend Ball friendship bonus upon catching (#5795)
This commit is contained in:
parent
75eaf890a2
commit
3ad5de5fef
@ -179,6 +179,7 @@
|
||||
#define B_DREAM_BALL_MODIFIER GEN_LATEST // In Gen8+, Dream Ball's catch multiplier is x4 when the target is asleep or has the ability Comatose.
|
||||
#define B_SPORT_BALL_MODIFIER GEN_LATEST // In Gen8+, Sport Ball's catch multiplier was reduced from x1.5 to x1.
|
||||
#define B_SAFARI_BALL_MODIFIER GEN_LATEST // In Gen8+, Safari Ball's catch multiplier was reduced from x1.5 to x1.
|
||||
#define B_FRIEND_BALL_MODIFIER GEN_LATEST // In Gen8+, Friend Ball's friendship boost was reduced from 200 to 150.
|
||||
#define B_SERENE_GRACE_BOOST GEN_LATEST // In Gen5+, Serene Grace boosts the added flinch chance of King's Rock and Razor Fang.
|
||||
|
||||
// Flag settings
|
||||
|
||||
@ -2323,7 +2323,7 @@ static inline bool32 DoesBattlerNegateDamage(u32 battler)
|
||||
return FALSE;
|
||||
if (ability == ABILITY_DISGUISE && species == SPECIES_MIMIKYU)
|
||||
return TRUE;
|
||||
if (ability == ABILITY_ICE_FACE && species == SPECIES_EISCUE && GetBattleMoveCategory(gCurrentMove) == DAMAGE_CATEGORY_SPECIAL)
|
||||
if (ability == ABILITY_ICE_FACE && species == SPECIES_EISCUE && GetBattleMoveCategory(gCurrentMove) == DAMAGE_CATEGORY_PHYSICAL)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
@ -15700,13 +15700,18 @@ static void Cmd_handleballthrow(void)
|
||||
else
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
|
||||
if (gLastUsedItem == BALL_HEAL)
|
||||
if (ballId == BALL_HEAL)
|
||||
{
|
||||
MonRestorePP(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]]);
|
||||
HealStatusConditions(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], STATUS1_ANY, gBattlerTarget);
|
||||
gBattleMons[gBattlerTarget].hp = gBattleMons[gBattlerTarget].maxHP;
|
||||
SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_HP, &gBattleMons[gBattlerTarget].hp);
|
||||
}
|
||||
else if (ballId == BALL_FRIEND)
|
||||
{
|
||||
u32 friendship = (B_FRIEND_BALL_MODIFIER >= GEN_8 ? 150 : 200);
|
||||
SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_FRIENDSHIP, &friendship);
|
||||
}
|
||||
}
|
||||
else // mon may be caught, calculate shakes
|
||||
{
|
||||
@ -15761,6 +15766,11 @@ static void Cmd_handleballthrow(void)
|
||||
gBattleMons[gBattlerTarget].hp = gBattleMons[gBattlerTarget].maxHP;
|
||||
SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_HP, &gBattleMons[gBattlerTarget].hp);
|
||||
}
|
||||
else if (ballId == BALL_FRIEND)
|
||||
{
|
||||
u32 friendship = (B_FRIEND_BALL_MODIFIER >= GEN_8 ? 150 : 200);
|
||||
SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_FRIENDSHIP, &friendship);
|
||||
}
|
||||
}
|
||||
else // not caught
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user