Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
play_checks.c File Reference

CARDGAME's opponent card order and the checks of whether a card can be played. More...

Include dependency graph for play_checks.c:

Go to the source code of this file.

Functions

void CARDGAME_sortOpponentCards (CardBattle *battle)
 Sorts the opponent's cards by opponentDraws[].order, then swaps card effectStep.choice to reserveStart.
 
s32 CARDGAME_canPlayCardKind (CardBattle *battle, s32 index)
 Whether card index can be played in this phase by its kind: any kind but 0 in CARD_PHASE_PLAYS_AFTER, kind 2 in CARD_PHASE_PLAYS_BEFORE.
 
s32 CARDGAME_canPlayCard (CardBattle *battle, u8 *points, s32 card)
 Whether a card can be played: in CARD_PHASE_PUT_OUT a kind 0x10 card needs as many points of its colour (points), otherwise CARDGAME_canPlayCardKind.
 

Detailed Description

CARDGAME's opponent card order and the checks of whether a card can be played.

Definition in file play_checks.c.

Function Documentation

◆ CARDGAME_sortOpponentCards()

void CARDGAME_sortOpponentCards ( CardBattle *  battle)

Sorts the opponent's cards by opponentDraws[].order, then swaps card effectStep.choice to reserveStart.

Definition at line 7 of file play_checks.c.

Referenced by takePickedCard().

Here is the caller graph for this function:

◆ CARDGAME_canPlayCardKind()

s32 CARDGAME_canPlayCardKind ( CardBattle *  battle,
s32  index 
)

Whether card index can be played in this phase by its kind: any kind but 0 in CARD_PHASE_PLAYS_AFTER, kind 2 in CARD_PHASE_PLAYS_BEFORE.

Definition at line 39 of file play_checks.c.

Referenced by CARDGAME_canPlayCard(), and CARDGAME_pickComputerCard().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CARDGAME_canPlayCard()

s32 CARDGAME_canPlayCard ( CardBattle *  battle,
u8 *  points,
s32  card 
)

Whether a card can be played: in CARD_PHASE_PUT_OUT a kind 0x10 card needs as many points of its colour (points), otherwise CARDGAME_canPlayCardKind.

Definition at line 57 of file play_checks.c.

Referenced by CARDGAME_flagPlayableCards(), CARDGAME_pickComputerCards(), CARDGAME_startHandPick(), CARDGAME_startQuestion(), showHandAfterMenu(), and startChooseState().

Here is the call graph for this function:
Here is the caller graph for this function: