mirror of https://github.com/pret/pokecrystal.git
Add more constants for some maximum values
This commit is contained in:
parent
7d4486e6a3
commit
148fd299f9
|
@ -7009,14 +7009,14 @@ ApplyStatLevelMultiplier: ; 3ecb7
|
|||
|
||||
; Cap at 999.
|
||||
ld a, [hQuotient + 2]
|
||||
sub 999 % $100
|
||||
sub MAX_STAT_VALUE % $100
|
||||
ld a, [hQuotient + 1]
|
||||
sbc 999 / $100
|
||||
sbc MAX_STAT_VALUE / $100
|
||||
jp c, .okay3
|
||||
|
||||
ld a, 999 / $100
|
||||
ld a, MAX_STAT_VALUE / $100
|
||||
ld [hQuotient + 1], a
|
||||
ld a, 999 % $100
|
||||
ld a, MAX_STAT_VALUE % $100
|
||||
ld [hQuotient + 2], a
|
||||
|
||||
.okay3
|
||||
|
@ -7132,13 +7132,13 @@ BoostStat: ; 3ed7c
|
|||
|
||||
; Cap at 999.
|
||||
ld a, [hld]
|
||||
sub 999 % $100
|
||||
sub MAX_STAT_VALUE % $100
|
||||
ld a, [hl]
|
||||
sbc 999 / $100
|
||||
sbc MAX_STAT_VALUE / $100
|
||||
ret c
|
||||
ld a, 999 / $100
|
||||
ld a, MAX_STAT_VALUE / $100
|
||||
ld [hli], a
|
||||
ld a, 999 % $100
|
||||
ld a, MAX_STAT_VALUE % $100
|
||||
ld [hld], a
|
||||
ret
|
||||
; 3ed9f
|
||||
|
@ -9135,10 +9135,10 @@ AddLastMobileBattleToLinkRecord: ; 3fa42
|
|||
dec hl
|
||||
ld a, [hl]
|
||||
inc hl
|
||||
cp 9999 / $100
|
||||
cp MAX_LINK_RECORD / $100
|
||||
ret c
|
||||
ld a, [hl]
|
||||
cp 9999 % $100
|
||||
cp MAX_LINK_RECORD % $100
|
||||
ret
|
||||
; 3fac8
|
||||
|
||||
|
|
|
@ -5651,10 +5651,10 @@ CheckIfStatCanBeRaised: ; 361ef
|
|||
.no_carry
|
||||
pop bc
|
||||
ld a, [hld]
|
||||
sub 999 % $100
|
||||
sub MAX_STAT_VALUE % $100
|
||||
jr nz, .not_already_max
|
||||
ld a, [hl]
|
||||
sbc 999 / $100
|
||||
sbc MAX_STAT_VALUE / $100
|
||||
jp z, .stats_already_max
|
||||
.not_already_max
|
||||
ld a, [hBattleTurn]
|
||||
|
@ -6417,14 +6417,14 @@ CalcStats: ; 3661d
|
|||
|
||||
.check_maxed_out
|
||||
ld a, [hQuotient + 2]
|
||||
cp 999 % $100
|
||||
cp MAX_STAT_VALUE % $100
|
||||
ld a, b
|
||||
sbc 999 / $100
|
||||
sbc MAX_STAT_VALUE / $100
|
||||
jr c, .not_maxed_out
|
||||
|
||||
ld a, 999 % $100
|
||||
ld a, MAX_STAT_VALUE % $100
|
||||
ld [hQuotient + 2], a
|
||||
ld a, 999 / $100
|
||||
ld a, MAX_STAT_VALUE / $100
|
||||
ld [hQuotient + 1], a
|
||||
|
||||
.not_maxed_out
|
||||
|
|
|
@ -54,6 +54,8 @@ NUM_STATS EQU const_value
|
|||
STAT_MIN_NORMAL EQU 5
|
||||
STAT_MIN_HP EQU 10
|
||||
|
||||
MAX_STAT_VALUE EQU 999
|
||||
|
||||
; shiny dvs
|
||||
ATKDEFDV_SHINY EQU $EA
|
||||
SPDSPCDV_SHINY EQU $AA
|
||||
|
|
|
@ -89,6 +89,8 @@ HOF_MON_LENGTH = 1 + 2 + 2 + 1 + (PKMN_NAME_LENGTH +- 1) ; species, id, dvs, lev
|
|||
HOF_LENGTH = 1 + HOF_MON_LENGTH * PARTY_LENGTH + 1 ; win count, party, terminator
|
||||
NUM_HOF_TEAMS = 30
|
||||
|
||||
MAX_LINK_RECORD EQU 9999
|
||||
|
||||
|
||||
; significant money values
|
||||
START_MONEY EQU 3000
|
||||
|
|
|
@ -2147,8 +2147,8 @@ GetHealingItemAmount: ; f395 (3:7395)
|
|||
dbw HYPER_POTION, 200
|
||||
dbw SUPER_POTION, 50
|
||||
dbw POTION, 20
|
||||
dbw MAX_POTION, 999
|
||||
dbw FULL_RESTORE, 999
|
||||
dbw MAX_POTION, MAX_STAT_VALUE
|
||||
dbw FULL_RESTORE, MAX_STAT_VALUE
|
||||
dbw MOOMOO_MILK, 100
|
||||
dbw BERRY, 10
|
||||
dbw GOLD_BERRY, 30
|
||||
|
|
|
@ -1579,9 +1579,9 @@ CalcPkmnStatC: ; e17b
|
|||
jr c, .stat_value_okay
|
||||
|
||||
.max_stat
|
||||
ld a, 999 / $100
|
||||
ld a, MAX_STAT_VALUE / $100
|
||||
ld [hMultiplicand + 1], a
|
||||
ld a, 999 % $100
|
||||
ld a, MAX_STAT_VALUE % $100
|
||||
ld [hMultiplicand + 2], a
|
||||
|
||||
.stat_value_okay
|
||||
|
|
|
@ -58,7 +58,7 @@ CeladonGameCornerFisherScript:
|
|||
buttonsound
|
||||
checkitem COIN_CASE
|
||||
iffalse .NoCoinCase
|
||||
checkcoins 9998
|
||||
checkcoins MAX_COINS - 1
|
||||
if_equal $0, .FullCoinCase
|
||||
stringtotext .coinname, $1
|
||||
scall .GiveCoins
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
ROUTE43GATE_TOLL EQU 1000
|
||||
|
||||
const_value set 2
|
||||
const ROUTE43GATE_OFFICER
|
||||
const ROUTE43GATE_ROCKET1
|
||||
|
@ -48,17 +50,17 @@ RocketScript_Southbound:
|
|||
opentext
|
||||
writetext RocketText_TollFee
|
||||
buttonsound
|
||||
checkmoney $0, 999
|
||||
checkmoney $0, ROUTE43GATE_TOLL - 1
|
||||
if_equal $0, RocketScript_TollSouth
|
||||
jump RocketScript_YoureBrokeSouth
|
||||
|
||||
RocketScript_TollSouth:
|
||||
takemoney $0, 1000
|
||||
takemoney $0, ROUTE43GATE_TOLL
|
||||
writetext RocketText_ThankYou
|
||||
jump RocketScript_ShakeDownSouth
|
||||
|
||||
RocketScript_YoureBrokeSouth:
|
||||
takemoney $0, 1000
|
||||
takemoney $0, ROUTE43GATE_TOLL
|
||||
writetext RocketText_AllYouGot
|
||||
jump RocketScript_ShakeDownSouth
|
||||
|
||||
|
@ -80,17 +82,17 @@ RocketScript_Northbound:
|
|||
opentext
|
||||
writetext RocketText_TollFee
|
||||
buttonsound
|
||||
checkmoney $0, 999
|
||||
checkmoney $0, ROUTE43GATE_TOLL - 1
|
||||
if_equal $0, RocketScript_TollNorth
|
||||
jump RocketScript_YoureBrokeNorth
|
||||
|
||||
RocketScript_TollNorth:
|
||||
takemoney $0, 1000
|
||||
takemoney $0, ROUTE43GATE_TOLL
|
||||
writetext RocketText_ThankYou
|
||||
jump RocketScript_ShakeDownNorth
|
||||
|
||||
RocketScript_YoureBrokeNorth:
|
||||
takemoney $0, 1000
|
||||
takemoney $0, ROUTE43GATE_TOLL
|
||||
writetext RocketText_AllYouGot
|
||||
jump RocketScript_ShakeDownNorth
|
||||
|
||||
|
|
Loading…
Reference in New Issue