Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pret
GitHub Repository: pret/pokered
Path: blob/master/engine/battle/move_effects/mist.asm
1271 views
1
MistEffect_:
2
ld hl, wPlayerBattleStatus2
3
ldh a, [hWhoseTurn]
4
and a
5
jr z, .mistEffect
6
ld hl, wEnemyBattleStatus2
7
.mistEffect
8
bit PROTECTED_BY_MIST, [hl] ; is mon protected by mist?
9
jr nz, .mistAlreadyInUse
10
set PROTECTED_BY_MIST, [hl] ; mon is now protected by mist
11
callfar PlayCurrentMoveAnimation
12
ld hl, ShroudedInMistText
13
jp PrintText
14
.mistAlreadyInUse
15
jpfar PrintButItFailedText_
16
17
ShroudedInMistText:
18
text_far _ShroudedInMistText
19
text_end
20
21