mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
"Implement" Ante
This commit is contained in:
parent
1592a9d173
commit
2666b6b3e2
4 changed files with 64 additions and 3 deletions
38
Mage.Sets/src/mage/cards/a/AmuletOfQuoz.java
Normal file
38
Mage.Sets/src/mage/cards/a/AmuletOfQuoz.java
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.InfoEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noahg
|
||||
*/
|
||||
public final class AmuletOfQuoz extends CardImpl {
|
||||
|
||||
public AmuletOfQuoz(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}");
|
||||
|
||||
|
||||
// Remove Amulet of Quoz from your deck before playing if you're not playing for ante.
|
||||
// {T}, Sacrifice Amulet of Quoz: Target opponent may ante the top card of their library. If they don’t, you flip a coin. If you win the flip, that player loses the game. If you lose the flip, you lose the game. Activate this ability only during your upkeep.
|
||||
this.getSpellAbility().addEffect(new InfoEffect("Remove Amulet of Quoz from your deck before playing if " +
|
||||
"you're not playing for ante.\nSacrifice Amulet of Quoz: Target opponent may ante the top card of " +
|
||||
"their library. If they don’t, you flip a coin. If you win the flip, that player loses the game. If " +
|
||||
"you lose the flip, you lose the game. Activate this ability only during your upkeep."));
|
||||
}
|
||||
|
||||
public AmuletOfQuoz(final AmuletOfQuoz card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AmuletOfQuoz copy() {
|
||||
return new AmuletOfQuoz(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -30,6 +30,7 @@ public final class IceAge extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Adarkar Wastes", 351, Rarity.RARE, mage.cards.a.AdarkarWastes.class));
|
||||
cards.add(new SetCardInfo("Aegis of the Meek", 307, Rarity.RARE, mage.cards.a.AegisOfTheMeek.class));
|
||||
cards.add(new SetCardInfo("Altar of Bone", 281, Rarity.RARE, mage.cards.a.AltarOfBone.class));
|
||||
cards.add(new SetCardInfo("Amulet of Quoz", 308, Rarity.RARE, mage.cards.a.AmuletOfQuoz.class));
|
||||
cards.add(new SetCardInfo("Anarchy", 170, Rarity.UNCOMMON, mage.cards.a.Anarchy.class));
|
||||
cards.add(new SetCardInfo("Arenson's Aura", 3, Rarity.COMMON, mage.cards.a.ArensonsAura.class));
|
||||
cards.add(new SetCardInfo("Armor of Faith", 4, Rarity.COMMON, mage.cards.a.ArmorOfFaith.class));
|
||||
|
|
|
|||
|
|
@ -75,6 +75,10 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
|
||||
private static final Logger logger = Logger.getLogger(GameImpl.class);
|
||||
|
||||
private static final Set<String> ANTE_CARDS = new HashSet<>(Arrays.asList("Amulet of Quoz", "Bronze Tablet",
|
||||
"Contract from Below", "Darkpact", "Demonic Attorney", "Jeweled Bird", "Rebirth", "Tempest Efreet",
|
||||
"Timmerian Fiends"));
|
||||
|
||||
private transient Object customData;
|
||||
protected boolean simulation = false;
|
||||
|
||||
|
|
@ -887,9 +891,29 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
initTimer(player.getId());
|
||||
}
|
||||
}
|
||||
|
||||
//Ante
|
||||
for (Player player : state.getPlayers().values()) {
|
||||
List<Card> cardsInLibrary = player.getLibrary().getCards(this);
|
||||
for (Card card : cardsInLibrary){
|
||||
if (ANTE_CARDS.contains(card.getName())){
|
||||
fireInformEvent("Removed "+card.getIdName()+" from "+player.getName()+"'s deck (not playing for ante).");
|
||||
player.getLibrary().remove(card.getId(), this);
|
||||
}
|
||||
}
|
||||
Set<Card> cardsInSideboard = player.getSideboard().getCards(this);
|
||||
for (Card card : cardsInSideboard){
|
||||
if (ANTE_CARDS.contains(card.getName())){
|
||||
fireInformEvent("Removed "+card.getIdName()+" from "+player.getName()+"'s sideboard (not playing for ante).");
|
||||
player.getSideboard().remove(card);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (startMessage == null || startMessage.isEmpty()) {
|
||||
startMessage = "Game has started";
|
||||
}
|
||||
|
||||
fireStatusEvent(startMessage, false);
|
||||
|
||||
saveState(false);
|
||||
|
|
|
|||
|
|
@ -148,9 +148,7 @@ public class Library implements Serializable {
|
|||
|
||||
public void set(Library newLibrary) {
|
||||
library.clear();
|
||||
for (UUID card : newLibrary.getCardList()) {
|
||||
library.add(card);
|
||||
}
|
||||
library.addAll(newLibrary.getCardList());
|
||||
}
|
||||
|
||||
public List<UUID> getCardList() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue