forked from External/mage
implemented Widespread Brutality
This commit is contained in:
parent
ffef19fe43
commit
3d45543346
2 changed files with 75 additions and 0 deletions
74
Mage.Sets/src/mage/cards/w/WidespreadBrutality.java
Normal file
74
Mage.Sets/src/mage/cards/w/WidespreadBrutality.java
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
package mage.cards.w;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.keyword.AmassEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class WidespreadBrutality extends CardImpl {
|
||||
|
||||
public WidespreadBrutality(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{R}{R}");
|
||||
|
||||
// Amass 2, then the Army you amassed deals damage equal to its power to each non-Army creature.
|
||||
this.getSpellAbility().addEffect(new WidespreadBrutalityEffect());
|
||||
}
|
||||
|
||||
private WidespreadBrutality(final WidespreadBrutality card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WidespreadBrutality copy() {
|
||||
return new WidespreadBrutality(this);
|
||||
}
|
||||
}
|
||||
|
||||
class WidespreadBrutalityEffect extends OneShotEffect {
|
||||
|
||||
WidespreadBrutalityEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Amass 2, then the Army you amassed deals damage equal to its power to each non-Army creature. " +
|
||||
"<i>(To amass 2, put two +1/+1 counters on an Army you control. " +
|
||||
"If you don’t control one, create a 0/0 black Zombie Army creature token first.)</i>";
|
||||
}
|
||||
|
||||
private WidespreadBrutalityEffect(final WidespreadBrutalityEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WidespreadBrutalityEffect copy() {
|
||||
return new WidespreadBrutalityEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
AmassEffect amassEffect = new AmassEffect(2);
|
||||
if (!amassEffect.apply(game, source)) {
|
||||
return false;
|
||||
}
|
||||
Permanent amassedArmy = game.getPermanent(amassEffect.getAmassedCreatureId());
|
||||
if (amassedArmy == null) {
|
||||
return false;
|
||||
}
|
||||
int power = amassedArmy.getPower().getValue();
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) {
|
||||
if (permanent != null && permanent.isCreature() && !permanent.hasSubtype(SubType.ARMY, game)) {
|
||||
permanent.damage(power, amassedArmy.getId(), game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -41,5 +41,6 @@ public final class WarOfTheSpark extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Swamp", 256, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Swamp", 257, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Swamp", 258, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Widespread Brutality", 226, Rarity.RARE, mage.cards.w.WidespreadBrutality.class));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue