mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 12:31:59 -08:00
Implemented Vraska, Swarm's Eminence
This commit is contained in:
parent
a493f26b4f
commit
3dd6836559
3 changed files with 137 additions and 0 deletions
|
|
@ -0,0 +1,75 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AssassinToken2 extends TokenImpl {
|
||||
|
||||
public AssassinToken2() {
|
||||
super("Assassin", "1/1 black Assassin creature token with deathtouch and \"Whenever this creature deals damage to a planeswalker, destroy that planeswalker.\"");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlack(true);
|
||||
subtype.add(SubType.ASSASSIN);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(DeathtouchAbility.getInstance());
|
||||
addAbility(new AssassinToken2TriggeredAbility());
|
||||
}
|
||||
|
||||
private AssassinToken2(final AssassinToken2 token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public AssassinToken2 copy() {
|
||||
return new AssassinToken2(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AssassinToken2TriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
AssassinToken2TriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DestroyTargetEffect());
|
||||
}
|
||||
|
||||
private AssassinToken2TriggeredAbility(final AssassinToken2TriggeredAbility effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AssassinToken2TriggeredAbility copy() {
|
||||
return new AssassinToken2TriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGED_PLANESWALKER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getSourceId().equals(getSourceId())) {
|
||||
for (Effect effect : this.getAllEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(event.getPlayerId()));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever this creature deals damage to a planeswalker, destroy that planeswalker.";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue