forked from External/mage
[DOM] Added three cards. Some fixes to rule texts and some more minor fixes.
This commit is contained in:
parent
dddb77b856
commit
041ad9e036
26 changed files with 464 additions and 105 deletions
|
|
@ -27,16 +27,15 @@
|
|||
*/
|
||||
package mage.players;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
|
|
@ -136,6 +135,28 @@ public class Library implements Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
public void putCardThirdFromTheTop(Card card, Game game) {
|
||||
if (card != null && card.getOwnerId().equals(playerId)) {
|
||||
Card cardTop = null;
|
||||
Card cardSecond = null;
|
||||
if (hasCards()) {
|
||||
cardTop = removeFromTop(game);
|
||||
}
|
||||
if (hasCards()) {
|
||||
cardSecond = removeFromTop(game);
|
||||
}
|
||||
putOnTop(card, game);
|
||||
if (cardSecond != null) {
|
||||
putOnTop(cardSecond, game);
|
||||
}
|
||||
if (cardTop != null) {
|
||||
putOnTop(cardTop, game);
|
||||
}
|
||||
} else {
|
||||
game.getPlayer(card.getOwnerId()).getLibrary().putCardThirdFromTheTop(card, game);
|
||||
}
|
||||
}
|
||||
|
||||
public void putOnBottom(Card card, Game game) {
|
||||
if (card.getOwnerId().equals(playerId)) {
|
||||
card.setZone(Zone.LIBRARY, game);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue