forked from External/mage
Merge remote-tracking branch 'remotes/upstream/master'
This commit is contained in:
commit
e2f6624cc1
2 changed files with 12 additions and 6 deletions
|
|
@ -174,12 +174,14 @@ class AbandonedSarcophagusReplacementEffect extends ReplacementEffectImpl {
|
|||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
cardWasCycledThisTurn = false;
|
||||
cardHasCycling = false;
|
||||
if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD) {
|
||||
if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD
|
||||
&& !game.isSimulation()) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
AbandonedSarcophagusWatcher watcher = (AbandonedSarcophagusWatcher) game.getState().getWatchers().get(AbandonedSarcophagusWatcher.class.getSimpleName());
|
||||
Card card = game.getCard(event.getTargetId());
|
||||
if (card != null
|
||||
&& watcher != null) {
|
||||
&& watcher != null
|
||||
&& card.getOwnerId() == controller.getId()) {
|
||||
for (Ability ability : card.getAbilities()) {
|
||||
if (ability instanceof CyclingAbility) {
|
||||
cardHasCycling = true;
|
||||
|
|
@ -217,9 +219,13 @@ class AbandonedSarcophagusWatcher extends Watcher {
|
|||
|
||||
@Override
|
||||
public void watch(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.CYCLE_CARD) {
|
||||
if (event.getType() == GameEvent.EventType.CYCLE_CARD
|
||||
&& !game.isSimulation()) {
|
||||
Card card = game.getCard(event.getSourceId());
|
||||
if (card != null) {
|
||||
Player controller = game.getPlayer(event.getPlayerId());
|
||||
if (card != null
|
||||
&& controller != null
|
||||
&& card.getOwnerId() == controller.getId()) {
|
||||
Cards c = getCardsCycledThisTurn(event.getPlayerId());
|
||||
c.add(card);
|
||||
cycledCardsThisTurn.put(event.getPlayerId(), c);
|
||||
|
|
|
|||
|
|
@ -35,12 +35,12 @@ import mage.abilities.mana.AnyColorManaAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -50,7 +50,7 @@ public class ElvishHarbinger extends CardImpl {
|
|||
|
||||
static final FilterCard filter = new FilterCard("Elf card");
|
||||
static {
|
||||
filter.add(new SubtypePredicate(SubType.ELEMENTAL));
|
||||
filter.add(new SubtypePredicate(SubType.ELF));
|
||||
}
|
||||
public ElvishHarbinger(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue