Skip to content

Commit

Permalink
Port 9bit-related fixes.
Browse files Browse the repository at this point in the history
The reason for this is twofold: if BT parties is to have continued tweaking,
might as well make it 9bit-aware already. Also, this fixes the broken
BT legality checker, and allows you to specify wildmon formes.
  • Loading branch information
FredrIQ committed Feb 13, 2021
1 parent dd44f89 commit e1336d9
Show file tree
Hide file tree
Showing 44 changed files with 4,424 additions and 4,307 deletions.
28 changes: 15 additions & 13 deletions constants/pokemon_data_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ MON_ABILITY EQUS "(wPartyMon1Ability - wPartyMon1)"
MON_NATURE EQUS "(wPartyMon1Nature - wPartyMon1)"
MON_GENDER EQUS "(wPartyMon1Gender - wPartyMon1)"
MON_IS_EGG EQUS "(wPartyMon1IsEgg - wPartyMon1)"
MON_IS_DEAD EQUS "(wPartyMon1IsDead - wPartyMon1)"
MON_EXTSPECIES EQUS "(wPartyMon1ExtSpecies - wPartyMon1)"
MON_FORM EQUS "(wPartyMon1Form - wPartyMon1)"
MON_PP EQUS "(wPartyMon1PP - wPartyMon1)"
MON_HAPPINESS EQUS "(wPartyMon1Happiness - wPartyMon1)"
Expand All @@ -112,19 +112,21 @@ BOXMON_STRUCT_LENGTH EQUS "(wPartyMon1End - wPartyMon1)"
PARTYMON_STRUCT_LENGTH EQUS "(wPartyMon1StatsEnd - wPartyMon1)"

; apply to MON_FORM
SHINY_MASK EQU %10000000
ABILITY_MASK EQU %01100000
NATURE_MASK EQU %00011111
GENDER_MASK EQU %10000000
IS_EGG_MASK EQU %01000000
IS_DEAD_MASK EQU %00100000
FORM_MASK EQU %00011111
SHINY_MASK EQU %10000000
ABILITY_MASK EQU %01100000
NATURE_MASK EQU %00011111
GENDER_MASK EQU %10000000
IS_EGG_MASK EQU %01000000
EXTSPECIES_MASK EQU %00100000
FORM_MASK EQU %00011111
BASEMON_MASK EQU (EXTSPECIES_MASK | FORM_MASK)

HYPER_TRAINING_MASK EQU %11111100

MON_SHINY_F EQU 7
MON_GENDER_F EQU 7
MON_IS_EGG_F EQU 6
MON_SHINY_F EQU 7
MON_GENDER_F EQU 7
MON_IS_EGG_F EQU 6
MON_EXTSPECIES_F EQU 5

; apply to MON_CAUGHTDATA
CAUGHTGENDER_MASK EQU %10000000
Expand Down Expand Up @@ -185,8 +187,8 @@ NUM_HOF_TEAMS = 30
NUM_GRASSMON EQU 7
NUM_WATERMON EQU 3

GRASS_WILDDATA_LENGTH EQU (NUM_GRASSMON * 2 + 1) * 3 + 2
WATER_WILDDATA_LENGTH EQU (NUM_WATERMON * 2 + 1) * 1 + 2
GRASS_WILDDATA_LENGTH EQU (NUM_GRASSMON * 3 + 1) * 3 + 2
WATER_WILDDATA_LENGTH EQU (NUM_WATERMON * 3 + 1) * 1 + 2


SHINY_NUMERATOR EQU 16 ; 16/65536 = 1/4096
Expand Down
20 changes: 10 additions & 10 deletions contents/bank_ends.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
> -- Morimoto, Pokémon Ultra Sun/Ultra Moon
> <https://www.serebii.net/ultrasunultramoon/virtualconsole.shtml>

Free space: 272499/2097152 (12.99%)
Free space: 269314/2097152 (12.84%)

bank end free
$00 $3bf4 $040c
$00 $3c2f $03d1
$01 $8000 $0000
$02 $8000 $0000
$03 $8000 $0000
Expand Down Expand Up @@ -77,10 +77,10 @@ $41 $8000 $0000
$42 $8000 $0000
$43 $8000 $0000
$44 $8000 $0000
$45 $7fff $0001
$45 $8000 $0000
$46 $7fff $0001
$47 $7fff $0001
$48 $7fff $0001
$47 $8000 $0000
$48 $8000 $0000
$49 $8000 $0000
$4a $8000 $0000
$4b $8000 $0000
Expand All @@ -105,21 +105,21 @@ $5d $7fff $0001
$5e $8000 $0000
$5f $8000 $0000
$60 $8000 $0000
$61 $8000 $0000
$62 $8000 $0000
$61 $7fff $0001
$62 $7fff $0001
$63 $8000 $0000
$64 $8000 $0000
$65 $8000 $0000
$66 $8000 $0000
$66 $7fff $0001
$67 $8000 $0000
$68 $8000 $0000
$69 $8000 $0000
$6a $8000 $0000
$6b $8000 $0000
$6b $7fff $0001
$6c $8000 $0000
$6d $8000 $0000
$6e $8000 $0000
$6f $5ba0 $2460
$6f $67d7 $1829
$70 $4000 $4000
$71 $4000 $4000
$72 $4000 $4000
Expand Down
Loading

0 comments on commit e1336d9

Please sign in to comment.