forked from External/mage
[SLD] Implement Atreus, Impulsive Son
This commit is contained in:
parent
1c0525d058
commit
7b131673be
4 changed files with 120 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ public abstract class AbstractCommander extends Constructed {
|
|||
|
||||
private static List<CommanderValidator> validators = Arrays.asList(
|
||||
PartnerValidator.instance,
|
||||
PartnerFatherAndSonValidator.instance,
|
||||
FriendsForeverValidator.instance,
|
||||
PartnerWithValidator.instance,
|
||||
ChooseABackgroundValidator.instance,
|
||||
|
|
|
|||
64
Mage.Sets/src/mage/cards/a/AtreusImpulsiveSon.java
Normal file
64
Mage.Sets/src/mage/cards/a/AtreusImpulsiveSon.java
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CountersControllerCount;
|
||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardControllerEffect;
|
||||
import mage.abilities.keyword.PartnerFatherAndSonAbility;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AtreusImpulsiveSon extends CardImpl {
|
||||
|
||||
private static final DynamicValue xValue = new CountersControllerCount(CounterType.EXPERIENCE);
|
||||
|
||||
public AtreusImpulsiveSon(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{R}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.GOD);
|
||||
this.subtype.add(SubType.ARCHER);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Reach
|
||||
this.addAbility(ReachAbility.getInstance());
|
||||
|
||||
// {3}, {T}: Draw a card for each experience counter you have, then discard a card. Atreus, Impulsive Son deals 2 damage to each opponent.
|
||||
Ability ability = new SimpleActivatedAbility(new DrawCardSourceControllerEffect(xValue)
|
||||
.setText("draw a card for each experience counter you have"), new GenericManaCost(3));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addEffect(new DiscardControllerEffect(1).concatBy(", then"));
|
||||
ability.addEffect(new DamagePlayersEffect(2, TargetController.OPPONENT));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Partner--Father & son
|
||||
this.addAbility(PartnerFatherAndSonAbility.getInstance());
|
||||
}
|
||||
|
||||
private AtreusImpulsiveSon(final AtreusImpulsiveSon card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AtreusImpulsiveSon copy() {
|
||||
return new AtreusImpulsiveSon(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import mage.abilities.MageSingleton;
|
||||
import mage.abilities.StaticAbility;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.io.ObjectStreamException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class PartnerFatherAndSonAbility extends StaticAbility implements MageSingleton {
|
||||
|
||||
private static final PartnerFatherAndSonAbility instance = new PartnerFatherAndSonAbility();
|
||||
|
||||
private Object readResolve() throws ObjectStreamException {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public static PartnerFatherAndSonAbility getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
private PartnerFatherAndSonAbility() {
|
||||
super(Zone.BATTLEFIELD, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Partner—Father & son <i>(You can have two commanders if both have this ability.)</i>";
|
||||
}
|
||||
|
||||
@Override
|
||||
public PartnerFatherAndSonAbility copy() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package mage.util.validation;
|
||||
|
||||
import mage.abilities.keyword.PartnerFatherAndSonAbility;
|
||||
import mage.cards.Card;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum PartnerFatherAndSonValidator implements CommanderValidator {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean checkPartner(Card commander1, Card commander2) {
|
||||
return commander1.getAbilities().containsClass(PartnerFatherAndSonAbility.class);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue