mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 22:03:53 +01:00
Destiny Knot
This commit is contained in:
parent
e2524bed49
commit
d56aaf7c0b
@ -1736,6 +1736,11 @@
|
|||||||
.4byte \ptr
|
.4byte \ptr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro infatuatewithbattler battler1:req, battler2:req
|
||||||
|
various \battler1, VARIOUS_INFATUATE_WITH_BATTLER
|
||||||
|
.byte \battler2
|
||||||
|
.endm
|
||||||
|
|
||||||
@ helpful macros
|
@ helpful macros
|
||||||
.macro setstatchanger stat:req, stages:req, down:req
|
.macro setstatchanger stat:req, stages:req, down:req
|
||||||
setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7
|
setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7
|
||||||
|
@ -3724,6 +3724,30 @@ BattleScript_FuryCutterHit:
|
|||||||
jumpifmovehadnoeffect BattleScript_FuryCutterHit
|
jumpifmovehadnoeffect BattleScript_FuryCutterHit
|
||||||
adjustdamage
|
adjustdamage
|
||||||
goto BattleScript_HitFromAtkAnimation
|
goto BattleScript_HitFromAtkAnimation
|
||||||
|
|
||||||
|
BattleScript_TryDestinyKnotTarget:
|
||||||
|
jumpifnoholdeffect BS_ATTACKER, HOLD_EFFECT_DESTINY_KNOT, BattleScript_TryDestinyKnotTargetRet
|
||||||
|
infatuatewithbattler BS_TARGET, BS_ATTACKER
|
||||||
|
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL
|
||||||
|
waitanimation
|
||||||
|
status2animation BS_TARGET, STATUS2_INFATUATION
|
||||||
|
waitanimation
|
||||||
|
printstring STRINGID_DESTINYKNOTACTIVATES
|
||||||
|
waitmessage 0x40
|
||||||
|
BattleScript_TryDestinyKnotTargetRet:
|
||||||
|
return
|
||||||
|
|
||||||
|
BattleScript_TryDestinyKnotAttacker:
|
||||||
|
jumpifnoholdeffect BS_TARGET, HOLD_EFFECT_DESTINY_KNOT, BattleScript_TryDestinyKnotAttackerRet
|
||||||
|
infatuatewithbattler BS_ATTACKER, BS_TARGET
|
||||||
|
playanimation BS_TARGET, B_ANIM_HELD_ITEM_EFFECT, NULL
|
||||||
|
waitanimation
|
||||||
|
status2animation BS_ATTACKER, STATUS2_INFATUATION
|
||||||
|
waitanimation
|
||||||
|
printstring STRINGID_DESTINYKNOTACTIVATES
|
||||||
|
waitmessage 0x40
|
||||||
|
BattleScript_TryDestinyKnotAttackerRet:
|
||||||
|
return
|
||||||
|
|
||||||
BattleScript_EffectAttract::
|
BattleScript_EffectAttract::
|
||||||
attackcanceler
|
attackcanceler
|
||||||
@ -3736,6 +3760,7 @@ BattleScript_EffectAttract::
|
|||||||
waitanimation
|
waitanimation
|
||||||
printstring STRINGID_PKMNFELLINLOVE
|
printstring STRINGID_PKMNFELLINLOVE
|
||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
|
call BattleScript_TryDestinyKnotAttacker
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
BattleScript_EffectPresent::
|
BattleScript_EffectPresent::
|
||||||
@ -7077,6 +7102,7 @@ BattleScript_CuteCharmActivates::
|
|||||||
status2animation BS_ATTACKER, STATUS2_INFATUATION
|
status2animation BS_ATTACKER, STATUS2_INFATUATION
|
||||||
printstring STRINGID_PKMNSXINFATUATEDY
|
printstring STRINGID_PKMNSXINFATUATEDY
|
||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
|
call BattleScript_TryDestinyKnotTarget
|
||||||
return
|
return
|
||||||
|
|
||||||
BattleScript_AbilityStatusEffect::
|
BattleScript_AbilityStatusEffect::
|
||||||
|
@ -158,6 +158,7 @@
|
|||||||
#define VARIOUS_JUMP_IF_NO_ALLY 95
|
#define VARIOUS_JUMP_IF_NO_ALLY 95
|
||||||
#define VARIOUS_HANDLE_TYPE_IMMUNITY 96
|
#define VARIOUS_HANDLE_TYPE_IMMUNITY 96
|
||||||
#define VARIOUS_JUMP_IF_NO_HOLD_EFFECT 97
|
#define VARIOUS_JUMP_IF_NO_HOLD_EFFECT 97
|
||||||
|
#define VARIOUS_INFATUATE_WITH_BATTLER 98
|
||||||
|
|
||||||
// Cmd_manipulatedamage
|
// Cmd_manipulatedamage
|
||||||
#define DMG_CHANGE_SIGN 0
|
#define DMG_CHANGE_SIGN 0
|
||||||
|
@ -547,7 +547,8 @@
|
|||||||
#define STRINGID_RECEIVERABILITYTAKEOVER 543
|
#define STRINGID_RECEIVERABILITYTAKEOVER 543
|
||||||
#define STRINGID_PKNMABSORBINGPOWER 544
|
#define STRINGID_PKNMABSORBINGPOWER 544
|
||||||
#define STRINGID_NOONEWILLBEABLETORUNAWAY 545
|
#define STRINGID_NOONEWILLBEABLETORUNAWAY 545
|
||||||
|
#define STRINGID_DESTINYKNOTACTIVATES 546
|
||||||
|
|
||||||
#define BATTLESTRINGS_COUNT 546
|
#define BATTLESTRINGS_COUNT 547
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H
|
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H
|
||||||
|
@ -668,9 +668,11 @@ static const u8 sText_HealerCure[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_LAST_ABILI
|
|||||||
static const u8 sText_ReceiverAbilityTakeOver[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\nwas taken over!");
|
static const u8 sText_ReceiverAbilityTakeOver[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\nwas taken over!");
|
||||||
static const u8 sText_PkmnAbsorbingPower[] = _("{B_ATK_NAME_WITH_PREFIX} is absorbing power!");
|
static const u8 sText_PkmnAbsorbingPower[] = _("{B_ATK_NAME_WITH_PREFIX} is absorbing power!");
|
||||||
static const u8 sText_NoOneWillBeAbleToRun[] = _("No one will be able to run away\nduring the next turn!");
|
static const u8 sText_NoOneWillBeAbleToRun[] = _("No one will be able to run away\nduring the next turn!");
|
||||||
|
static const u8 sText_DestinyKnotActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} fell in love\nfrom the {B_LAST_ITEM}!");
|
||||||
|
|
||||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||||
{
|
{
|
||||||
|
[STRINGID_DESTINYKNOTACTIVATES - 12] = sText_DestinyKnotActivates,
|
||||||
[STRINGID_NOONEWILLBEABLETORUNAWAY - 12] = sText_NoOneWillBeAbleToRun,
|
[STRINGID_NOONEWILLBEABLETORUNAWAY - 12] = sText_NoOneWillBeAbleToRun,
|
||||||
[STRINGID_PKNMABSORBINGPOWER - 12] = sText_PkmnAbsorbingPower,
|
[STRINGID_PKNMABSORBINGPOWER - 12] = sText_PkmnAbsorbingPower,
|
||||||
[STRINGID_RECEIVERABILITYTAKEOVER - 12] = sText_ReceiverAbilityTakeOver,
|
[STRINGID_RECEIVERABILITYTAKEOVER - 12] = sText_ReceiverAbilityTakeOver,
|
||||||
|
@ -6851,6 +6851,11 @@ static void Cmd_various(void)
|
|||||||
else
|
else
|
||||||
gBattlescriptCurrInstr += 7;
|
gBattlescriptCurrInstr += 7;
|
||||||
return;
|
return;
|
||||||
|
case VARIOUS_INFATUATE_WITH_BATTLER:
|
||||||
|
gBattleScripting.battler = gActiveBattler;
|
||||||
|
gBattleMons[gActiveBattler].status2 |= STATUS2_INFATUATED_WITH(GetBattlerForBattleScript(gBattlescriptCurrInstr[3]));
|
||||||
|
gBattlescriptCurrInstr += 4;
|
||||||
|
return;
|
||||||
case VARIOUS_TRY_FAIRY_LOCK:
|
case VARIOUS_TRY_FAIRY_LOCK:
|
||||||
if (gFieldStatuses & STATUS_FIELD_FAIRY_LOCK)
|
if (gFieldStatuses & STATUS_FIELD_FAIRY_LOCK)
|
||||||
{
|
{
|
||||||
|
@ -326,6 +326,7 @@ u8 GetBattlerForBattleScript(u8 caseId)
|
|||||||
break;
|
break;
|
||||||
case BS_ABILITY_BATTLER:
|
case BS_ABILITY_BATTLER:
|
||||||
ret = gBattlerAbility;
|
ret = gBattlerAbility;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user