Skip to content

Choosing RUN in a trainer battle makes you win on DEBUG mode

ZetaPx edited this page Aug 7, 2025 · 1 revision

This is very simple. Code by ZetaPhoenix.

The enemy is fainted first to avoid some graphical glitches.

In engine/battle/core.asm

Go to TryRunningFromBattle.trainerBattle

.trainerBattle
+IF DEF(_DEBUG)
+	call FaintEnemyPokemon
+	call TrainerBattleVictory
+	jp _InitBattleCommon.endOfBattle
+ENDC
	ld hl, NoRunningText
.printCantEscapeOrNoRunningText
	call PrintText
	ld a, 1
	ld [wForcePlayerToChooseMon], a
	call SaveScreenTilesToBuffer1
	and a ; reset carry
	ret
Clone this wiki locally