mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Implemented Jace, Arcane Strategist
This commit is contained in:
parent
108fba8ab6
commit
249b7528ff
2 changed files with 109 additions and 0 deletions
108
Mage.Sets/src/mage/cards/j/JaceArcaneStrategist.java
Normal file
108
Mage.Sets/src/mage/cards/j/JaceArcaneStrategist.java
Normal file
|
@ -0,0 +1,108 @@
|
|||
package mage.cards.j;
|
||||
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedAllEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class JaceArcaneStrategist extends CardImpl {
|
||||
|
||||
public JaceArcaneStrategist(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{U}{U}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.JACE);
|
||||
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4));
|
||||
|
||||
// Whenever you draw your second card each turn, put a +1/+1 counter on target creature you control.
|
||||
this.addAbility(new JaceArcaneStrategistTriggeredAbility());
|
||||
|
||||
// +1: Draw a card.
|
||||
this.addAbility(new LoyaltyAbility(new DrawCardSourceControllerEffect(1), 1));
|
||||
|
||||
// -7: Creatures you control can't be blocked this turn.
|
||||
this.addAbility(new LoyaltyAbility(new CantBeBlockedAllEffect(
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE, Duration.EndOfTurn
|
||||
), -7));
|
||||
}
|
||||
|
||||
private JaceArcaneStrategist(final JaceArcaneStrategist card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JaceArcaneStrategist copy() {
|
||||
return new JaceArcaneStrategist(this);
|
||||
}
|
||||
}
|
||||
|
||||
class JaceArcaneStrategistTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private boolean triggeredOnce = false;
|
||||
private boolean triggeredTwice = false;
|
||||
|
||||
JaceArcaneStrategistTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), false);
|
||||
this.addTarget(new TargetControlledCreaturePermanent());
|
||||
}
|
||||
|
||||
private JaceArcaneStrategistTriggeredAbility(final JaceArcaneStrategistTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.triggeredOnce = ability.triggeredOnce;
|
||||
this.triggeredTwice = ability.triggeredTwice;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DREW_CARD
|
||||
|| event.getType() == GameEvent.EventType.END_PHASE_POST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.END_PHASE_POST) {
|
||||
triggeredOnce = triggeredTwice = false;
|
||||
return false;
|
||||
}
|
||||
if (event.getType() == GameEvent.EventType.DREW_CARD
|
||||
&& event.getPlayerId().equals(controllerId)) {
|
||||
if (triggeredOnce) {
|
||||
if (triggeredTwice) {
|
||||
return false;
|
||||
} else {
|
||||
triggeredTwice = true;
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
triggeredOnce = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you draw your second card each turn, put a +1/+1 counter on target creature you control.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public JaceArcaneStrategistTriggeredAbility copy() {
|
||||
return new JaceArcaneStrategistTriggeredAbility(this);
|
||||
}
|
||||
}
|
|
@ -117,6 +117,7 @@ public final class WarOfTheSpark extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Jace's Projection", 272, Rarity.UNCOMMON, mage.cards.j.JacesProjection.class));
|
||||
cards.add(new SetCardInfo("Jace's Ruse", 273, Rarity.RARE, mage.cards.j.JacesRuse.class));
|
||||
cards.add(new SetCardInfo("Jace's Triumph", 55, Rarity.UNCOMMON, mage.cards.j.JacesTriumph.class));
|
||||
cards.add(new SetCardInfo("Jace, Arcane Strategist", 270, Rarity.MYTHIC, mage.cards.j.JaceArcaneStrategist.class));
|
||||
cards.add(new SetCardInfo("Jace, Wielder of Mysteries", 54, Rarity.RARE, mage.cards.j.JaceWielderOfMysteries.class));
|
||||
cards.add(new SetCardInfo("Jaya's Greeting", 136, Rarity.COMMON, mage.cards.j.JayasGreeting.class));
|
||||
cards.add(new SetCardInfo("Jaya, Venerated Firemage", 135, Rarity.UNCOMMON, mage.cards.j.JayaVeneratedFiremage.class));
|
||||
|
|
Loading…
Reference in a new issue