mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
Implement Soldevi Sentry
This commit is contained in:
parent
fad76ba4e0
commit
8db00d34de
2 changed files with 70 additions and 0 deletions
68
Mage.Sets/src/mage/cards/s/SoldeviSentry.java
Normal file
68
Mage.Sets/src/mage/cards/s/SoldeviSentry.java
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.RegenerateSourceEffect;
|
||||
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 mage.players.Player;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ketsuban
|
||||
*/
|
||||
public final class SoldeviSentry extends CardImpl {
|
||||
|
||||
public SoldeviSentry(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[] { CardType.ARTIFACT, CardType.CREATURE }, "{1}");
|
||||
this.subtype.add(SubType.SOLDIER);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// 1: Choose target opponent. Regenerate Soldevi Sentry. When it regenerates
|
||||
// this way, that player may draw a card.
|
||||
Ability ability = new SimpleActivatedAbility(new SoldeviSentryEffect(), new GenericManaCost(1));
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public SoldeviSentry(final SoldeviSentry card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoldeviSentry copy() {
|
||||
return new SoldeviSentry(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SoldeviSentryEffect extends RegenerateSourceEffect {
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
//20110204 - 701.11
|
||||
Player opponent = game.getPlayer(source.getFirstTarget());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null && permanent.regenerate(this.getId(), game)) {
|
||||
if (opponent != null) {
|
||||
if (opponent.chooseUse(Outcome.DrawCard, "Draw a card?", source, game)) {
|
||||
opponent.drawCards(1, game);
|
||||
}
|
||||
}
|
||||
this.used = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -171,6 +171,8 @@ public final class Alliances extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Soldevi Heretic", "33b", Rarity.COMMON, mage.cards.s.SoldeviHeretic.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Soldevi Sage", "34a", Rarity.COMMON, mage.cards.s.SoldeviSage.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Soldevi Sage", "34b", Rarity.COMMON, mage.cards.s.SoldeviSage.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Soldevi Sentry", "132a", Rarity.COMMON, mage.cards.s.SoldeviSentry.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Soldevi Sentry", "132b", Rarity.COMMON, mage.cards.s.SoldeviSentry.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Soldevi Steam Beast", "133a", Rarity.COMMON, mage.cards.s.SoldeviSteamBeast.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Soldevi Steam Beast", "133b", Rarity.COMMON, mage.cards.s.SoldeviSteamBeast.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Soldier of Fortune", 80, Rarity.UNCOMMON, mage.cards.s.SoldierOfFortune.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue