2016-06-12 00:24:04 +00:00
|
|
|
ReflectLightScreenEffect_:
|
2015-08-31 02:38:41 +00:00
|
|
|
ld hl, wPlayerBattleStatus3
|
|
|
|
ld de, wPlayerMoveEffect
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh a, [hWhoseTurn]
|
2015-04-01 14:51:04 +00:00
|
|
|
and a
|
2015-04-08 10:15:08 +00:00
|
|
|
jr z, .reflectLightScreenEffect
|
2015-08-31 02:38:41 +00:00
|
|
|
ld hl, wEnemyBattleStatus3
|
|
|
|
ld de, wEnemyMoveEffect
|
2015-04-08 10:15:08 +00:00
|
|
|
.reflectLightScreenEffect
|
2015-04-01 14:51:04 +00:00
|
|
|
ld a, [de]
|
|
|
|
cp LIGHT_SCREEN_EFFECT
|
|
|
|
jr nz, .reflect
|
2017-12-29 23:59:48 +00:00
|
|
|
bit HAS_LIGHT_SCREEN_UP, [hl] ; is mon already protected by light screen?
|
2015-04-01 14:51:04 +00:00
|
|
|
jr nz, .moveFailed
|
2017-12-29 23:59:48 +00:00
|
|
|
set HAS_LIGHT_SCREEN_UP, [hl] ; mon is now protected by light screen
|
2015-04-01 14:51:04 +00:00
|
|
|
ld hl, LightScreenProtectedText
|
2015-04-08 10:15:08 +00:00
|
|
|
jr .playAnim
|
2015-04-01 14:51:04 +00:00
|
|
|
.reflect
|
2017-12-29 23:59:48 +00:00
|
|
|
bit HAS_REFLECT_UP, [hl] ; is mon already protected by reflect?
|
2015-04-01 14:51:04 +00:00
|
|
|
jr nz, .moveFailed
|
2017-12-29 23:59:48 +00:00
|
|
|
set HAS_REFLECT_UP, [hl] ; mon is now protected by reflect
|
2015-04-01 14:51:04 +00:00
|
|
|
ld hl, ReflectGainedArmorText
|
2015-04-08 10:15:08 +00:00
|
|
|
.playAnim
|
2015-04-01 14:51:04 +00:00
|
|
|
push hl
|
|
|
|
ld hl, PlayCurrentMoveAnimation
|
2020-11-05 21:55:39 +00:00
|
|
|
call EffectCallBattleCore
|
2015-04-01 14:51:04 +00:00
|
|
|
pop hl
|
|
|
|
jp PrintText
|
|
|
|
.moveFailed
|
2015-07-03 19:37:53 +00:00
|
|
|
ld c, 50
|
2015-04-01 14:51:04 +00:00
|
|
|
call DelayFrames
|
|
|
|
ld hl, PrintButItFailedText_
|
2020-11-05 21:55:39 +00:00
|
|
|
jp EffectCallBattleCore
|
2015-04-01 14:51:04 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
LightScreenProtectedText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _LightScreenProtectedText
|
|
|
|
text_end
|
2015-04-01 14:51:04 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
ReflectGainedArmorText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _ReflectGainedArmorText
|
|
|
|
text_end
|
2015-04-01 14:51:04 +00:00
|
|
|
|
2020-11-05 21:55:39 +00:00
|
|
|
EffectCallBattleCore:
|
2015-04-01 14:51:04 +00:00
|
|
|
ld b, BANK(BattleCore)
|
|
|
|
jp Bankswitch
|