Skip to content

Commit

Permalink
Merge pull request #156 from ElectroDeoxys/ai_documentation
Browse files Browse the repository at this point in the history
Identify AI info in card data, rename AI score routines
  • Loading branch information
dannye authored Nov 16, 2024
2 parents e79d8c3 + 061ea37 commit 94c3d86
Show file tree
Hide file tree
Showing 18 changed files with 562 additions and 524 deletions.
4 changes: 2 additions & 2 deletions bugs_and_glitches.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ DetermineAIScoreOfAttackEnergyRequirement:
jr nc, .check_evolution
.atk_kos_defending
ld a, 20
call AddToAIScore
call AIEncourage

-; this is possibly a bug.
-; this is an identical check as above to test whether this card is active.
Expand All @@ -72,7 +72,7 @@ DetermineAIScoreOfAttackEnergyRequirement:
or a
jr nz, .check_evolution
ld a, 10
call AddToAIScore
call AIEncourage
...
```

Expand Down
14 changes: 12 additions & 2 deletions src/constants/card_data_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ DEF CARD_DATA_WEAKNESS EQU $33
DEF CARD_DATA_RESISTANCE EQU $34
DEF CARD_DATA_CATEGORY EQU $35
DEF CARD_DATA_POKEDEX_NUMBER EQU $37
DEF CARD_DATA_UNKNOWN1 EQU $38
DEF CARD_DATA_UNUSED EQU $38
DEF CARD_DATA_LEVEL EQU $39
DEF CARD_DATA_LENGTH EQU $3a
DEF CARD_DATA_WEIGHT EQU $3c
DEF CARD_DATA_PKMN_DESCRIPTION EQU $3e
DEF CARD_DATA_UNKNOWN2 EQU $40
DEF CARD_DATA_AI_INFO EQU $40

DEF PKMN_CARD_DATA_LENGTH EQU $41

Expand Down Expand Up @@ -251,3 +251,13 @@ DEF SECOND_ATTACK EQU $1
; has limit on attached energy cards boost.
DEF MAX_ENERGY_BOOST_IS_LIMITED EQU $2
DEF MAX_ENERGY_BOOST_IS_NOT_LIMITED EQU $3

; CARD_DATA_AI_INFO constants
DEF AI_INFO_BENCH_UTILITY EQU $1
DEF AI_INFO_ENCOURAGE_EVO EQU $2
DEF AI_INFO_UNK_03 EQU $3
DEF AI_INFO_UNK_05 EQU $5
DEF AI_INFO_UNK_08 EQU $8

DEF HAS_EVOLUTION_F EQU 4
DEF HAS_EVOLUTION EQU 1 << HAS_EVOLUTION_F
Loading

0 comments on commit 94c3d86

Please sign in to comment.