- AdditionalCostsPaid will now be cleared when a card hits the graveyard.

This commit is contained in:
Sloth
2012-11-13 20:32:37 +00:00
parent 960eddf543
commit b36d711d75
2 changed files with 13 additions and 40 deletions

View File

@@ -1257,9 +1257,6 @@ public class Card extends GameEntity implements Comparable<Card> {
Singletons.getModel().getGame().getTriggerHandler().runTrigger(TriggerType.CounterAdded, runParams); Singletons.getModel().getGame().getTriggerHandler().runTrigger(TriggerType.CounterAdded, runParams);
} }
// play the Add Counter sound
Sounds.AddCounter.play();
this.updateObservers(); this.updateObservers();
} }
@@ -1293,9 +1290,6 @@ public class Card extends GameEntity implements Comparable<Card> {
Singletons.getModel().getGame().getTriggerHandler().runTrigger(TriggerType.CounterAdded, runParams); Singletons.getModel().getGame().getTriggerHandler().runTrigger(TriggerType.CounterAdded, runParams);
} }
// play the Add Counter sound
Sounds.AddCounter.play();
this.updateObservers(); this.updateObservers();
} }
@@ -1366,10 +1360,6 @@ public class Card extends GameEntity implements Comparable<Card> {
} }
} }
} }
// play the Subtract Counter sound
Sounds.RemoveCounter.play();
this.updateObservers(); this.updateObservers();
} }
} }
@@ -3865,9 +3855,6 @@ public class Card extends GameEntity implements Comparable<Card> {
this.addEquipping(c); this.addEquipping(c);
c.addEquippedBy(this); c.addEquippedBy(this);
this.equip(); this.equip();
// Play the Equip sound
Sounds.Equip.play();
} }
/** /**
@@ -5827,6 +5814,17 @@ public class Card extends GameEntity implements Comparable<Card> {
} }
this.optionalAdditionalCostsPaid.add(cost); this.optionalAdditionalCostsPaid.add(cost);
} }
/**
* <p>
* optionalAdditionalCostsPaid.
* </p>
*/
public final void clearAdditionalCostsPaid() {
if (optionalAdditionalCostsPaid != null) {
optionalAdditionalCostsPaid.clear();
}
}
/** /**
* <p> * <p>

View File

@@ -131,8 +131,6 @@ public class GameAction {
return c; return c;
} }
// System.err.println(String.format("%s moves from %s to %s", c.toString(), zoneFrom.getZoneType().name(), zoneTo.getZoneType().name()));
boolean suppress; boolean suppress;
if ((zoneFrom == null) && !c.isToken()) { if ((zoneFrom == null) && !c.isToken()) {
suppress = true; suppress = true;
@@ -299,6 +297,7 @@ public class GameAction {
if (!zoneTo.is(ZoneType.Graveyard) || !c.getName().equals("Skullbriar, the Walking Grave")) { if (!zoneTo.is(ZoneType.Graveyard) || !c.getName().equals("Skullbriar, the Walking Grave")) {
copied.clearCounters(); copied.clearCounters();
} }
copied.clearAdditionalCostsPaid();
if (copied.isFaceDown()) { if (copied.isFaceDown()) {
copied.turnFaceUp(); copied.turnFaceUp();
} }
@@ -322,6 +321,7 @@ public class GameAction {
copied.removeHiddenExtrinsicKeyword(s); copied.removeHiddenExtrinsicKeyword(s);
} }
} }
copied.clearAdditionalCostsPaid();
if (copied.isFaceDown()) { if (copied.isFaceDown()) {
copied.turnFaceUp(); copied.turnFaceUp();
} }
@@ -1254,9 +1254,6 @@ public class GameAction {
if (c.getCounters(Counters.LOYALTY) <= 0) { if (c.getCounters(Counters.LOYALTY) <= 0) {
Singletons.getModel().getGame().getAction().moveToGraveyard(c); Singletons.getModel().getGame().getAction().moveToGraveyard(c);
// Play the Destroy sound
Sounds.Destroy.play();
} }
final ArrayList<String> types = c.getType(); final ArrayList<String> types = c.getType();
@@ -1301,9 +1298,6 @@ public class GameAction {
for (int i = 0; i < b.size(); i++) { for (int i = 0; i < b.size(); i++) {
Singletons.getModel().getGame().getAction().sacrificeDestroy(b.get(i)); Singletons.getModel().getGame().getAction().sacrificeDestroy(b.get(i));
} }
// Play the Destroy sound
Sounds.Destroy.play();
} }
} }
} // destroyLegendaryCreatures() } // destroyLegendaryCreatures()
@@ -1331,9 +1325,6 @@ public class GameAction {
} }
this.sacrificeDestroy(c); this.sacrificeDestroy(c);
// Play the Sacrifice sound
Sounds.Sacrifice.play();
// Run triggers // Run triggers
final HashMap<String, Object> runParams = new HashMap<String, Object>(); final HashMap<String, Object> runParams = new HashMap<String, Object>();
runParams.put("Card", c); runParams.put("Card", c);
@@ -1385,8 +1376,6 @@ public class GameAction {
GameAction.this.destroy(crd); GameAction.this.destroy(crd);
card.setDamage(0); card.setDamage(0);
// Play the Destroy sound
Sounds.Destroy.play();
} }
}; };
@@ -1399,9 +1388,6 @@ public class GameAction {
} }
} // totem armor } // totem armor
// Play the Destroy sound
Sounds.Destroy.play();
return this.sacrificeDestroy(c); return this.sacrificeDestroy(c);
} }
@@ -1547,10 +1533,6 @@ public class GameAction {
c.tap(); c.tap();
c.addRegeneratedThisTurn(); c.addRegeneratedThisTurn();
game.getCombat().removeFromCombat(c); game.getCombat().removeFromCombat(c);
// Play the Regeneration sound
Sounds.Regen.play();
return false; return false;
} }
@@ -1578,18 +1560,11 @@ public class GameAction {
c.setDamage(0); c.setDamage(0);
this.destroy(crd); this.destroy(crd);
// Play the Destroy sound
Sounds.Destroy.play();
System.out.println("Totem armor destroyed instead of original card"); System.out.println("Totem armor destroyed instead of original card");
return false; return false;
} }
} // totem armor } // totem armor
// Play the Destroy sound
Sounds.Destroy.play();
return this.sacrificeDestroy(c); return this.sacrificeDestroy(c);
} }