mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Implemented Cavalcade of Calamity
This commit is contained in:
parent
0404be994e
commit
e0cb67f493
2 changed files with 73 additions and 0 deletions
72
Mage.Sets/src/mage/cards/c/CavalcadeOfCalamity.java
Normal file
72
Mage.Sets/src/mage/cards/c/CavalcadeOfCalamity.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksAllTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CavalcadeOfCalamity extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter
|
||||
= new FilterCreaturePermanent("creaure you control with power 1 or less");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 2));
|
||||
}
|
||||
|
||||
public CavalcadeOfCalamity(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}");
|
||||
|
||||
// Whenever a creature you control with power 1 or less attacks, Cavalcade of Calamity deals 1 damage to the player or planeswalker that creature is attacking.
|
||||
this.addAbility(new AttacksAllTriggeredAbility(
|
||||
new CavalcadeOfCalamityEffect(), false, filter,
|
||||
SetTargetPointer.PERMANENT, false, false
|
||||
));
|
||||
}
|
||||
|
||||
private CavalcadeOfCalamity(final CavalcadeOfCalamity card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CavalcadeOfCalamity copy() {
|
||||
return new CavalcadeOfCalamity(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CavalcadeOfCalamityEffect extends OneShotEffect {
|
||||
|
||||
CavalcadeOfCalamityEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "{this} deals 1 damage to the player or planeswalker that creature is attacking.";
|
||||
}
|
||||
|
||||
private CavalcadeOfCalamityEffect(final CavalcadeOfCalamityEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CavalcadeOfCalamityEffect copy() {
|
||||
return new CavalcadeOfCalamityEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return game.damagePlayerOrPlaneswalker(
|
||||
game.getCombat().getDefenderId(source.getFirstTarget()), 1,
|
||||
source.getSourceId(), game, false, true
|
||||
) > 0;
|
||||
}
|
||||
}
|
|
@ -60,6 +60,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Burning-Tree Vandal", 94, Rarity.COMMON, mage.cards.b.BurningTreeVandal.class));
|
||||
cards.add(new SetCardInfo("Captive Audience", 160, Rarity.MYTHIC, mage.cards.c.CaptiveAudience.class));
|
||||
cards.add(new SetCardInfo("Carnival // Carnage", 222, Rarity.UNCOMMON, mage.cards.c.CarnivalCarnage.class));
|
||||
cards.add(new SetCardInfo("Cavalcade of Calamity", 95, Rarity.UNCOMMON, mage.cards.c.CavalcadeOfCalamity.class));
|
||||
cards.add(new SetCardInfo("Charging War Boar", 271, Rarity.UNCOMMON, mage.cards.c.ChargingWarBoar.class));
|
||||
cards.add(new SetCardInfo("Cindervines", 161, Rarity.RARE, mage.cards.c.Cindervines.class));
|
||||
cards.add(new SetCardInfo("Clamor Shaman", 96, Rarity.UNCOMMON, mage.cards.c.ClamorShaman.class));
|
||||
|
|
Loading…
Reference in a new issue