summaryrefslogtreecommitdiff
path: root/engine/battle/move_effects/thunder.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2018-01-26 11:36:00 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2018-01-26 11:36:00 -0500
commit0cf4eb68955952659b0e94fbeae0a75fe36255ae (patch)
treef38113626f149a5f71b01212a6440c0f8926b662 /engine/battle/move_effects/thunder.asm
parenta0cc4a33929f6aeb08a733c4a985c3bbb24ef55f (diff)
Move-unique effect commands consistently go in engine/battle/move_effects/
Diffstat (limited to 'engine/battle/move_effects/thunder.asm')
-rw-r--r--engine/battle/move_effects/thunder.asm20
1 files changed, 20 insertions, 0 deletions
diff --git a/engine/battle/move_effects/thunder.asm b/engine/battle/move_effects/thunder.asm
new file mode 100644
index 000000000..adfb4dd33
--- /dev/null
+++ b/engine/battle/move_effects/thunder.asm
@@ -0,0 +1,20 @@
+BattleCommand_ThunderAccuracy: ; 37d94
+; thunderaccuracy
+
+ ld a, BATTLE_VARS_MOVE_TYPE
+ call GetBattleVarAddr
+ inc hl
+ ld a, [Weather]
+ 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
+
+; 37daa