mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[SPE] Implement Double Trouble
This commit is contained in:
parent
bb37e79665
commit
447a5e33dd
2 changed files with 69 additions and 0 deletions
68
Mage.Sets/src/mage/cards/d/DoubleTrouble.java
Normal file
68
Mage.Sets/src/mage/cards/d/DoubleTrouble.java
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DoubleTrouble extends CardImpl {
|
||||
|
||||
public DoubleTrouble(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{R}");
|
||||
|
||||
// Double the power of each creature you control until end of turn.
|
||||
this.getSpellAbility().addEffect(new DoubleTroubleEffect());
|
||||
}
|
||||
|
||||
private DoubleTrouble(final DoubleTrouble card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleTrouble copy() {
|
||||
return new DoubleTrouble(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DoubleTroubleEffect extends OneShotEffect {
|
||||
|
||||
DoubleTroubleEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "double the power of each creature you control until end of turn";
|
||||
}
|
||||
|
||||
private DoubleTroubleEffect(final DoubleTroubleEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleTroubleEffect copy() {
|
||||
return new DoubleTroubleEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE, source.getControllerId(), source, game
|
||||
)) {
|
||||
int power = permanent.getPower().getValue();
|
||||
if (power != 0) {
|
||||
game.addEffect(new BoostTargetEffect(power, 0)
|
||||
.setTargetPointer(new FixedTarget(permanent, game)), source);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -23,6 +23,7 @@ public final class MarvelsSpiderManEternal extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Alchemax Slayer-Bots", 5, Rarity.COMMON, mage.cards.a.AlchemaxSlayerBots.class));
|
||||
cards.add(new SetCardInfo("Amateur Hero", 1, Rarity.COMMON, mage.cards.a.AmateurHero.class));
|
||||
cards.add(new SetCardInfo("Doc Ock, Evil Inventor", 24, Rarity.RARE, mage.cards.d.DocOckEvilInventor.class));
|
||||
cards.add(new SetCardInfo("Double Trouble", 13, Rarity.RARE, mage.cards.d.DoubleTrouble.class));
|
||||
cards.add(new SetCardInfo("Future Flight", 6, Rarity.RARE, mage.cards.f.FutureFlight.class));
|
||||
cards.add(new SetCardInfo("Grasping Tentacles", 21, Rarity.RARE, mage.cards.g.GraspingTentacles.class));
|
||||
cards.add(new SetCardInfo("Green Goblin, Nemesis", 23, Rarity.RARE, mage.cards.g.GreenGoblinNemesis.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue