mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Revision 704 hosed targeted spells.
This commit is contained in:
parent
b468731842
commit
cba120cb24
4 changed files with 0 additions and 34 deletions
|
@ -240,7 +240,6 @@ public class GameState implements Serializable, Copyable<GameState> {
|
|||
for (Player player: players.values()) {
|
||||
player.reset();
|
||||
}
|
||||
stack.reset(game);
|
||||
battlefield.reset(game);
|
||||
effects.apply(game);
|
||||
}
|
||||
|
|
|
@ -41,16 +41,12 @@ import mage.MageObject;
|
|||
import mage.ObjectColor;
|
||||
import mage.abilities.Abilities;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.AlternativeCost;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.Costs;
|
||||
import mage.abilities.costs.mana.ManaCost;
|
||||
import mage.abilities.costs.mana.ManaCosts;
|
||||
import mage.abilities.effects.common.ExileSpellEffect;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.ManaPool;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.watchers.Watchers;
|
||||
|
@ -157,28 +153,6 @@ public class Spell<T extends Spell<T>> implements StackObject, Card {
|
|||
card.moveToZone(Zone.GRAVEYARD, sourceId, game, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset ( Game game ) {
|
||||
Mana oldPayment = ability.getManaCosts().getPayment();
|
||||
ManaPool tmpPool = new ManaPool();
|
||||
tmpPool.changeMana(oldPayment);
|
||||
List<AlternativeCost> oldAltCosts = ability.getAlternativeCosts();
|
||||
Costs<Cost> oldOptionalCosts = ability.getOptionalCosts();
|
||||
Costs<Cost> oldCosts = ability.getCosts();
|
||||
|
||||
//Get a fresh copy of the spell ability.
|
||||
ability = card.getSpellAbility().copy();
|
||||
|
||||
//Reload all the payments for all costs.
|
||||
ability.getManaCosts().assignPayment(tmpPool);
|
||||
ability.getAlternativeCosts().clear();
|
||||
ability.getAlternativeCosts().addAll(oldAltCosts);
|
||||
ability.getOptionalCosts().clear();
|
||||
ability.getOptionalCosts().addAll(oldOptionalCosts);
|
||||
ability.getCosts().clear();
|
||||
ability.getCosts().addAll(oldCosts);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID getSourceId() {
|
||||
return card.getId();
|
||||
|
|
|
@ -134,12 +134,6 @@ public class SpellStack extends Stack<StackObject> {
|
|||
return null;
|
||||
}
|
||||
|
||||
public void reset ( Game game ) {
|
||||
for ( StackObject stackObject : this ) {
|
||||
stackObject.reset(game);
|
||||
}
|
||||
}
|
||||
|
||||
public SpellStack copy() {
|
||||
return new SpellStack(this);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,6 @@ public interface StackObject extends MageObject {
|
|||
public UUID getControllerId();
|
||||
public void checkTriggers(GameEvent event, Game game);
|
||||
public void counter(UUID sourceId, Game game);
|
||||
public void reset ( Game game );
|
||||
@Override
|
||||
public StackObject copy();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue