forked from External/mage
[DSK] Implement Toby, Beastie Befriender
This commit is contained in:
parent
3acab4a76d
commit
2b970d676c
3 changed files with 95 additions and 0 deletions
60
Mage.Sets/src/mage/cards/t/TobyBeastieBefriender.java
Normal file
60
Mage.Sets/src/mage/cards/t/TobyBeastieBefriender.java
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.hint.ConditionHint;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.permanent.token.BeastieToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TobyBeastieBefriender extends CardImpl {
|
||||
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
|
||||
StaticFilters.FILTER_CREATURE_TOKENS, ComparisonType.MORE_THAN, 3, true
|
||||
);
|
||||
private static final Hint hint = new ConditionHint(
|
||||
condition, "You control four or more creature tokens"
|
||||
);
|
||||
|
||||
public TobyBeastieBefriender(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// When Toby, Beastie Befriender enters, create a 4/4 white Beast creature token with "This creature can't attack or block alone."
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new BeastieToken())));
|
||||
|
||||
// As long as you control four or more creature tokens, creature tokens you control have flying.
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(new GainAbilityControlledEffect(
|
||||
FlyingAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_CREATURE_TOKENS
|
||||
), condition, "as long as you control four or more creature tokens, creature tokens you control have flying")).addHint(hint));
|
||||
}
|
||||
|
||||
private TobyBeastieBefriender(final TobyBeastieBefriender card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TobyBeastieBefriender copy() {
|
||||
return new TobyBeastieBefriender(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -33,5 +33,6 @@ public final class DuskmournHouseOfHorror extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Screaming Nemesis", 157, Rarity.MYTHIC, mage.cards.s.ScreamingNemesis.class));
|
||||
cards.add(new SetCardInfo("Swamp", 274, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("The Wandering Rescuer", 41, Rarity.MYTHIC, mage.cards.t.TheWanderingRescuer.class));
|
||||
cards.add(new SetCardInfo("Toby, Beastie Befriender", 35, Rarity.RARE, mage.cards.t.TobyBeastieBefriender.class));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.CantAttackAloneAbility;
|
||||
import mage.abilities.keyword.CantBlockAloneAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class BeastieToken extends TokenImpl {
|
||||
|
||||
public BeastieToken() {
|
||||
super("Beast Token", "4/4 white Beast creature token with \"This creature can't attack or block alone.\"");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
subtype.add(SubType.BEAST);
|
||||
power = new MageInt(4);
|
||||
toughness = new MageInt(4);
|
||||
|
||||
this.addAbility(new CantAttackAloneAbility());
|
||||
this.addAbility(CantBlockAloneAbility.getInstance());
|
||||
}
|
||||
|
||||
private BeastieToken(final BeastieToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeastieToken copy() {
|
||||
return new BeastieToken(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue