mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
[ONE] Implement Venerated Rotpriest
This commit is contained in:
parent
7ac7de7f48
commit
b94f7fc034
2 changed files with 91 additions and 0 deletions
90
Mage.Sets/src/mage/cards/v/VeneratedRotpriest.java
Normal file
90
Mage.Sets/src/mage/cards/v/VeneratedRotpriest.java
Normal file
|
@ -0,0 +1,90 @@
|
|||
package mage.cards.v;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.FightTargetSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddPoisonCounterTargetEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.ToxicAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class VeneratedRotpriest extends CardImpl {
|
||||
|
||||
public VeneratedRotpriest(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
|
||||
|
||||
this.subtype.add(SubType.PHYREXIAN);
|
||||
this.subtype.add(SubType.DRUID);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Toxic 1
|
||||
this.addAbility(new ToxicAbility(1));
|
||||
|
||||
// Whenever a creature you control becomes the target of a spell, target opponent gets a poison counter.
|
||||
this.addAbility(new VeneratedRotpriestTriggeredAbility());
|
||||
}
|
||||
|
||||
private VeneratedRotpriest(final VeneratedRotpriest card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VeneratedRotpriest copy() {
|
||||
return new VeneratedRotpriest(this);
|
||||
}
|
||||
}
|
||||
|
||||
class VeneratedRotpriestTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
VeneratedRotpriestTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AddPoisonCounterTargetEffect(1));
|
||||
this.addTarget(new TargetOpponent());
|
||||
}
|
||||
|
||||
private VeneratedRotpriestTriggeredAbility(final VeneratedRotpriestTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VeneratedRotpriestTriggeredAbility copy() {
|
||||
return new VeneratedRotpriestTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.TARGETED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
MageObject object = game.getObject(event.getSourceId());
|
||||
return permanent != null
|
||||
&& object != null
|
||||
&& isControlledBy(permanent.getControllerId())
|
||||
&& permanent.isCreature(game)
|
||||
&& object instanceof Spell;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever a creature you control becomes the target of a spell, target opponent gets a poison counter.";
|
||||
}
|
||||
}
|
|
@ -59,6 +59,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Tyvar, Jubilant Brawler", 218, Rarity.RARE, mage.cards.t.TyvarJubilantBrawler.class));
|
||||
cards.add(new SetCardInfo("Unctus Grand Metatect", 75, Rarity.RARE, mage.cards.u.UnctusGrandMetatect.class));
|
||||
cards.add(new SetCardInfo("Urabrask's Forge", 153, Rarity.RARE, mage.cards.u.UrabrasksForge.class));
|
||||
cards.add(new SetCardInfo("Venerated Rotpriest", 192, Rarity.RARE, mage.cards.v.VeneratedRotpriest.class));
|
||||
cards.add(new SetCardInfo("Venser, Corpse Puppet", 219, Rarity.RARE, mage.cards.v.VenserCorpsePuppet.class));
|
||||
cards.add(new SetCardInfo("Vindictive Flamestoker", 154, Rarity.RARE, mage.cards.v.VindictiveFlamestoker.class));
|
||||
cards.add(new SetCardInfo("White Sun's Twilight", 38, Rarity.RARE, mage.cards.w.WhiteSunsTwilight.class));
|
||||
|
|
Loading…
Reference in a new issue