mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Implemented Swathcutter Giant
This commit is contained in:
parent
9e155309ef
commit
66c41358c3
2 changed files with 76 additions and 0 deletions
75
Mage.Sets/src/mage/cards/s/SwathcutterGiant.java
Normal file
75
Mage.Sets/src/mage/cards/s/SwathcutterGiant.java
Normal file
|
@ -0,0 +1,75 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageAllEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SwathcutterGiant extends CardImpl {
|
||||
|
||||
public SwathcutterGiant(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{W}");
|
||||
|
||||
this.subtype.add(SubType.GIANT);
|
||||
this.subtype.add(SubType.SOLDIER);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// Whenever Swathcutter Giant attacks, it deals 1 damage to each creature defending player controls.
|
||||
this.addAbility(new AttacksTriggeredAbility(new SwathcutterGiantEffect(), false));
|
||||
}
|
||||
|
||||
public SwathcutterGiant(final SwathcutterGiant card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SwathcutterGiant copy() {
|
||||
return new SwathcutterGiant(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SwathcutterGiantEffect extends OneShotEffect {
|
||||
|
||||
public SwathcutterGiantEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "it deals 1 damage to each creature "
|
||||
+ "defending player controls.";
|
||||
}
|
||||
|
||||
public SwathcutterGiantEffect(final SwathcutterGiantEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SwathcutterGiantEffect copy() {
|
||||
return new SwathcutterGiantEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
filter.add(new ControllerIdPredicate(
|
||||
game.getCombat().getDefenderId(source.getSourceId())
|
||||
));
|
||||
return new DamageAllEffect(1, filter).apply(game, source);
|
||||
}
|
||||
}
|
|
@ -168,6 +168,7 @@ public final class GuildsOfRavnica extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sunhome Stalwart", 26, Rarity.UNCOMMON, mage.cards.s.SunhomeStalwart.class));
|
||||
cards.add(new SetCardInfo("Swamp", 262, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Swarm Guildmage", 201, Rarity.UNCOMMON, mage.cards.s.SwarmGuildmage.class));
|
||||
cards.add(new SetCardInfo("Swathcutter Giant", 202, Rarity.UNCOMMON, mage.cards.s.SwathcutterGiant.class));
|
||||
cards.add(new SetCardInfo("Swiftblade Vindicator", 203, Rarity.RARE, mage.cards.s.SwiftbladeVindicator.class));
|
||||
cards.add(new SetCardInfo("Temple Garden", 258, Rarity.RARE, mage.cards.t.TempleGarden.class));
|
||||
cards.add(new SetCardInfo("Thought Erasure", 206, Rarity.UNCOMMON, mage.cards.t.ThoughtErasure.class));
|
||||
|
|
Loading…
Reference in a new issue