mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
[LTR] Implement Surrounded by Orcs
This commit is contained in:
parent
f5da1e52ba
commit
6d2bd8acaf
2 changed files with 68 additions and 0 deletions
67
Mage.Sets/src/mage/cards/s/SurroundedByOrcs.java
Normal file
67
Mage.Sets/src/mage/cards/s/SurroundedByOrcs.java
Normal file
|
@ -0,0 +1,67 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.keyword.AmassEffect;
|
||||
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.TargetPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SurroundedByOrcs extends CardImpl {
|
||||
|
||||
public SurroundedByOrcs(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}");
|
||||
|
||||
// Amass Orcs 3, then target player mills X cards, where X is the amassed Army's power.
|
||||
this.getSpellAbility().addEffect(new SurroundedByOrcsEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
}
|
||||
|
||||
private SurroundedByOrcs(final SurroundedByOrcs card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SurroundedByOrcs copy() {
|
||||
return new SurroundedByOrcs(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SurroundedByOrcsEffect extends OneShotEffect {
|
||||
|
||||
SurroundedByOrcsEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "amass Orcs 3, then target player mills X cards, where X is the amassed Army's power";
|
||||
}
|
||||
|
||||
private SurroundedByOrcsEffect(final SurroundedByOrcsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SurroundedByOrcsEffect copy() {
|
||||
return new SurroundedByOrcsEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = AmassEffect.doAmass(3, SubType.ORC, game, source);
|
||||
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (permanent == null || player == null) {
|
||||
return false;
|
||||
}
|
||||
player.millCards(permanent.getPower().getValue(), source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -120,6 +120,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Snarling Warg", 109, Rarity.COMMON, mage.cards.s.SnarlingWarg.class));
|
||||
cards.add(new SetCardInfo("Stern Scolding", 71, Rarity.UNCOMMON, mage.cards.s.SternScolding.class));
|
||||
cards.add(new SetCardInfo("Stew the Coneys", 189, Rarity.UNCOMMON, mage.cards.s.StewTheConeys.class));
|
||||
cards.add(new SetCardInfo("Surrounded by Orcs", 73, Rarity.COMMON, mage.cards.s.SurroundedByOrcs.class));
|
||||
cards.add(new SetCardInfo("Swamp", 266, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Swarming of Moria", 150, Rarity.COMMON, mage.cards.s.SwarmingOfMoria.class));
|
||||
cards.add(new SetCardInfo("Tale of Tinuviel", 34, Rarity.UNCOMMON, mage.cards.t.TaleOfTinuviel.class));
|
||||
|
|
Loading…
Reference in a new issue