Merge pull request #1480 from BuffelSaft/big_root_fix

Make Big Root affect absorb moves
This commit is contained in:
ghoulslash 2021-05-04 09:32:18 -06:00 committed by GitHub
commit 22fc9733e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -2234,6 +2234,7 @@ BattleScript_EffectAbsorb::
resultmessage
waitmessage 0x40
setdrainedhp
manipulatedamage DMG_BIG_ROOT
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_AbsorbLiquidOoze
setbyte cMULTISTRING_CHOOSER, 0x0
@ -2361,6 +2362,7 @@ BattleScript_DreamEaterWorked:
resultmessage
waitmessage 0x40
setdrainedhp
manipulatedamage DMG_BIG_ROOT
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER

View File

@ -8877,15 +8877,16 @@ static void Cmd_stockpiletohpheal(void)
}
}
// Sign change for drained HP handled in GetDrainedBigRootHp
static void Cmd_setdrainedhp(void)
{
if (gBattleMoves[gCurrentMove].argument != 0)
gBattleMoveDamage = -(gHpDealt * gBattleMoves[gCurrentMove].argument / 100);
gBattleMoveDamage = (gHpDealt * gBattleMoves[gCurrentMove].argument / 100);
else
gBattleMoveDamage = -(gHpDealt / 2);
gBattleMoveDamage = (gHpDealt / 2);
if (gBattleMoveDamage == 0)
gBattleMoveDamage = -1;
gBattleMoveDamage = 1;
gBattlescriptCurrInstr++;
}