mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[DMU] Implemented Hero's Heirloom
This commit is contained in:
parent
f7295ac298
commit
edd6851715
2 changed files with 64 additions and 0 deletions
63
Mage.Sets/src/mage/cards/h/HerosHeirloom.java
Normal file
63
Mage.Sets/src/mage/cards/h/HerosHeirloom.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.AttachedToMatchesFilterCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class HerosHeirloom extends CardImpl {
|
||||
|
||||
private static final Condition condition
|
||||
= new AttachedToMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_LEGENDARY);
|
||||
|
||||
public HerosHeirloom(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// Equipped creature gets +2/+1.
|
||||
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(2, 1)));
|
||||
|
||||
// As long as equipped creature is legendary, it has trample and haste.
|
||||
Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
new GainAbilityAttachedEffect(
|
||||
TrampleAbility.getInstance(), AttachmentType.EQUIPMENT
|
||||
), condition, "as long as equipped creature is legendary, it has trample"
|
||||
));
|
||||
ability.addEffect(new ConditionalContinuousEffect(
|
||||
new GainAbilityAttachedEffect(
|
||||
HasteAbility.getInstance(), AttachmentType.EQUIPMENT
|
||||
), condition, "and haste"
|
||||
));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(2));
|
||||
}
|
||||
|
||||
private HerosHeirloom(final HerosHeirloom card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HerosHeirloom copy() {
|
||||
return new HerosHeirloom(this);
|
||||
}
|
||||
}
|
|
@ -42,6 +42,7 @@ public final class DominariaUnited extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Forest", 274, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Frostfist Strider", 51, Rarity.UNCOMMON, mage.cards.f.FrostfistStrider.class));
|
||||
cards.add(new SetCardInfo("Herd Migration", 165, Rarity.RARE, mage.cards.h.HerdMigration.class));
|
||||
cards.add(new SetCardInfo("Hero's Heirloom", 231, Rarity.RARE, mage.cards.h.HerosHeirloom.class));
|
||||
cards.add(new SetCardInfo("Impede Momentum", 54, Rarity.COMMON, mage.cards.i.ImpedeMomentum.class));
|
||||
cards.add(new SetCardInfo("Island", 265, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Jaya, Fiery Negotiator", 133, Rarity.MYTHIC, mage.cards.j.JayaFieryNegotiator.class));
|
||||
|
|
Loading…
Reference in a new issue