mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Cards added: Akoum Boulderfoot, Blade-Tribe Berserkers, Bleak Coven Vampires
Fixed ability: ConditionalTriggeredAbility Fixed cards using ConditionalTriggeredAbility
This commit is contained in:
parent
4ac54673ee
commit
0b1527a206
7 changed files with 291 additions and 73 deletions
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* 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.riseoftheeldrazi;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class AkoumBoulderfoot extends CardImpl<AkoumBoulderfoot> {
|
||||
|
||||
public AkoumBoulderfoot(UUID ownerId) {
|
||||
super(ownerId, 134, "Akoum Boulderfoot", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{R}{R}");
|
||||
this.expansionSetCode = "ROE";
|
||||
this.subtype.add("Giant");
|
||||
this.subtype.add("Warrior");
|
||||
|
||||
this.color.setRed(true);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1), false);
|
||||
Target target = new TargetCreatureOrPlayer();
|
||||
target.setRequired(true);
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public AkoumBoulderfoot(final AkoumBoulderfoot card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AkoumBoulderfoot copy() {
|
||||
return new AkoumBoulderfoot(this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* 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.scarsofmirrodin;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class BladeTribeBerserkers extends CardImpl<BladeTribeBerserkers> {
|
||||
|
||||
private final String effectText = "Metalcraft - When Blade-Tribe Berserkers enters the battlefield, if you control three or more artifacts, Blade-Tribe Berserkers gets +3/+3 and gains haste until end of turn.";
|
||||
|
||||
public BladeTribeBerserkers(UUID ownerId) {
|
||||
super(ownerId, 84, "Blade-Tribe Berserkers", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
this.expansionSetCode = "SOM";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Berserker");
|
||||
|
||||
this.color.setRed(true);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BoostSourceEffect(3, 3, Duration.EndOfTurn), false);
|
||||
ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
|
||||
Target target = new TargetPlayer();
|
||||
target.setRequired(true);
|
||||
ability.addTarget(target);
|
||||
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, Metalcraft.getInstance(), effectText));
|
||||
}
|
||||
|
||||
public BladeTribeBerserkers(final BladeTribeBerserkers card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BladeTribeBerserkers copy() {
|
||||
return new BladeTribeBerserkers(this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* 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.scarsofmirrodin;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class BleakCovenVampires extends CardImpl<BleakCovenVampires> {
|
||||
|
||||
private final String effectText = "Metalcraft - When Bleak Coven Vampires enters the battlefield, if you control three or more artifacts, target player loses 4 life and you gain 4 life.";
|
||||
|
||||
public BleakCovenVampires(UUID ownerId) {
|
||||
super(ownerId, 55, "Bleak Coven Vampires", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
||||
this.expansionSetCode = "SOM";
|
||||
this.subtype.add("Vampire");
|
||||
this.subtype.add("Warrior");
|
||||
|
||||
this.color.setBlack(true);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(4), false);
|
||||
ability.addEffect(new GainLifeEffect(4));
|
||||
Target target = new TargetPlayer();
|
||||
target.setRequired(true);
|
||||
ability.addTarget(target);
|
||||
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, Metalcraft.getInstance(), effectText));
|
||||
}
|
||||
|
||||
public BleakCovenVampires(final BleakCovenVampires card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BleakCovenVampires copy() {
|
||||
return new BleakCovenVampires(this);
|
||||
}
|
||||
}
|
|
@ -25,19 +25,15 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.scarsofmirrodin;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -49,30 +45,29 @@ import java.util.UUID;
|
|||
*/
|
||||
public class LumengridDrake extends CardImpl<LumengridDrake> {
|
||||
|
||||
private static final String text = "Metalcraft - When Lumengrid Drake enters the battlefield, if you control three or more artifacts, return target creature to its owner's hand.";
|
||||
private static final String text = "Metalcraft - When Lumengrid Drake enters the battlefield, if you control three or more artifacts, return target creature to its owner's hand.";
|
||||
|
||||
public LumengridDrake(UUID ownerId) {
|
||||
super(ownerId, 36, "Lumengrid Drake", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||
this.expansionSetCode = "SOM";
|
||||
this.subtype.add("Drake");
|
||||
this.color.setBlue(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
public LumengridDrake(UUID ownerId) {
|
||||
super(ownerId, 36, "Lumengrid Drake", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||
this.expansionSetCode = "SOM";
|
||||
this.subtype.add("Drake");
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
Effect effect = new ReturnToHandTargetEffect();
|
||||
TriggeredAbility conditional = new ConditionalTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(effect), effect, Metalcraft.getInstance(), text);
|
||||
conditional.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(conditional);
|
||||
}
|
||||
TriggeredAbility conditional = new ConditionalTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect()), Metalcraft.getInstance(), text);
|
||||
conditional.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(conditional);
|
||||
}
|
||||
|
||||
public LumengridDrake(final LumengridDrake card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LumengridDrake copy() {
|
||||
return new LumengridDrake(this);
|
||||
}
|
||||
public LumengridDrake(final LumengridDrake card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LumengridDrake copy() {
|
||||
return new LumengridDrake(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.sets.scarsofmirrodin;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -34,15 +33,11 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.Metalcraft;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DiscardTargetEffect;
|
||||
import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -50,25 +45,26 @@ import mage.target.TargetPlayer;
|
|||
*/
|
||||
public class ScreechingSilcaw extends CardImpl<ScreechingSilcaw> {
|
||||
|
||||
private static final String text = "Metalcraft - Whenever Screeching Silcaw deals combat damage to a player, if you control three or more artifacts, that player puts the top four cards of his or her library into his or her graveyard.";
|
||||
private static final String text = "Metalcraft - Whenever Screeching Silcaw deals combat damage to a player, if you control three or more artifacts, that player puts the top four cards of his or her library into his or her graveyard.";
|
||||
|
||||
public ScreechingSilcaw (UUID ownerId) {
|
||||
public ScreechingSilcaw(UUID ownerId) {
|
||||
super(ownerId, 42, "Screeching Silcaw", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
this.expansionSetCode = "SOM";
|
||||
this.subtype.add("Bird");
|
||||
|
||||
this.color.setBlue(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
Effect effect = new PutLibraryIntoGraveTargetEffect(4);
|
||||
TriggeredAbility ability = new DealsCombatDamageToAPlayerTriggeredAbility(effect, false);
|
||||
TriggeredAbility conditional = new ConditionalTriggeredAbility(
|
||||
ability, effect, Metalcraft.getInstance(), text);
|
||||
this.addAbility(conditional);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
TriggeredAbility conditional = new ConditionalTriggeredAbility(
|
||||
new DealsCombatDamageToAPlayerTriggeredAbility(new PutLibraryIntoGraveTargetEffect(4), false),
|
||||
Metalcraft.getInstance(), text);
|
||||
this.addAbility(conditional);
|
||||
}
|
||||
|
||||
public ScreechingSilcaw (final ScreechingSilcaw card) {
|
||||
public ScreechingSilcaw(final ScreechingSilcaw card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
@ -76,5 +72,4 @@ public class ScreechingSilcaw extends CardImpl<ScreechingSilcaw> {
|
|||
public ScreechingSilcaw copy() {
|
||||
return new ScreechingSilcaw(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ import mage.Constants.Zone;
|
|||
import mage.MageObject;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
package mage.abilities.decorator;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
|
@ -20,44 +16,43 @@ public class ConditionalTriggeredAbility extends TriggeredAbilityImpl<Conditiona
|
|||
|
||||
protected TriggeredAbility ability;
|
||||
protected Condition condition;
|
||||
protected Effect effect;
|
||||
protected String text;
|
||||
|
||||
public ConditionalTriggeredAbility(TriggeredAbility ability, Effect effect, Condition condition, String text) {
|
||||
super(ability.getZone(), effect);
|
||||
public ConditionalTriggeredAbility(TriggeredAbility ability, Condition condition, String text) {
|
||||
super(ability.getZone(), null);
|
||||
this.ability = ability;
|
||||
this.effect = effect;
|
||||
this.condition = condition;
|
||||
this.effects = ability.getEffects();
|
||||
this.condition = condition;
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public ConditionalTriggeredAbility(ConditionalTriggeredAbility triggered) {
|
||||
super(triggered);
|
||||
this.ability = triggered.ability;
|
||||
this.condition = triggered.condition;
|
||||
this.text = triggered.text;
|
||||
}
|
||||
public ConditionalTriggeredAbility(ConditionalTriggeredAbility triggered) {
|
||||
super(triggered);
|
||||
this.ability = triggered.ability;
|
||||
this.condition = triggered.condition;
|
||||
this.text = triggered.text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConditionalTriggeredAbility copy() {
|
||||
return new ConditionalTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
ability.setSourceId(this.getSourceId());
|
||||
if (ability.checkTrigger(event, game)) {
|
||||
if (condition.apply(game, this)) {
|
||||
this.targets.clear();
|
||||
this.targets.addAll(ability.getTargets());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
ability.setSourceId(this.getSourceId());
|
||||
if (ability.checkTrigger(event, game)) {
|
||||
if (condition.apply(game, this)) {
|
||||
this.targets.clear();
|
||||
this.targets.addAll(ability.getTargets());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return text;
|
||||
}
|
||||
@Override
|
||||
public String getRule() {
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue