mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 02:52:02 -08:00
[OTC] Implement Angelic Sell-Sword
This commit is contained in:
parent
b7bcdf0099
commit
38ec2b57c1
2 changed files with 80 additions and 0 deletions
79
Mage.Sets/src/mage/cards/a/AngelicSellSword.java
Normal file
79
Mage.Sets/src/mage/cards/a/AngelicSellSword.java
Normal file
|
|
@ -0,0 +1,79 @@
|
||||||
|
package mage.cards.a;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.MageObject;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
|
import mage.abilities.common.EntersBattlefieldThisOrAnotherTriggeredAbility;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
|
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.token.MercenaryToken;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class AngelicSellSword extends CardImpl {
|
||||||
|
|
||||||
|
public AngelicSellSword(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.ANGEL);
|
||||||
|
this.subtype.add(SubType.MERCENARY);
|
||||||
|
this.power = new MageInt(4);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Vigilance
|
||||||
|
this.addAbility(VigilanceAbility.getInstance());
|
||||||
|
|
||||||
|
// Whenever Angelic Sell-Sword or another nontoken creature enters the battlefield under your control, create a 1/1 red Mercenary creature token with "{T}: Target creature you control gets +1/+0 until end of turn. Activate only as a sorcery."
|
||||||
|
this.addAbility(new EntersBattlefieldThisOrAnotherTriggeredAbility(
|
||||||
|
new CreateTokenEffect(new MercenaryToken()),
|
||||||
|
StaticFilters.FILTER_CREATURE_NON_TOKEN, false, true
|
||||||
|
));
|
||||||
|
|
||||||
|
// Whenever Angelic Sell-Sword attacks, if its power is 6 or greater, draw a card.
|
||||||
|
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||||
|
new AttacksTriggeredAbility(new DrawCardSourceControllerEffect(1)),
|
||||||
|
AngelicSellSwordCondition.instance, "Whenever {this} attacks, " +
|
||||||
|
"if its power is 6 or greater, draw a card."
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
private AngelicSellSword(final AngelicSellSword card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AngelicSellSword copy() {
|
||||||
|
return new AngelicSellSword(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum AngelicSellSwordCondition implements Condition {
|
||||||
|
instance;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return Optional
|
||||||
|
.ofNullable(source.getSourcePermanentOrLKI(game))
|
||||||
|
.map(MageObject::getPower)
|
||||||
|
.map(MageInt::getValue)
|
||||||
|
.orElse(0) >= 6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -20,6 +20,7 @@ public final class OutlawsOfThunderJunctionCommander extends ExpansionSet {
|
||||||
this.hasBasicLands = false;
|
this.hasBasicLands = false;
|
||||||
|
|
||||||
cards.add(new SetCardInfo("Angel of Indemnity", 45, Rarity.RARE, mage.cards.a.AngelOfIndemnity.class));
|
cards.add(new SetCardInfo("Angel of Indemnity", 45, Rarity.RARE, mage.cards.a.AngelOfIndemnity.class));
|
||||||
|
cards.add(new SetCardInfo("Angelic Sell-Sword", 10, Rarity.RARE, mage.cards.a.AngelicSellSword.class));
|
||||||
cards.add(new SetCardInfo("Stella Lee, Wild Card", 3, Rarity.MYTHIC, mage.cards.s.StellaLeeWildCard.class));
|
cards.add(new SetCardInfo("Stella Lee, Wild Card", 3, Rarity.MYTHIC, mage.cards.s.StellaLeeWildCard.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue