mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
[GTC] Assemble the Legion; Aurelia the Warleader; Truefire Paladin, Vizkopa Guildmage
This commit is contained in:
parent
4833b379df
commit
6b0ff748bc
4 changed files with 522 additions and 0 deletions
111
Mage.Sets/src/mage/sets/gatecrash/AssembleTheLegion.java
Normal file
111
Mage.Sets/src/mage/sets/gatecrash/AssembleTheLegion.java
Normal file
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.TargetController;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.Counter;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class AssembleTheLegion extends CardImpl<AssembleTheLegion> {
|
||||
|
||||
public AssembleTheLegion(UUID ownerId) {
|
||||
super(ownerId, 142, "Assemble the Legion", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}{W}");
|
||||
this.expansionSetCode = "GTC";
|
||||
|
||||
this.color.setRed(true);
|
||||
this.color.setWhite(true);
|
||||
|
||||
// At the beginning of your upkeep, put a muster counter on Assemble the Legion. Then put a 1/1 red and white Soldier creature token with haste onto the battlefield for each muster counter on Assemble the Legion.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AssembleTheLegionEffect(), TargetController.YOU, false));
|
||||
}
|
||||
|
||||
public AssembleTheLegion(final AssembleTheLegion card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AssembleTheLegion copy() {
|
||||
return new AssembleTheLegion(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AssembleTheLegionEffect extends OneShotEffect<AssembleTheLegionEffect> {
|
||||
|
||||
public AssembleTheLegionEffect() {
|
||||
super(Outcome.Copy);
|
||||
this.staticText = "put a muster counter on {this}. Then put a 1/1 red and white Soldier creature token with haste onto the battlefield for each muster counter on {this}";
|
||||
}
|
||||
|
||||
public AssembleTheLegionEffect(final AssembleTheLegionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AssembleTheLegionEffect copy() {
|
||||
return new AssembleTheLegionEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (sourcePermanent != null) {
|
||||
new AddCountersSourceEffect(new MusterCounter(),false).apply(game, source);
|
||||
int amountCounters = sourcePermanent.getCounters().getCount("Muster");
|
||||
return new CreateTokenEffect(new SoldierToken(), amountCounters).apply(game, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class MusterCounter extends Counter<MusterCounter> {
|
||||
|
||||
public MusterCounter() {
|
||||
super("Muster");
|
||||
this.count = 1;
|
||||
}
|
||||
|
||||
public MusterCounter(int amount) {
|
||||
super("Muster");
|
||||
this.count = amount;
|
||||
}
|
||||
}
|
176
Mage.Sets/src/mage/sets/gatecrash/AureliaTheWarleader.java
Normal file
176
Mage.Sets/src/mage/sets/gatecrash/AureliaTheWarleader.java
Normal file
|
@ -0,0 +1,176 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.UntapAllControllerEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.turn.TurnMod;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class AureliaTheWarleader extends CardImpl<AureliaTheWarleader> {
|
||||
|
||||
public AureliaTheWarleader(UUID ownerId) {
|
||||
super(ownerId, 143, "Aurelia, the Warleader", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{R}{R}{W}{W}");
|
||||
this.expansionSetCode = "GTC";
|
||||
this.color.setRed(true);
|
||||
this.color.setWhite(true);
|
||||
this.supertype.add("Legendary");
|
||||
this.subtype.add("Angel");
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Flying, vigilance, haste
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// Whenever Aurelia, the Warleader attacks for the first time each turn, untap all creatures you control. After this phase, there is an additional combat phase.
|
||||
Ability ability = new AureliaAttacksTriggeredAbility(new UntapAllControllerEffect(new FilterControlledCreaturePermanent(),"untap all creatures you control"), false);
|
||||
ability.addEffect(new AdditionalCombatPhaseEffect());;
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
public AureliaTheWarleader(final AureliaTheWarleader card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AureliaTheWarleader copy() {
|
||||
return new AureliaTheWarleader(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AureliaAttacksTriggeredAbility extends TriggeredAbilityImpl<AureliaAttacksTriggeredAbility> {
|
||||
|
||||
protected String text;
|
||||
|
||||
public AureliaAttacksTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
}
|
||||
|
||||
public AureliaAttacksTriggeredAbility(Effect effect, boolean optional, String text) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public AureliaAttacksTriggeredAbility(final AureliaAttacksTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.text = ability.text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset(Game game) {
|
||||
Card sourceCard = game.getCard(getSourceId());
|
||||
game.getState().setValue(getValueKey(sourceCard), new Integer(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == EventType.ATTACKER_DECLARED && event.getSourceId().equals(this.getSourceId()) ) {
|
||||
Card sourceCard = game.getCard(getSourceId());
|
||||
Integer amountAttacks = (Integer) game.getState().getValue(getValueKey(sourceCard));
|
||||
if (amountAttacks == null || amountAttacks.intValue() < 1) {
|
||||
if (amountAttacks == null) {
|
||||
amountAttacks = new Integer(1);
|
||||
} else {
|
||||
++amountAttacks;
|
||||
}
|
||||
game.getState().setValue(getValueKey(sourceCard), amountAttacks);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected String getValueKey(Card sourceCard) {
|
||||
if (sourceCard == null) {
|
||||
return "";
|
||||
}
|
||||
return new StringBuilder(this.getId().toString()).append(sourceCard.getZoneChangeCounter()).append("amountAttacks").toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
if (text == null || text.isEmpty()) {
|
||||
|
||||
return "Whenever {this} attacks for the first time each turn, " + super.getRule();
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AureliaAttacksTriggeredAbility copy() {
|
||||
return new AureliaAttacksTriggeredAbility(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AdditionalCombatPhaseEffect extends OneShotEffect<AdditionalCombatPhaseEffect> {
|
||||
|
||||
public AdditionalCombatPhaseEffect() {
|
||||
super(Constants.Outcome.Benefit);
|
||||
staticText = "After this phase, there is an additional combat phase";
|
||||
}
|
||||
|
||||
public AdditionalCombatPhaseEffect(final AdditionalCombatPhaseEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdditionalCombatPhaseEffect copy() {
|
||||
return new AdditionalCombatPhaseEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
game.getState().getTurnMods().add(new TurnMod(source.getControllerId(), Constants.TurnPhase.COMBAT, null, false));
|
||||
return true;
|
||||
}
|
||||
}
|
83
Mage.Sets/src/mage/sets/gatecrash/TruefirePaladin.java
Normal file
83
Mage.Sets/src/mage/sets/gatecrash/TruefirePaladin.java
Normal file
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class TruefirePaladin extends CardImpl<TruefirePaladin> {
|
||||
|
||||
public TruefirePaladin(UUID ownerId) {
|
||||
super(ownerId, 202, "Truefire Paladin", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{R}{W}");
|
||||
this.expansionSetCode = "GTC";
|
||||
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Knight");
|
||||
|
||||
this.color.setRed(true);
|
||||
this.color.setWhite(true);
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// {R}{W}: Truefire Paladin gets +2/+0 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2,0, Duration.EndOfTurn), new ManaCostsImpl("{R}{W}")));
|
||||
|
||||
// {R}{W}: Truefire Paladin gets first strike until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), new ManaCostsImpl("{R}{W}")));
|
||||
|
||||
}
|
||||
|
||||
public TruefirePaladin(final TruefirePaladin card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TruefirePaladin copy() {
|
||||
return new TruefirePaladin(this);
|
||||
}
|
||||
}
|
152
Mage.Sets/src/mage/sets/gatecrash/VizkopaGuildmage.java
Normal file
152
Mage.Sets/src/mage/sets/gatecrash/VizkopaGuildmage.java
Normal file
|
@ -0,0 +1,152 @@
|
|||
/*
|
||||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class VizkopaGuildmage extends CardImpl<VizkopaGuildmage> {
|
||||
|
||||
public VizkopaGuildmage(UUID ownerId) {
|
||||
super(ownerId, 206, "Vizkopa Guildmage", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{W}{B}");
|
||||
this.expansionSetCode = "GTC";
|
||||
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Wizard");
|
||||
|
||||
this.color.setWhite(true);
|
||||
this.color.setBlack(true);
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// 1{W}{B}: Target creature gains lifelink until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn),new ManaCostsImpl("{1}{W}{B}"));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
// 1{W}{B}: Whenever you gain life this turn, each opponent loses that much life.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(new VizkopaGuildmageTriggeredAbility(), Duration.EndOfTurn), new ManaCostsImpl("{1}{W}{B}")));
|
||||
}
|
||||
|
||||
public VizkopaGuildmage(final VizkopaGuildmage card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VizkopaGuildmage copy() {
|
||||
return new VizkopaGuildmage(this);
|
||||
}
|
||||
}
|
||||
|
||||
class VizkopaGuildmageTriggeredAbility extends TriggeredAbilityImpl<VizkopaGuildmageTriggeredAbility> {
|
||||
|
||||
|
||||
public VizkopaGuildmageTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new OpponentsLoseLifeEffect());
|
||||
}
|
||||
|
||||
public VizkopaGuildmageTriggeredAbility(final VizkopaGuildmageTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VizkopaGuildmageTriggeredAbility copy() {
|
||||
return new VizkopaGuildmageTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.GAINED_LIFE && event.getTargetId().equals(controllerId)) {
|
||||
getEffects().get(0).setValue("amountLifeGained", new Integer(event.getAmount()));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you gain life this turn, " + super.getRule();
|
||||
}
|
||||
}
|
||||
|
||||
class OpponentsLoseLifeEffect extends OneShotEffect<OpponentsLoseLifeEffect> {
|
||||
|
||||
public OpponentsLoseLifeEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "each opponent loses that much life";
|
||||
}
|
||||
|
||||
public OpponentsLoseLifeEffect(final OpponentsLoseLifeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OpponentsLoseLifeEffect copy() {
|
||||
return new OpponentsLoseLifeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Integer amountLifeGained = (Integer) this.getValue("amountLifeGained");
|
||||
if (amountLifeGained != null ) {
|
||||
for (UUID opponentId: game.getOpponents(source.getControllerId())) {
|
||||
Player opponent = game.getPlayer(opponentId);
|
||||
if (opponent != null) {
|
||||
opponent.damage(amountLifeGained, source.getSourceId(), game, false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue