mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Introduce argument and do Draining kiss
This commit is contained in:
parent
39f9b1ddf0
commit
2d73637ff4
@ -702,7 +702,7 @@
|
||||
.4byte \param0
|
||||
.endm
|
||||
|
||||
.macro negativedamage
|
||||
.macro setdrainedhp
|
||||
.byte 0x88
|
||||
.endm
|
||||
|
||||
|
@ -744,7 +744,7 @@ BattleScript_EffectAbsorb::
|
||||
waitmessage 0x40
|
||||
resultmessage
|
||||
waitmessage 0x40
|
||||
negativedamage
|
||||
setdrainedhp
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||
jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_AbsorbLiquidOoze
|
||||
setbyte cMULTISTRING_CHOOSER, 0x0
|
||||
@ -854,7 +854,7 @@ BattleScript_82D8C18::
|
||||
waitmessage 0x40
|
||||
resultmessage
|
||||
waitmessage 0x40
|
||||
negativedamage
|
||||
setdrainedhp
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
|
@ -6928,7 +6928,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_GEN6] =
|
||||
.split = SPLIT_STATUS,
|
||||
},
|
||||
{ // MOVE_DRAINING_KISS
|
||||
.effect = EFFECT_PLACEHOLDER, // Needs a custom move effect (restores 75% HP instead of 50% HP)
|
||||
.effect = EFFECT_ABSORB,
|
||||
.power = 50,
|
||||
.type = TYPE_FAIRY,
|
||||
.accuracy = 100,
|
||||
@ -6937,7 +6937,8 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_GEN6] =
|
||||
.target = MOVE_TARGET_SELECTED,
|
||||
.priority = 0,
|
||||
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGSROCK_AFFECTED,
|
||||
.split = SPLIT_SPECIAL,
|
||||
.split = SPLIT_SPECIAL, // restores 75% HP instead of 50% HP
|
||||
.argument = 75,
|
||||
},
|
||||
{ // MOVE_CRAFTY_SHIELD
|
||||
.effect = EFFECT_PLACEHOLDER, // Needs a custom move effect
|
||||
|
@ -365,6 +365,7 @@ struct BattleMove
|
||||
s8 priority;
|
||||
u32 flags;
|
||||
u8 split;
|
||||
u8 argument;
|
||||
};
|
||||
|
||||
struct SpindaSpot
|
||||
|
@ -227,7 +227,7 @@ static void atk84_jumpifcantmakeasleep(void);
|
||||
static void atk85_stockpile(void);
|
||||
static void atk86_stockpiletobasedamage(void);
|
||||
static void atk87_stockpiletohpheal(void);
|
||||
static void atk88_negativedamage(void);
|
||||
static void atk88_setdrainedhp(void);
|
||||
static void atk89_statbuffchange(void);
|
||||
static void atk8A_normalisebuffs(void);
|
||||
static void atk8B_setbide(void);
|
||||
@ -485,7 +485,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
|
||||
atk85_stockpile,
|
||||
atk86_stockpiletobasedamage,
|
||||
atk87_stockpiletohpheal,
|
||||
atk88_negativedamage,
|
||||
atk88_setdrainedhp,
|
||||
atk89_statbuffchange,
|
||||
atk8A_normalisebuffs,
|
||||
atk8B_setbide,
|
||||
@ -6739,9 +6739,13 @@ static void atk87_stockpiletohpheal(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void atk88_negativedamage(void)
|
||||
static void atk88_setdrainedhp(void)
|
||||
{
|
||||
gBattleMoveDamage = -(gHpDealt / 2);
|
||||
if (gBattleMoves[gCurrentMove].argument != 0)
|
||||
gBattleMoveDamage = -(gHpDealt * gBattleMoves[gCurrentMove].argument / 100);
|
||||
else
|
||||
gBattleMoveDamage = -(gHpDealt / 2);
|
||||
|
||||
if (gBattleMoveDamage == 0)
|
||||
gBattleMoveDamage = -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user