mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Implemented Plague Wight
This commit is contained in:
parent
0d32b501af
commit
cf2b6c3dae
2 changed files with 75 additions and 0 deletions
74
Mage.Sets/src/mage/cards/p/PlagueWight.java
Normal file
74
Mage.Sets/src/mage/cards/p/PlagueWight.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BecomesBlockedTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.BlockedByIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class PlagueWight extends CardImpl {
|
||||
|
||||
public PlagueWight(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
|
||||
this.subtype.add(SubType.ZOMBIE);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever Plague Wight becomes blocked, each creature blocking it gets -1/-1 until end of turn.
|
||||
this.addAbility(new BecomesBlockedTriggeredAbility(new PlagueWightEffect(), false));
|
||||
}
|
||||
|
||||
private PlagueWight(final PlagueWight card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlagueWight copy() {
|
||||
return new PlagueWight(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PlagueWightEffect extends OneShotEffect {
|
||||
|
||||
PlagueWightEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "each creature blocking it gets -1/-1 until end of turn.";
|
||||
}
|
||||
|
||||
private PlagueWightEffect(final PlagueWightEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlagueWightEffect copy() {
|
||||
return new PlagueWightEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
filter.add(new BlockedByIdPredicate(source.getSourceId()));
|
||||
game.addEffect(new BoostAllEffect(-1, -1, Duration.EndOfTurn, filter, false), source);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -189,6 +189,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Persistent Petitioners", 44, Rarity.COMMON, mage.cards.p.PersistentPetitioners.class));
|
||||
cards.add(new SetCardInfo("Pestilent Spirit", 81, Rarity.RARE, mage.cards.p.PestilentSpirit.class));
|
||||
cards.add(new SetCardInfo("Pitiless Pontiff", 194, Rarity.UNCOMMON, mage.cards.p.PitilessPontiff.class));
|
||||
cards.add(new SetCardInfo("Plague Wight", 82, Rarity.COMMON, mage.cards.p.PlagueWight.class));
|
||||
cards.add(new SetCardInfo("Plains", 260, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Plaza of Harmony", 254, Rarity.RARE, mage.cards.p.PlazaOfHarmony.class));
|
||||
cards.add(new SetCardInfo("Precognitive Perception", 45, Rarity.RARE, mage.cards.p.PrecognitivePerception.class));
|
||||
|
|
Loading…
Reference in a new issue