summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstag019 <stag019@gmail.com>2012-03-21 23:24:33 -0400
committerstag019 <stag019@gmail.com>2012-03-21 23:24:33 -0400
commit694acb6a42a9bfb2fead3b143c2bb5a1d3f58557 (patch)
tree7fc128a282ca291467f19521abefffff91ff84de
parent6d91075892c8d1ee13954b2c42a3b760ff2b31dd (diff)
Some small CalculateDamage fixes.
hg-commit-id: fcfcc64ed156
-rw-r--r--main.asm22
1 files changed, 11 insertions, 11 deletions
diff --git a/main.asm b/main.asm
index da573898..73e50979 100644
--- a/main.asm
+++ b/main.asm
@@ -39769,7 +39769,7 @@ UnnamedText_3ddca: ; 0x3ddca
CalculateDamage: ; 0x3ddcf
xor a
- ld hl, $d0d7 ;D0D7-D0D8: damage to eventually inflict, intitialise to zero
+ ld hl, $d0d7 ;damage to eventually inflict, intitialise to zero
ldi [hl], a
ld [hl], a
ld hl, W_PLAYERMOVEPOWER
@@ -39781,11 +39781,11 @@ CalculateDamage: ; 0x3ddcf
cp a, $14 ;types >= $14 are all special
jr nc, .specialAttack
.physicalAttack
- ld hl, W_ENEMYMONDEFENSE ;CFF8: opponent defense
+ ld hl, W_ENEMYMONDEFENSE ;opponent defense
ld a, [hli] ;*BC = opponent defense used later
ld b, a
ld c, [hl]
- ld a, [W_ENEMYBATTSTATUS3] ;test for reflect?
+ ld a, [W_ENEMYBATTSTATUS3] ;test for reflect
bit 2, a
jr z, .next\@
.doubleDefense
@@ -39810,11 +39810,11 @@ CalculateDamage: ; 0x3ddcf
pop bc
jr .next3\@
.specialAttack
- ld hl, W_ENEMYMONSPECIAL ;CFFC: opponent special
+ ld hl, W_ENEMYMONSPECIAL ;opponent special
ld a, [hli] ;*BC = opponent special defense used later
ld b, a
ld c, [hl]
- ld a, [W_ENEMYBATTSTATUS3] ;test for lightscreen?
+ ld a, [W_ENEMYBATTSTATUS3] ;test for lightscreen
bit 1, a
jr z, .next2\@
.doubleSpecialDefense
@@ -39822,7 +39822,7 @@ CalculateDamage: ; 0x3ddcf
rl b
.next2\@
ld hl, $d02b
- ld a, [$d05e] ;D05E[?] decides skip
+ ld a, [$d05e] ;XXX
and a
jr z, .next3\@ ;skip portion of code that pulls up inactive pokemon
.loadOtherPoke
@@ -39833,13 +39833,13 @@ CalculateDamage: ; 0x3ddcf
ld a, [$ff00+$98]
ld c, a
push bc
- ld hl, $d195 ;HL base = D195 [where other monster data is stored]
- ld a, [W_PLAYERMONNUMBER] ;multiplier = [CC2F] [desired slot #?]
- ld bc, $002c ;mulitiplicand = 002C [bytes per monster]
- call AddNTimes ;HL = D195 + $002C * slot
+ ld hl, $d195
+ ld a, [W_PLAYERMONNUMBER]
+ ld bc, $002c
+ call AddNTimes
pop bc
.next3\@
- ld a, [hli] ;HL: D025 when this was taken
+ ld a, [hli] ;HL: when this was taken
ld l, [hl]
ld h, a ;*HL = attacker attack
or b ;is either attack or defense high byte nonzero?