mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
updated Gold token errata
This commit is contained in:
parent
991200256a
commit
3d991635e8
6 changed files with 50 additions and 62 deletions
|
@ -1,9 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EnchantedPlayerAttackedTriggeredAbility;
|
import mage.abilities.common.EnchantedPlayerAttackedTriggeredAbility;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
|
@ -23,8 +19,11 @@ import mage.players.Player;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Saga
|
* @author Saga
|
||||||
*/
|
*/
|
||||||
public final class CurseOfOpulence extends CardImpl {
|
public final class CurseOfOpulence extends CardImpl {
|
||||||
|
@ -44,7 +43,7 @@ public final class CurseOfOpulence extends CardImpl {
|
||||||
this.addAbility(new EnchantedPlayerAttackedTriggeredAbility(new CurseOfOpulenceEffect()));
|
this.addAbility(new EnchantedPlayerAttackedTriggeredAbility(new CurseOfOpulenceEffect()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CurseOfOpulence(final CurseOfOpulence card) {
|
private CurseOfOpulence(final CurseOfOpulence card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,12 +57,10 @@ class CurseOfOpulenceEffect extends OneShotEffect {
|
||||||
|
|
||||||
CurseOfOpulenceEffect() {
|
CurseOfOpulenceEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
this.staticText = "create a colorless artifact token named Gold. It has "
|
this.staticText = "create a Gold token. Each opponent attacking that player does the same.";
|
||||||
+ "\"sacrifice this artifact: Add one mana of any color.\" "
|
|
||||||
+ "Each opponent attacking that player does the same.";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CurseOfOpulenceEffect(final CurseOfOpulenceEffect effect) {
|
private CurseOfOpulenceEffect(final CurseOfOpulenceEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,28 +72,28 @@ class CurseOfOpulenceEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
Permanent enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||||
if (enchantment != null) {
|
if (enchantment == null) {
|
||||||
Player enchantedPlayer = game.getPlayer(enchantment.getAttachedTo());
|
return false;
|
||||||
if (enchantedPlayer != null) {
|
|
||||||
Set<UUID> players = new HashSet<>();
|
|
||||||
for (UUID attacker : game.getCombat().getAttackers()) {
|
|
||||||
UUID defender = game.getCombat().getDefenderId(attacker);
|
|
||||||
if (defender.equals(enchantedPlayer.getId())
|
|
||||||
&& game.getPlayer(source.getControllerId()).hasOpponent(game.getPermanent(attacker).getControllerId(), game)) {
|
|
||||||
players.add(game.getPermanent(attacker).getControllerId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
players.add(source.getControllerId());
|
|
||||||
for (UUID player : players) {
|
|
||||||
game.getPlayer(player);
|
|
||||||
Effect effect = new CreateTokenTargetEffect(new GoldToken());
|
|
||||||
effect.setTargetPointer(new FixedTarget(player));
|
|
||||||
effect.apply(game, source);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
Player enchantedPlayer = game.getPlayer(enchantment.getAttachedTo());
|
||||||
|
if (enchantedPlayer == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Set<UUID> players = new HashSet<>();
|
||||||
|
for (UUID attacker : game.getCombat().getAttackers()) {
|
||||||
|
UUID defender = game.getCombat().getDefenderId(attacker);
|
||||||
|
if (defender.equals(enchantedPlayer.getId())
|
||||||
|
&& game.getPlayer(source.getControllerId()).hasOpponent(game.getPermanent(attacker).getControllerId(), game)) {
|
||||||
|
players.add(game.getPermanent(attacker).getControllerId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
players.add(source.getControllerId());
|
||||||
|
for (UUID player : players) {
|
||||||
|
game.getPlayer(player);
|
||||||
|
Effect effect = new CreateTokenTargetEffect(new GoldToken());
|
||||||
|
effect.setTargetPointer(new FixedTarget(player));
|
||||||
|
effect.apply(game, source);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.ExileTargetEffect;
|
import mage.abilities.effects.common.ExileTargetEffect;
|
||||||
|
@ -11,22 +9,21 @@ import mage.constants.CardType;
|
||||||
import mage.game.permanent.token.GoldToken;
|
import mage.game.permanent.token.GoldToken;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public final class Gild extends CardImpl {
|
public final class Gild extends CardImpl {
|
||||||
|
|
||||||
public Gild(UUID ownerId, CardSetInfo setInfo) {
|
public Gild(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
|
||||||
|
|
||||||
|
|
||||||
// Exile target creature.
|
// Exile target creature.
|
||||||
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
||||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
// Create a colorless artifact token named Gold. It has "Sacrifice this artifact: Add one mana of any color."
|
// Create a colorless artifact token named Gold. It has "Sacrifice this artifact: Add one mana of any color."
|
||||||
Effect effect = new CreateTokenEffect(new GoldToken());
|
Effect effect = new CreateTokenEffect(new GoldToken());
|
||||||
effect.setText("Create a colorless artifact token named Gold. It has \"Sacrifice this artifact: Add one mana of any color.\"");
|
|
||||||
this.getSpellAbility().addEffect(effect);
|
this.getSpellAbility().addEffect(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.k;
|
package mage.cards.k;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
|
@ -34,7 +33,7 @@ public final class KingMacarTheGoldCursed extends CardImpl {
|
||||||
Ability ability = new InspiredAbility(new ExileTargetEffect(), true);
|
Ability ability = new InspiredAbility(new ExileTargetEffect(), true);
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
Effect effect = new CreateTokenEffect(new GoldToken());
|
Effect effect = new CreateTokenEffect(new GoldToken());
|
||||||
effect.setText("If you do, create a colorless artifact token named Gold. It has \"Sacrifice this artifact: Add one mana of any color.\"");
|
effect.setText("If you do, create a Gold token");
|
||||||
ability.addEffect(effect);
|
ability.addEffect(effect);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,10 +54,7 @@ public final class TheFirstIroanGames extends CardImpl {
|
||||||
sagaAbility.addHint(FerociousHint.instance);
|
sagaAbility.addHint(FerociousHint.instance);
|
||||||
|
|
||||||
// IV — Create a Gold token.
|
// IV — Create a Gold token.
|
||||||
sagaAbility.addChapterEffect(
|
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_IV, new CreateTokenEffect(new GoldToken()));
|
||||||
this, SagaChapter.CHAPTER_IV, new CreateTokenEffect(new GoldToken())
|
|
||||||
.setText("create a Gold token")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TheFirstIroanGames(final TheFirstIroanGames card) {
|
private TheFirstIroanGames(final TheFirstIroanGames card) {
|
||||||
|
|
|
@ -43,6 +43,7 @@ public enum SubType {
|
||||||
EQUIPMENT("Equipment", SubTypeSet.ArtifactType),
|
EQUIPMENT("Equipment", SubTypeSet.ArtifactType),
|
||||||
FOOD("Food", SubTypeSet.ArtifactType),
|
FOOD("Food", SubTypeSet.ArtifactType),
|
||||||
FORTIFICATION("Fortification", SubTypeSet.ArtifactType),
|
FORTIFICATION("Fortification", SubTypeSet.ArtifactType),
|
||||||
|
GOLD("Gold", SubTypeSet.ArtifactType),
|
||||||
TREASURE("Treasure", SubTypeSet.ArtifactType),
|
TREASURE("Treasure", SubTypeSet.ArtifactType),
|
||||||
VEHICLE("Vehicle", SubTypeSet.ArtifactType),
|
VEHICLE("Vehicle", SubTypeSet.ArtifactType),
|
||||||
// 205.3m : Creatures and tribals share their lists of subtypes; these subtypes are called creature types.
|
// 205.3m : Creatures and tribals share their lists of subtypes; these subtypes are called creature types.
|
||||||
|
|
|
@ -1,41 +1,38 @@
|
||||||
|
|
||||||
|
|
||||||
package mage.game.permanent.token;
|
package mage.game.permanent.token;
|
||||||
|
|
||||||
|
import mage.abilities.costs.Cost;
|
||||||
|
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||||
|
import mage.abilities.mana.AnyColorManaAbility;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
|
||||||
import mage.abilities.effects.mana.AddManaOfAnyColorEffect;
|
|
||||||
import mage.abilities.mana.SimpleManaAbility;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public final class GoldToken extends TokenImpl {
|
public final class GoldToken extends TokenImpl {
|
||||||
|
|
||||||
static final private List<String> tokenImageSets = new ArrayList<>();
|
static final private List<String> tokenImageSets = new ArrayList<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
tokenImageSets.addAll(Arrays.asList("BNG", "C17"));
|
tokenImageSets.addAll(Arrays.asList("BNG", "C17", "THB"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public GoldToken() {
|
public GoldToken() {
|
||||||
this((String)null);
|
super("Gold", "Gold token");
|
||||||
}
|
|
||||||
|
|
||||||
public GoldToken(String setCode) {
|
|
||||||
super("Gold", "colorless artifact token named Gold with \"Sacrifice this artifact: Add one mana of any color.\"");
|
|
||||||
availableImageSetCodes = tokenImageSets;
|
availableImageSetCodes = tokenImageSets;
|
||||||
setOriginalExpansionSetCode(setCode);
|
|
||||||
cardType.add(CardType.ARTIFACT);
|
cardType.add(CardType.ARTIFACT);
|
||||||
|
subtype.add(SubType.GOLD);
|
||||||
|
|
||||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new SacrificeSourceCost()));
|
Cost cost = new SacrificeSourceCost();
|
||||||
|
cost.setText("Sacrifice this artifact");
|
||||||
|
this.addAbility(new AnyColorManaAbility(cost));
|
||||||
}
|
}
|
||||||
|
|
||||||
public GoldToken(final GoldToken token) {
|
private GoldToken(final GoldToken token) {
|
||||||
super(token);
|
super(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue