mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[AFR] Implemented Sylvan Shepherd
This commit is contained in:
parent
e4f74f1e6b
commit
9fef2a1692
3 changed files with 60 additions and 4 deletions
53
Mage.Sets/src/mage/cards/s/SylvanShepherd.java
Normal file
53
Mage.Sets/src/mage/cards/s/SylvanShepherd.java
Normal file
|
@ -0,0 +1,53 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.RollDieWithResultTableEffect;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SylvanShepherd extends CardImpl {
|
||||
|
||||
public SylvanShepherd(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.DRUID);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// Whenever Sylvan Shepherd attacks, roll a d20.
|
||||
RollDieWithResultTableEffect effect = new RollDieWithResultTableEffect();
|
||||
this.addAbility(new AttacksTriggeredAbility(effect));
|
||||
|
||||
// 1-9 | You gain 1 life.
|
||||
effect.addTableEntry(1, 9, new GainLifeEffect(1));
|
||||
|
||||
// 10-19 | You gain 2 life.
|
||||
effect.addTableEntry(10, 19, new GainLifeEffect(2));
|
||||
|
||||
// 20 | You gain 5 life.
|
||||
effect.addTableEntry(20, 20, new GainLifeEffect(5));
|
||||
}
|
||||
|
||||
private SylvanShepherd(final SylvanShepherd card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SylvanShepherd copy() {
|
||||
return new SylvanShepherd(this);
|
||||
}
|
||||
}
|
|
@ -136,6 +136,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Soulknife Spy", 75, Rarity.COMMON, mage.cards.s.SoulknifeSpy.class));
|
||||
cards.add(new SetCardInfo("Swamp", 270, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Swarming Goblins", 162, Rarity.COMMON, mage.cards.s.SwarmingGoblins.class));
|
||||
cards.add(new SetCardInfo("Sylvan Shepherd", 206, Rarity.COMMON, mage.cards.s.SylvanShepherd.class));
|
||||
cards.add(new SetCardInfo("Targ Nar, Demon-Fang Gnoll", 234, Rarity.UNCOMMON, mage.cards.t.TargNarDemonFangGnoll.class));
|
||||
cards.add(new SetCardInfo("Tasha's Hideous Laughter", 78, Rarity.RARE, mage.cards.t.TashasHideousLaughter.class));
|
||||
cards.add(new SetCardInfo("The Deck of Many Things", 241, Rarity.MYTHIC, mage.cards.t.TheDeckOfManyThings.class));
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.abilities.common;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.SetTargetPointer;
|
||||
|
@ -10,8 +8,9 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class AttacksTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
@ -19,6 +18,10 @@ public class AttacksTriggeredAbility extends TriggeredAbilityImpl {
|
|||
protected SetTargetPointer setTargetPointer;
|
||||
protected String text;
|
||||
|
||||
public AttacksTriggeredAbility(Effect effect) {
|
||||
this(effect, false);
|
||||
}
|
||||
|
||||
public AttacksTriggeredAbility(Effect effect, boolean optional) {
|
||||
this(effect, optional, null);
|
||||
}
|
||||
|
@ -75,5 +78,4 @@ public class AttacksTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public AttacksTriggeredAbility copy() {
|
||||
return new AttacksTriggeredAbility(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue