mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00
Some wram constants
This commit is contained in:
parent
a8375aaee7
commit
247b619e9a
|
@ -82,7 +82,7 @@ GainExperience: ; 5524f (15:524f)
|
||||||
call BoostExp ; traded mon exp boost
|
call BoostExp ; traded mon exp boost
|
||||||
ld a, $1
|
ld a, $1
|
||||||
.next
|
.next
|
||||||
ld [wcf4d], a
|
ld [wGainBoostedExp], a
|
||||||
ld a, [W_ISINBATTLE]
|
ld a, [W_ISINBATTLE]
|
||||||
dec a ; is it a trainer battle?
|
dec a ; is it a trainer battle?
|
||||||
call nz, BoostExp ; if so, boost exp
|
call nz, BoostExp ; if so, boost exp
|
||||||
|
@ -342,12 +342,12 @@ BoostExp: ; 5549f (15:549f)
|
||||||
GainedText: ; 554b2 (15:54b2)
|
GainedText: ; 554b2 (15:54b2)
|
||||||
TX_FAR _GainedText
|
TX_FAR _GainedText
|
||||||
db $08 ; asm
|
db $08 ; asm
|
||||||
ld a, [wcc5b]
|
ld a, [wBoostExpByExpAll]
|
||||||
ld hl, WithExpAllText
|
ld hl, WithExpAllText
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
ld hl, ExpPointsText
|
ld hl, ExpPointsText
|
||||||
ld a, [wcf4d]
|
ld a, [wGainBoostedExp]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
ld hl, BoostedText
|
ld hl, BoostedText
|
||||||
|
|
|
@ -2931,7 +2931,7 @@ TossBallAnimation: ; 79e16 (1e:5e16)
|
||||||
|
|
||||||
Func_79e6a: ; 79e6a (1e:5e6a)
|
Func_79e6a: ; 79e6a (1e:5e6a)
|
||||||
call WaitForSoundToFinish
|
call WaitForSoundToFinish
|
||||||
ld a, [wd05b]
|
ld a, [wDamageMultipliers]
|
||||||
and $7f
|
and $7f
|
||||||
ret z
|
ret z
|
||||||
cp $a
|
cp $a
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
DisplayEffectiveness: ; 2fb7b (b:7b7b)
|
DisplayEffectiveness: ; 2fb7b (b:7b7b)
|
||||||
ld a, [wd05b]
|
ld a, [wDamageMultipliers]
|
||||||
and a, $7F
|
and a, $7F
|
||||||
cp a, $0A
|
cp a, $0A
|
||||||
ret z
|
ret z
|
||||||
|
|
|
@ -919,7 +919,7 @@ FaintEnemyPokemon ; 0x3c567
|
||||||
; if exp all is in the bag, this will be only be half of the stat exp and normal exp, due to the above loop
|
; if exp all is in the bag, this will be only be half of the stat exp and normal exp, due to the above loop
|
||||||
.giveExpToMonsThatFought
|
.giveExpToMonsThatFought
|
||||||
xor a
|
xor a
|
||||||
ld [wcc5b], a
|
ld [wBoostExpByExpAll], a
|
||||||
callab GainExperience
|
callab GainExperience
|
||||||
pop af
|
pop af
|
||||||
ret z ; return if no exp all
|
ret z ; return if no exp all
|
||||||
|
@ -928,7 +928,7 @@ FaintEnemyPokemon ; 0x3c567
|
||||||
; now, set the gain exp flag for every party member
|
; now, set the gain exp flag for every party member
|
||||||
; half of the total stat exp and normal exp will divided evenly amongst every party member
|
; half of the total stat exp and normal exp will divided evenly amongst every party member
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcc5b], a
|
ld [wBoostExpByExpAll], a
|
||||||
ld a, [wPartyCount]
|
ld a, [wPartyCount]
|
||||||
ld b, 0
|
ld b, 0
|
||||||
.gainExpFlagsLoop
|
.gainExpFlagsLoop
|
||||||
|
@ -1811,8 +1811,8 @@ SendOutMon: ; 3cc91 (f:4c91)
|
||||||
ld hl, wcc2d
|
ld hl, wcc2d
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld [wcc5b], a
|
ld [wBoostExpByExpAll], a
|
||||||
ld [wd05b], a
|
ld [wDamageMultipliers], a
|
||||||
ld [W_PLAYERMOVENUM], a
|
ld [W_PLAYERMOVENUM], a
|
||||||
ld hl, wPlayerUsedMove
|
ld hl, wPlayerUsedMove
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
|
@ -3129,9 +3129,9 @@ ExecutePlayerMove: ; 3d65e (f:565e)
|
||||||
xor a
|
xor a
|
||||||
ld [W_MOVEMISSED], a
|
ld [W_MOVEMISSED], a
|
||||||
ld [wcced], a
|
ld [wcced], a
|
||||||
ld [wccf4], a
|
ld [wMoveDidntMiss], a
|
||||||
ld a, $a
|
ld a, $a
|
||||||
ld [wd05b], a
|
ld [wDamageMultipliers], a
|
||||||
ld a, [wcd6a]
|
ld a, [wcd6a]
|
||||||
and a
|
and a
|
||||||
jp nz, ExecutePlayerMoveDone
|
jp nz, ExecutePlayerMoveDone
|
||||||
|
@ -3277,7 +3277,7 @@ MirrorMoveCheck
|
||||||
call PrintCriticalOHKOText
|
call PrintCriticalOHKOText
|
||||||
callab DisplayEffectiveness
|
callab DisplayEffectiveness
|
||||||
ld a,1
|
ld a,1
|
||||||
ld [wccf4],a
|
ld [wMoveDidntMiss],a
|
||||||
.notDone
|
.notDone
|
||||||
ld a,[W_PLAYERMOVEEFFECT]
|
ld a,[W_PLAYERMOVEEFFECT]
|
||||||
ld hl,AlwaysHappenSideEffects
|
ld hl,AlwaysHappenSideEffects
|
||||||
|
@ -3901,7 +3901,7 @@ PrintMoveFailureText: ; 3dbe2 (f:5be2)
|
||||||
ld de, W_ENEMYMOVEEFFECT
|
ld de, W_ENEMYMOVEEFFECT
|
||||||
.playersTurn
|
.playersTurn
|
||||||
ld hl, DoesntAffectMonText
|
ld hl, DoesntAffectMonText
|
||||||
ld a, [wd05b]
|
ld a, [wDamageMultipliers]
|
||||||
and $7f
|
and $7f
|
||||||
jr z, .gotTextToPrint
|
jr z, .gotTextToPrint
|
||||||
ld hl, AttackMissedText
|
ld hl, AttackMissedText
|
||||||
|
@ -5306,7 +5306,7 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5)
|
||||||
ld [W_DAMAGE],a
|
ld [W_DAMAGE],a
|
||||||
ld a,l
|
ld a,l
|
||||||
ld [W_DAMAGE + 1],a
|
ld [W_DAMAGE + 1],a
|
||||||
ld hl,wd05b
|
ld hl,wDamageMultipliers
|
||||||
set 7,[hl]
|
set 7,[hl]
|
||||||
.skipSameTypeAttackBonus
|
.skipSameTypeAttackBonus
|
||||||
ld a,[wd11e]
|
ld a,[wd11e]
|
||||||
|
@ -5329,13 +5329,13 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5)
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
inc hl
|
inc hl
|
||||||
ld a,[wd05b]
|
ld a,[wDamageMultipliers]
|
||||||
and a,$80
|
and a,$80
|
||||||
ld b,a
|
ld b,a
|
||||||
ld a,[hl] ; a = damage multiplier
|
ld a,[hl] ; a = damage multiplier
|
||||||
ld [H_MULTIPLIER],a
|
ld [H_MULTIPLIER],a
|
||||||
add b
|
add b
|
||||||
ld [wd05b],a
|
ld [wDamageMultipliers],a
|
||||||
xor a
|
xor a
|
||||||
ld [H_MULTIPLICAND],a
|
ld [H_MULTIPLICAND],a
|
||||||
ld hl,W_DAMAGE
|
ld hl,W_DAMAGE
|
||||||
|
@ -5659,9 +5659,9 @@ ExecuteEnemyMove: ; 3e6bc (f:66bc)
|
||||||
inc [hl]
|
inc [hl]
|
||||||
xor a
|
xor a
|
||||||
ld [W_MOVEMISSED], a
|
ld [W_MOVEMISSED], a
|
||||||
ld [wccf4], a
|
ld [wMoveDidntMiss], a
|
||||||
ld a, $a
|
ld a, $a
|
||||||
ld [wd05b], a
|
ld [wDamageMultipliers], a
|
||||||
call CheckEnemyStatusConditions
|
call CheckEnemyStatusConditions
|
||||||
jr nz, .enemyHasNoSpecialConditions
|
jr nz, .enemyHasNoSpecialConditions
|
||||||
jp [hl]
|
jp [hl]
|
||||||
|
@ -5812,7 +5812,7 @@ asm_3e7ef: ; 3e7ef (f:67ef)
|
||||||
call PrintCriticalOHKOText
|
call PrintCriticalOHKOText
|
||||||
callab DisplayEffectiveness
|
callab DisplayEffectiveness
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wccf4], a
|
ld [wMoveDidntMiss], a
|
||||||
.asm_3e83e
|
.asm_3e83e
|
||||||
ld a, [W_ENEMYMOVEEFFECT]
|
ld a, [W_ENEMYMOVEEFFECT]
|
||||||
ld hl, AlwaysHappenSideEffects
|
ld hl, AlwaysHappenSideEffects
|
||||||
|
@ -8614,7 +8614,7 @@ NoEffectText: ; 3fb49 (f:7b49)
|
||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
Func_3fb4e: ; 3fb4e (f:7b4e)
|
Func_3fb4e: ; 3fb4e (f:7b4e)
|
||||||
ld a, [wccf4]
|
ld a, [wMoveDidntMiss]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
|
|
|
@ -321,7 +321,7 @@ ItemUseBall: ; d687 (3:5687)
|
||||||
xor a
|
xor a
|
||||||
ld [$fff3],a
|
ld [$fff3],a
|
||||||
ld [wcc5b],a
|
ld [wcc5b],a
|
||||||
ld [wd05b],a
|
ld [wDamageMultipliers],a
|
||||||
ld a,[wWhichPokemon]
|
ld a,[wWhichPokemon]
|
||||||
push af
|
push af
|
||||||
ld a,[wcf91]
|
ld a,[wcf91]
|
||||||
|
|
16
wram.asm
16
wram.asm
|
@ -351,6 +351,7 @@ wNPCMovementScriptBank:: ; cc58
|
||||||
ds 2
|
ds 2
|
||||||
|
|
||||||
wHallOfFame:: ; cc5b
|
wHallOfFame:: ; cc5b
|
||||||
|
wBoostExpByExpAll:: ; cc5b
|
||||||
wcc5b:: ds 1
|
wcc5b:: ds 1
|
||||||
wcc5c:: ds 1
|
wcc5c:: ds 1
|
||||||
wcc5d:: ds 1
|
wcc5d:: ds 1
|
||||||
|
@ -431,7 +432,7 @@ wccf0:: ds 1
|
||||||
wPlayerUsedMove:: ds 1
|
wPlayerUsedMove:: ds 1
|
||||||
wEnemyUsedMove:: ds 1
|
wEnemyUsedMove:: ds 1
|
||||||
wccf3:: ds 1
|
wccf3:: ds 1
|
||||||
wccf4:: ds 1
|
wMoveDidntMiss:: ds 1
|
||||||
|
|
||||||
wPartyFoughtCurrentEnemyFlags::
|
wPartyFoughtCurrentEnemyFlags::
|
||||||
; flags that indicate which party members have fought the current enemy mon
|
; flags that indicate which party members have fought the current enemy mon
|
||||||
|
@ -783,7 +784,9 @@ wcf30:: ds 7
|
||||||
wcf37:: ds 20
|
wcf37:: ds 20
|
||||||
wcf4b:: ds 1
|
wcf4b:: ds 1
|
||||||
wcf4c:: ds 1
|
wcf4c:: ds 1
|
||||||
wcf4d:: ds 18
|
wGainBoostedExp:: ; cf4d
|
||||||
|
ds 1
|
||||||
|
ds 17
|
||||||
|
|
||||||
wGymCityName:: ; cf5f
|
wGymCityName:: ; cf5f
|
||||||
wStringBuffer1:: ; cf5f
|
wStringBuffer1:: ; cf5f
|
||||||
|
@ -967,7 +970,14 @@ W_BATTLETYPE:: ; d05a
|
||||||
; in safari battle, this is 2
|
; in safari battle, this is 2
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wd05b:: ds 1
|
wDamageMultipliers:: ; d05b
|
||||||
|
; bits 0-6: Effectiveness
|
||||||
|
; $0 = immune
|
||||||
|
; $5 = not very effective
|
||||||
|
; $a = neutral
|
||||||
|
; $14 = super-effective
|
||||||
|
; bit 7: STAB
|
||||||
|
ds 1
|
||||||
|
|
||||||
W_LONEATTACKNO:: ; d05c
|
W_LONEATTACKNO:: ; d05c
|
||||||
; which entry in LoneAttacks to use
|
; which entry in LoneAttacks to use
|
||||||
|
|
Loading…
Reference in a new issue