Fix potential issue when destiny knot fail after proccing from cute charm (#8459)
This commit is contained in:
parent
22dcef88c2
commit
86ba8c3191
@ -3526,10 +3526,15 @@ BattleScript_TryDestinyKnotTarget:
|
||||
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT
|
||||
waitanimation
|
||||
printstring STRINGID_DESTINYKNOTACTIVATES
|
||||
tryinfatuating BattleScript_ButItFailed
|
||||
tryinfatuating BattleScript_TryDestinyKnotTargetFailed
|
||||
volatileanimation BS_TARGET, VOLATILE_INFATUATION
|
||||
waitanimation
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_TryDestinyKnotTargetRet
|
||||
BattleScript_TryDestinyKnotTargetFailed:
|
||||
pause B_WAIT_TIME_SHORT
|
||||
printstring STRINGID_BUTITFAILED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_TryDestinyKnotTargetRet:
|
||||
return
|
||||
|
||||
|
||||
@ -64,3 +64,17 @@ SINGLE_BATTLE_TEST("Destiny Knot procs but fails if the target is oblivious")
|
||||
EXPECT(!player->volatiles.infatuation);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Destiny Knot procs but fails if the target is already infatuated (cute charm)")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_CLEFAIRY) { Gender(MON_MALE); Ability(ABILITY_CUTE_CHARM);}
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Gender(MON_FEMALE); Item(ITEM_DESTINY_KNOT); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_ATTRACT);}
|
||||
TURN { MOVE(opponent, MOVE_TACKLE);}
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
|
||||
MESSAGE("But it failed!");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user