mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-03-28 08:28:59 +01:00
fix sticky barb theft in trainer battles
This commit is contained in:
parent
5bdf266000
commit
a426092006
@ -142,8 +142,7 @@
|
|||||||
#define B_CATCHING_CHARM_BOOST 20 // % boost in Critical Capture odds if player has the Catching Charm.
|
#define B_CATCHING_CHARM_BOOST 20 // % boost in Critical Capture odds if player has the Catching Charm.
|
||||||
|
|
||||||
// Item Theft Settings
|
// Item Theft Settings
|
||||||
#define B_TRAINERS_KNOCK_OFF_ITEMS TRUE // If TRUE, trainers can steal/swap your items (non-berries are restored after battle). In vanilla games trainers cannot steal items.
|
#define B_TRAINERS_KNOCK_OFF_ITEMS TRUE // If TRUE, trainers can steal/swap your items (non-berries are restored after battle). In vanilla games trainers cannot steal items.
|
||||||
#define B_KEEP_STOLEN_TRAINER_ITEMS GEN_5 // In Gen5+, you do not keep items stolen from trainers. Wild Pokemon still always have their items permanently stolen.
|
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
#define B_DOUBLE_WILD_CHANCE 0 // % chance of encountering two Pokémon in a Wild Encounter.
|
#define B_DOUBLE_WILD_CHANCE 0 // % chance of encountering two Pokémon in a Wild Encounter.
|
||||||
|
@ -5856,9 +5856,10 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
|||||||
&& IsMoveMakingContact(gCurrentMove, gBattlerAttacker)
|
&& IsMoveMakingContact(gCurrentMove, gBattlerAttacker)
|
||||||
&& !DoesSubstituteBlockMove(gCurrentMove, gBattlerAttacker, battlerId)
|
&& !DoesSubstituteBlockMove(gCurrentMove, gBattlerAttacker, battlerId)
|
||||||
&& IsBattlerAlive(gBattlerAttacker)
|
&& IsBattlerAlive(gBattlerAttacker)
|
||||||
|
&& CanStealItem(gBattlerAttacker, gBattlerTarget, gBattleMons[gBattlerTarget].item)
|
||||||
&& gBattleMons[gBattlerAttacker].item == ITEM_NONE)
|
&& gBattleMons[gBattlerAttacker].item == ITEM_NONE)
|
||||||
{
|
{
|
||||||
// No sticky hold checks. item is already known so no CanStealItem checks
|
// No sticky hold checks.
|
||||||
gEffectBattler = battlerId; // gEffectBattler = target
|
gEffectBattler = battlerId; // gEffectBattler = target
|
||||||
StealTargetItem(gBattlerAttacker, gBattlerTarget); // Attacker takes target's barb
|
StealTargetItem(gBattlerAttacker, gBattlerTarget); // Attacker takes target's barb
|
||||||
BattleScriptPushCursor();
|
BattleScriptPushCursor();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user