Added comments that need to be addressed for card draw.

This commit is contained in:
Alex Vasile 2022-07-31 22:50:00 -04:00
parent 2f0d31e734
commit cbbfe5906a
2 changed files with 3 additions and 0 deletions

View file

@ -51,6 +51,7 @@ public class MageDrawAction extends MageAction {
int numDrawn = 0;
int score = 0;
GameEvent event = new DrawCardsEvent(this.player.getId(), source, this.originalDrawEvent, this.amount);
// TODO: This needs a better description of how it works. Why "amount < 2"?
if (amount < 2 || !game.replaceEvent(event)) {
amount = event.getAmount();
for (int i = 0; i < amount; i++) {

View file

@ -374,6 +374,7 @@ public interface Player extends MageItem, Copyable<Player> {
/**
* Draw cards. If you call it in replace events then use method with event.appliedEffects param instead.
* Returns 0 if replacement effect triggers on card draw.
*
* @param num
* @param source can be null for game default draws (non effects, example: start of the turn)
@ -384,6 +385,7 @@ public interface Player extends MageItem, Copyable<Player> {
/**
* Draw cards with applied effects, for replaceEvent
* Returns 0 if replacement effect triggers on card draw.
*
* @param num
* @param source can be null for game default draws (non effects, example: start of the turn)