mirror of
https://github.com/correl/mage.git
synced 2024-11-25 03:00:11 +00:00
Added card "Droidsmith" and its abilities and effects
This commit is contained in:
parent
43075f7088
commit
64ad1f5984
2 changed files with 57 additions and 1 deletions
|
@ -1,4 +1,59 @@
|
|||
package mage.cards.d;
|
||||
|
||||
public class Droidsmith {
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.CompoundCondition;
|
||||
import mage.abilities.condition.common.SourceTappedCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.keyword.CantBeBlockedSourceAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Merlingilb
|
||||
*/
|
||||
public class Droidsmith extends CardImpl {
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
static {
|
||||
filter.add(SubType.DROID.getPredicate());
|
||||
}
|
||||
public Droidsmith(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{B}");
|
||||
this.addSubType(SubType.ANGEL);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
//Droidsmith can't be blocked.
|
||||
this.addAbility(new CantBeBlockedSourceAbility());
|
||||
|
||||
//Droid creatures you control get +1/+0 as long as Droidsmith is tapped.
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
new BoostControlledEffect(1, 0, Duration.WhileOnBattlefield, filter),
|
||||
new CompoundCondition(SourceTappedCondition.TAPPED),
|
||||
"Droid creatures you control get +1/+0 as long as Droidsmith is tapped."
|
||||
)));
|
||||
//Droid creatures you control get +0/+1 as long as Droidsmith is untapped.
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
new BoostControlledEffect(0, 1, Duration.WhileOnBattlefield, filter),
|
||||
new CompoundCondition(SourceTappedCondition.UNTAPPED),
|
||||
"Droid creatures you control get +0/+1 as long as Droidsmith is untapped."
|
||||
)));
|
||||
}
|
||||
|
||||
public Droidsmith(final Droidsmith card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Card copy() {
|
||||
return new Droidsmith(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ public enum SubType {
|
|||
ALLY("Ally", SubTypeSet.CreatureType),
|
||||
ANGEL("Angel", SubTypeSet.CreatureType),
|
||||
ANTELOPE("Antelope", SubTypeSet.CreatureType),
|
||||
ANZELLAN("Anzellan", SubTypeSet.CreatureType, true), // Star Wars
|
||||
AQUALISH("Aqualish", SubTypeSet.CreatureType, true), // Star Wars
|
||||
APE("Ape", SubTypeSet.CreatureType),
|
||||
ARCONA("Arcona", SubTypeSet.CreatureType, true),
|
||||
|
|
Loading…
Reference in a new issue