mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Implemented Drannith Stinger
This commit is contained in:
parent
10814e4b4c
commit
a4e9b21b82
3 changed files with 102 additions and 0 deletions
46
Mage.Sets/src/mage/cards/d/DrannithStinger.java
Normal file
46
Mage.Sets/src/mage/cards/d/DrannithStinger.java
Normal file
|
@ -0,0 +1,46 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.CycleControllerTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
||||
import mage.abilities.keyword.CyclingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DrannithStinger extends CardImpl {
|
||||
|
||||
public DrannithStinger(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Whenever you cycle another card, Drannith Stinger deals 1 damage to each opponent.
|
||||
this.addAbility(new CycleControllerTriggeredAbility(
|
||||
new DamagePlayersEffect(1, TargetController.OPPONENT)
|
||||
));
|
||||
|
||||
// Cycling {1}
|
||||
this.addAbility(new CyclingAbility(new ManaCostsImpl("{1}")));
|
||||
}
|
||||
|
||||
private DrannithStinger(final DrannithStinger card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DrannithStinger copy() {
|
||||
return new DrannithStinger(this);
|
||||
}
|
||||
}
|
|
@ -37,6 +37,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Colossification", 148, Rarity.RARE, mage.cards.c.Colossification.class));
|
||||
cards.add(new SetCardInfo("Dire Tactics", 183, Rarity.UNCOMMON, mage.cards.d.DireTactics.class));
|
||||
cards.add(new SetCardInfo("Dirge Bat", 84, Rarity.RARE, mage.cards.d.DirgeBat.class));
|
||||
cards.add(new SetCardInfo("Drannith Stinger", 113, Rarity.COMMON, mage.cards.d.DrannithStinger.class));
|
||||
cards.add(new SetCardInfo("Dreamtail Heron", 47, Rarity.COMMON, mage.cards.d.DreamtailHeron.class));
|
||||
cards.add(new SetCardInfo("Essence Scatter", 49, Rarity.COMMON, mage.cards.e.EssenceScatter.class));
|
||||
cards.add(new SetCardInfo("Fertilid", 152, Rarity.COMMON, mage.cards.f.Fertilid.class));
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.keyword.CyclingAbility;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.StackAbility;
|
||||
import mage.game.stack.StackObject;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class CycleControllerTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public CycleControllerTriggeredAbility(Effect effect) {
|
||||
this(effect, false);
|
||||
}
|
||||
|
||||
public CycleControllerTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
}
|
||||
|
||||
private CycleControllerTriggeredAbility(final CycleControllerTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ACTIVATED_ABILITY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (game.getState().getStack().isEmpty()
|
||||
|| !event.getPlayerId().equals(this.getControllerId())
|
||||
|| event.getSourceId().equals(this.getSourceId())) {
|
||||
return false;
|
||||
}
|
||||
StackObject item = game.getState().getStack().getFirst();
|
||||
return item instanceof StackAbility
|
||||
&& item.getStackAbility() instanceof CyclingAbility;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you cycle another card, " + super.getRule();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CycleControllerTriggeredAbility copy() {
|
||||
return new CycleControllerTriggeredAbility(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue