mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 12:52:06 -08:00
Implemented Marble Priest
This commit is contained in:
parent
955ec5064c
commit
3dcfa773e0
3 changed files with 89 additions and 4 deletions
74
Mage.Sets/src/mage/cards/m/MarblePriest.java
Normal file
74
Mage.Sets/src/mage/cards/m/MarblePriest.java
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.PreventAllDamageToSourceEffect;
|
||||
import mage.abilities.effects.common.combat.MustBeBlockedByAllSourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MarblePriest extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.WALL, "Walls");
|
||||
|
||||
public MarblePriest(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{5}");
|
||||
|
||||
this.subtype.add(SubType.CLERIC);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// All Walls able to block Marble Priest do so.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new MustBeBlockedByAllSourceEffect(
|
||||
Duration.WhileOnBattlefield,
|
||||
filter
|
||||
)
|
||||
));
|
||||
|
||||
// Prevent all combat damage that would be dealt to Marble Priest by Walls.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new MarblePriestPreventionEffect()
|
||||
));
|
||||
}
|
||||
|
||||
public MarblePriest(final MarblePriest card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MarblePriest copy() {
|
||||
return new MarblePriest(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MarblePriestPreventionEffect extends PreventAllDamageToSourceEffect {
|
||||
|
||||
public MarblePriestPreventionEffect() {
|
||||
super(Duration.WhileOnBattlefield);
|
||||
staticText = "Prevent all combat damage that would be dealt to {this} by Walls";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return super.applies(event, source, game)
|
||||
&& event.getFlag()
|
||||
&& game.getObject(event.getSourceId()).hasSubtype(SubType.WALL, game)
|
||||
&& event.getTargetId().equals(source.getSourceId());
|
||||
}
|
||||
}
|
||||
|
|
@ -173,6 +173,7 @@ public final class Legends extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Lost Soul", 111, Rarity.COMMON, mage.cards.l.LostSoul.class));
|
||||
cards.add(new SetCardInfo("Mana Drain", 65, Rarity.UNCOMMON, mage.cards.m.ManaDrain.class));
|
||||
cards.add(new SetCardInfo("Mana Matrix", 285, Rarity.RARE, mage.cards.m.ManaMatrix.class));
|
||||
cards.add(new SetCardInfo("Marble Priest", 231, Rarity.UNCOMMON, mage.cards.m.MarblePriest.class));
|
||||
cards.add(new SetCardInfo("Marhault Elsdragon", 244, Rarity.UNCOMMON, mage.cards.m.MarhaultElsdragon.class));
|
||||
cards.add(new SetCardInfo("Mirror Universe", 287, Rarity.RARE, mage.cards.m.MirrorUniverse.class));
|
||||
cards.add(new SetCardInfo("Moat", 28, Rarity.RARE, mage.cards.m.Moat.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue