forked from External/mage
Implemented Vilis, Broker of Blood
This commit is contained in:
parent
fa88266b58
commit
4e3d5521bc
2 changed files with 97 additions and 0 deletions
96
Mage.Sets/src/mage/cards/v/VilisBrokerOfBlood.java
Normal file
96
Mage.Sets/src/mage/cards/v/VilisBrokerOfBlood.java
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
package mage.cards.v;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.PayLifeCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class VilisBrokerOfBlood extends CardImpl {
|
||||
|
||||
public VilisBrokerOfBlood(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}{B}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.DEMON);
|
||||
this.power = new MageInt(8);
|
||||
this.toughness = new MageInt(8);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// {B}, Pay 2 life: Target creature gets -1/-1 until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new BoostTargetEffect(-1, -1), new ManaCostsImpl("{B}")
|
||||
);
|
||||
ability.addCost(new PayLifeCost(2));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever you lose life, draw that many cards.
|
||||
this.addAbility(new VilisBrokerOfBloodTriggeredAbility());
|
||||
}
|
||||
|
||||
private VilisBrokerOfBlood(final VilisBrokerOfBlood card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VilisBrokerOfBlood copy() {
|
||||
return new VilisBrokerOfBlood(this);
|
||||
}
|
||||
}
|
||||
|
||||
class VilisBrokerOfBloodTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
VilisBrokerOfBloodTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, null, false);
|
||||
}
|
||||
|
||||
private VilisBrokerOfBloodTriggeredAbility(final VilisBrokerOfBloodTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VilisBrokerOfBloodTriggeredAbility copy() {
|
||||
return new VilisBrokerOfBloodTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.LOST_LIFE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getPlayerId().equals(this.getControllerId())) {
|
||||
this.getEffects().clear();
|
||||
this.addEffect(new DrawCardSourceControllerEffect(event.getAmount()));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you lose life, draw that many cards.";
|
||||
}
|
||||
}
|
||||
|
|
@ -172,6 +172,7 @@ public final class CoreSet2020 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Unsummon", 78, Rarity.COMMON, mage.cards.u.Unsummon.class));
|
||||
cards.add(new SetCardInfo("Vampire of the Dire Moon", 120, Rarity.UNCOMMON, mage.cards.v.VampireOfTheDireMoon.class));
|
||||
cards.add(new SetCardInfo("Vial of Dragonfire", 241, Rarity.COMMON, mage.cards.v.VialOfDragonfire.class));
|
||||
cards.add(new SetCardInfo("Vilis, Broker of Blood", 122, Rarity.RARE, mage.cards.v.VilisBrokerOfBlood.class));
|
||||
cards.add(new SetCardInfo("Vivien, Nature's Avenger", 298, Rarity.MYTHIC, mage.cards.v.VivienNaturesAvenger.class));
|
||||
cards.add(new SetCardInfo("Voracious Hydra", 200, Rarity.RARE, mage.cards.v.VoraciousHydra.class));
|
||||
cards.add(new SetCardInfo("Wakeroot Elemental", 202, Rarity.RARE, mage.cards.w.WakerootElemental.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue