mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
[LTR] Implement The One Ring
This commit is contained in:
parent
2ea6a85aec
commit
d17f1fc723
3 changed files with 74 additions and 0 deletions
72
Mage.Sets/src/mage/cards/t/TheOneRing.java
Normal file
72
Mage.Sets/src/mage/cards/t/TheOneRing.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.condition.common.CastFromEverywhereSourceCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControllerEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.abilities.keyword.ProtectionFromEverythingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TheOneRing extends CardImpl {
|
||||
|
||||
private static final DynamicValue xValue = new CountersSourceCount(CounterType.BURDEN);
|
||||
|
||||
public TheOneRing(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
|
||||
// Indestructible
|
||||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// When The One Ring enters the battlefield, if you cast it, you gain protection from everything until your next turn.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new GainAbilityControllerEffect(
|
||||
new ProtectionFromEverythingAbility(), Duration.UntilYourNextTurn
|
||||
)), CastFromEverywhereSourceCondition.instance, "When {this} enters the battlefield, " +
|
||||
"if you cast it, you gain protection from everything until your next turn."
|
||||
));
|
||||
|
||||
// At the beginning of your upkeep, you lose 1 life for each burden counter on The One Ring.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||
new LoseLifeSourceControllerEffect(xValue), TargetController.YOU, false
|
||||
));
|
||||
|
||||
// {T}: Put a burden counter on The One Ring, then draw a card for each burden counter on The One Ring.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new AddCountersSourceEffect(CounterType.BURDEN.createInstance()), new TapSourceCost()
|
||||
);
|
||||
ability.addEffect(new DrawCardSourceControllerEffect(xValue));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private TheOneRing(final TheOneRing card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TheOneRing copy() {
|
||||
return new TheOneRing(this);
|
||||
}
|
||||
}
|
|
@ -26,6 +26,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Plains", 272, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Reprieve", 26, Rarity.UNCOMMON, mage.cards.r.Reprieve.class));
|
||||
cards.add(new SetCardInfo("Swamp", 276, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("The One Ring", 246, Rarity.MYTHIC, mage.cards.t.TheOneRing.class));
|
||||
cards.add(new SetCardInfo("Trailblazer's Boots", 398, Rarity.RARE, mage.cards.t.TrailblazersBoots.class));
|
||||
cards.add(new SetCardInfo("You Cannot Pass!", 38, Rarity.UNCOMMON, mage.cards.y.YouCannotPass.class));
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ public enum CounterType {
|
|||
BOUNTY("bounty"),
|
||||
BRIBERY("bribery"),
|
||||
BRICK("brick"),
|
||||
BURDEN("burden"),
|
||||
CAGE("cage"),
|
||||
CARRION("carrion"),
|
||||
CHARGE("charge"),
|
||||
|
|
Loading…
Reference in a new issue