mirror of
https://github.com/correl/mage.git
synced 2025-01-07 11:08:44 +00:00
[LTR] Implement Bilbo's Ring
This commit is contained in:
parent
2e018b2c14
commit
871479f075
2 changed files with 73 additions and 0 deletions
72
Mage.Sets/src/mage/cards/b/BilbosRing.java
Normal file
72
Mage.Sets/src/mage/cards/b/BilbosRing.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksAloneAttachedTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.MyTurnCondition;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.decorator.ConditionalRestrictionEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedAttachedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.hint.common.MyTurnHint;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.HexproofAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class BilbosRing extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent(SubType.HALFLING, "Halfling");
|
||||
|
||||
public BilbosRing(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// As long as it's your turn, equipped creature has hexproof and can't be blocked.
|
||||
Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
new GainAbilityAttachedEffect(HexproofAbility.getInstance(), AttachmentType.EQUIPMENT),
|
||||
MyTurnCondition.instance, "as long as it's your turn, equipped creature has hexproof"
|
||||
));
|
||||
ability.addEffect(new ConditionalRestrictionEffect(
|
||||
new CantBeBlockedAttachedEffect(AttachmentType.EQUIPMENT),
|
||||
MyTurnCondition.instance, "and can't be blocked"
|
||||
));
|
||||
this.addAbility(ability.addHint(MyTurnHint.instance));
|
||||
|
||||
// Whenever equipped creature attacks alone, you draw a card and you lose 1 life.
|
||||
ability = new AttacksAloneAttachedTriggeredAbility(
|
||||
new DrawCardSourceControllerEffect(1, "you")
|
||||
);
|
||||
ability.addEffect(new LoseLifeSourceControllerEffect(1).concatBy("and"));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Equip Halfling {1}
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1), new TargetPermanent(filter)));
|
||||
|
||||
// Equip {4}
|
||||
this.addAbility(new EquipAbility(4));
|
||||
}
|
||||
|
||||
private BilbosRing(final BilbosRing card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BilbosRing copy() {
|
||||
return new BilbosRing(this);
|
||||
}
|
||||
}
|
|
@ -29,6 +29,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Banish from Edoras", 1, Rarity.COMMON, mage.cards.b.BanishFromEdoras.class));
|
||||
cards.add(new SetCardInfo("Barad-dur", 253, Rarity.RARE, mage.cards.b.BaradDur.class));
|
||||
cards.add(new SetCardInfo("Battle-Scarred Goblin", 115, Rarity.COMMON, mage.cards.b.BattleScarredGoblin.class));
|
||||
cards.add(new SetCardInfo("Bilbo's Ring", 298, Rarity.RARE, mage.cards.b.BilbosRing.class));
|
||||
cards.add(new SetCardInfo("Bilbo, Retired Burglar", 196, Rarity.UNCOMMON, mage.cards.b.BilboRetiredBurglar.class));
|
||||
cards.add(new SetCardInfo("Birthday Escape", 43, Rarity.COMMON, mage.cards.b.BirthdayEscape.class));
|
||||
cards.add(new SetCardInfo("Bitter Downfall", 77, Rarity.UNCOMMON, mage.cards.b.BitterDownfall.class));
|
||||
|
|
Loading…
Reference in a new issue