KDLPro

Unknown Moves snippet of engine/battle/ai/switch.asm

Mar 12th, 2021 (edited)
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .unknown_moves
  2.     call .IncreaseScore
  3.     call .IncreaseScore
  4.     ld a, [wBattleMonType1]
  5.     ld b, a
  6.     ld hl, wEnemyMonType1
  7.     call CheckTypeMatchup
  8.     ld a, [wTypeMatchup]
  9.     cp EFFECTIVE + 1 ; 1.0 + 0.1
  10.     jr c, .ok
  11.     call .DecreaseScore
  12. .ok
  13.     ld a, [wBattleMonType2]
  14.     cp b
  15.     jr z, .ok2
  16.     call CheckTypeMatchup
  17.     ld a, [wTypeMatchup]
  18.     cp EFFECTIVE + 1 ; 1.0 + 0.1
  19.     jr c, .ok2
  20.     call .DecreaseScore
  21. .ok2
  22.     ld a, [wBattleMonType1]
  23.     ld b, a
  24.     ld hl, wEnemyMonType2
  25.     ld a, [wEnemyMonType1]
  26.     ld d, a
  27.     ld a, [wEnemyMonType2]
  28.     cp d
  29.     jr z, .done
  30.     call .IncreaseScore
  31.     call .IncreaseScore
  32.     call CheckTypeMatchup
  33.     ld a, [wTypeMatchup]
  34.     cp EFFECTIVE + 1 ; 1.0 + 0.1
  35.     jr c, .ok3
  36.     call .DecreaseScore
  37. .ok3
  38.     ld a, [wBattleMonType2]
  39.     cp b
  40.     jr z, .done
  41.     call CheckTypeMatchup
  42.     ld a, [wTypeMatchup]
  43.     cp EFFECTIVE + 1 ; 1.0 + 0.1
  44.     jr c, .done
  45.     call .DecreaseScore
  46. .done
  47.     call .CheckEnemyMoveMatchups
  48.     pop bc
  49.     pop de
  50.     pop hl
  51.     ret
Add Comment
Please, Sign In to add comment