mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Implemented Dovin, Grand Arbiter
This commit is contained in:
parent
a62cad1319
commit
8c95d89fb7
3 changed files with 108 additions and 1 deletions
106
Mage.Sets/src/mage/cards/d/DovinGrandArbiter.java
Normal file
106
Mage.Sets/src/mage/cards/d/DovinGrandArbiter.java
Normal file
|
@ -0,0 +1,106 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.ThopterColorlessToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DovinGrandArbiter extends CardImpl {
|
||||
|
||||
public DovinGrandArbiter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{W}{U}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.DOVIN);
|
||||
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(3));
|
||||
|
||||
// +1: Until end of turn, whenever a creature you control deals combat damage to a player, put a loyalty counter on Dovin, Grand Arbiter.
|
||||
this.addAbility(new LoyaltyAbility(new CreateDelayedTriggeredAbilityEffect(
|
||||
new DovinGrandArbiterDelayedTriggeredAbility(), false
|
||||
), 1));
|
||||
|
||||
// -1: Create a 1/1 colorless Thopter artifact creature token with flying. You gain 1 life.
|
||||
Ability ability = new LoyaltyAbility(new CreateTokenEffect(new ThopterColorlessToken()), -1);
|
||||
ability.addEffect(new GainLifeEffect(1).setText("You gain 1 life."));
|
||||
this.addAbility(ability);
|
||||
|
||||
// -7: Look at the top ten cards of your library. Put three of them into your hand and the rest on the bottom of your library in a random order.
|
||||
this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect(
|
||||
new StaticValue(10), false,
|
||||
new StaticValue(3), StaticFilters.FILTER_CARD,
|
||||
Zone.LIBRARY, false, false, false,
|
||||
Zone.HAND, false, false, false
|
||||
).setText("Look at the top ten cards of your library. " +
|
||||
"Put three of them into your hand and the rest " +
|
||||
"on the bottom of your library in a random order.")));
|
||||
}
|
||||
|
||||
private DovinGrandArbiter(final DovinGrandArbiter card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DovinGrandArbiter copy() {
|
||||
return new DovinGrandArbiter(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DovinGrandArbiterDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
||||
|
||||
DovinGrandArbiterDelayedTriggeredAbility() {
|
||||
super(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance()), Duration.EndOfTurn);
|
||||
}
|
||||
|
||||
private DovinGrandArbiterDelayedTriggeredAbility(final DovinGrandArbiterDelayedTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DovinGrandArbiterDelayedTriggeredAbility copy() {
|
||||
return new DovinGrandArbiterDelayedTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGED_PLAYER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (((DamagedPlayerEvent) event).isCombatDamage()) {
|
||||
Permanent creature = game.getPermanent(event.getSourceId());
|
||||
if (creature != null && creature.isControlledBy(controllerId)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Until end of turn, whenever a creature you control " +
|
||||
"deals combat damage to a player, " +
|
||||
"put a loyalty counter on {this}.";
|
||||
}
|
||||
}
|
|
@ -41,6 +41,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Blood Crypt", 245, Rarity.RARE, mage.cards.b.BloodCrypt.class));
|
||||
cards.add(new SetCardInfo("Breeding Pool", 246, Rarity.RARE, mage.cards.b.BreedingPool.class));
|
||||
cards.add(new SetCardInfo("Deputy of Detention", 165, Rarity.RARE, mage.cards.d.DeputyOfDetention.class));
|
||||
cards.add(new SetCardInfo("Dovin, Grand Arbiter", 167, Rarity.MYTHIC, mage.cards.d.DovinGrandArbiter.class));
|
||||
cards.add(new SetCardInfo("Emergency Powers", 169, Rarity.MYTHIC, mage.cards.e.EmergencyPowers.class));
|
||||
cards.add(new SetCardInfo("Frenzied Arynx", 173, Rarity.COMMON, mage.cards.f.FrenziedArynx.class));
|
||||
cards.add(new SetCardInfo("Gate Colossus", 232, Rarity.UNCOMMON, mage.cards.g.GateColossus.class));
|
||||
|
|
|
@ -30,7 +30,7 @@ public final class [=$className=] extends CardImpl {
|
|||
[=$subType=][=$colors=][=
|
||||
if ($power || $power eq 0) {
|
||||
if ($planeswalker eq 'true') {
|
||||
$OUT .= "\n this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility($power));";
|
||||
$OUT .= "\n this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility($power));";
|
||||
} else {
|
||||
$OUT .= "\n this.power = new MageInt($power);";
|
||||
$OUT .= "\n this.toughness = new MageInt($toughness);";
|
||||
|
|
Loading…
Reference in a new issue