summaryrefslogtreecommitdiff
path: root/engine/battle/move_effects/thunder.asm
blob: b2a64378726a55cae67d920c3c07f569c8233e4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
BattleCommand_ThunderAccuracy:
; thunderaccuracy

	ld a, BATTLE_VARS_MOVE_TYPE
	call GetBattleVarAddr
	inc hl
	ld a, [wBattleWeather]
	cp WEATHER_RAIN
	jr z, .rain
	cp WEATHER_SUN
	ret nz
	ld [hl], 50 percent + 1
	ret

.rain
	; Redundant with CheckHit guranteeing hit
	ld [hl], 100 percent
	ret