mist_effect.asm 449 B

1234567891011121314151617181920
  1. MistEffect_:
  2. ld hl, wPlayerBattleStatus2
  3. ld a, [H_WHOSETURN]
  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. callab PlayCurrentMoveAnimation
  12. ld hl, ShroudedInMistText
  13. jp PrintText
  14. .mistAlreadyInUse
  15. jpab PrintButItFailedText_
  16. ShroudedInMistText:
  17. TX_FAR _ShroudedInMistText
  18. db "@"