mirror of
https://github.com/correl/mage.git
synced 2025-01-12 03:00:13 +00:00
[EMA] Added Prowling Pangolin and fixed some wrong rarities.
This commit is contained in:
parent
5c8c6a3aeb
commit
8c6f44386d
22 changed files with 229 additions and 20 deletions
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class Avarax extends mage.sets.onslaught.Avarax {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class Avarax extends mage.sets.onslaught.Avarax {
|
|||
super(ownerId);
|
||||
this.cardNumber = 117;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public Avarax(final Avarax card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class CephalidSage extends mage.sets.torment.CephalidSage {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class CephalidSage extends mage.sets.torment.CephalidSage {
|
|||
super(ownerId);
|
||||
this.cardNumber = 41;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public CephalidSage(final CephalidSage card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class DragonEgg extends mage.sets.magic2014.DragonEgg {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class DragonEgg extends mage.sets.magic2014.DragonEgg {
|
|||
super(ownerId);
|
||||
this.cardNumber = 126;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public DragonEgg(final DragonEgg card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class EliteVanguard extends mage.sets.magic2010.EliteVanguard {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class EliteVanguard extends mage.sets.magic2010.EliteVanguard {
|
|||
super(ownerId);
|
||||
this.cardNumber = 8;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public EliteVanguard(final EliteVanguard card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class ElvishVanguard extends mage.sets.onslaught.ElvishVanguard {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class ElvishVanguard extends mage.sets.onslaught.ElvishVanguard {
|
|||
super(ownerId);
|
||||
this.cardNumber = 164;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public ElvishVanguard(final ElvishVanguard card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class FieldOfSouls extends mage.sets.tempestremastered.FieldOfSouls {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class FieldOfSouls extends mage.sets.tempestremastered.FieldOfSouls {
|
|||
super(ownerId);
|
||||
this.cardNumber = 11;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.UNCOMMON;
|
||||
}
|
||||
|
||||
public FieldOfSouls(final FieldOfSouls card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class GlacialWall extends mage.sets.fifthedition.GlacialWall {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class GlacialWall extends mage.sets.fifthedition.GlacialWall {
|
|||
super(ownerId);
|
||||
this.cardNumber = 53;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public GlacialWall(final GlacialWall card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class Humble extends mage.sets.urzassaga.Humble {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class Humble extends mage.sets.urzassaga.Humble {
|
|||
super(ownerId);
|
||||
this.cardNumber = 14;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public Humble(final Humble card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class MerfolkLooter extends mage.sets.magic2012.MerfolkLooter {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class MerfolkLooter extends mage.sets.magic2012.MerfolkLooter {
|
|||
super(ownerId);
|
||||
this.cardNumber = 61;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.UNCOMMON;
|
||||
}
|
||||
|
||||
public MerfolkLooter(final MerfolkLooter card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class MistralCharger extends mage.sets.dissension.MistralCharger {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class MistralCharger extends mage.sets.dissension.MistralCharger {
|
|||
super(ownerId);
|
||||
this.cardNumber = 20;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public MistralCharger(final MistralCharger card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class MonkIdealist extends mage.sets.urzassaga.MonkIdealist {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class MonkIdealist extends mage.sets.urzassaga.MonkIdealist {
|
|||
super(ownerId);
|
||||
this.cardNumber = 21;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public MonkIdealist(final MonkIdealist card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class NightsWhisper extends mage.sets.fifthdawn.NightsWhisper {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class NightsWhisper extends mage.sets.fifthdawn.NightsWhisper {
|
|||
super(ownerId);
|
||||
this.cardNumber = 100;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public NightsWhisper(final NightsWhisper card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class OrcishOriflamme extends mage.sets.limitedalpha.OrcishOriflamme {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class OrcishOriflamme extends mage.sets.limitedalpha.OrcishOriflamme {
|
|||
super(ownerId);
|
||||
this.cardNumber = 140;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public OrcishOriflamme(final OrcishOriflamme card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class PeregrineDrake extends mage.sets.urzassaga.PeregrineDrake {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class PeregrineDrake extends mage.sets.urzassaga.PeregrineDrake {
|
|||
super(ownerId);
|
||||
this.cardNumber = 64;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public PeregrineDrake(final PeregrineDrake card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class PhantomMonster extends mage.sets.fifthedition.PhantomMonster {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class PhantomMonster extends mage.sets.fifthedition.PhantomMonster {
|
|||
super(ownerId);
|
||||
this.cardNumber = 65;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public PhantomMonster(final PhantomMonster card) {
|
||||
|
|
54
Mage.Sets/src/mage/sets/eternalmasters/ProwlingPangolin.java
Normal file
54
Mage.Sets/src/mage/sets/eternalmasters/ProwlingPangolin.java
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ProwlingPangolin extends mage.sets.onslaught.ProwlingPangolin {
|
||||
|
||||
public ProwlingPangolin(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 104;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public ProwlingPangolin(final ProwlingPangolin card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProwlingPangolin copy() {
|
||||
return new ProwlingPangolin(this);
|
||||
}
|
||||
}
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class RallyThePeasants extends mage.sets.innistrad.RallyThePeasants {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class RallyThePeasants extends mage.sets.innistrad.RallyThePeasants {
|
|||
super(ownerId);
|
||||
this.cardNumber = 25;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public RallyThePeasants(final RallyThePeasants card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class StupefyingTouch extends mage.sets.torment.StupefyingTouch {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class StupefyingTouch extends mage.sets.torment.StupefyingTouch {
|
|||
super(ownerId);
|
||||
this.cardNumber = 74;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public StupefyingTouch(final StupefyingTouch card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class TidalWave extends mage.sets.mirage.TidalWave {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class TidalWave extends mage.sets.mirage.TidalWave {
|
|||
super(ownerId);
|
||||
this.cardNumber = 75;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public TidalWave(final TidalWave card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class UndyingRage extends mage.sets.heroesvsmonsters.UndyingRage {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class UndyingRage extends mage.sets.heroesvsmonsters.UndyingRage {
|
|||
super(ownerId);
|
||||
this.cardNumber = 152;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public UndyingRage(final UndyingRage card) {
|
||||
|
|
|
@ -28,11 +28,12 @@
|
|||
package mage.sets.eternalmasters;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.Rarity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
|
||||
*
|
||||
*/
|
||||
public class WardenOfEvosIsle extends mage.sets.magic2014.WardenOfEvosIsle {
|
||||
|
||||
|
@ -40,6 +41,7 @@ public class WardenOfEvosIsle extends mage.sets.magic2014.WardenOfEvosIsle {
|
|||
super(ownerId);
|
||||
this.cardNumber = 76;
|
||||
this.expansionSetCode = "EMA";
|
||||
this.rarity = Rarity.COMMON;
|
||||
}
|
||||
|
||||
public WardenOfEvosIsle(final WardenOfEvosIsle card) {
|
||||
|
|
115
Mage.Sets/src/mage/sets/onslaught/ProwlingPangolin.java
Normal file
115
Mage.Sets/src/mage/sets/onslaught/ProwlingPangolin.java
Normal file
|
@ -0,0 +1,115 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.onslaught;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ProwlingPangolin extends CardImpl {
|
||||
|
||||
public ProwlingPangolin(UUID ownerId) {
|
||||
super(ownerId, 163, "Prowling Pangolin", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
||||
this.expansionSetCode = "ONS";
|
||||
this.subtype.add("Beast");
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// When Prowling Pangolin enters the battlefield, any player may sacrifice two creatures. If a player does, sacrifice Prowling Pangolin.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new ProwlingPangolinEffect(), false));
|
||||
}
|
||||
|
||||
public ProwlingPangolin(final ProwlingPangolin card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProwlingPangolin copy() {
|
||||
return new ProwlingPangolin(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ProwlingPangolinEffect extends OneShotEffect {
|
||||
|
||||
ProwlingPangolinEffect() {
|
||||
super(Outcome.Sacrifice);
|
||||
this.staticText = "any player may sacrifice two creatures. If a player does, sacrifice {this}";
|
||||
}
|
||||
|
||||
ProwlingPangolinEffect(final ProwlingPangolinEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProwlingPangolinEffect copy() {
|
||||
return new ProwlingPangolinEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
boolean costPaid = false;
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Cost cost = new SacrificeTargetCost(new TargetControlledPermanent(2, 2, new FilterControlledCreaturePermanent("two creatures"), true));
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null
|
||||
&& cost.canPay(source, source.getSourceId(), playerId, game)
|
||||
&& player.chooseUse(Outcome.Sacrifice, "Sacrifice two creatures?", source, game)
|
||||
&& cost.pay(source, game, source.getSourceId(), playerId, true, null)) {
|
||||
costPaid = true;
|
||||
}
|
||||
}
|
||||
if (costPaid) {
|
||||
Permanent sourceObject = game.getPermanent(source.getSourceId());
|
||||
if (sourceObject != null) {
|
||||
sourceObject.sacrifice(source.getSourceId(), game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue