shithub: pokecrystal

Download patch

ref: 50da83cb23bd9b6f374a781acabdec0aa22bb598
parent: 79cf90ab5ec6069d2d27281e6602e85ba5310c87
author: mid-kid <[email protected]>
date: Fri Aug 17 16:16:37 EDT 2018

CheckDestinyBond -> CheckFaint

Its main function is fainting the opponent and ending the move effect.
Updated the comment accordingly.

--- a/data/battle/effect_command_pointers.asm
+++ b/data/battle/effect_command_pointers.asm
@@ -20,7 +20,7 @@
 	dw BattleCommand_ApplyDamage
 	dw BattleCommand_CriticalText
 	dw BattleCommand_SuperEffectiveText
-	dw BattleCommand_CheckDestinyBond
+	dw BattleCommand_CheckFaint
 	dw BattleCommand_BuildOpponentRage
 	dw BattleCommand_PoisonTarget
 	dw BattleCommand_SleepTarget
--- a/data/moves/effects.asm
+++ b/data/moves/effects.asm
@@ -17,7 +17,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -47,7 +47,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	poisontarget
 	endmove
@@ -68,7 +68,7 @@
 	criticaltext
 	supereffectivetext
 	draintarget
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -89,7 +89,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	burntarget
 	endmove
@@ -110,7 +110,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	freezetarget
 	endmove
@@ -131,7 +131,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	paralyzetarget
 	endmove
@@ -152,7 +152,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -173,7 +173,7 @@
 	criticaltext
 	supereffectivetext
 	eatdream
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	endmove
 
@@ -551,7 +551,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	attackdown
 	statdownmessage
@@ -573,7 +573,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	effectchance ; bug: duplicate effectchance shouldn't be here
 	defensedown
@@ -596,7 +596,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	speeddown
 	statdownmessage
@@ -618,7 +618,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	specialattackdown
 	statdownmessage
@@ -640,7 +640,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	specialdefensedown
 	statdownmessage
@@ -662,7 +662,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	accuracydown
 	statdownmessage
@@ -684,7 +684,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	evasiondown
 	statdownmessage
@@ -706,7 +706,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	defenseup
 	statupmessage
@@ -728,7 +728,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	attackup
 	statupmessage
@@ -750,7 +750,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	allstatsup
 	endmove
@@ -771,7 +771,7 @@
 	criticaltext
 	supereffectivetext
 	payday
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -801,7 +801,7 @@
 	moveanim
 	bidefailtext
 	applydamage
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -824,7 +824,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -856,7 +856,7 @@
 	criticaltext
 	cleartext
 	supereffectivelooptext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	endloop
 	raisesub
@@ -883,7 +883,7 @@
 	criticaltext
 	cleartext
 	supereffectivelooptext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	endloop
 	raisesub
@@ -907,7 +907,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	flinchtarget
 	endmove
@@ -923,7 +923,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	endmove
 
@@ -943,7 +943,7 @@
 	criticaltext
 	supereffectivetext
 	recoil
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -987,7 +987,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	confusetarget
 	endmove
@@ -1029,7 +1029,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	tristatuschance
 	endmove
@@ -1073,7 +1073,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	flinchtarget
 	kingsrock
@@ -1102,7 +1102,7 @@
 	criticaltext
 	supereffectivetext
 	rechargenextturn
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	endmove
 
@@ -1123,7 +1123,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1183,7 +1183,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1206,7 +1206,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1227,7 +1227,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	traptarget
 	endmove
@@ -1244,7 +1244,7 @@
 	moveanim
 	failuretext
 	applydamage
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1260,7 +1260,7 @@
 	failuretext
 	applydamage
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1273,7 +1273,7 @@
 	moveanim
 	failuretext
 	applydamage
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1311,7 +1311,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	flinchtarget
 	kingsrock
@@ -1385,7 +1385,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1417,7 +1417,7 @@
 	criticaltext
 	cleartext
 	supereffectivelooptext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kickcounter
 	endloop
@@ -1442,7 +1442,7 @@
 	criticaltext
 	supereffectivetext
 	thief
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1478,7 +1478,7 @@
 	criticaltext
 	supereffectivetext
 	defrost
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	burntarget
 	endmove
@@ -1550,7 +1550,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1589,7 +1589,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1618,7 +1618,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1639,7 +1639,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1660,7 +1660,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1689,7 +1689,7 @@
 	criticaltext
 	supereffectivetext
 	defrost
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	burntarget
 	endmove
@@ -1711,7 +1711,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1739,7 +1739,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1760,7 +1760,7 @@
 	criticaltext
 	supereffectivetext
 	clearhazards
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1801,7 +1801,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1852,7 +1852,7 @@
 	moveanim
 	failuretext
 	applydamage
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -1874,7 +1874,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endturn
@@ -1899,7 +1899,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	flinchtarget
 	endmove
@@ -1921,7 +1921,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	endmove
 
@@ -1938,7 +1938,7 @@
 	moveanimnosub
 	failuretext
 	applydamage
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	endmove
 
@@ -1958,7 +1958,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	endmove
 
@@ -1979,7 +1979,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	flinchtarget
 	endmove
@@ -2002,7 +2002,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	kingsrock
 	endmove
@@ -2024,7 +2024,7 @@
 	applydamage
 	criticaltext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	paralyzetarget
 	endmove
@@ -2055,7 +2055,7 @@
 	criticaltext
 	cleartext
 	supereffectivetext
-	checkdestinybond
+	checkfaint
 	buildopponentrage
 	endloop
 	beatupfailtext
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -2363,10 +2363,12 @@
 .print
 	jp StdBattleTextBox
 
-BattleCommand_CheckDestinyBond:
-; checkdestinybond
+BattleCommand_CheckFaint:
+; checkfaint
 
-; Faint the user if it fainted an opponent using Destiny Bond.
+; Faint the opponent if its HP reached zero
+;  and faint the user along with it if it used Destiny Bond.
+; Ends the move effect if the opponent faints.
 
 	ld hl, wEnemyMonHP
 	ld a, [hBattleTurn]
--- a/macros/scripts/battle_commands.asm
+++ b/macros/scripts/battle_commands.asm
@@ -21,7 +21,7 @@
 	command applydamage             ; 0e
 	command criticaltext            ; 0f
 	command supereffectivetext      ; 10
-	command checkdestinybond        ; 11
+	command checkfaint              ; 11
 	command buildopponentrage       ; 12
 	command poisontarget            ; 13
 	command sleeptarget             ; 14