mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
updated Blightning and Rakdos's Return
This commit is contained in:
parent
f53ec85471
commit
9fe08dd438
2 changed files with 93 additions and 15 deletions
|
@ -24,17 +24,24 @@
|
|||
* 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.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetPlayerOrPlaneswalker;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -43,14 +50,12 @@ import mage.target.TargetPlayer;
|
|||
public class Blightning extends CardImpl {
|
||||
|
||||
public Blightning(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}{R}");
|
||||
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{R}");
|
||||
|
||||
// Blightning deals 3 damage to target player. That player discards two cards.
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
|
||||
this.getSpellAbility().addEffect(new DiscardTargetEffect(2));
|
||||
this.getSpellAbility().addEffect(new BlightningEffect());
|
||||
}
|
||||
|
||||
public Blightning(final Blightning card) {
|
||||
|
@ -62,3 +67,37 @@ public class Blightning extends CardImpl {
|
|||
return new Blightning(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BlightningEffect extends OneShotEffect {
|
||||
|
||||
BlightningEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "That player or that planeswalker’s controller discards two cards.";
|
||||
}
|
||||
|
||||
BlightningEffect(final BlightningEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlightningEffect copy() {
|
||||
return new BlightningEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
if (player == null) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
player = game.getPlayer(permanent.getControllerId());
|
||||
}
|
||||
}
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Effect effect = new DiscardTargetEffect(2);
|
||||
effect.setTargetPointer(new FixedTarget(player.getId(), game));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,17 +25,24 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetOpponent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -43,18 +50,16 @@ import mage.target.common.TargetOpponent;
|
|||
*/
|
||||
public class RakdossReturn extends CardImpl {
|
||||
|
||||
public RakdossReturn (UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{B}{R}");
|
||||
|
||||
|
||||
public RakdossReturn(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{B}{R}");
|
||||
|
||||
// Rakdos's Return deals X damage to target opponent. That player discards X cards.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue()));
|
||||
this.getSpellAbility().addEffect(new DiscardTargetEffect(new ManacostVariableValue()));
|
||||
this.getSpellAbility().addEffect(new RakdossReturnEffect());
|
||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||
}
|
||||
|
||||
public RakdossReturn (final RakdossReturn card) {
|
||||
public RakdossReturn(final RakdossReturn card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
@ -63,3 +68,37 @@ public class RakdossReturn extends CardImpl {
|
|||
return new RakdossReturn(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RakdossReturnEffect extends OneShotEffect {
|
||||
|
||||
RakdossReturnEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "That player or that planeswalker’s controller discards X cards.";
|
||||
}
|
||||
|
||||
RakdossReturnEffect(final RakdossReturnEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RakdossReturnEffect copy() {
|
||||
return new RakdossReturnEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
if (player == null) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
player = game.getPlayer(permanent.getControllerId());
|
||||
}
|
||||
}
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Effect effect = new DiscardTargetEffect(new ManacostVariableValue());
|
||||
effect.setTargetPointer(new FixedTarget(player.getId(), game));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue