Painfull Quandary changed to fixedTarget

This commit is contained in:
North 2011-09-15 23:50:23 +03:00
parent 970bef84d1
commit ad46d3afc7
2 changed files with 4 additions and 5 deletions

View file

@ -77,7 +77,7 @@ class FireballEffect extends OneShotEffect<FireballEffect> {
public FireballEffect() {
super(Outcome.Damage);
staticText = "{this} deals X damage divided evenly, rounded down, among any number of target creatures and/or players.\n {this} costs {1} more to cast for each target beyond the first.";
staticText = "{this} deals X damage divided evenly, rounded down, among any number of target creatures and/or players.\n {this} costs {1} more to cast for each target beyond the first";
}
public FireballEffect(final FireballEffect effect) {

View file

@ -42,8 +42,8 @@ import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.players.Player;
import mage.target.TargetPlayer;
import mage.target.common.TargetCardInHand;
import mage.target.targetpointer.FixedTarget;
/**
*
@ -73,7 +73,6 @@ class PainfulQuandryAbility extends TriggeredAbilityImpl<PainfulQuandryAbility>
public PainfulQuandryAbility() {
super(Zone.BATTLEFIELD, new PainfulQuandryEffect());
this.addTarget(new TargetPlayer());
}
public PainfulQuandryAbility(final PainfulQuandryAbility ability) {
@ -88,7 +87,7 @@ class PainfulQuandryAbility extends TriggeredAbilityImpl<PainfulQuandryAbility>
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == EventType.SPELL_CAST && game.getOpponents(controllerId).contains(event.getPlayerId())) {
this.getTargets().get(0).add(event.getPlayerId(), game);
this.getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId()));
return true;
}
return false;
@ -118,7 +117,7 @@ class PainfulQuandryEffect extends OneShotEffect<PainfulQuandryEffect> {
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getFirstTarget());
Player player = game.getPlayer(targetPointer.getFirst(source));
if (player != null) {
Cost cost = new DiscardTargetCost(new TargetCardInHand());
if (!cost.pay(source, game, player.getId(), player.getId(), false)) {