mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Sound System: A little fix to the counter sounds. Also, adding back some of the changes that seemingly did not go through the last time.
This commit is contained in:
@@ -1257,6 +1257,12 @@ 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
|
||||||
|
if (n > 0) {
|
||||||
|
Sounds.AddCounter.play();
|
||||||
|
}
|
||||||
|
|
||||||
this.updateObservers();
|
this.updateObservers();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1290,6 +1296,11 @@ 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
|
||||||
|
if (n > 0) {
|
||||||
|
Sounds.AddCounter.play();
|
||||||
|
}
|
||||||
|
|
||||||
this.updateObservers();
|
this.updateObservers();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1360,6 +1371,12 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Play the Subtract Counter sound
|
||||||
|
if (n > 0) {
|
||||||
|
Sounds.RemoveCounter.play();
|
||||||
|
}
|
||||||
|
|
||||||
this.updateObservers();
|
this.updateObservers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3855,6 +3872,9 @@ 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1256,6 +1256,9 @@ public class GameAction {
|
|||||||
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();
|
||||||
for (final String type : types) {
|
for (final String type : types) {
|
||||||
if (!CardUtil.isAPlaneswalkerType(type)) {
|
if (!CardUtil.isAPlaneswalkerType(type)) {
|
||||||
@@ -1298,6 +1301,9 @@ 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()
|
||||||
@@ -1325,6 +1331,9 @@ 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);
|
||||||
@@ -1376,6 +1385,8 @@ public class GameAction {
|
|||||||
GameAction.this.destroy(crd);
|
GameAction.this.destroy(crd);
|
||||||
card.setDamage(0);
|
card.setDamage(0);
|
||||||
|
|
||||||
|
// Play the Destroy sound
|
||||||
|
Sounds.Destroy.play();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1388,6 +1399,9 @@ public class GameAction {
|
|||||||
}
|
}
|
||||||
} // totem armor
|
} // totem armor
|
||||||
|
|
||||||
|
// Play the Destroy sound
|
||||||
|
Sounds.Destroy.play();
|
||||||
|
|
||||||
return this.sacrificeDestroy(c);
|
return this.sacrificeDestroy(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1533,6 +1547,10 @@ public class GameAction {
|
|||||||
c.tap();
|
c.tap();
|
||||||
c.addRegeneratedThisTurn();
|
c.addRegeneratedThisTurn();
|
||||||
game.getCombat().removeFromCombat(c);
|
game.getCombat().removeFromCombat(c);
|
||||||
|
|
||||||
|
// Play the Regen sound
|
||||||
|
Sounds.Regen.play();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1561,10 +1579,17 @@ public class GameAction {
|
|||||||
c.setDamage(0);
|
c.setDamage(0);
|
||||||
this.destroy(crd);
|
this.destroy(crd);
|
||||||
System.out.println("Totem armor destroyed instead of original card");
|
System.out.println("Totem armor destroyed instead of original card");
|
||||||
|
|
||||||
|
// Play the Destroy sound
|
||||||
|
Sounds.Destroy.play();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} // totem armor
|
} // totem armor
|
||||||
|
|
||||||
|
// Play the Destroy sound
|
||||||
|
Sounds.Destroy.play();
|
||||||
|
|
||||||
return this.sacrificeDestroy(c);
|
return this.sacrificeDestroy(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user