mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 11:49:56 -08:00
commit
906d373e55
12 changed files with 51 additions and 50 deletions
|
|
@ -39,6 +39,7 @@ import mage.abilities.effects.Effect;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
|
|
@ -49,7 +50,6 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ public class AthreosGodOfPassage extends CardImpl {
|
|||
}
|
||||
|
||||
public AthreosGodOfPassage(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{W}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{1}{W}{B}");
|
||||
addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.GOD);
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ class AthreosGodOfPassageReturnEffect extends OneShotEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
UUID creatureId = (UUID) this.getValue("creatureId");
|
||||
Permanent creature = game.getPermanentOrLKIBattlefield(creatureId);
|
||||
Card creature = game.getCard(creatureId);
|
||||
if (creature != null) {
|
||||
Player opponent = game.getPlayer(source.getFirstTarget());
|
||||
boolean paid = false;
|
||||
|
|
@ -133,7 +133,7 @@ class AthreosGodOfPassageReturnEffect extends OneShotEffect {
|
|||
}
|
||||
if (opponent == null || !paid) {
|
||||
if (game.getState().getZone(creature.getId()) == Zone.GRAVEYARD) {
|
||||
controller.moveCards(game.getCard(creatureId), Zone.HAND, source, game);
|
||||
controller.moveCards(creature, Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -171,8 +171,7 @@ class AthreosDiesCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) {
|
||||
Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
|
||||
if (permanent != null && filter.match(permanent, sourceId, controllerId, game)) {
|
||||
if (zEvent.getTarget() != null && filter.match(zEvent.getTarget(), sourceId, controllerId, game)) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setValue("creatureId", event.getTargetId());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ import mage.target.common.TargetCreatureOrPlayer;
|
|||
public class BlazingTorch extends CardImpl {
|
||||
|
||||
public BlazingTorch(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}");
|
||||
this.subtype.add("Equipment");
|
||||
|
||||
// Equipped creature can't be blocked by Vampires or Zombies. (!this is a static ability of the equipment)
|
||||
|
|
@ -95,7 +95,7 @@ class BlazingTorchEvasionEffect extends RestrictionEffect {
|
|||
Permanent equipment = game.getPermanent(source.getSourceId());
|
||||
if (equipment != null && equipment.getAttachedTo() != null) {
|
||||
Permanent equipped = game.getPermanent(equipment.getAttachedTo());
|
||||
if (permanent.getId().equals(equipped.getId())) {
|
||||
if (equipped != null && permanent.getId().equals(equipped.getId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.filter.predicate.mageobject.AnotherCardPredicate;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
/**
|
||||
|
|
@ -47,12 +47,13 @@ import mage.target.common.TargetCardInYourGraveyard;
|
|||
public class CarrionThrash extends CardImpl {
|
||||
|
||||
private static final FilterCreatureCard filter = new FilterCreatureCard("another creature card from your graveyard");
|
||||
|
||||
static {
|
||||
filter.add(new AnotherPredicate());
|
||||
filter.add(new AnotherCardPredicate());
|
||||
}
|
||||
|
||||
public CarrionThrash(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{R}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{R}{G}");
|
||||
this.subtype.add("Viashino");
|
||||
this.subtype.add("Warrior");
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ class ChandraTorchOfDefianceEffect extends OneShotEffect {
|
|||
|
||||
public ChandraTorchOfDefianceEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "Exile the top card of your library. You may cast that card. If you don't, Chandra, Torch of Defiance deals 2 damage to each opponent";
|
||||
this.staticText = "Exile the top card of your library. You may cast that card. If you don't, {this} deals 2 damage to each opponent";
|
||||
}
|
||||
|
||||
public ChandraTorchOfDefianceEffect(final ChandraTorchOfDefianceEffect effect) {
|
||||
|
|
@ -111,17 +111,12 @@ class ChandraTorchOfDefianceEffect extends OneShotEffect {
|
|||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (controller != null && sourceObject != null && controller.getLibrary().hasCards()) {
|
||||
Library library = controller.getLibrary();
|
||||
Card card = library.removeFromTop(game);
|
||||
Card card = library.getFromTop(game);
|
||||
if (card != null) {
|
||||
boolean exiledCardWasCast = false;
|
||||
controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getIdName(), source.getSourceId(), game, Zone.LIBRARY, true);
|
||||
if (!card.getManaCost().isEmpty()) {
|
||||
if (controller.chooseUse(Outcome.Benefit, "Cast the card? (You still pay the costs)", source, game) && !card.isLand()) {
|
||||
// LinkedHashMap<UUID, ActivatedAbility> useableAbilities = controller.getUseableActivatedAbilities(card, Zone.EXILED, game);
|
||||
// for (ActivatedAbility ability : useableAbilities.values()) {
|
||||
//
|
||||
// }
|
||||
// controller.activateAbility(useableAbilities, game);
|
||||
exiledCardWasCast = controller.cast(card.getSpellAbility(), game, false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class WildfireEternalCastEffect extends OneShotEffect {
|
|||
|
||||
public WildfireEternalCastEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = " you may cast an instant or sorcery card from your hand without paying its mana cost.";
|
||||
this.staticText = "you may cast an instant or sorcery card from your hand without paying its mana cost";
|
||||
}
|
||||
|
||||
public WildfireEternalCastEffect(final WildfireEternalCastEffect effect) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue