diff options
author | ElectroDeoxys <ElectroDeoxys@gmail.com> | 2020-05-08 01:09:47 +0100 |
---|---|---|
committer | ElectroDeoxys <ElectroDeoxys@gmail.com> | 2020-05-08 01:09:47 +0100 |
commit | bf4cc80aa71c401f489cee3027fba09e975a64cd (patch) | |
tree | 9ff80bc87747c3a23a01b914047054ef68b4057e /src | |
parent | 81191863b354193fcefbd6cd2919b362c390a5bd (diff) |
Document Deck AI data structures
Diffstat (limited to 'src')
-rw-r--r-- | src/engine/deck_ai.asm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/engine/deck_ai.asm b/src/engine/deck_ai.asm index dfa6820..15a1025 100644 --- a/src/engine/deck_ai.asm +++ b/src/engine/deck_ai.asm @@ -30,6 +30,36 @@ store_list_pointer: MACRO ld [hl], d
ENDM
+; deck AIs are specialized to work on a given deck ID.
+; they decide what happens during a turn, what Pokemon cards
+; to pick during the start of the duel, etc.
+; each of these have a pointer table with the following structure:
+; dw .do_turn : never called;
+;
+; dw .do_turn : called to handle the main turn logic, from the beginning
+; of the turn up to the attack (or lack thereof);
+;
+; dw .start_duel : called at the start of the duel to initialize some
+; variables and optionally set up CPU hand and deck;
+;
+; dw .forced_switch : logic to determine what Pokemon to pick when there's
+; an effect that forces AI to switch to Bench card;
+;
+; dw .ko_switch : logic for picking which card to use after a KO;
+;
+; dw .take_prize : logic to decide which prize card to pick.
+
+; optionally, decks can also declare card lists that will add
+; more specialized logic during various generic AI routines,
+; and read during the .start_duel routines.
+; the pointers to these lists are stored in memory:
+; wAICardListAvoidPrize : list of cards to avoid being placed as prize;
+; wAICardListArenaPriority : priority list of Arena card at duel start;
+; wAICardListBenchPriority : priority list of Bench cards at duel start;
+; wAICardListPlayFromHandPriority : priority list of cards to play from hand;
+; wAICardListRetreatBonus : scores given to certain cards for retreat;
+; wAICardListEnergyBonus : max number of energy cards and card scores.
+
AIActionTable_GeneralNoRetreat: ; 148dc (5:48dc)
dw .do_turn ; unused
dw .do_turn
|