mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 01:14:19 +01:00
Completed Black Sludge's effect
This commit is contained in:
parent
13a464ffa4
commit
8a2921ef71
@ -6120,7 +6120,20 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
break;
|
||||
case HOLD_EFFECT_BLACK_SLUDGE:
|
||||
if (IS_BATTLER_OF_TYPE(battlerId, TYPE_POISON))
|
||||
{
|
||||
goto LEFTOVERS;
|
||||
}
|
||||
else if (GetBattlerAbility(battlerId) != ABILITY_MAGIC_GUARD && !moveTurn)
|
||||
{
|
||||
gBattleMoveDamage = gBattleMons[battlerId].maxHP / 8;
|
||||
if (gBattleMoveDamage == 0)
|
||||
gBattleMoveDamage = 1;
|
||||
BattleScriptExecute(BattleScript_ItemHurtEnd2);
|
||||
effect = ITEM_HP_CHANGE;
|
||||
RecordItemEffectBattle(battlerId, battlerHoldEffect);
|
||||
PREPARE_ITEM_BUFFER(gBattleTextBuff1, gLastUsedItem);
|
||||
}
|
||||
break;
|
||||
case HOLD_EFFECT_LEFTOVERS:
|
||||
LEFTOVERS:
|
||||
if (gBattleMons[battlerId].hp < gBattleMons[battlerId].maxHP && !moveTurn)
|
||||
|
Loading…
x
Reference in New Issue
Block a user