Skip to content

Wrong description of AI logic #174

@oatspear

Description

@oatspear

; if it's a boss deck, only play double colorless in this situation.

The referenced comment says that Boss Deck AI will only play DCE in that particular situation, but it is actually the opposite. Boss decks skip playing DCE in that block.

; otherwise, look for any card and play it.
; if it's a boss deck, only play double colorless in this situation.
.look_for_any_energy
	ld hl, wDuelTempList
	call CountCardsInDuelTempList
	call ShuffleCards
.loop_2
	ld a, [hli]
	cp $ff
	jr z, .check_if_done
	call CheckIfOpponentHasBossDeckID
	jr nc, .load_card
	push af
	call GetCardIDFromDeckIndex
	ld a, e
	cp DOUBLE_COLORLESS_ENERGY
	pop bc
	jr z, .loop_2
	ld a, b
.load_card
	ldh [hTemp_ffa0], a

As we can see, CheckIfOpponentHasBossDeckID returns carry if it is a Boss Deck. So, the check for DCE at cp DOUBLE_COLORLESS_ENERGY only happens for Boss Decks. If the card is a DCE (jr z, .loop_2), it skips to the next card. The current card is selected for play (ldh [hTemp_ffa0], a) if it is not a DCE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions