mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-03-25 06:58:25 +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.
|
||||
|
||||
// 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_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.
|
||||
#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.
|
||||
|
||||
// Other
|
||||
#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)
|
||||
&& !DoesSubstituteBlockMove(gCurrentMove, gBattlerAttacker, battlerId)
|
||||
&& IsBattlerAlive(gBattlerAttacker)
|
||||
&& CanStealItem(gBattlerAttacker, gBattlerTarget, gBattleMons[gBattlerTarget].item)
|
||||
&& 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
|
||||
StealTargetItem(gBattlerAttacker, gBattlerTarget); // Attacker takes target's barb
|
||||
BattleScriptPushCursor();
|
||||
|
Loading…
x
Reference in New Issue
Block a user