mirror of
https://github.com/correl/mage.git
synced 2025-01-16 11:08:00 +00:00
[MOC] Implement Shalai and Hallar
This commit is contained in:
parent
56d37b3496
commit
56a4ef5443
2 changed files with 100 additions and 0 deletions
99
Mage.Sets/src/mage/cards/s/ShalaiAndHallar.java
Normal file
99
Mage.Sets/src/mage/cards/s/ShalaiAndHallar.java
Normal file
|
@ -0,0 +1,99 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.dynamicvalue.common.SavedDamageValue;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ShalaiAndHallar extends CardImpl {
|
||||
|
||||
public ShalaiAndHallar(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}{W}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.ANGEL);
|
||||
this.subtype.add(SubType.ELF);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// Whenever one or more +1/+1 counters are put on a creature you control, Shalai and Hallar deals that much damage to target opponent.
|
||||
this.addAbility(new ShalaiAndHallarTriggeredAbility());
|
||||
}
|
||||
|
||||
private ShalaiAndHallar(final ShalaiAndHallar card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShalaiAndHallar copy() {
|
||||
return new ShalaiAndHallar(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ShalaiAndHallarTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
ShalaiAndHallarTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DamageTargetEffect(SavedDamageValue.MUCH));
|
||||
this.addTarget(new TargetOpponent());
|
||||
}
|
||||
|
||||
private ShalaiAndHallarTriggeredAbility(final ShalaiAndHallarTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShalaiAndHallarTriggeredAbility copy() {
|
||||
return new ShalaiAndHallarTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.COUNTERS_ADDED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (!event.getData().equals(CounterType.P1P1.getName())
|
||||
|| event.getAmount() < 1) {
|
||||
return false;
|
||||
}
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (permanent == null
|
||||
|| !permanent.isControlledBy(this.getControllerId())
|
||||
|| !permanent.isCreature(game)) {
|
||||
return false;
|
||||
}
|
||||
this.getEffects().setValue("damage", event.getAmount());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever one or more +1/+1 counters are put on a creature you control, " +
|
||||
"{this} deals that much damage to target opponent.";
|
||||
}
|
||||
}
|
|
@ -254,6 +254,7 @@ public final class MarchOfTheMachineCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Secure the Wastes", 203, Rarity.RARE, mage.cards.s.SecureTheWastes.class));
|
||||
cards.add(new SetCardInfo("Semester's End", 204, Rarity.RARE, mage.cards.s.SemestersEnd.class));
|
||||
cards.add(new SetCardInfo("Seraph of the Masses", 205, Rarity.UNCOMMON, mage.cards.s.SeraphOfTheMasses.class));
|
||||
cards.add(new SetCardInfo("Shalai and Hallar", 10, Rarity.MYTHIC, mage.cards.s.ShalaiAndHallar.class));
|
||||
cards.add(new SetCardInfo("Sharding Sphinx", 235, Rarity.RARE, mage.cards.s.ShardingSphinx.class));
|
||||
cards.add(new SetCardInfo("Shattered Angel", 206, Rarity.UNCOMMON, mage.cards.s.ShatteredAngel.class));
|
||||
cards.add(new SetCardInfo("Shimmer Dragon", 236, Rarity.RARE, mage.cards.s.ShimmerDragon.class));
|
||||
|
|
Loading…
Reference in a new issue