mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 02:52:02 -08:00
Added comments that need to be addressed for card draw.
This commit is contained in:
parent
2f0d31e734
commit
cbbfe5906a
2 changed files with 3 additions and 0 deletions
|
|
@ -51,6 +51,7 @@ public class MageDrawAction extends MageAction {
|
||||||
int numDrawn = 0;
|
int numDrawn = 0;
|
||||||
int score = 0;
|
int score = 0;
|
||||||
GameEvent event = new DrawCardsEvent(this.player.getId(), source, this.originalDrawEvent, this.amount);
|
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)) {
|
if (amount < 2 || !game.replaceEvent(event)) {
|
||||||
amount = event.getAmount();
|
amount = event.getAmount();
|
||||||
for (int i = 0; i < amount; i++) {
|
for (int i = 0; i < amount; i++) {
|
||||||
|
|
|
||||||
|
|
@ -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.
|
* 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 num
|
||||||
* @param source can be null for game default draws (non effects, example: start of the turn)
|
* @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
|
* Draw cards with applied effects, for replaceEvent
|
||||||
|
* Returns 0 if replacement effect triggers on card draw.
|
||||||
*
|
*
|
||||||
* @param num
|
* @param num
|
||||||
* @param source can be null for game default draws (non effects, example: start of the turn)
|
* @param source can be null for game default draws (non effects, example: start of the turn)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue