Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
effect_script.c
Go to the documentation of this file.
1/* The first object of CARDGAME.PRO, from the start of the code to
2 CARDGAME_runEffectStep (USA). CARDGAME.PRO was four objects:
3 each one's jump tables are aligned to 8 from the start of its own rodata,
4 and they are 4 bytes past a multiple of 8 from 0x80082A04 (USA) to
5 0x80082E30 and from 0x80083294 on. Where each object's code starts is only
6 known to be between the function with the last jump table of the object
7 before and the one with its first. The second and third objects are cut
8 into modules, in their link order (play_checks.c to round.c, then
9 battle_steps.c to fader.c), each with its own rodata, a cut only where
10 each jump table keeps its place. The data is with the objects that read
11 it: effect_script.c's table, then the second object's (data/cardgame_2.c) and
12 the third's (data/cardgame_3.c), whose variables at the end the second
13 object reads too. */
14
16
17/* One field of card effect index (CardEffect): 0 its condition, 1 its play
18 condition, 2 its message, 3 its target, 4 its script's step at offset */
19s32 CARDGAME_getEffectField(s32 index, u32 field, s32 offset) {
20 u8 value = 0;
21
22 switch (field) {
23 case 0:
24 value = CARDGAME_cardEffects[index].condition;
25 break;
26 case 1:
28 break;
29 case 2:
30 value = CARDGAME_cardEffects[index].message;
31 break;
32 case 3:
33 value = CARDGAME_cardEffects[index].target;
34 break;
35 case 4:
36 value = CARDGAME_cardEffects[index].script[offset];
37 break;
38 }
39 return value;
40}
41
42/* The effect script jumps offset steps (effectPos) when the last card played was side value's */
43void CARDGAME_jumpIfLastSide(CardBattle *battle, CardScreen *screen, s32 value, s32 offset) {
44 if (battle->record.plays[battle->record.playCount - 1].side == value) {
45 battle->effectPos += offset;
46 }
47}
48
49/* The effect script jumps offset steps (effectPos) when side holds at most value cards */
50void CARDGAME_jumpIfFewInHand(CardBattle *battle, s32 side, s32 value, s32 offset) {
51 if (value >= battle->sides[side].pile.handCount) {
52 battle->effectPos += offset;
53 }
54}
55
56/* The effect script jumps offset steps (effectPos) when side holds more than value cards */
57void CARDGAME_jumpIfManyInHand(CardBattle *battle, s32 side, s32 value, s32 offset) {
58 if (value < battle->sides[side].pile.handCount) {
59 battle->effectPos += offset;
60 }
61}
62
63/* The effect script jumps offset steps (effectPos) when side's deck has cards left */
64void CARDGAME_jumpIfDeckLeft(CardBattle *battle, s32 side, s32 offset) {
65 if (battle->sides[side].pile.deckCount > 0) {
66 battle->effectPos += offset;
67 }
68}
69
70/* The effect script jumps offset steps (effectPos) when side has fewer than six cards out */
71void CARDGAME_jumpIfSlotFree(CardBattle *battle, s32 side, s32 offset) {
72 if (battle->players[side].slotCount < 6) {
73 battle->effectPos += offset;
74 }
75}
76
77/* Counts effectStep.time down by the frame time; whether it ran out */
80 return battle->effectStep.time <= 0;
81}
82
83/* effectStep.choice becomes the card side which draws next: the player's deck
84 top, or the opponent's first card held back (reserveStart) */
85void CARDGAME_chooseNextDraw(CardBattle *battle, CardScreen *screen, s32 which) {
86 if (which == 0) {
87 battle->effectStep.choice = battle->sides[0].pile.deckTop;
88 } else {
89 battle->effectStep.choice = battle->reserveStart;
90 }
91}
92
93/* Marks (effectStep.marked) the slots whose order is the last card played's target */
95 s32 entry = battle->record.playCount - 1;
96 CardSlot *slot;
97 s32 i;
98
99 for (i = 0; i < 12; i++) {
100 battle->effectStep.marked[i] = 0;
101 if (i < 6) {
102 if (i >= battle->players[0].slotCount) {
103 continue;
104 }
105 slot = &battle->players[0].slots[i];
106 } else {
107 if (i - 6 >= battle->players[1].slotCount) {
108 continue;
109 }
110 slot = &battle->players[1].slots[i - 6];
111 }
112 if (slot->order == battle->record.plays[entry].target) {
113 battle->effectStep.marked[i] = 1;
114 }
115 }
116}
117
118/* Marks the opponent's slot that scoreHand rates highest, and keeps it in effectStep.choice */
120 s32 best = 0;
121 s32 bestIndex = 6;
122 s32 value;
123 s32 i;
124
125 for (i = 0; i < 12; i++) {
126 battle->effectStep.marked[i] = 0;
127 if (i >= 6) {
128 value = battle->scoreHand(battle, 1, 1 << (i - 6));
129 if (best < value) {
130 best = value;
131 battle->effectStep.marked[bestIndex] = 0;
132 bestIndex = i;
133 battle->effectStep.choice = i;
134 battle->effectStep.marked[i] = 1;
135 }
136 }
137 }
138}
139
140/* Effect steps 30-40: CARDGAME_stepColorValue on a colour of the last card's
141 side (30-35) or of the other side (36-40) */
143 u8 a = 0;
144 u8 b = 0;
145 s32 state;
146
147 switch (battle->effectStep.id) {
148 case 30:
149 case 36:
150 b = 0;
151 break;
152 case 31:
153 case 37:
154 b = 1;
155 break;
156 case 32:
157 case 33:
158 case 38:
159 b = 2;
160 break;
161 case 34:
162 case 39:
163 b = 3;
164 break;
165 case 35:
166 case 40:
167 b = 4;
168 break;
169 }
170 state = battle->effectStep.id;
171 if (state >= 30) {
172 if (state < 36) {
173 a = battle->record.plays[battle->record.playCount - 1].side;
174 } else if (state < 41) {
175 a = battle->record.plays[battle->record.playCount - 1].side ^ 1;
176 }
177 }
178 return CARDGAME_stepColorValue(battle, screen, a, b);
179}
180
181/* Starts the effect step battle->effectStep.next asks for: what it shows,
182 moves or waits for before it runs */
183static inline void startEffectStep(CardBattle *battle, CardScreen *screen, s32 side, s32 nextSide, s32 other) {
184 s32 count;
185
186 switch (battle->effectStep.next) {
187 case 1:
188 battle->effectStep.time = 45;
189 break;
190 case 18:
191 CARDGAME_startPlayCard(battle, screen, 0);
192 break;
193 case 19:
194 CARDGAME_startPlayCard(battle, screen, 1);
195 break;
196 case 20:
197 CARDGAME_clearHands(battle, screen);
198 break;
199 case 27:
200 CARDGAME_startSwap(battle, screen);
201 break;
202 case 21:
203 CARDGAME_startAttack(battle, screen, 0);
204 break;
205 case 22:
206 CARDGAME_startAttack(battle, screen, 1);
207 break;
208 case 23:
209 CARDGAME_startDiscardAllSlots(battle, screen, 0);
210 break;
211 case 24:
212 CARDGAME_startDiscardAllSlots(battle, screen, 1);
213 break;
214 case 25:
215 CARDGAME_showSlotTotal(battle, screen, 0);
216 break;
217 case 26:
218 CARDGAME_showSlotTotal(battle, screen, 1);
219 break;
220 case 28:
221 case 29:
222 CARDGAME_startRoundEnd(battle, screen);
223 break;
224 case 30:
225 case 31:
226 case 32:
227 case 34:
228 case 35:
229 CARDGAME_startColorChange(battle, screen, 1, 30);
230 break;
231 case 33:
232 CARDGAME_startColorChange(battle, screen, 2, 30);
233 break;
234 case 36:
235 case 37:
236 case 38:
237 case 39:
238 case 40:
239 CARDGAME_startColorChange(battle, screen, -2, 30);
240 break;
241 case 41:
242 CARDGAME_startColorDrain(battle, screen);
243 break;
244 case 47:
245 CARDGAME_startMessage(battle, screen, 0x39);
246 break;
247 case 48:
248 CARDGAME_startMessage(battle, screen, 0x35);
249 break;
250 case 49:
251 if (side == 0) {
252 CARDGAME_startMessage(battle, screen, 0x3B);
253 }
254 break;
255 case 43:
256 CARDGAME_startClosePanels(battle, screen, 0);
257 break;
258 case 45:
259 CARDGAME_startClosePanels(battle, screen, 1);
260 break;
261 case 44:
262 CARDGAME_startOpenPanels(battle, screen, 0);
263 break;
264 case 46:
265 CARDGAME_startOpenPanels(battle, screen, 1);
266 break;
267 case 62:
268 CARDGAME_showPileCard(battle, screen, other, 0);
269 break;
270 case 63:
271 CARDGAME_showPileCard(battle, screen, side, 0);
272 break;
273 case 64:
274 CARDGAME_showPileCard(battle, screen, other, 1);
275 break;
276 case 65:
277 CARDGAME_startCloseGauge(battle, screen);
278 break;
279 case 66:
280 CARDGAME_takeCardToHand(battle, screen, side, 3);
281 break;
282 case 67:
283 CARDGAME_takeCardToHand(battle, screen, side, 4);
284 break;
285 case 68:
286 CARDGAME_startDiscardCount(battle, screen, side);
287 break;
288 case 69:
289 CARDGAME_startDraw(battle, screen, 2);
290 break;
291 case 70:
292 /* up to three, less what the pile already holds: the match depends
293 on the subtraction being a statement of its own */
294 count = 3;
295 count -= battle->sides[side].pile.handCount;
296 if (count <= 0) {
297 count = 0;
298 }
299 CARDGAME_startDraw(battle, screen, count);
300 break;
301 case 71:
302 CARDGAME_startDraw(battle, screen, 6);
303 break;
304 case 72:
305 CARDGAME_drawMarkedCards(battle, screen, side);
306 break;
307 case 73:
308 CARDGAME_startHandCount(battle, screen, side);
309 break;
310 case 76:
311 CARDGAME_beginStep(battle, screen);
312 break;
313 case 77:
314 case 78:
315 CARDGAME_startSlotSweep(battle, screen);
316 break;
317 case 93:
318 battle->effectStep.state = 1;
319 break;
320 case 90:
321 CARDGAME_startTotals(battle, screen);
322 break;
323 case 79:
324 CARDGAME_putSlotCard(battle, screen, side, 0x50);
325 break;
326 case 80:
327 CARDGAME_putSlotCard(battle, screen, side, 0x51);
328 break;
329 case 81:
330 CARDGAME_putSlotCard(battle, screen, side, 0x52);
331 break;
332 case 82:
333 CARDGAME_putSlotCard(battle, screen, side, 0x53);
334 break;
335 case 83:
336 CARDGAME_putSlotCard(battle, screen, side, 0x54);
337 break;
338 case 84:
339 CARDGAME_putSlotCard(battle, screen, side, 0x55);
340 break;
341 case 85:
342 CARDGAME_putSlotCard(battle, screen, side, 0x56);
343 break;
344 case 86:
345 CARDGAME_takeHandCard(battle, screen, side);
346 break;
347 case 87:
348 CARDGAME_copySlotCard(battle, screen, side);
349 break;
350 case 88:
351 CARDGAME_startSlotEffects(battle, screen, 0);
352 break;
353 case 89:
354 CARDGAME_startSlotEffects(battle, screen, 1);
355 break;
356 case 94:
357 CARDGAME_moveMarkedSlots(battle, screen, 0x000A000A, 1);
358 break;
359 case 95:
360 CARDGAME_moveMarkedSlots(battle, screen, 0x0000001E, 1);
361 break;
362 case 96:
363 CARDGAME_moveMarkedSlots(battle, screen, 0x00320032, 1);
364 break;
365 case 97:
366 CARDGAME_moveMarkedSlots(battle, screen, 0x00140014, 1);
367 break;
368 case 98:
369 CARDGAME_moveMarkedSlots(battle, screen, 0x001E001E, 1);
370 break;
371 case 99:
372 CARDGAME_moveMarkedSlots(battle, screen, 0x0000000A, 1);
373 break;
374 case 100:
375 CARDGAME_moveMarkedSlots(battle, screen, 0x000A0000, 1);
376 break;
377 case 101:
378 CARDGAME_moveMarkedSlots(battle, screen, 0x0000FFC4, 0);
379 break;
380 case 102:
381 CARDGAME_moveMarkedSlots(battle, screen, 0x0000FFF1, 0);
382 break;
383 case 103:
384 CARDGAME_moveMarkedSlots(battle, screen, 0x0000FFE2, 0);
385 break;
386 case 104:
387 CARDGAME_moveMarkedSlots(battle, screen, 0x000AFFF6, 0);
388 break;
389 case 105:
390 CARDGAME_moveMarkedSlots(battle, screen, 0xFF9D0000, 2);
391 break;
392 case 106:
393 battle->fade = 1;
394 battle->effectStep.time = 10;
395 break;
396 case 107:
397 battle->fade = 2;
398 battle->effectStep.time = 10;
399 break;
400 case 108:
401 battle->fade = 3;
402 battle->effectStep.time = 10;
403 break;
404 case 109:
405 battle->fade = 4;
406 battle->effectStep.time = 10;
407 break;
408 case 110:
409 battle->fade = 5;
410 battle->effectStep.time = 15;
411 break;
412 case 111:
413 battle->fade = 6;
414 battle->effectStep.time = 10;
415 break;
416 case 152:
417 CARDGAME_startQuestion(battle, screen, 14);
418 break;
419 case 155:
420 CARDGAME_startPick(battle, screen, battle->sides[0].pile.handCount, 5);
421 break;
422 case 156:
423 CARDGAME_startPick(battle, screen, battle->sides[0].pile.discardCount, 9);
424 break;
425 case 168:
426 CARDGAME_startViewTable(battle, screen);
427 break;
428 case 154:
429 CARDGAME_startHandPick(battle, screen, &battle->sides[0].pile);
430 break;
431 case 157:
432 battle->effectStep.count = 0;
433 break;
434 case 158:
435 CARDGAME_startPanelsStep(battle, screen);
436 break;
437 case 153:
438 CARDGAME_startHandPick(battle, screen, &battle->sides[battle->record.turnSide].pile);
439 break;
440 case 159:
441 case 160:
442 CARDGAME_startStepMessage(battle, screen, 0);
443 break;
444 case 161:
445 CARDGAME_startStepMessage(battle, screen, 1);
446 break;
447 case 162:
448 CARDGAME_startStepMessage(battle, screen, 2);
449 break;
450 case 163:
451 CARDGAME_startStepMessage(battle, screen, 3);
452 break;
453 case 164:
454 CARDGAME_startStepMessage(battle, screen, 4);
455 break;
456 case 165:
457 CARDGAME_startStepMessage(battle, screen, 5);
458 break;
459 case 166:
460 CARDGAME_startStepMessage(battle, screen, 6);
461 break;
462 case 167:
463 CARDGAME_startFirstPick(battle, screen);
464 break;
465 case 172:
466 CARDGAME_setupCardChoice(battle, screen, side, 2);
467 break;
468 case 173:
469 CARDGAME_setupCardChoice(battle, screen, other, 1);
470 break;
471 case 169:
472 CARDGAME_setupCardChoice(battle, screen, other, 0);
473 break;
474 case 170:
475 CARDGAME_setupCardChoice(battle, screen, side, 0);
476 break;
477 case 171:
478 CARDGAME_setupCardChoice(battle, screen, side, 3);
479 break;
480 case 174:
481 CARDGAME_startPickTableCard(battle, screen, 0);
482 break;
483 case 112:
484 CARDGAME_startPileChoice(battle, screen, 0);
485 break;
486 case 113:
487 CARDGAME_startPileChoice(battle, screen, 0x4000);
488 break;
489 case 114:
490 CARDGAME_startPileChoice(battle, screen, 0x2000);
491 break;
492 case 115:
493 CARDGAME_startPileChoice(battle, screen, 0x1);
494 break;
495 case 116:
496 CARDGAME_startPileChoice(battle, screen, 0x4);
497 break;
498 case 117:
499 CARDGAME_startPileChoice(battle, screen, 0x10);
500 break;
501 case 118:
502 CARDGAME_startPileChoice(battle, screen, 0x40);
503 break;
504 case 119:
505 CARDGAME_startPileChoice(battle, screen, 0x100);
506 break;
507 case 120:
508 CARDGAME_startPileChoice(battle, screen, 0x2);
509 break;
510 case 121:
511 CARDGAME_startPileChoice(battle, screen, 0x8);
512 break;
513 case 122:
514 CARDGAME_startPileChoice(battle, screen, 0x20);
515 break;
516 case 123:
517 CARDGAME_startPileChoice(battle, screen, 0x80);
518 break;
519 case 124:
520 CARDGAME_startPileChoice(battle, screen, 0x200);
521 break;
522 case 125:
523 CARDGAME_startPileChoice(battle, screen, 0x3FF);
524 break;
525 case 126:
526 CARDGAME_startPileChoice(battle, screen, 0xF0000);
527 break;
528 case 127:
529 CARDGAME_startPileChoice(battle, screen, 0x8000);
530 break;
531 case 129:
532 CARDGAME_startPileChoice(battle, screen, 0x400);
533 break;
534 case 128:
535 CARDGAME_startPileChoice(battle, screen, 0x1400);
536 break;
537 case 130:
538 CARDGAME_startPileChoice(battle, screen, 0x1000);
539 break;
540 case 131:
541 CARDGAME_startPreviousCardChoice(battle, screen, 0);
542 break;
543 case 132:
544 CARDGAME_startPreviousCardChoice(battle, screen, 1);
545 break;
546 case 141:
547 CARDGAME_startPickTableCard(battle, screen, 1);
548 break;
549 case 142:
550 CARDGAME_showTargetSlots(battle, screen, nextSide, 1);
551 break;
552 case 143:
553 CARDGAME_showTargetSlots(battle, screen, nextSide, 2);
554 break;
555 case 144:
556 CARDGAME_showTargetSlots(battle, screen, nextSide, 3);
557 break;
558 case 145:
559 CARDGAME_showTargetSlots(battle, screen, nextSide, 4);
560 break;
561 case 146:
562 CARDGAME_showTargetSlots(battle, screen, nextSide, 5);
563 break;
564 case 147:
565 CARDGAME_showTargetSlots(battle, screen, nextSide, 6);
566 break;
567 case 148:
568 CARDGAME_showTargetSlots(battle, screen, nextSide, 7);
569 break;
570 case 149:
571 CARDGAME_showTargetSlots(battle, screen, nextSide, 8);
572 break;
573 case 151:
574 CARDGAME_setupSideChoice(battle, screen, nextSide);
575 break;
576 }
577}
578
579/* The effect script goes back four steps (effectPos) when side other holds a
580 card of another colour than 5 */
581static inline void jumpBackForOtherColors(CardBattle *battle, s32 other) {
582 CardDrawer drawer;
583 s32 i;
584
585 initCardDrawer(&drawer);
586 for (i = 0; i < battle->sides[other].pile.handCount; i++) {
587 drawer.setCard(battle->cards[battle->sides[other].pile.hand[i]] + 1);
588 if (drawer.card->color != 5) {
589 battle->effectPos -= 4;
590 break;
591 }
592 }
593}
594
595/* effectStep.choice becomes the first card of side other's hand that can be picked (effectStep.eligible) */
596static inline void chooseFirstEligible(CardBattle *battle, s32 other) {
597 s32 i;
598
599 for (i = 0; i < battle->sides[other].pile.handCount; i++) {
600 if (battle->effectStep.eligible[i] != 0) {
601 battle->effectStep.choice = i;
602 break;
603 }
604 }
605}
606
607/* Ends a step that has an answer: result, once it is no longer -1 */
608static inline void answerOnceDone(CardBattle *battle, s32 result) {
609 if (result != -1) {
610 battle->record.answer = result;
611 battle->run = CARD_RUN_PHASE;
612 }
613}
614
615/* Effect step 141: the player picks a card on the table; the answer is 0 when
616 there was none or the player backed out, or 1 with the picked slot's order as the next play's target */
617static inline void answerTableCardPick(CardBattle *battle, CardScreen *screen) {
618 s32 index;
619
620 switch (CARDGAME_pickTableCard(battle, screen)) {
621 case 1:
622 battle->record.answer = 0;
623 battle->run = CARD_RUN_PHASE;
624 break;
625 case 2:
626 index = battle->effectStep.choice;
627 if (index < 6) {
628 battle->record.plays[battle->record.playCount].target = battle->players[0].slots[index].order;
629 } else {
630 index -= 6;
631 battle->record.plays[battle->record.playCount].target = battle->players[1].slots[index].order;
632 }
633 battle->record.answer = 1;
634 battle->run = CARD_RUN_PHASE;
635 break;
636 }
637}
638
639/* Effect step 151: a card is picked from nextSide's hand; the answer is 0 when
640 the player backed out, or 1 with the picked card as the next play's target */
641static inline void answerHandCardPick(CardBattle *battle, CardScreen *screen, s32 nextSide) {
642 switch (CARDGAME_chooseCard(battle, screen, 1)) {
643 case 1:
644 battle->record.answer = 0;
645 battle->run = CARD_RUN_PHASE;
646 break;
647 case 2:
648 if (nextSide == 0) {
649 battle->record.plays[battle->record.playCount].target = battle->sides[0].pile.hand[battle->effectStep.choice];
650 } else {
651 battle->record.plays[battle->record.playCount].target = battle->sides[1].pile.hand[battle->effectStep.choice];
652 }
653 battle->record.answer = 1;
654 battle->run = CARD_RUN_PHASE;
655 break;
656 }
657}
658
659/* Effect step 152: the yes/no question; the answer is 1 for the first choice, 0 for the second */
660static inline void answerYesNo(CardBattle *battle, CardScreen *screen) {
661 switch (CARDGAME_stepYesNo(battle, screen)) {
662 case 0:
663 break;
664 case 1:
665 battle->record.answer = 1;
666 battle->run = CARD_RUN_PHASE;
667 break;
668 case 2:
669 battle->record.answer = 0;
670 battle->run = CARD_RUN_PHASE;
671 break;
672 }
673}
674
675/* Starts the effect step battle->effectStep.next asks for (startEffectStep), then runs the current one (battle->effectStep.id) */
677 s32 side = battle->record.plays[battle->record.playCount - 1].side;
678 s32 nextSide = battle->record.plays[battle->record.playCount].side;
679 s32 other = side ^ 1;
680 s32 result;
681
682 if (battle->effectStep.next != 0) {
683 startEffectStep(battle, screen, side, nextSide, other);
684 battle->effectStep.id = battle->effectStep.next;
685 battle->effectStep.next = 0;
686 }
687
688 switch (battle->effectStep.id) {
689 case 0:
690 break;
691 case 1:
692 if (CARDGAME_countDown(battle, screen)) {
693 battle->run = CARD_RUN_RESOLVE;
694 }
695 break;
696 case 2:
697 battle->run = CARD_RUN_RESOLVE;
698 battle->effectPos += 2;
699 break;
700 case 3:
701 battle->loopCount = 2;
702 battle->run = CARD_RUN_RESOLVE;
703 battle->loopStart = battle->effectPos;
704 break;
705 case 4:
706 battle->loopCount = 3;
707 battle->run = CARD_RUN_RESOLVE;
708 battle->loopStart = battle->effectPos;
709 break;
710 case 5:
711 battle->loopCount = 5;
712 battle->run = CARD_RUN_RESOLVE;
713 battle->loopStart = battle->effectPos;
714 break;
715 case 6:
716 if (--battle->loopCount > 0) {
717 battle->effectPos = battle->loopStart;
718 }
719 battle->run = CARD_RUN_RESOLVE;
720 break;
721 case 7:
722 CARDGAME_jumpIfLastSide(battle, screen, 1, 1);
723 battle->run = CARD_RUN_RESOLVE;
724 break;
725 case 8:
726 CARDGAME_jumpIfLastSide(battle, screen, 1, 2);
727 battle->run = CARD_RUN_RESOLVE;
728 break;
729 case 15:
730 jumpBackForOtherColors(battle, other);
731 battle->run = CARD_RUN_RESOLVE;
732 break;
733 case 9:
734 CARDGAME_jumpIfFewInHand(battle, side, 10, 9);
735 battle->run = CARD_RUN_RESOLVE;
736 break;
737 case 10:
738 CARDGAME_jumpIfManyInHand(battle, side, 10, -9);
739 battle->run = CARD_RUN_RESOLVE;
740 break;
741 case 11:
742 CARDGAME_jumpIfFewInHand(battle, side, 3, 9);
743 battle->run = CARD_RUN_RESOLVE;
744 break;
745 case 12:
746 CARDGAME_jumpIfManyInHand(battle, side, 3, -9);
747 battle->run = CARD_RUN_RESOLVE;
748 break;
749 case 16:
750 CARDGAME_jumpIfSlotFree(battle, side, 5);
751 battle->run = CARD_RUN_RESOLVE;
752 break;
753 case 13:
754 CARDGAME_jumpIfManyInHand(battle, side, 2, 4);
755 battle->run = CARD_RUN_RESOLVE;
756 break;
757 case 14:
758 CARDGAME_jumpIfDeckLeft(battle, other, 2);
759 battle->run = CARD_RUN_RESOLVE;
760 break;
761 case 17:
762 battle->record.plays[battle->record.playCount - 1].side ^= 1;
763 battle->run = CARD_RUN_RESOLVE;
764 break;
765 case 18:
766 case 19:
767 if (CARDGAME_stepPlayCard(battle, screen)) {
768 battle->run = CARD_RUN_PHASE;
769 }
770 break;
771 case 20:
772 if (CARDGAME_stepStart(battle, screen)) {
773 battle->run = CARD_RUN_PHASE;
774 }
775 break;
776 case 27:
777 if (CARDGAME_stepSwap(battle, screen)) {
778 battle->run = CARD_RUN_PHASE;
779 }
780 break;
781 case 21:
782 if (CARDGAME_stepAttack(battle, screen, 0)) {
783 battle->run = CARD_RUN_PHASE;
784 }
785 break;
786 case 22:
787 if (CARDGAME_stepAttack(battle, screen, 1)) {
788 battle->run = CARD_RUN_PHASE;
789 }
790 break;
791 case 23:
792 if (CARDGAME_stepDiscardAllSlots(battle, screen, 0)) {
793 battle->run = CARD_RUN_PHASE;
794 }
795 break;
796 case 24:
797 if (CARDGAME_stepDiscardAllSlots(battle, screen, 1)) {
798 battle->run = CARD_RUN_PHASE;
799 }
800 break;
801 case 25:
802 if (CARDGAME_stepSlotTotal(battle, screen, 0)) {
803 battle->run = CARD_RUN_PHASE;
804 }
805 break;
806 case 26:
807 if (CARDGAME_stepSlotTotal(battle, screen, 1)) {
808 battle->run = CARD_RUN_PHASE;
809 }
810 break;
811 case 28:
812 if (CARDGAME_stepRoundEnd(battle, screen, 0)) {
813 battle->run = CARD_RUN_PHASE;
814 }
815 break;
816 case 29:
817 if (CARDGAME_stepRoundEnd(battle, screen, 1)) {
818 battle->run = CARD_RUN_PHASE;
819 }
820 break;
821 case 30:
822 case 31:
823 case 32:
824 case 33:
825 case 34:
826 case 35:
827 case 36:
828 case 37:
829 case 38:
830 case 39:
831 case 40:
832 if (CARDGAME_stepEffectColorValue(battle, screen)) {
833 battle->run = CARD_RUN_RESOLVE;
834 }
835 break;
836 case 41:
837 if (CARDGAME_drainColorValues(battle, screen)) {
838 battle->run = CARD_RUN_RESOLVE;
839 }
840 break;
841 case 42:
842 if (CARDGAME_keepLastCard(battle, screen)) {
843 battle->run = CARD_RUN_RESOLVE;
844 }
845 break;
846 case 43:
847 case 45:
848 if (CARDGAME_stepClosePanels(battle, screen)) {
849 battle->run = CARD_RUN_RESOLVE;
850 }
851 break;
852 case 44:
853 case 46:
854 if (CARDGAME_stepOpenPanels(battle, screen)) {
855 battle->run = CARD_RUN_RESOLVE;
856 }
857 break;
858 case 47:
859 if (side != 0) {
860 battle->run = CARD_RUN_RESOLVE;
861 } else if (CARDGAME_waitMessage(battle, screen)) {
862 battle->run = CARD_RUN_RESOLVE;
863 }
864 break;
865 case 48:
866 if (CARDGAME_waitMessage(battle, screen)) {
867 battle->run = CARD_RUN_RESOLVE;
868 }
869 break;
870 case 49:
871 if (side != 0) {
872 battle->run = CARD_RUN_RESOLVE;
873 } else if (CARDGAME_waitMessage(battle, screen)) {
874 battle->run = CARD_RUN_RESOLVE;
875 }
876 break;
877 case 52:
878 CARDGAME_markPileCardsByColor(battle, screen, side, 3, 0xFD);
879 battle->run = CARD_RUN_RESOLVE;
880 break;
881 case 53:
882 CARDGAME_markPileCardsByColor(battle, screen, side, 3, 0xFE);
883 battle->run = CARD_RUN_RESOLVE;
884 break;
885 case 50:
886 CARDGAME_markPileCardsByColor(battle, screen, side, 3, 0xFF);
887 battle->run = CARD_RUN_RESOLVE;
888 break;
889 case 51:
890 CARDGAME_markPileCardsByColor(battle, screen, other, 3, 0xFF);
891 battle->run = CARD_RUN_RESOLVE;
892 break;
893 case 55:
894 CARDGAME_markPileCardsByColor(battle, screen, side, 2, 0xFF);
895 battle->run = CARD_RUN_RESOLVE;
896 break;
897 case 54:
898 CARDGAME_markPileCardsByColor(battle, screen, other, 2, 0xFF);
899 battle->run = CARD_RUN_RESOLVE;
900 break;
901 case 56:
902 CARDGAME_markPileCardsByColor(battle, screen, other, 2, 0x81);
903 battle->run = CARD_RUN_RESOLVE;
904 break;
905 case 57:
906 CARDGAME_markPileCardsByColor(battle, screen, other, 2, 0xBF);
907 battle->run = CARD_RUN_RESOLVE;
908 break;
909 case 58:
910 CARDGAME_markPileCardsByColor(battle, screen, side, 4, 0xFF);
911 battle->run = CARD_RUN_RESOLVE;
912 break;
913 case 59:
914 CARDGAME_markSlotsByColor(battle, screen, side, 0x3FC);
915 battle->run = CARD_RUN_RESOLVE;
916 break;
917 case 60:
918 CARDGAME_markSlotsByColor(battle, screen, side, 0x2FC);
919 battle->run = CARD_RUN_RESOLVE;
920 break;
921 case 61:
922 CARDGAME_markSlotsByColor(battle, screen, side, 0x1FC);
923 battle->run = CARD_RUN_RESOLVE;
924 break;
925 case 62:
926 if (CARDGAME_discardPickedCard(battle, screen, other, 0)) {
927 battle->run = CARD_RUN_RESOLVE;
928 }
929 break;
930 case 63:
931 if (CARDGAME_discardPickedCard(battle, screen, side, 0)) {
932 battle->run = CARD_RUN_RESOLVE;
933 }
934 break;
935 case 64:
936 if (CARDGAME_discardPickedCard(battle, screen, other, 1)) {
937 battle->run = CARD_RUN_RESOLVE;
938 }
939 break;
940 case 65:
941 if (CARDGAME_discardPrevCard(battle, screen)) {
942 battle->prevDiscarded = 1;
943 battle->run = CARD_RUN_RESOLVE;
944 }
945 break;
946 case 66:
947 if (CARDGAME_drawFromDeck(battle, screen, side, 3)) {
948 battle->run = CARD_RUN_RESOLVE;
949 }
950 break;
951 case 67:
952 if (CARDGAME_drawFromDeck(battle, screen, side, 4)) {
953 battle->run = CARD_RUN_RESOLVE;
954 }
955 break;
956 case 68:
957 if (CARDGAME_returnUsedCards(battle, screen, side)) {
958 battle->run = CARD_RUN_RESOLVE;
959 }
960 break;
961 case 69:
962 case 70:
963 case 71:
964 if (CARDGAME_markDrawnCards(battle, screen, side)) {
965 battle->run = CARD_RUN_RESOLVE;
966 }
967 break;
968 case 72:
969 if (CARDGAME_drawNewCards(battle, screen, side)) {
970 battle->run = CARD_RUN_RESOLVE;
971 }
972 break;
973 case 73:
974 if (CARDGAME_discardHand(battle, screen, side)) {
975 battle->run = CARD_RUN_RESOLVE;
976 }
977 break;
978 case 74:
979 chooseFirstEligible(battle, other);
980 battle->run = CARD_RUN_RESOLVE;
981 break;
982 case 75:
983 CARDGAME_chooseNextDraw(battle, screen, other);
984 battle->run = CARD_RUN_RESOLVE;
985 break;
986 case 76:
987 if (CARDGAME_removeMarkedSlots(battle, screen)) {
988 battle->run = CARD_RUN_RESOLVE;
989 }
990 break;
991 case 77:
992 if (CARDGAME_stepSlotSweep(battle, screen, 0)) {
993 battle->run = CARD_RUN_RESOLVE;
994 }
995 break;
996 case 78:
997 if (CARDGAME_stepSlotSweep(battle, screen, 1)) {
998 battle->run = CARD_RUN_RESOLVE;
999 }
1000 break;
1001 case 79:
1002 case 80:
1003 case 81:
1004 case 82:
1005 case 83:
1006 case 84:
1007 case 85:
1008 case 86:
1009 if (CARDGAME_moveSlotCard(battle, screen, side)) {
1010 battle->run = CARD_RUN_RESOLVE;
1011 }
1012 break;
1013 case 87:
1014 if (CARDGAME_flipSlotCard(battle, screen, side)) {
1015 battle->run = CARD_RUN_RESOLVE;
1016 }
1017 break;
1018 case 88:
1019 if (CARDGAME_waitFor(battle, screen, 36)) {
1020 battle->run = CARD_RUN_RESOLVE;
1021 }
1022 break;
1023 case 89:
1024 if (CARDGAME_waitFor(battle, screen, 28)) {
1025 battle->run = CARD_RUN_RESOLVE;
1026 }
1027 break;
1028 case 90:
1029 if (CARDGAME_stepTotals(battle, screen)) {
1030 battle->run = CARD_RUN_RESOLVE;
1031 }
1032 break;
1033 case 91:
1034 CARDGAME_markSlotsOfOrder(battle, screen);
1035 battle->run = CARD_RUN_RESOLVE;
1036 break;
1037 case 92:
1038 CARDGAME_markTargetSlots(battle, screen);
1039 battle->run = CARD_RUN_RESOLVE;
1040 break;
1041 case 93:
1042 result = CARDGAME_countSlotValues(battle, screen);
1043 if (result == 1) {
1044 battle->run = CARD_RUN_RESOLVE;
1045 } else if (result == 2) {
1046 battle->effectStep.next = 77;
1047 }
1048 break;
1049 case 94:
1050 case 95:
1051 case 96:
1052 case 97:
1053 case 98:
1054 case 99:
1055 case 100:
1056 case 101:
1057 case 102:
1058 case 103:
1059 case 104:
1060 case 105:
1061 if (CARDGAME_stepSlotStats(battle, screen)) {
1062 battle->run = CARD_RUN_RESOLVE;
1063 }
1064 break;
1065 case 106:
1066 case 107:
1067 case 108:
1068 case 109:
1069 case 110:
1070 case 111:
1071 if (CARDGAME_countDown(battle, screen)) {
1072 battle->run = CARD_RUN_RESOLVE;
1073 }
1074 break;
1075 case 112:
1076 case 113:
1077 case 114:
1078 case 115:
1079 case 116:
1080 case 117:
1081 case 118:
1082 case 119:
1083 case 120:
1084 case 121:
1085 case 122:
1086 case 123:
1087 case 124:
1088 case 125:
1089 case 126:
1090 answerOnceDone(battle, CARDGAME_stepPileChoice(battle, screen));
1091 break;
1092 case 127:
1093 answerOnceDone(battle, CARDGAME_stepPileChoice(battle, screen));
1094 break;
1095 case 128:
1096 case 129:
1097 case 130:
1098 answerOnceDone(battle, CARDGAME_stepPileChoice(battle, screen));
1099 break;
1100 case 131:
1101 case 132:
1102 answerOnceDone(battle, CARDGAME_stepPreviousCardChoice(battle, screen));
1103 break;
1104 case 135:
1105 CARDGAME_markSlotsByColor(battle, screen, nextSide, 0x180);
1106 battle->effectStep.next = 141;
1107 break;
1108 case 134:
1109 CARDGAME_markSlotsByColor(battle, screen, nextSide, 0x1BC);
1110 battle->effectStep.next = 141;
1111 break;
1112 case 133:
1113 CARDGAME_markSlotsByColor(battle, screen, nextSide, 0x1FC);
1114 battle->effectStep.next = 141;
1115 break;
1116 case 138:
1117 CARDGAME_markSlotsByColor(battle, screen, nextSide, 0x280);
1118 battle->effectStep.next = 141;
1119 break;
1120 case 137:
1121 CARDGAME_markSlotsByColor(battle, screen, nextSide, 0x2BC);
1122 battle->effectStep.next = 141;
1123 break;
1124 case 136:
1125 CARDGAME_markSlotsByColor(battle, screen, nextSide, 0x2FC);
1126 battle->effectStep.next = 141;
1127 break;
1128 case 139:
1129 CARDGAME_markSlotsByColor(battle, screen, nextSide, 0x3FC);
1130 battle->effectStep.next = 141;
1131 break;
1132 case 140:
1133 CARDGAME_markSlotsByColor(battle, screen, nextSide, 0x380);
1134 battle->effectStep.next = 141;
1135 break;
1136 case 141:
1137 answerTableCardPick(battle, screen);
1138 break;
1139 case 152:
1140 answerYesNo(battle, screen);
1141 break;
1142 case 153:
1143 answerOnceDone(battle, CARDGAME_stepChooseCards(battle, screen, &battle->sides[battle->record.turnSide].pile));
1144 break;
1145 case 154:
1146 if (CARDGAME_stepChooseCards(battle, screen, &battle->sides[0].pile) != -1) {
1147 battle->run = CARD_RUN_PHASE;
1148 }
1149 break;
1150 case 157:
1151 if (CARDGAME_pickComputerCards(battle, screen)) {
1152 battle->run = CARD_RUN_PHASE;
1153 }
1154 break;
1155 case 155:
1156 case 156:
1157 if (CARDGAME_stepChooseCards(battle, screen, &battle->sides[0].pile) != -1) {
1158 battle->run = CARD_RUN_MENU;
1159 }
1160 break;
1161 case 168:
1162 if (CARDGAME_viewTable(battle, screen)) {
1163 battle->run = CARD_RUN_MENU;
1164 }
1165 break;
1166 case 158:
1167 if (CARDGAME_stepTally(battle, screen)) {
1168 battle->run = CARD_RUN_PHASE;
1169 }
1170 break;
1171 case 159:
1172 case 160:
1173 case 161:
1174 case 162:
1175 case 163:
1176 case 164:
1177 case 165:
1178 case 166:
1179 if (CARDGAME_stepMessage(battle, screen)) {
1180 battle->run = CARD_RUN_PHASE;
1181 }
1182 break;
1183 case 167:
1184 if (CARDGAME_drawFirstPlayer(battle, screen)) {
1185 battle->run = CARD_RUN_PHASE;
1186 }
1187 break;
1188 case 172:
1189 if (side == 0) {
1190 if (CARDGAME_chooseCard(battle, screen, 2)) {
1191 battle->run = CARD_RUN_RESOLVE;
1192 }
1193 } else {
1194 CARDGAME_pickComputerDeckCard(battle, screen);
1195 battle->run = CARD_RUN_RESOLVE;
1196 }
1197 break;
1198 case 173:
1199 if (side == 0) {
1200 if (CARDGAME_chooseCard(battle, screen, 0)) {
1201 battle->run = CARD_RUN_RESOLVE;
1202 }
1203 } else {
1204 CARDGAME_pickLowestPlayerCard(battle, screen);
1205 battle->run = CARD_RUN_RESOLVE;
1206 }
1207 break;
1208 case 169:
1209 if (side == 0) {
1210 if (CARDGAME_chooseCard(battle, screen, 0)) {
1211 battle->run = CARD_RUN_RESOLVE;
1212 }
1213 } else {
1214 CARDGAME_pickBestPileCard(battle, screen, 1);
1215 battle->run = CARD_RUN_RESOLVE;
1216 }
1217 break;
1218 case 170:
1219 if (side == 0) {
1220 if (CARDGAME_chooseCard(battle, screen, 0)) {
1221 battle->run = CARD_RUN_RESOLVE;
1222 }
1223 } else {
1224 CARDGAME_pickBestPileCard(battle, screen, 0);
1225 battle->run = CARD_RUN_RESOLVE;
1226 }
1227 break;
1228 case 171:
1229 if (side == 0) {
1230 if (CARDGAME_chooseCard(battle, screen, 0)) {
1231 battle->run = CARD_RUN_RESOLVE;
1232 }
1233 } else {
1234 CARDGAME_pickBestPileCard(battle, screen, 1);
1235 battle->run = CARD_RUN_RESOLVE;
1236 }
1237 break;
1238 case 174:
1239 if (side == 0) {
1240 if (CARDGAME_pickTableCard(battle, screen)) {
1241 battle->run = CARD_RUN_RESOLVE;
1242 }
1243 } else {
1245 battle->run = CARD_RUN_RESOLVE;
1246 }
1247 break;
1248 case 142:
1249 case 143:
1250 case 144:
1251 case 145:
1252 case 146:
1253 case 147:
1254 case 148:
1255 case 149:
1256 answerOnceDone(battle, CARDGAME_stepTargetSlots(battle, screen));
1257 break;
1258 case 150:
1259 CARDGAME_markPileCardsByColor(battle, screen, nextSide, 2, 0xFD);
1260 battle->effectStep.next = 151;
1261 break;
1262 case 151:
1263 answerHandCardPick(battle, screen, nextSide);
1264 break;
1265 }
1266}
1267
1268/* The data: the cards' effects, this object's one table */
1270 { 0x91, 0x0A, 0x2F, 0x04, { 0x6A, 0x5C, 0x59, 0x4D, 0x4C } },
1271 { 0x70, 0x00, 0x00, 0x09, { 0x03, 0x10, 0x31, 0x3D, 0xAE, 0x4D, 0x4C, 0x4F, 0x06 } },
1272 { 0x8E, 0x0A, 0x2F, 0x01, { 0x5C, 0x5E } },
1273 { 0x85, 0x09, 0x2F, 0x00, { 0x5B, 0x5F } },
1274 { 0x73, 0x00, 0x00, 0x09, { 0x1E } },
1275 { 0x70, 0x00, 0x00, 0x09, { 0x10, 0x31, 0x3D, 0xAE, 0x4D, 0x4C, 0x50 } },
1276 { 0x92, 0x0A, 0x2F, 0x05, { 0x6B, 0x5C, 0x4E, 0x4C, 0x03, 0x09, 0x08, 0x2F, 0x2B, 0x37, 0xAA, 0x07, 0x2C, 0x3F, 0x0A, 0x11, 0x06 } },
1277 { 0x88, 0x09, 0x2F, 0x00, { 0x10, 0x31, 0x3D, 0xAE, 0x4D, 0x4C, 0x5B, 0x57, 0x4C } },
1278 { 0x83, 0x00, 0x00, 0x09, { 0x41 } },
1279 { 0x8B, 0x09, 0x2F, 0x00, { 0x5B, 0x4E, 0x4C, 0x03, 0x09, 0x08, 0x2F, 0x2B, 0x37, 0xAA, 0x07, 0x2C, 0x3F, 0x0A, 0x11, 0x06 } },
1280 { 0x74, 0x00, 0x00, 0x09, { 0x1F } },
1281 { 0x70, 0x00, 0x00, 0x09, { 0x10, 0x31, 0x3D, 0xAE, 0x4D, 0x4C, 0x51 } },
1282 { 0x93, 0x0A, 0x2F, 0x06, { 0x6C, 0x5C, 0x60 } },
1283 { 0x81, 0x04, 0x00, 0x09, { 0x2D, 0x3A, 0xAB, 0x43, 0x2E } },
1284 { 0x75, 0x00, 0x00, 0x09, { 0x21 } },
1285 { 0x85, 0x09, 0x2F, 0x00, { 0x5B, 0x61 } },
1286 { 0x75, 0x00, 0x00, 0x09, { 0x20 } },
1287 { 0x70, 0x00, 0x00, 0x09, { 0x10, 0x31, 0x3D, 0xAE, 0x4D, 0x4C, 0x52 } },
1288 { 0x94, 0x0A, 0x2F, 0x07, { 0x6D, 0x5C, 0x58, 0x65, 0x4D, 0x4C } },
1289 { 0x95, 0x0A, 0x2F, 0x08, { 0x5C, 0x59, 0x4D, 0x4C } },
1290 { 0x90, 0x0A, 0x2F, 0x03, { 0x5C, 0x58, 0x66, 0x4D, 0x4C } },
1291 { 0x88, 0x09, 0x2F, 0x00, { 0x5B, 0x58, 0x67, 0x4D, 0x4C } },
1292 { 0x76, 0x00, 0x00, 0x09, { 0x22 } },
1293 { 0x70, 0x00, 0x00, 0x09, { 0x10, 0x31, 0x3D, 0xAE, 0x4D, 0x4C, 0x53 } },
1294 { 0x7F, 0x03, 0x3A, 0x09, { 0x6E, 0x39, 0x4A, 0x3E, 0x0F } },
1295 { 0x82, 0x05, 0x35, 0x09, { 0x2D, 0x32, 0xAC, 0x42, 0x2E, 0x09, 0x08, 0x2F, 0x2B, 0x37, 0xAA, 0x07, 0x2C, 0x3F, 0x0A } },
1296 { 0x89, 0x09, 0x2F, 0x00, { 0x5B, 0x59, 0x4D, 0x4C } },
1297 { 0x7F, 0x01, 0x33, 0x09, { 0x07, 0x2F, 0x07, 0x2B, 0x36, 0xA9, 0x07, 0x2C, 0x3E } },
1298 { 0x77, 0x00, 0x00, 0x09, { 0x23 } },
1299 { 0x70, 0x00, 0x00, 0x09, { 0x10, 0x31, 0x3D, 0xAE, 0x4D, 0x4C, 0x54 } },
1300 { 0x90, 0x0A, 0x2F, 0x03, { 0x6F, 0x5C, 0x59, 0x4D, 0x4C } },
1301 { 0x7E, 0x00, 0x00, 0x09, { 0x6F, 0x2A } },
1302 { 0x72, 0x06, 0x35, 0x09, { 0x6F, 0x04, 0x08, 0x2F, 0x2B, 0x33, 0xAD, 0x07, 0x2C, 0x40, 0x0E, 0x30, 0x02, 0x06 } },
1303 { 0x82, 0x05, 0x35, 0x09, { 0x6F, 0x49, 0x2D, 0x47, 0x48, 0x2E } },
1304 { 0x7D, 0x00, 0x00, 0x09, { 0x6F, 0x29 } },
1305 { 0x80, 0x04, 0x00, 0x09, { 0x44 } },
1306 { 0x70, 0x00, 0x00, 0x09, { 0x0D, 0x2D, 0x46, 0x48, 0x2E, 0x0B, 0x08, 0x2F, 0x2B, 0x37, 0xAA, 0x07, 0x2C, 0x3F, 0x0C, 0x11, 0x0D, 0x2D, 0x46, 0x48, 0x2E, 0x0B, 0x08, 0x2F, 0x2B, 0x37, 0xAA, 0x07, 0x2C, 0x3F, 0x0C, 0x11 } },
1307 { 0x72, 0x06, 0x35, 0x09, { 0x05, 0x33, 0x4B, 0x40, 0x0E, 0x30, 0x02, 0x06 } },
1308 { 0x8F, 0x0A, 0x2F, 0x02, { 0x5C, 0x69 } },
1309 { 0x96, 0x0B, 0x2F, 0x09, { 0x10, 0x31, 0x3D, 0xAE, 0x4D, 0x4C, 0x56 } },
1310 { 0x87, 0x09, 0x2F, 0x00, { 0x5B, 0x62 } },
1311 { 0x82, 0x05, 0x35, 0x09, { 0x2D, 0x45, 0x48, 0x2E, 0x09, 0x08, 0x2F, 0x2B, 0x37, 0xAA, 0x07, 0x2C, 0x3F, 0x0A } },
1312 { 0x82, 0x07, 0x36, 0x09, { 0x2D, 0x34, 0xAC, 0x42, 0x2E, 0x09, 0x08, 0x2F, 0x2B, 0x37, 0xAA, 0x07, 0x2C, 0x3F, 0x0A } },
1313 { 0x82, 0x08, 0x37, 0x09, { 0x2D, 0x35, 0xAC, 0x42, 0x2E, 0x09, 0x08, 0x2F, 0x2B, 0x37, 0xAA, 0x07, 0x2C, 0x3F, 0x0A } },
1314 { 0x82, 0x05, 0x35, 0x09, { 0x2D, 0x32, 0xAC, 0x42, 0x2E, 0x08, 0x2F, 0x2B, 0x37, 0xAA, 0x07, 0x2C, 0x3F } },
1315 { 0x72, 0x06, 0x35, 0x09, { 0x03, 0x33, 0x4B, 0x40, 0x0E, 0x30, 0x02, 0x06 } },
1316 { 0x8A, 0x09, 0x2F, 0x00, { 0x5B, 0x58, 0x67, 0x4D, 0x4C } },
1317 { 0x84, 0x00, 0x00, 0x09, { 0x41 } },
1318 { 0x7F, 0x02, 0x38, 0x09, { 0x07, 0x2F, 0x07, 0x2B, 0x38, 0xA9, 0x07, 0x2C, 0x3E } },
1319 { 0x70, 0x00, 0x00, 0x09, { 0x03, 0x10, 0x31, 0x3D, 0xAE, 0x4D, 0x4C, 0x55, 0x06 } },
1320 { 0x78, 0x00, 0x00, 0x09, { 0x24 } },
1321 { 0x79, 0x00, 0x00, 0x09, { 0x25 } },
1322 { 0x7A, 0x00, 0x00, 0x09, { 0x26 } },
1323 { 0x7B, 0x00, 0x00, 0x09, { 0x27 } },
1324 { 0x7C, 0x00, 0x00, 0x09, { 0x28 } },
1325 { 0x8C, 0x09, 0x2F, 0x00, { 0x5B, 0x4E, 0x4C, 0x03, 0x09, 0x08, 0x2F, 0x2B, 0x37, 0xAA, 0x07, 0x2C, 0x3F, 0x0A, 0x11, 0x06 } },
1326 { 0x8B, 0x09, 0x2F, 0x00, { 0x5B, 0x58, 0x68, 0x4D, 0x4C } },
1327 { 0x8A, 0x09, 0x2F, 0x00, { 0x5B, 0x4D, 0x4C } },
1328 { 0x85, 0x09, 0x2F, 0x00, { 0x5B, 0x63 } },
1329 { 0x85, 0x09, 0x2F, 0x00, { 0x5B, 0x64 } },
1330};
s32 CARDGAME_waitMessage(CardBattle *battle, CardScreen *screen)
Waits for the message window to open, for cross or triangle, then for the window to close; 1 once it ...
void CARDGAME_startClosePanels(CardBattle *battle, CardScreen *screen, s32 force)
When the last card was the player's (or force): takes its play off for a while and closes the panels.
s32 CARDGAME_stepClosePanels(CardBattle *battle, CardScreen *screen)
Waits for the panels to close and puts the play back; 1 once done.
void CARDGAME_startMessage(CardBattle *battle, CardScreen *screen, s32 text)
Opens message text for a step.
Definition battle_steps.c:8
s32 CARDGAME_stepOpenPanels(CardBattle *battle, CardScreen *screen)
Waits for the panels to open and puts the play back; 1 once done.
void CARDGAME_startOpenPanels(CardBattle *battle, CardScreen *screen, s32 force)
When the last card was the player's (or force): takes its play off for a while and opens the panels.
s32 CARDGAME_countSlotValues(CardBattle *battle, CardScreen *screen)
Steps each slot's shown values (its sprite's ap and hp) one unit toward the slot's ap and hp,...
CARDGAME.PRO: the card battle (mode 0x700).
s32 CARDGAME_chooseCard(CardBattle *battle, CardScreen *screen, s32 mode)
Lets a player pick a card of a row (set up by CARDGAME_setupCardChoice): 2 once one is picked,...
void CARDGAME_startPreviousCardChoice(CardBattle *battle, CardScreen *screen, s32 mode)
Shows the last card played as sprite 15; with mode 0, or mode 1 and a colour 6 card before it,...
s32 CARDGAME_stepTargetSlots(CardBattle *battle, CardScreen *screen)
The steps of CARDGAME_showTargetSlots: highlights the marked slots (effectStep.marked); confirming ne...
void CARDGAME_setupSideChoice(CardBattle *battle, CardScreen *screen, s32 side)
CARDGAME_setupCardChoice of side, kind 0.
Definition card_choice.c:51
void CARDGAME_pickBestPileCard(CardBattle *battle, CardScreen *screen, s32 lowest)
Sets effectStep.choice to the effectStep.eligible-marked card of the pile effectStep....
s32 CARDGAME_pickComputerCards(CardBattle *battle, CardScreen *screen)
The computer marks (effectStep.marked) the cards of its hand it plays: up to six that can be played,...
void CARDGAME_setupCardChoice(CardBattle *battle, CardScreen *screen, s32 side, s32 kind)
Sets up CARDGAME_chooseCard's choice of one of a side's cards: kind 0 among its hand,...
Definition card_choice.c:8
s32 CARDGAME_stepPreviousCardChoice(CardBattle *battle, CardScreen *screen)
The steps of CARDGAME_startPreviousCardChoice: confirming takes the card before the last one played,...
void CARDGAME_showTargetSlots(CardBattle *battle, CardScreen *screen, s32 owner, s32 target)
Shows the card being played as sprite 15 and lets the slots out that its target picks (a side of owne...
void CARDGAME_startPileChoice(CardBattle *battle, CardScreen *screen, s32 flags)
Shows the card being played as sprite 15 and the panels with flags, and starts CARDGAME_stepPileChoic...
s32 CARDGAME_stepPileChoice(CardBattle *battle, CardScreen *screen)
The steps of CARDGAME_startPileChoice: confirming is allowed when the pile the panel flags (effectSte...
void CARDGAME_pickComputerDeckCard(CardBattle *battle, CardScreen *screen)
The computer's pick from its deck: the first card flagged (effectStep.eligible) from its top up to dr...
void CARDGAME_pickLowestPlayerCard(CardBattle *battle, CardScreen *screen)
Picks the player's card with the lowest CardImage.rank, the strongest.
void initCardDrawer(CardDrawer *obj)
Clears a card drawer, gives it its methods and binds it.
@ CARD_RUN_MENU
Definition battle.h:74
@ CARD_RUN_RESOLVE
the card just played (CARDGAME_resolveCard)
Definition battle.h:73
@ CARD_RUN_PHASE
the battle's phase (CARDGAME_runPhase)
Definition battle.h:71
signed int s32
Definition common.h:11
unsigned int u32
Definition common.h:12
unsigned char u8
Definition common.h:8
GfxState GFX
GFX: the graphics state and its methods.
Definition display.c:209
static void answerYesNo(CardBattle *battle, CardScreen *screen)
Effect step 152: the yes/no question; the answer is 1 for the first choice, 0 for the second.
void CARDGAME_markSlotsOfOrder(CardBattle *battle, CardScreen *screen)
Marks (effectStep.marked) the slots whose order is the last card played's target.
static void jumpBackForOtherColors(CardBattle *battle, s32 other)
The effect script goes back four steps (effectPos) when side other holds a card of another colour tha...
void CARDGAME_jumpIfSlotFree(CardBattle *battle, s32 side, s32 offset)
The effect script jumps offset steps (effectPos) when side has fewer than six cards out.
s32 CARDGAME_stepEffectColorValue(CardBattle *battle, CardScreen *screen)
Effect steps 30-40: CARDGAME_stepColorValue on a colour of the last card's side (30-35) or of the oth...
static void chooseFirstEligible(CardBattle *battle, s32 other)
effectStep.choice becomes the first card of side other's hand that can be picked (effectStep....
static void answerOnceDone(CardBattle *battle, s32 result)
Ends a step that has an answer: result, once it is no longer -1.
void CARDGAME_chooseNextDraw(CardBattle *battle, CardScreen *screen, s32 which)
effectStep.choice becomes the card side which draws next: the player's deck top, or the opponent's fi...
static void answerTableCardPick(CardBattle *battle, CardScreen *screen)
Effect step 141: the player picks a card on the table; the answer is 0 when there was none or the pla...
static void startEffectStep(CardBattle *battle, CardScreen *screen, s32 side, s32 nextSide, s32 other)
Starts the effect step battle->effectStep.next asks for: what it shows, moves or waits for before it ...
void CARDGAME_jumpIfLastSide(CardBattle *battle, CardScreen *screen, s32 value, s32 offset)
The effect script jumps offset steps (effectPos) when the last card played was side value's.
void CARDGAME_runEffectStep(CardBattle *battle, CardScreen *screen)
Starts the effect step battle->effectStep.next asks for (startEffectStep), then runs the current one ...
s32 CARDGAME_countDown(CardBattle *battle, CardScreen *screen)
Counts effectStep.time down by the frame time; whether it ran out.
void CARDGAME_markBestOpponentSlot(CardBattle *battle)
Marks the opponent's slot that scoreHand rates highest, and keeps it in effectStep....
void CARDGAME_jumpIfManyInHand(CardBattle *battle, s32 side, s32 value, s32 offset)
The effect script jumps offset steps (effectPos) when side holds more than value cards.
CardEffect CARDGAME_cardEffects[60]
The data: the cards' effects, this object's one table.
static void answerHandCardPick(CardBattle *battle, CardScreen *screen, s32 nextSide)
Effect step 151: a card is picked from nextSide's hand; the answer is 0 when the player backed out,...
void CARDGAME_jumpIfDeckLeft(CardBattle *battle, s32 side, s32 offset)
The effect script jumps offset steps (effectPos) when side's deck has cards left.
s32 CARDGAME_getEffectField(s32 index, u32 field, s32 offset)
One field of card effect index (CardEffect): 0 its condition, 1 its play condition,...
void CARDGAME_jumpIfFewInHand(CardBattle *battle, s32 side, s32 value, s32 offset)
The effect script jumps offset steps (effectPos) when side holds at most value cards.
s32 CARDGAME_drawFirstPlayer(CardBattle *battle, CardScreen *screen)
The draw for who goes first: the two face-down cards open, the player picks one with left/right and c...
Definition hand_pick.c:891
s32 CARDGAME_stepMessage(CardBattle *battle, CardScreen *screen)
Waits for window 5 to open, then for Cross or Triangle to close it; 1 once it has closed.
Definition hand_pick.c:817
void CARDGAME_startStepMessage(CardBattle *battle, CardScreen *screen, s32 index)
Shows CARDGAME_stepMessages[index]: its message and window 5.
Definition hand_pick.c:808
void CARDGAME_startFirstPick(CardBattle *battle, CardScreen *screen)
Who goes first: cards 0x57 and 0x58 face down, in a random order.
Definition hand_pick.c:858
s32 CARDGAME_stepTally(CardBattle *battle, CardScreen *screen)
Turns the opponent's slot cards over, then counts the panels' ap and hp up to each side's pile apTota...
Definition hand_pick.c:696
s32 CARDGAME_stepChooseCards(CardBattle *battle, CardScreen *screen, CardPile *pile)
Choosing cards of PILE's hand to play: effectStep.nextState queues the next step (startChooseState).
Definition hand_pick.c:564
void CARDGAME_startPick(CardBattle *battle, CardScreen *screen, s32 all, s32 mode)
Starts a pick of the cards (all when all > 0) in mode (anim.next)
Definition hand_pick.c:43
void CARDGAME_startPanelsStep(CardBattle *battle, CardScreen *screen)
Opens the panels for a step.
Definition hand_pick.c:685
void CARDGAME_startHandPick(CardBattle *battle, CardScreen *screen, CardPile *pile)
Starts a pick from pile's hand: flags (effectStep.eligible) the cards that can be played,...
Definition hand_pick.c:10
void CARDGAME_startDiscardCount(CardBattle *battle, CardScreen *screen, s32 side)
Starts a count of side's discards and deck (effectStep.vars[0] and effectStep.vars[1])
s32 CARDGAME_drainColorValues(CardBattle *battle, CardScreen *screen)
Counts both sides' colour values (pile.points) down by one each effectStep.vars[2] frames,...
s32 CARDGAME_drawFromDeck(CardBattle *battle, CardScreen *screen, s32 side, s32 which)
Moves the card just put in the hand into place, then takes card effectStep.choice out of the deck (ta...
void CARDGAME_takeCardToHand(CardBattle *battle, CardScreen *screen, s32 side, s32 which)
Adds card effectStep.choice of a side's discards (which 4) or deck to its hand.
s32 CARDGAME_keepLastCard(CardBattle *battle, CardScreen *screen)
Keeps the last card played in keptCard (as card + 1) and counts it (keptCount); 1.
s32 CARDGAME_discardPickedCard(CardBattle *battle, CardScreen *screen, s32 side, s32 from)
Moves sprite 17 to the side's spot, then puts card effectStep.vars[4] on the side's discards and take...
s32 CARDGAME_returnUsedCards(CardBattle *battle, CardScreen *screen, s32 side)
Counts the panel's discards down into its deck, then puts the side's discards back into its deck; 1 o...
void CARDGAME_startDraw(CardBattle *battle, CardScreen *screen, s32 count)
Starts drawing count cards (effectStep.count)
s32 CARDGAME_markDrawnCards(CardBattle *battle, CardScreen *screen, s32 side)
Marks (effectStep.marked) the cards side draws from its deck: from its top for the player,...
s32 CARDGAME_stepColorValue(CardBattle *battle, CardScreen *screen, s32 side, s32 color)
Moves a side's colour value (pile.points[color]) one step each effectStep.vars[2] frames towards usin...
void CARDGAME_startColorDrain(CardBattle *battle, CardScreen *screen)
Starts CARDGAME_drainColorValues.
s32 CARDGAME_discardHand(CardBattle *battle, CardScreen *screen, s32 side)
Counts a side's hand cards over to its discards on its panel, one every 7 frames, then moves them; 1 ...
void CARDGAME_startCloseGauge(CardBattle *battle, CardScreen *screen)
Closes the gauge of the card before the last one.
void CARDGAME_startColorChange(CardBattle *battle, CardScreen *screen, s32 amount, s32 interval)
Starts CARDGAME_stepColorValue: amount (effectStep.vars[3], below 0 to take) one at a time,...
s32 CARDGAME_discardPrevCard(CardBattle *battle, CardScreen *screen)
Puts the card played before the last one (record.plays[playCount - 2]) on its side's discards once it...
void CARDGAME_drawMarkedCards(CardBattle *battle, CardScreen *screen, s32 side)
Moves side's marked deck cards to its hand and opens its panel.
s32 CARDGAME_drawNewCards(CardBattle *battle, CardScreen *screen, s32 side)
Moves the cards drawn into the hand (from effectStep.vars[4] on) into place one at a time (goToNextCa...
void CARDGAME_startHandCount(CardBattle *battle, CardScreen *screen, s32 side)
Starts a count of side's hand and discards (effectStep.vars[0] and effectStep.vars[1])
Definition pile_effects.c:7
void CARDGAME_showPileCard(CardBattle *battle, CardScreen *screen, s32 side, s32 which)
Shows side's card at effectStep.choice as sprite 17: of its hand (which 0) or its deck (1)
void CARDGAME_startQuestion(CardBattle *battle, CardScreen *screen, s32 value)
Opens the panels and asks message value; the European and Japanese versions start on the second choic...
Definition questions.c:44
s32 CARDGAME_stepYesNo(CardBattle *battle, CardScreen *screen)
Runs the yes/no window that CARDGAME_startQuestion sets up: 1 for the first choice,...
Definition questions.c:155
void CARDGAME_startAttack(CardBattle *battle, CardScreen *screen, s32 side)
Starts CARDGAME_stepAttack: side's apTotal comes off the other side's hpTotal (down to 0),...
Definition round.c:781
void CARDGAME_takeHandCard(CardBattle *battle, CardScreen *screen, s32 side)
Takes the card the last record names out of the side's hand into its next slot and shows it.
Definition round.c:151
s32 CARDGAME_stepSwap(CardBattle *battle, CardScreen *screen)
Swaps the two sides' pile apTotal and hpTotal, counting the panels' ap and hp over to each other,...
Definition round.c:928
void CARDGAME_startTotals(CardBattle *battle, CardScreen *screen)
Starts CARDGAME_stepTotals.
Definition round.c:1163
void CARDGAME_putSlotCard(CardBattle *battle, CardScreen *screen, s32 side, s32 card)
Puts a card in the side's next slot (owned by side 2) and shows it.
Definition round.c:120
s32 CARDGAME_stepSlotSweep(CardBattle *battle, CardScreen *screen, s32 which)
Goes over the marked slots one by one, discarding their cards (which 0) or returning them to the hand...
Definition round.c:16
s32 CARDGAME_stepSlotTotal(CardBattle *battle, CardScreen *screen, s32 side)
Takes the marked slots' sprites away, shows card effectStep.vars[4] in window 2 for 90 frames (or unt...
Definition round.c:1062
s32 CARDGAME_stepAttack(CardBattle *battle, CardScreen *screen, s32 side)
The side's slot cards go over one by one (every 27 frames) while the panels count its attack (CARD_PA...
Definition round.c:804
void CARDGAME_clearHands(CardBattle *battle, CardScreen *screen)
Empties both hands, on the panels with the decks.
Definition round.c:524
void CARDGAME_copySlotCard(CardBattle *battle, CardScreen *screen, s32 side)
Copies the first marked slot card (effectStep.marked) into the side's next slot.
Definition round.c:245
void CARDGAME_showSlotTotal(CardBattle *battle, CardScreen *screen, s32 side)
Adds up the marked slots' ap and hp (at most 99, 20 more for four or more slots) and shows them on sp...
Definition round.c:998
s32 CARDGAME_stepTotals(CardBattle *battle, CardScreen *screen)
Adds up both players' slots' ap and hp and counts the panels' ap and hp over to the totals,...
Definition round.c:1173
s32 CARDGAME_stepStart(CardBattle *battle, CardScreen *screen)
The start of a card battle: deals six cards to each side (dealNextCards), turns them over and counts ...
Definition round.c:670
s32 CARDGAME_stepDiscardAllSlots(CardBattle *battle, CardScreen *screen, s32 side)
Discards side's slot cards from the last to the first; 1 once done.
Definition round.c:878
void CARDGAME_startPlayCard(CardBattle *battle, CardScreen *screen, s32 side)
Shows the card being played as sprite 15 (opening the panels for side 0) and starts moving it to its ...
Definition round.c:358
s32 CARDGAME_flipSlotCard(CardBattle *battle, CardScreen *screen, s32 side)
Waits effectStep.time frames, then flips the side's next slot card over and moves it into place; 1 on...
Definition round.c:293
void CARDGAME_startDiscardAllSlots(CardBattle *battle, CardScreen *screen, s32 side)
Starts CARDGAME_stepDiscardAllSlots from side's last slot.
Definition round.c:871
s32 CARDGAME_moveSlotCard(CardBattle *battle, CardScreen *screen, s32 side)
Moves the side's next slot card into place; 1 once it is there.
Definition round.c:188
s32 CARDGAME_stepRoundEnd(CardBattle *battle, CardScreen *screen, s32 side)
Takes the side's slots away one by one, then moves both sides' hands back into their decks one at a t...
Definition round.c:1237
void CARDGAME_startSlotSweep(CardBattle *battle, CardScreen *screen)
Starts CARDGAME_stepSlotSweep.
Definition round.c:9
void CARDGAME_startRoundEnd(CardBattle *battle, CardScreen *screen)
Starts CARDGAME_stepRoundEnd.
Definition round.c:1226
void CARDGAME_startSwap(CardBattle *battle, CardScreen *screen)
Shows the kept card (keptCard) as sprite 17 for CARDGAME_stepSwap.
Definition round.c:919
s32 CARDGAME_stepPlayCard(CardBattle *battle, CardScreen *screen)
Card 15 goes off and the marked slot cards turn over; it then lands in sprite 12 + CardRecord....
Definition round.c:408
s32 CARDGAME_removeMarkedSlots(CardBattle *battle, CardScreen *screen)
Removes the slots marked in effectStep.marked: slides the cards after them left on screen,...
void CARDGAME_markTargetSlots(CardBattle *battle, CardScreen *screen)
Marks in effectStep.marked the slots out that the last card played applies to, by its target (record....
s32 CARDGAME_markSlotsByColor(CardBattle *battle, CardScreen *screen, s32 side, s32 flags)
Marks in effectStep.eligible the slots of the sides flags picks (0x100 side's own,...
void CARDGAME_beginStep(CardBattle *battle, CardScreen *screen)
Starts a step's first state.
void CARDGAME_startSlotEffects(CardBattle *battle, CardScreen *screen, s32 which)
Starts effect 3 (which 0) or 4 on the flagged cards in play, and plays a sound if there were any.
void CARDGAME_moveMarkedSlots(CardBattle *battle, CardScreen *screen, s32 offset, s32 mode)
Starts moving the marked slots (effectStep.marked) by an offset packed as x << 16 | y.
s32 CARDGAME_waitFor(CardBattle *battle, CardScreen *screen, s32 duration)
Counts effectStep.time up by the frame time; whether it passed duration.
s32 CARDGAME_stepSlotStats(CardBattle *battle, CardScreen *screen)
Counts the marked slots' ap and hp up or down by one a frame (sign of effectStep.vars[0]/effectStep....
s32 CARDGAME_markPileCardsByColor(CardBattle *battle, CardScreen *screen, s32 side, s32 kind, s32 flags)
Marks in effectStep.eligible the cards of a side's hand (kind 2), deck (3) or discards (4) whose colo...
The card battle (CARDGAME_createBattle).
Definition battle.h:226
u8 fade
the fade to start (CARDGAME_fadeColors), plus one
Definition battle.h:251
u8 run
what runs this frame (CARD_RUN_*)
Definition battle.h:238
CardPlayer players[2]
Definition battle.h:275
CardRecord record
Definition battle.h:273
s16 cards[250]
card ids, minus one (CARDGAME_loadCardImages)
Definition battle.h:228
u8 prevDiscarded
the card before the last one played went off too
Definition battle.h:265
s16 loopCount
the effect script's loop: the runs left
Definition battle.h:268
s32(* scoreHand)(struct CardBattle *battle, s32 side, s32 mask)
Definition battle.h:280
s16 effectPos
the step of the card's effect script to run next
Definition battle.h:267
u8 reserveStart
the first card of the opponent's deck held back (group 7)
Definition battle.h:261
CardStep effectStep
Definition battle.h:262
s16 loopStart
and where it starts again
Definition battle.h:269
CardSide sides[2]
Definition battle.h:274
Draws the cards' images (CardImage), from files 0x7E7-0x7EB.
Definition gfx.h:193
void(* setCard)()
(id)
Definition gfx.h:205
CardImage * card
Definition gfx.h:194
A card's effect (CARDGAME_cardEffects), read through CARDGAME_getEffectField.
Definition battle.h:53
u8 playCondition
CARDGAME_checkPlayCondition's.
Definition battle.h:55
u8 script[40]
the effect steps it runs one by one, up to a 0
Definition battle.h:58
u8 condition
for the computer (CARDGAME_checkComputerCondition)
Definition battle.h:54
u8 message
what it shows when the play condition holds
Definition battle.h:56
u8 target
the kind of target of its play (CardPlay.targetKind)
Definition battle.h:57
u8 color
from 1
Definition gfx.h:173
s16 deckCount
the cards left in the deck
Definition battle.h:113
s16 discardCount
Definition battle.h:112
s16 handCount
Definition battle.h:114
s16 deckTop
the index of the deck's top card
Definition battle.h:111
s16 hand[10]
handCount in use
Definition battle.h:119
u8 side
who played it
Definition battle.h:46
u8 target
the slot's order, or the card, it was played on
Definition battle.h:48
CardSlot slots[8]
Definition battle.h:39
u8 slotCount
Definition battle.h:38
s8 answer
a step's result: -1 while waiting, then 0 or 1
Definition battle.h:135
s8 playCount
the plays in use
Definition battle.h:130
u8 turnSide
the side whose turn it is
Definition battle.h:134
CardPlay plays[3]
the cards played this turn, up to three
Definition battle.h:137
The battle screen (created by CARDGAME_createScreen): the two panels, the cards on the table and the ...
Definition screen.h:263
CardPile pile
Definition battle.h:160
A card a player has out (CARDGAME_setSlot)
Definition battle.h:19
u8 order
CardBattle.slotCount when it was added.
Definition battle.h:27
u8 id
the step running
Definition battle.h:144
s32 time
a frame count, or the step's own sub-state
Definition battle.h:148
s8 eligible[0x29]
the cards or slots that can be picked
Definition battle.h:154
u8 count
the cards picked, or to draw
Definition battle.h:152
u8 state
the step's own state
Definition battle.h:146
s8 marked[40]
the cards or slots picked
Definition battle.h:155
s32 choice
the card, slot or answer chosen; -1 for none
Definition battle.h:151
u8 next
the step to start: CARDGAME_runEffectStep sets it up first
Definition battle.h:145
s32(* getFrameTime)(void)
Definition gfx.h:32
GfxFuncs funcs
Definition gfx.h:77
s32 CARDGAME_viewTable(CardBattle *battle, CardScreen *screen)
Lets the player look over the cards out on the table: the two players' rows and the row of the cards ...
Definition table_view.c:284
s32 CARDGAME_pickTableCard(CardBattle *battle, CardScreen *screen)
Lets the player pick a card out on the table (effectStep.flags bit 0: in their own row,...
Definition table_view.c:535
void CARDGAME_startViewTable(CardBattle *battle, CardScreen *screen)
Starts CARDGAME_viewTable.
Definition table_view.c:6
void CARDGAME_startPickTableCard(CardBattle *battle, CardScreen *screen, s32 cancelable)
Starts CARDGAME_pickTableCard, which triangle backs out of when cancelable (effectStep....
Definition table_view.c:356