mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Code cleanup
This commit is contained in:
@@ -149,7 +149,6 @@ public class Game {
|
|||||||
subscribeToEvents(gameLog.getEventVisitor());
|
subscribeToEvents(gameLog.getEventVisitor());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the players who are still fighting to win, in turn order.
|
* Gets the players who are still fighting to win, in turn order.
|
||||||
*
|
*
|
||||||
@@ -550,7 +549,6 @@ public class Game {
|
|||||||
final Map<String, Object> runParams = new TreeMap<String, Object>();
|
final Map<String, Object> runParams = new TreeMap<String, Object>();
|
||||||
runParams.put("Player", p);
|
runParams.put("Player", p);
|
||||||
this.getTriggerHandler().runTrigger(TriggerType.LosesGame, runParams, false);
|
this.getTriggerHandler().runTrigger(TriggerType.LosesGame, runParams, false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -600,17 +598,14 @@ public class Game {
|
|||||||
for (int i = 0; i < getCardsIn(ZoneType.Command).size(); i++) {
|
for (int i = 0; i < getCardsIn(ZoneType.Command).size(); i++) {
|
||||||
Card c = getCardsIn(ZoneType.Command).get(i);
|
Card c = getCardsIn(ZoneType.Command).get(i);
|
||||||
if (c.isScheme() && !c.isType("Ongoing")) {
|
if (c.isScheme() && !c.isType("Ongoing")) {
|
||||||
|
|
||||||
boolean foundonstack = false;
|
boolean foundonstack = false;
|
||||||
for (SpellAbilityStackInstance si : getStack()) {
|
for (SpellAbilityStackInstance si : getStack()) {
|
||||||
if (si.getSourceCard().equals(c)) {
|
if (si.getSourceCard().equals(c)) {
|
||||||
|
|
||||||
foundonstack = true;
|
foundonstack = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!foundonstack) {
|
if (!foundonstack) {
|
||||||
|
|
||||||
getTriggerHandler().suppressMode(TriggerType.ChangesZone);
|
getTriggerHandler().suppressMode(TriggerType.ChangesZone);
|
||||||
c.getController().getZone(ZoneType.Command).remove(c);
|
c.getController().getZone(ZoneType.Command).remove(c);
|
||||||
i--;
|
i--;
|
||||||
@@ -619,7 +614,6 @@ public class Game {
|
|||||||
c.getController().getZone(ZoneType.SchemeDeck).add(c);
|
c.getController().getZone(ZoneType.SchemeDeck).add(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -638,7 +632,6 @@ public class Game {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Multimap<Player, Card> chooseCardsForAnte(final boolean matchRarity) {
|
public Multimap<Player, Card> chooseCardsForAnte(final boolean matchRarity) {
|
||||||
|
|
||||||
Multimap<Player, Card> anteed = ArrayListMultimap.create();
|
Multimap<Player, Card> anteed = ArrayListMultimap.create();
|
||||||
|
|
||||||
if (matchRarity) {
|
if (matchRarity) {
|
||||||
@@ -708,15 +701,14 @@ public class Game {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
else {
|
||||||
for (Player player : getPlayers()) {
|
for (Player player : getPlayers()) {
|
||||||
chooseRandomCardsForAnte(player, anteed);
|
chooseRandomCardsForAnte(player, anteed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return anteed;
|
return anteed;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void chooseRandomCardsForAnte(final Player player, final Multimap<Player, Card> anteed) {
|
private void chooseRandomCardsForAnte(final Player player, final Multimap<Player, Card> anteed) {
|
||||||
|
|||||||
Reference in New Issue
Block a user