Clean up white space

This commit is contained in:
U-Daniel-PC\Daniel 2015-06-11 17:41:33 -05:00
parent c43c338a5f
commit 39abace569
19 changed files with 114 additions and 114 deletions

View file

@ -13,7 +13,7 @@ ConversionEffect_: ; 139a3 (4:79a3)
.conversionEffect
bit Invulnerable, a ; is mon immune to typical attacks (dig/fly)
jr nz, PrintButItFailedText
; copy target's types to user
; copy target's types to user
ld a, [hli]
ld [de], a
inc de

View file

@ -1,5 +1,5 @@
DrainHPEffect_: ; 783f (1:783f)
ld hl, W_DAMAGE
ld hl, W_DAMAGE
ld a, [hl]
srl a ; divide damage by 2
ld [hli], a
@ -17,8 +17,8 @@ DrainHPEffect_: ; 783f (1:783f)
ld a, [H_WHOSETURN]
and a
jp z, .addDamageToAttackerHP
ld hl, wEnemyMonHP
ld de, wEnemyMonMaxHP
ld hl, wEnemyMonHP
ld de, wEnemyMonMaxHP
.addDamageToAttackerHP
ld bc, wHPBarOldHP+1
; copy current HP to wHPBarOldHP
@ -41,7 +41,7 @@ DrainHPEffect_: ; 783f (1:783f)
add b
ld [hld], a
ld [wHPBarNewHP], a
ld a, [W_DAMAGE]
ld a, [W_DAMAGE]
ld b, [hl]
adc b
ld [hli], a
@ -87,7 +87,7 @@ DrainHPEffect_: ; 783f (1:783f)
and a
ld a, [W_PLAYERMOVEEFFECT]
jr z, .next3
ld a, [W_ENEMYMOVEEFFECT]
ld a, [W_ENEMYMOVEEFFECT]
.next3
cp DREAM_EATER_EFFECT
jr nz, .printText

View file

@ -1,11 +1,11 @@
HazeEffect_: ; 139da (4:79da)
ld a, $7
; store 7 on every stat mod
; store 7 on every stat mod
ld hl, wPlayerMonAttackMod
call ResetStatMods
ld hl, wEnemyMonAttackMod
call ResetStatMods
; copy unmodified stats to battle stats
; copy unmodified stats to battle stats
ld hl, wPlayerMonUnmodifiedAttack
ld de, wBattleMonAttack
call ResetStats
@ -25,7 +25,7 @@ HazeEffect_: ; 139da (4:79da)
ld [hl], $0
and SLP | (1 << FRZ)
jr z, .cureVolatileStatuses
; prevent the Pokemon from executing a move if it was asleep or frozen
; prevent the Pokemon from executing a move if it was asleep or frozen
ld a, $ff
ld [de], a
@ -51,7 +51,7 @@ CureVolatileStatuses: ; 13a37 (4:7a37)
inc hl ; BATTSTATUS2
ld a, [hl]
; clear UsingXAccuracy, ProtectedByMist, GettingPumped, and Seeded statuses
and $ff ^((1 << UsingXAccuracy) | (1 << ProtectedByMist) | (1 << GettingPumped) | (1 << Seeded))
and $ff ^((1 << UsingXAccuracy) | (1 << ProtectedByMist) | (1 << GettingPumped) | (1 << Seeded))
ld [hli], a ; BATTSTATUS3
ld a, [hl]
and %11110000 | (1 << Transformed) ; clear Bad Poison, Reflect and Light Screen statuses
@ -61,7 +61,7 @@ CureVolatileStatuses: ; 13a37 (4:7a37)
ResetStatMods: ; 13a43 (4:7a43)
ld b, $8
.loop
ld [hli], a
ld [hli], a
dec b
jr nz, .loop
ret

View file

@ -76,7 +76,7 @@ HealEffect_: ; 3b9ec (e:79ec)
ld a, [de]
sbc [hl]
jr c, .playAnim
; copy max HP to current HP if an overflow ocurred
; copy max HP to current HP if an overflow ocurred
ld a, [hli]
ld [de], a
ld [wHPBarNewHP+1], a

View file

@ -1,20 +1,20 @@
LeechSeedEffect_: ; 2bea9 (a:7ea9)
callab MoveHitTest
ld a, [W_MOVEMISSED]
ld a, [W_MOVEMISSED]
and a
jr nz, .moveMissed
ld hl, W_ENEMYBATTSTATUS2
ld de, wEnemyMonType1
ld a, [H_WHOSETURN]
ld hl, W_ENEMYBATTSTATUS2
ld de, wEnemyMonType1
ld a, [H_WHOSETURN]
and a
jr z, .leechSeedEffect
ld hl, W_PLAYERBATTSTATUS2
ld de, wBattleMonType1
ld hl, W_PLAYERBATTSTATUS2
ld de, wBattleMonType1
.leechSeedEffect
; miss if the target is grass-type or already seeded
ld a, [de]
cp GRASS
jr z, .moveMissed
jr z, .moveMissed
inc de
ld a, [de]
cp GRASS

View file

@ -1,5 +1,5 @@
OneHitKOEffect_: ; 33f57 (c:7f57)
ld hl, W_DAMAGE
ld hl, W_DAMAGE
xor a
ld [hli], a
ld [hl], a ; set the damage output to zero
@ -7,7 +7,7 @@ OneHitKOEffect_: ; 33f57 (c:7f57)
ld [wCriticalHitOrOHKO], a
ld hl, wBattleMonSpeed + 1
ld de, wEnemyMonSpeed + 1
ld a, [H_WHOSETURN]
ld a, [H_WHOSETURN]
and a
jr z, .compareSpeed
ld hl, wEnemyMonSpeed + 1
@ -24,7 +24,7 @@ OneHitKOEffect_: ; 33f57 (c:7f57)
ld a, [hl]
sbc b
jr c, .userIsSlower
ld hl, W_DAMAGE
ld hl, W_DAMAGE
ld a, $ff
ld [hli], a
ld [hl], a
@ -34,5 +34,5 @@ OneHitKOEffect_: ; 33f57 (c:7f57)
.userIsSlower
; keep damage at 0 and set move missed flag if target's current speed is higher instead
ld a, $1
ld [W_MOVEMISSED], a
ld [W_MOVEMISSED], a
ret

View file

@ -4,7 +4,7 @@ ParalyzeEffect_: ; 52601 (14:6601)
ld a, [H_WHOSETURN]
and a
jp z, .next
ld hl, wBattleMonStatus
ld hl, wBattleMonStatus
ld de, W_ENEMYMOVETYPE
.next
ld a, [hl]
@ -28,7 +28,7 @@ ParalyzeEffect_: ; 52601 (14:6601)
push hl
callab MoveHitTest
pop hl
ld a, [W_MOVEMISSED]
ld a, [W_MOVEMISSED]
and a
jr nz, .didntAffect
set PAR, [hl]

View file

@ -9,19 +9,19 @@ PayDayEffect_ ; 2feb8 (b:7eb8)
ld a, [wEnemyMonLevel]
.payDayEffect
; level * 2
add a
add a
ld [H_DIVIDEND + 3], a
xor a
ld [H_DIVIDEND], a
ld [H_DIVIDEND + 1], a
ld [H_DIVIDEND + 2], a
; convert to BCD
; convert to BCD
ld a, 100
ld [H_DIVISOR], a
ld b, $4
call Divide
ld a, [H_QUOTIENT + 3]
ld [hli], a
ld [hli], a
ld a, [H_REMAINDER]
ld [H_DIVIDEND + 3], a
ld a, 10

View file

@ -46,7 +46,7 @@ RecoilEffect_: ; 1392c (4:792c)
ld [wHPBarNewHP+1], a
jr nc, .getHPBarCoords
; if recoil damage is higher than the Pokemon's HP, set its HP to 0
xor a
xor a
ld [hli], a
ld [hl], a
ld hl, wHPBarNewHP

View file

@ -11,15 +11,15 @@ SubstituteEffect_: ; 17dad (5:7dad)
ld de, wEnemySubstituteHP
ld bc, W_ENEMYBATTSTATUS2
.notEnemy
ld a, [bc]
ld a, [bc]
bit HasSubstituteUp, a ; user already has substitute?
jr nz, .alreadyHasSubstitute
jr nz, .alreadyHasSubstitute
; quarter health to remove from user
; assumes max HP is 1023 or lower
; assumes max HP is 1023 or lower
push bc
ld a, [hli]
ld b, [hl]
srl a
srl a
rr b
srl a
rr b ; max hp / 4
@ -27,29 +27,29 @@ SubstituteEffect_: ; 17dad (5:7dad)
ld de, wBattleMonHP - wBattleMonMaxHP
add hl, de ; point hl to current HP low byte
pop de
ld a, b
ld a, b
ld [de], a ; save copy of HP to subtract in ccd7/ccd8 [how much HP substitute has]
ld a, [hld]
; subtract [max hp / 4] to current HP
sub b
; subtract [max hp / 4] to current HP
sub b
ld d, a
ld a, [hl]
sbc 0
sbc 0
pop bc
jr c, .notEnoughHP ; underflow means user would be left with negative health
; bug: since it only brances on carry, it will possibly leave user with 0 HP
.userHasZeroOrMoreHP
ldi [hl], a ; save resulting HP after substraction into current HP
ld [hl], d
ld [hl], d
ld h, b
ld l, c
set HasSubstituteUp, [hl]
ld a, [W_OPTIONS]
set HasSubstituteUp, [hl]
ld a, [W_OPTIONS]
bit 7, a ; battle animation is enabled?
ld hl, PlayCurrentMoveAnimation
ld hl, PlayCurrentMoveAnimation
ld b, BANK(PlayCurrentMoveAnimation)
jr z, .animationEnabled
ld hl, AnimationSubstitute
ld hl, AnimationSubstitute
ld b, BANK(AnimationSubstitute)
.animationEnabled
call Bankswitch ; jump to routine depending on animation setting

View file

@ -24,7 +24,7 @@ TransformEffect_: ; 3bab1 (e:7ab1)
ld hl, W_ENEMYBATTSTATUS2
.transformEffect
; animation(s) played are different if target has Substitute up
bit HasSubstituteUp, [hl]
bit HasSubstituteUp, [hl]
push af
ld hl, Func_79747
ld b, BANK(Func_79747)
@ -49,13 +49,13 @@ TransformEffect_: ; 3bab1 (e:7ab1)
pop de
pop hl
push hl
; transform user into opposing Pokemon
; transform user into opposing Pokemon
; species
ld a, [hl]
ld a, [hl]
ld [de], a
; type 1, type 2, catch rate, and moves
; type 1, type 2, catch rate, and moves
ld bc, $5
add hl, bc
add hl, bc
inc de
inc de
inc de
@ -82,7 +82,7 @@ TransformEffect_: ; 3bab1 (e:7ab1)
ld a, [hli]
ld [de], a
inc de
; Attack, Defense, Speed, and Special stats
; Attack, Defense, Speed, and Special stats
inc hl
inc hl
inc hl
@ -91,7 +91,7 @@ TransformEffect_: ; 3bab1 (e:7ab1)
inc de
ld bc, $8
call CopyData
ld bc, wBattleMonMoves - wBattleMonPP
ld bc, wBattleMonMoves - wBattleMonPP
add hl, bc ; ld hl, wBattleMonMoves
ld b, NUM_MOVES
.copyPPLoop