forked from External/mage
Rework drawing cards and associated replacement effects; implement [WHO] River Song (#12700)
* remove unused scoring system code * add test for Alms Collector replacement effect * flatten draw cards into single method in PlayerImpl * remove outdated MageAction framework * clarify game event for drawing two or more cards * clarify methods for getting cards from library * implement [WHO] River Song * fix error * adjust library methods * add lots of test cases for draw replacement effects * fix #12616 * track cards drawn this way through multi draw replacement as well * add test for River Song * remove redundant comment
This commit is contained in:
parent
34ae226130
commit
9fcbfdeac6
22 changed files with 645 additions and 345 deletions
|
|
@ -9,6 +9,10 @@ import java.util.UUID;
|
|||
*/
|
||||
public class DrawCardEvent extends GameEvent {
|
||||
|
||||
private boolean fromBottom = false; // for replacement effects that draw from bottom of library instead
|
||||
|
||||
private int cardsDrawn = 0; // for replacement effects to keep track for "cards drawn this way"
|
||||
|
||||
public DrawCardEvent(UUID playerId, Ability source, GameEvent originalDrawEvent) {
|
||||
super(GameEvent.EventType.DRAW_CARD, playerId, null, playerId, 0, false);
|
||||
|
||||
|
|
@ -22,4 +26,21 @@ public class DrawCardEvent extends GameEvent {
|
|||
this.addAppliedEffects(originalDrawEvent.getAppliedEffects());
|
||||
}
|
||||
}
|
||||
|
||||
public void setFromBottom(boolean fromBottom) {
|
||||
this.fromBottom = fromBottom;
|
||||
}
|
||||
|
||||
public boolean isFromBottom() {
|
||||
return fromBottom;
|
||||
}
|
||||
|
||||
public void incrementCardsDrawn(int cardsDrawn) {
|
||||
this.cardsDrawn += cardsDrawn;
|
||||
}
|
||||
|
||||
public int getCardsDrawn() {
|
||||
return cardsDrawn;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue