shithub: pokecrystal

ref: 8fc3b8e6e36663f00f8ce7c2830db55a538a72b5
dir: /engine/battle/move_effects/triple_kick.asm/

View raw version
BattleCommand_TripleKick:
	ld a, [wBattleAnimParam]
	ld b, a
	inc b
	ld hl, wCurDamage + 1
	ld a, [hld]
	ld e, a
	ld a, [hli]
	ld d, a
.next_kick
	dec b
	ret z
	ld a, [hl]
	add e
	ld [hld], a
	ld a, [hl]
	adc d
	ld [hli], a

; No overflow.
	jr nc, .next_kick
	ld a, $ff
	ld [hld], a
	ld [hl], a
	ret

BattleCommand_KickCounter:
	ld hl, wBattleAnimParam
	inc [hl]
	ret