summaryrefslogtreecommitdiff
path: root/engine/battle/move_effects/thunder.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle/move_effects/thunder.asm')
-rw-r--r--engine/battle/move_effects/thunder.asm18
1 files changed, 18 insertions, 0 deletions
diff --git a/engine/battle/move_effects/thunder.asm b/engine/battle/move_effects/thunder.asm
new file mode 100644
index 00000000..b2a64378
--- /dev/null
+++ b/engine/battle/move_effects/thunder.asm
@@ -0,0 +1,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