mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
GameLog: add method takes 2 arguments, because entry type is reported by enum
ViewWinLose: writes "You" (won or lost) in title if there was only one human in game
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -13758,9 +13758,9 @@ src/main/java/forge/Constant.java svneol=native#text/plain
|
|||||||
src/main/java/forge/CounterType.java svneol=native#text/plain
|
src/main/java/forge/CounterType.java svneol=native#text/plain
|
||||||
src/main/java/forge/FThreads.java -text
|
src/main/java/forge/FThreads.java -text
|
||||||
src/main/java/forge/GameEntity.java -text
|
src/main/java/forge/GameEntity.java -text
|
||||||
|
src/main/java/forge/GameEventType.java -text
|
||||||
src/main/java/forge/GameLog.java -text
|
src/main/java/forge/GameLog.java -text
|
||||||
src/main/java/forge/GameLogEntry.java -text
|
src/main/java/forge/GameLogEntry.java -text
|
||||||
src/main/java/forge/GameLogLevel.java -text
|
|
||||||
src/main/java/forge/ImageCache.java svneol=native#text/plain
|
src/main/java/forge/ImageCache.java svneol=native#text/plain
|
||||||
src/main/java/forge/ImageLoader.java -text
|
src/main/java/forge/ImageLoader.java -text
|
||||||
src/main/java/forge/Singletons.java svneol=native#text/plain
|
src/main/java/forge/Singletons.java svneol=native#text/plain
|
||||||
|
|||||||
@@ -3168,8 +3168,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
*/
|
*/
|
||||||
public final void equipCard(final Card c) {
|
public final void equipCard(final Card c) {
|
||||||
if (c.hasKeyword("CARDNAME can't be equipped.")) {
|
if (c.hasKeyword("CARDNAME can't be equipped.")) {
|
||||||
getGame().getGameLog().add("ResolveStack", "Trying to equip " + c.getName()
|
getGame().getGameLog().add(GameEventType.STACK_RESOLVE, "Trying to equip " + c.getName() + " but it can't be equipped.");
|
||||||
+ " but it can't be equipped.", GameLogLevel.STACK);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.hasStartOfKeyword("CantEquip")) {
|
if (this.hasStartOfKeyword("CantEquip")) {
|
||||||
@@ -3178,8 +3177,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
final String[] k = parse.split(" ", 2);
|
final String[] k = parse.split(" ", 2);
|
||||||
final String[] restrictions = k[1].split(",");
|
final String[] restrictions = k[1].split(",");
|
||||||
if (c.isValid(restrictions, this.getController(), this)) {
|
if (c.isValid(restrictions, this.getController(), this)) {
|
||||||
getGame().getGameLog().add("ResolveStack", "Trying to equip " + c.getName()
|
getGame().getGameLog().add(GameEventType.STACK_RESOLVE, "Trying to equip " + c.getName() + " but it can't be equipped.");
|
||||||
+ " but it can't be equipped.", GameLogLevel.STACK);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3371,8 +3369,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
*/
|
*/
|
||||||
public final void enchantEntity(final GameEntity entity) {
|
public final void enchantEntity(final GameEntity entity) {
|
||||||
if (entity.hasKeyword("CARDNAME can't be enchanted.")) {
|
if (entity.hasKeyword("CARDNAME can't be enchanted.")) {
|
||||||
getGame().getGameLog().add("ResolveStack", "Trying to enchant " + entity.getName()
|
getGame().getGameLog().add(GameEventType.STACK_RESOLVE, "Trying to enchant " + entity.getName()
|
||||||
+ " but it can't be enchanted.", GameLogLevel.STACK);
|
+ " but it can't be enchanted.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.addEnchanting(entity);
|
this.addEnchanting(entity);
|
||||||
@@ -7460,7 +7458,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
game.getEvents().post(new CardDamagedEvent());
|
game.getEvents().post(new CardDamagedEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
getGame().getGameLog().add("Damage", String.format("Dealing %d damage to %s. %s", damageToAdd, this.getName(), additionalLog), GameLogLevel.DAMAGE);
|
getGame().getGameLog().add(GameEventType.DAMAGE, String.format("Dealing %d damage to %s. %s", damageToAdd, this.getName(), additionalLog));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,23 @@
|
|||||||
package forge;
|
package forge;
|
||||||
|
|
||||||
public enum GameLogLevel {
|
public enum GameEventType {
|
||||||
GAME_OUTCOME("Game outcome"),
|
GAME_OUTCOME("Game outcome"),
|
||||||
MATCH_RESULTS("Match result"),
|
MATCH_RESULTS("Match result"),
|
||||||
TURN("Turn"),
|
TURN("Turn"),
|
||||||
MULLIGAN("Mulligan"),
|
MULLIGAN("Mulligan"),
|
||||||
ANTE("Ante"),
|
ANTE("Ante"),
|
||||||
COMBAT("Combat"),
|
COMBAT("Combat"),
|
||||||
EFFECT_REPLACED("ReplacementEffect"),
|
EFFECT_REPLACED("Replacement Effect"),
|
||||||
LAND("Land"),
|
LAND("Land"),
|
||||||
STACK("Stack"),
|
STACK_RESOLVE("Resolve stack"),
|
||||||
|
STACK_ADD("Add to stack"),
|
||||||
DAMAGE("Damage"),
|
DAMAGE("Damage"),
|
||||||
|
DAMAGE_POISON("Poison"),
|
||||||
MANA("Mana"),
|
MANA("Mana"),
|
||||||
PHASE("Phase");
|
PHASE("Phase");
|
||||||
|
|
||||||
private final String caption;
|
private final String caption;
|
||||||
private GameLogLevel(String name) {
|
private GameEventType(String name) {
|
||||||
this.caption = name;
|
this.caption = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,8 +28,10 @@ import com.google.common.eventbus.Subscribe;
|
|||||||
import forge.game.GameOutcome;
|
import forge.game.GameOutcome;
|
||||||
import forge.game.event.DuelOutcomeEvent;
|
import forge.game.event.DuelOutcomeEvent;
|
||||||
import forge.game.event.Event;
|
import forge.game.event.Event;
|
||||||
|
import forge.game.phase.Combat;
|
||||||
import forge.game.player.LobbyPlayer;
|
import forge.game.player.LobbyPlayer;
|
||||||
import forge.game.player.PlayerStatistics;
|
import forge.game.player.PlayerStatistics;
|
||||||
|
import forge.util.Lang;
|
||||||
import forge.util.MyObservable;
|
import forge.util.MyObservable;
|
||||||
|
|
||||||
|
|
||||||
@@ -60,6 +62,63 @@ public class GameLog extends MyObservable {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the.
|
||||||
|
*
|
||||||
|
* @param type the type
|
||||||
|
* @param message the message
|
||||||
|
* @param type the level
|
||||||
|
*/
|
||||||
|
public void add(final GameEventType type, final String message) {
|
||||||
|
log.add(new GameLogEntry(type, message));
|
||||||
|
this.updateObservers();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the log text.
|
||||||
|
*
|
||||||
|
* @return the log text
|
||||||
|
*/
|
||||||
|
public String getLogText() {
|
||||||
|
return getLogText(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLogText(final GameEventType logLevel) {
|
||||||
|
List<GameLogEntry> filteredAndReversed = getLogEntries(logLevel);
|
||||||
|
return StringUtils.join(filteredAndReversed, "\r\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the log entries below a certain level as a list.
|
||||||
|
*
|
||||||
|
* @param logLevel the log level
|
||||||
|
* @return the log text
|
||||||
|
*/
|
||||||
|
public List<GameLogEntry> getLogEntries(final GameEventType logLevel) { // null to fetch all
|
||||||
|
final List<GameLogEntry> result = new ArrayList<GameLogEntry>();
|
||||||
|
|
||||||
|
for (int i = log.size() - 1; i >= 0; i--) {
|
||||||
|
GameLogEntry le = log.get(i);
|
||||||
|
if(logLevel == null || le.type.compareTo(logLevel) <= 0 )
|
||||||
|
result.add(le);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<GameLogEntry> getLogEntriesExact(final GameEventType logLevel) { // null to fetch all
|
||||||
|
final List<GameLogEntry> result = new ArrayList<GameLogEntry>();
|
||||||
|
|
||||||
|
for (int i = log.size() - 1; i >= 0; i--) {
|
||||||
|
GameLogEntry le = log.get(i);
|
||||||
|
if(logLevel == null || le.type.compareTo(logLevel) == 0 )
|
||||||
|
result.add(le);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Special methods
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void receiveGameEvent(Event ev) {
|
public void receiveGameEvent(Event ev) {
|
||||||
if(ev instanceof DuelOutcomeEvent) {
|
if(ev instanceof DuelOutcomeEvent) {
|
||||||
@@ -67,6 +126,7 @@ public class GameLog extends MyObservable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates and adds
|
* Generates and adds
|
||||||
*/
|
*/
|
||||||
@@ -81,11 +141,11 @@ public class GameLog extends MyObservable {
|
|||||||
String whoHas = p.getKey().equals(human) ? "You have" : p.getKey().getName() + " has";
|
String whoHas = p.getKey().equals(human) ? "You have" : p.getKey().getName() + " has";
|
||||||
String outcome = String.format("%s %s", whoHas, p.getValue().getOutcome().toString());
|
String outcome = String.format("%s %s", whoHas, p.getValue().getOutcome().toString());
|
||||||
outcomes.add(outcome);
|
outcomes.add(outcome);
|
||||||
this.add("Final", outcome, GameLogLevel.GAME_OUTCOME);
|
this.add(GameEventType.GAME_OUTCOME, outcome);
|
||||||
}
|
}
|
||||||
|
|
||||||
final String statsSummary = generateSummary(history);
|
final String statsSummary = generateSummary(history);
|
||||||
this.add("Final", statsSummary, GameLogLevel.MATCH_RESULTS);
|
this.add(GameEventType.MATCH_RESULTS, statsSummary);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String generateSummary(List<GameOutcome> gamesPlayed) {
|
private static String generateSummary(List<GameOutcome> gamesPlayed) {
|
||||||
@@ -111,60 +171,77 @@ public class GameLog extends MyObservable {
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
public void addCombatAttackers(Combat combat) {
|
||||||
* Adds the.
|
this.add(GameEventType.COMBAT, describeAttack(combat));
|
||||||
*
|
|
||||||
* @param type the type
|
|
||||||
* @param message the message
|
|
||||||
* @param level the level
|
|
||||||
*/
|
|
||||||
public void add(final String type, final String message, final GameLogLevel level) {
|
|
||||||
log.add(new GameLogEntry(type, message, level));
|
|
||||||
this.updateObservers();
|
|
||||||
}
|
}
|
||||||
|
public void addCombatBlockers(Combat combat) {
|
||||||
/**
|
this.add(GameEventType.COMBAT, describeBlock(combat));
|
||||||
* Gets the log text.
|
|
||||||
*
|
|
||||||
* @return the log text
|
|
||||||
*/
|
|
||||||
public String getLogText() {
|
|
||||||
return getLogText(null);
|
|
||||||
}
|
}
|
||||||
|
// Special methods
|
||||||
|
|
||||||
|
|
||||||
public String getLogText(final GameLogLevel logLevel) {
|
private static String describeAttack(final Combat combat) {
|
||||||
List<GameLogEntry> filteredAndReversed = getLogEntries(logLevel);
|
final StringBuilder sb = new StringBuilder();
|
||||||
return StringUtils.join(filteredAndReversed, "\r\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
// Loop through Defenders
|
||||||
* Gets the log entries below a certain level as a list.
|
// Append Defending Player/Planeswalker
|
||||||
*
|
|
||||||
* @param logLevel the log level
|
|
||||||
* @return the log text
|
|
||||||
*/
|
|
||||||
public List<GameLogEntry> getLogEntries(final GameLogLevel logLevel) { // null to fetch all
|
|
||||||
final List<GameLogEntry> result = new ArrayList<GameLogEntry>();
|
|
||||||
|
|
||||||
for (int i = log.size() - 1; i >= 0; i--) {
|
|
||||||
GameLogEntry le = log.get(i);
|
|
||||||
if(logLevel == null || le.level.compareTo(logLevel) <= 0 )
|
// Not a big fan of the triple nested loop here
|
||||||
result.add(le);
|
for (GameEntity defender : combat.getDefenders()) {
|
||||||
|
List<Card> attackers = combat.getAttackersOf(defender);
|
||||||
|
if (attackers == null || attackers.isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ( sb.length() > 0 ) sb.append("\n");
|
||||||
|
|
||||||
|
sb.append(combat.getAttackingPlayer()).append(" declared ").append(Lang.joinHomogenous(attackers));
|
||||||
|
sb.append(" to attack ").append(defender.toString()).append(".");
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static String describeBlock(final Combat combat) {
|
||||||
|
final StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
// Loop through Defenders
|
||||||
|
// Append Defending Player/Planeswalker
|
||||||
|
|
||||||
|
List<Card> blockers = null;
|
||||||
|
|
||||||
|
|
||||||
|
for (GameEntity defender : combat.getDefenders()) {
|
||||||
|
List<Card> attackers = combat.getAttackersOf(defender);
|
||||||
|
if (attackers == null || attackers.isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ( sb.length() > 0 ) sb.append("\n");
|
||||||
|
|
||||||
|
String controllerName = defender instanceof Card ? ((Card)defender).getController().getName() : defender.getName();
|
||||||
|
boolean firstAttacker = true;
|
||||||
|
for (final Card attacker : attackers) {
|
||||||
|
if ( !firstAttacker ) sb.append("\n");
|
||||||
|
|
||||||
|
blockers = combat.getBlockers(attacker);
|
||||||
|
if ( blockers.isEmpty() ) {
|
||||||
|
sb.append(controllerName).append(" didn't block ");
|
||||||
|
} else {
|
||||||
|
sb.append(controllerName).append(" assigned ").append(Lang.joinHomogenous(blockers)).append(" to block ");
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append(attacker).append(".");
|
||||||
|
firstAttacker = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<GameLogEntry> getLogEntriesExact(final GameLogLevel logLevel) { // null to fetch all
|
|
||||||
final List<GameLogEntry> result = new ArrayList<GameLogEntry>();
|
|
||||||
|
|
||||||
for (int i = log.size() - 1; i >= 0; i--) {
|
|
||||||
GameLogEntry le = log.get(i);
|
|
||||||
if(logLevel == null || le.level.compareTo(logLevel) == 0 )
|
|
||||||
result.add(le);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // end class GameLog
|
} // end class GameLog
|
||||||
|
|||||||
@@ -1,22 +1,18 @@
|
|||||||
package forge;
|
package forge;
|
||||||
|
|
||||||
public class GameLogEntry {
|
public class GameLogEntry {
|
||||||
public final String type;
|
|
||||||
public final String message;
|
public final String message;
|
||||||
public final GameLogLevel level;
|
public final GameEventType type;
|
||||||
|
// might add here date and some other fields
|
||||||
|
|
||||||
GameLogEntry(final String typeIn, final String messageIn, final GameLogLevel levelIn) {
|
GameLogEntry(final GameEventType type0, final String messageIn) {
|
||||||
type = typeIn;
|
type = type0;
|
||||||
message = messageIn;
|
message = messageIn;
|
||||||
level = levelIn;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see java.lang.Object#toString()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return type + ": " + message;
|
return type.getCaption() + ": " + message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,7 @@ import forge.Command;
|
|||||||
import forge.Constant;
|
import forge.Constant;
|
||||||
import forge.CounterType;
|
import forge.CounterType;
|
||||||
import forge.GameEntity;
|
import forge.GameEntity;
|
||||||
import forge.GameLogLevel;
|
import forge.GameEventType;
|
||||||
import forge.card.ColorSet;
|
import forge.card.ColorSet;
|
||||||
import forge.card.MagicColor;
|
import forge.card.MagicColor;
|
||||||
import forge.card.ability.AbilityFactory;
|
import forge.card.ability.AbilityFactory;
|
||||||
@@ -205,10 +205,8 @@ public class CardFactoryUtil {
|
|||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
if (sourceCard.turnFaceUp()) {
|
if (sourceCard.turnFaceUp()) {
|
||||||
StringBuilder sb = new StringBuilder();
|
String sb = this.getActivatingPlayer() + " has unmorphed " + sourceCard.getName();
|
||||||
sb.append(this.getActivatingPlayer()).append(" has unmorphed ");
|
sourceCard.getGame().getGameLog().add(GameEventType.STACK_RESOLVE, sb);
|
||||||
sb.append(sourceCard.getName());
|
|
||||||
sourceCard.getGame().getGameLog().add("ResolveStack", sb.toString(), GameLogLevel.STACK);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -429,12 +427,9 @@ public class CardFactoryUtil {
|
|||||||
|
|
||||||
int counters = AbilityUtils.calculateAmount(c, timeCounters, this);
|
int counters = AbilityUtils.calculateAmount(c, timeCounters, this);
|
||||||
c.addCounter(CounterType.TIME, counters, true);
|
c.addCounter(CounterType.TIME, counters, true);
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
String sb = String.format("%s has suspended %s with %d time counters on it.", this.getActivatingPlayer(), c.getName(), counters);
|
||||||
sb.append(this.getActivatingPlayer()).append(" has suspended ");
|
game.getGameLog().add(GameEventType.STACK_RESOLVE, sb);
|
||||||
sb.append(c.getName()).append("with ");
|
|
||||||
sb.append(counters).append(" time counters on it.");
|
|
||||||
game.getGameLog().add("ResolveStack", sb.toString(), GameLogLevel.STACK);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
final StringBuilder sbDesc = new StringBuilder();
|
final StringBuilder sbDesc = new StringBuilder();
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import forge.Card;
|
import forge.Card;
|
||||||
import forge.GameLogLevel;
|
import forge.GameEventType;
|
||||||
import forge.card.ability.AbilityFactory;
|
import forge.card.ability.AbilityFactory;
|
||||||
import forge.card.ability.AbilityUtils;
|
import forge.card.ability.AbilityUtils;
|
||||||
import forge.card.spellability.SpellAbility;
|
import forge.card.spellability.SpellAbility;
|
||||||
@@ -150,7 +150,7 @@ public class ReplacementHandler {
|
|||||||
ReplacementResult res = this.executeReplacement(runParams, chosenRE, decider, game);
|
ReplacementResult res = this.executeReplacement(runParams, chosenRE, decider, game);
|
||||||
if (res != ReplacementResult.NotReplaced) {
|
if (res != ReplacementResult.NotReplaced) {
|
||||||
chosenRE.setHasRun(false);
|
chosenRE.setHasRun(false);
|
||||||
game.getGameLog().add("ReplacementEffect", chosenRE.toString(), GameLogLevel.EFFECT_REPLACED);
|
game.getGameLog().add(GameEventType.EFFECT_REPLACED, chosenRE.toString());
|
||||||
return res;
|
return res;
|
||||||
} else {
|
} else {
|
||||||
if (possibleReplacers.size() == 0) {
|
if (possibleReplacers.size() == 0) {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import com.google.common.collect.Lists;
|
|||||||
import forge.Card;
|
import forge.Card;
|
||||||
import forge.CardLists;
|
import forge.CardLists;
|
||||||
import forge.CardPredicates;
|
import forge.CardPredicates;
|
||||||
import forge.GameLogLevel;
|
import forge.GameEventType;
|
||||||
import forge.card.trigger.Trigger;
|
import forge.card.trigger.Trigger;
|
||||||
import forge.card.trigger.TriggerHandler;
|
import forge.card.trigger.TriggerHandler;
|
||||||
import forge.card.trigger.TriggerType;
|
import forge.card.trigger.TriggerType;
|
||||||
@@ -314,10 +314,10 @@ public class GameNew {
|
|||||||
Predicate<Card> goodForAnte = Predicates.not(CardPredicates.Presets.BASIC_LANDS);
|
Predicate<Card> goodForAnte = Predicates.not(CardPredicates.Presets.BASIC_LANDS);
|
||||||
Card ante = Aggregates.random(Iterables.filter(lib, goodForAnte));
|
Card ante = Aggregates.random(Iterables.filter(lib, goodForAnte));
|
||||||
if (ante == null) {
|
if (ante == null) {
|
||||||
game.getGameLog().add("Ante", "Only basic lands found. Will ante one of them", GameLogLevel.ANTE);
|
game.getGameLog().add(GameEventType.ANTE, "Only basic lands found. Will ante one of them");
|
||||||
ante = Aggregates.random(lib);
|
ante = Aggregates.random(lib);
|
||||||
}
|
}
|
||||||
game.getGameLog().add("Ante", p + " anted " + ante, GameLogLevel.ANTE);
|
game.getGameLog().add(GameEventType.ANTE, p + " anted " + ante);
|
||||||
game.getAction().moveTo(ZoneType.Ante, ante);
|
game.getAction().moveTo(ZoneType.Ante, ante);
|
||||||
msg.append(p.getName()).append(" ante: ").append(ante).append(nl);
|
msg.append(p.getName()).append(" ante: ").append(ante).append(nl);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ import forge.gui.GuiDialog;
|
|||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
import forge.gui.framework.SDisplayUtil;
|
import forge.gui.framework.SDisplayUtil;
|
||||||
import forge.gui.match.controllers.CCombat;
|
import forge.gui.match.controllers.CCombat;
|
||||||
import forge.util.Lang;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -965,77 +964,6 @@ public class CombatUtil {
|
|||||||
} // canAttack()
|
} // canAttack()
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gets a string for the GameLog regarding attackers.
|
|
||||||
*
|
|
||||||
* @return a String
|
|
||||||
*/
|
|
||||||
public static String getCombatAttackForLog(final Combat combat) {
|
|
||||||
final StringBuilder sb = new StringBuilder();
|
|
||||||
|
|
||||||
// Loop through Defenders
|
|
||||||
// Append Defending Player/Planeswalker
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Not a big fan of the triple nested loop here
|
|
||||||
for (GameEntity defender : combat.getDefenders()) {
|
|
||||||
List<Card> attackers = combat.getAttackersOf(defender);
|
|
||||||
if (attackers == null || attackers.isEmpty()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ( sb.length() > 0 ) sb.append("\n");
|
|
||||||
|
|
||||||
sb.append(combat.getAttackingPlayer()).append(" declared ").append(Lang.joinHomogenous(attackers));
|
|
||||||
sb.append(" to attack ").append(defender.toString()).append(".");
|
|
||||||
}
|
|
||||||
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gets a string for the GameLog regarding assigned blockers.
|
|
||||||
* @param game
|
|
||||||
*
|
|
||||||
* @return a String
|
|
||||||
*/
|
|
||||||
public static String getCombatBlockForLog(final Combat combat) {
|
|
||||||
final StringBuilder sb = new StringBuilder();
|
|
||||||
|
|
||||||
// Loop through Defenders
|
|
||||||
// Append Defending Player/Planeswalker
|
|
||||||
|
|
||||||
List<Card> blockers = null;
|
|
||||||
|
|
||||||
|
|
||||||
for (GameEntity defender : combat.getDefenders()) {
|
|
||||||
List<Card> attackers = combat.getAttackersOf(defender);
|
|
||||||
if (attackers == null || attackers.isEmpty()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ( sb.length() > 0 ) sb.append("\n");
|
|
||||||
|
|
||||||
String controllerName = defender instanceof Card ? ((Card)defender).getController().getName() : defender.getName();
|
|
||||||
boolean firstAttacker = true;
|
|
||||||
for (final Card attacker : attackers) {
|
|
||||||
if ( !firstAttacker ) sb.append("\n");
|
|
||||||
|
|
||||||
blockers = combat.getBlockers(attacker);
|
|
||||||
if ( blockers.isEmpty() ) {
|
|
||||||
sb.append(controllerName).append(" didn't block ");
|
|
||||||
} else {
|
|
||||||
sb.append(controllerName).append(" assigned ").append(Lang.joinHomogenous(blockers)).append(" to block ");
|
|
||||||
}
|
|
||||||
|
|
||||||
sb.append(attacker).append(".");
|
|
||||||
firstAttacker = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* showCombat.
|
* showCombat.
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import com.esotericsoftware.minlog.Log;
|
|||||||
|
|
||||||
import forge.Card;
|
import forge.Card;
|
||||||
import forge.FThreads;
|
import forge.FThreads;
|
||||||
import forge.GameLogLevel;
|
import forge.GameEventType;
|
||||||
import forge.Singletons;
|
import forge.Singletons;
|
||||||
import forge.card.trigger.TriggerType;
|
import forge.card.trigger.TriggerType;
|
||||||
import forge.game.GameState;
|
import forge.game.GameState;
|
||||||
@@ -39,6 +39,7 @@ import forge.gui.framework.SDisplayUtil;
|
|||||||
import forge.gui.match.CMatchUI;
|
import forge.gui.match.CMatchUI;
|
||||||
import forge.gui.match.nonsingleton.VField;
|
import forge.gui.match.nonsingleton.VField;
|
||||||
import forge.properties.ForgePreferences.FPref;
|
import forge.properties.ForgePreferences.FPref;
|
||||||
|
import forge.util.Lang;
|
||||||
import forge.util.MyObservable;
|
import forge.util.MyObservable;
|
||||||
|
|
||||||
|
|
||||||
@@ -486,10 +487,10 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
|
|||||||
default: // no action
|
default: // no action
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
String phaseType = "";
|
||||||
if (this.bRepeat) { // for when Cleanup needs to repeat itself
|
if (this.bRepeat) { // for when Cleanup needs to repeat itself
|
||||||
this.bRepeat = false;
|
this.bRepeat = false;
|
||||||
sb.append("Repeat Phase");
|
phaseType = "Repeat ";
|
||||||
} else {
|
} else {
|
||||||
// If the phase that's ending has a stack of additional phases
|
// If the phase that's ending has a stack of additional phases
|
||||||
// Take the LIFO one and move to that instead of the normal one
|
// Take the LIFO one and move to that instead of the normal one
|
||||||
@@ -501,23 +502,20 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
|
|||||||
this.extraPhases.remove(phase);
|
this.extraPhases.remove(phase);
|
||||||
}
|
}
|
||||||
this.phase = nextPhase;
|
this.phase = nextPhase;
|
||||||
sb.append("Additional Phase");
|
phaseType = "Additional ";
|
||||||
} else {
|
} else {
|
||||||
this.phase = phase.getNextPhase();
|
this.phase = phase.getNextPhase();
|
||||||
sb.append("Phase");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// **** Anything BELOW Here is actually in the next phase. Maybe move
|
// **** Anything BELOW Here is actually in the next phase. Maybe move
|
||||||
// this to handleBeginPhase
|
// this to handleBeginPhase
|
||||||
if (this.phase == PhaseType.UNTAP) {
|
if (this.phase == PhaseType.UNTAP) {
|
||||||
this.turn++;
|
this.turn++;
|
||||||
game.getGameLog().add("Turn", "Turn " + this.turn + " (" + this.getPlayerTurn() + ")", GameLogLevel.TURN);
|
game.getGameLog().add(GameEventType.TURN, "Turn " + this.turn + " (" + this.getPlayerTurn() + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
game.getGameLog().add(sb.toString(), this.getPlayerTurn() + " " + this.getPhase().Name, GameLogLevel.PHASE);
|
game.getGameLog().add(GameEventType.PHASE, phaseType + Lang.getPossesive(this.getPlayerTurn().getName()) + " " + this.getPhase().Name);
|
||||||
PhaseUtil.visuallyActivatePhase(this.getPlayerTurn(), this.getPhase());
|
PhaseUtil.visuallyActivatePhase(this.getPlayerTurn(), this.getPhase());
|
||||||
|
|
||||||
// When consecutively skipping phases (like in combat) this section
|
// When consecutively skipping phases (like in combat) this section
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import com.google.common.base.Predicate;
|
|||||||
import forge.Card;
|
import forge.Card;
|
||||||
import forge.CardLists;
|
import forge.CardLists;
|
||||||
import forge.CardPredicates.Presets;
|
import forge.CardPredicates.Presets;
|
||||||
import forge.GameLogLevel;
|
|
||||||
import forge.card.cost.Cost;
|
import forge.card.cost.Cost;
|
||||||
import forge.card.mana.ManaCost;
|
import forge.card.mana.ManaCost;
|
||||||
import forge.card.spellability.Ability;
|
import forge.card.spellability.Ability;
|
||||||
@@ -176,7 +175,7 @@ public class PhaseUtil {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
game.getGameLog().add("Combat", CombatUtil.getCombatAttackForLog(game.getCombat()), GameLogLevel.COMBAT);
|
game.getGameLog().addCombatAttackers(game.getCombat());
|
||||||
|
|
||||||
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
||||||
runParams.put("Attackers", list);
|
runParams.put("Attackers", list);
|
||||||
@@ -272,7 +271,7 @@ public class PhaseUtil {
|
|||||||
|
|
||||||
game.getStack().unfreezeStack();
|
game.getStack().unfreezeStack();
|
||||||
|
|
||||||
game.getGameLog().add("Combat", CombatUtil.getCombatBlockForLog(game.getCombat()), GameLogLevel.COMBAT);
|
game.getGameLog().addCombatBlockers(game.getCombat());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import forge.CardLists;
|
|||||||
import forge.CardPredicates.Presets;
|
import forge.CardPredicates.Presets;
|
||||||
import forge.CounterType;
|
import forge.CounterType;
|
||||||
import forge.FThreads;
|
import forge.FThreads;
|
||||||
import forge.GameLogLevel;
|
import forge.GameEventType;
|
||||||
import forge.card.ability.AbilityUtils;
|
import forge.card.ability.AbilityUtils;
|
||||||
import forge.card.ability.ApiType;
|
import forge.card.ability.ApiType;
|
||||||
import forge.card.ability.effects.CharmEffect;
|
import forge.card.ability.effects.CharmEffect;
|
||||||
@@ -356,7 +356,7 @@ public class HumanPlay {
|
|||||||
|
|
||||||
if (false == source.canReceiveCounters(counterType)) {
|
if (false == source.canReceiveCounters(counterType)) {
|
||||||
String message = String.format("Won't be able to pay upkeep for %s but it can't have %s counters put on it.", source, counterType.getName());
|
String message = String.format("Won't be able to pay upkeep for %s but it can't have %s counters put on it.", source, counterType.getName());
|
||||||
p.getGame().getGameLog().add("ResolveStack", message, GameLogLevel.STACK);
|
p.getGame().getGameLog().add(GameEventType.STACK_RESOLVE, message);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ import forge.Constant.Preferences;
|
|||||||
import forge.CounterType;
|
import forge.CounterType;
|
||||||
import forge.FThreads;
|
import forge.FThreads;
|
||||||
import forge.GameEntity;
|
import forge.GameEntity;
|
||||||
import forge.GameLogLevel;
|
import forge.GameEventType;
|
||||||
import forge.Singletons;
|
import forge.Singletons;
|
||||||
import forge.card.MagicColor;
|
import forge.card.MagicColor;
|
||||||
import forge.card.ability.AbilityFactory;
|
import forge.card.ability.AbilityFactory;
|
||||||
@@ -680,8 +680,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
runParams.put("IsCombatDamage", isCombat);
|
runParams.put("IsCombatDamage", isCombat);
|
||||||
game.getTriggerHandler().runTrigger(TriggerType.DamageDone, runParams, false);
|
game.getTriggerHandler().runTrigger(TriggerType.DamageDone, runParams, false);
|
||||||
|
|
||||||
game.getGameLog().add("Damage", String.format("Dealing %d damage to %s. %s",
|
game.getGameLog().add(GameEventType.DAMAGE, String.format("Dealing %d damage to %s. %s", damageToDo, this.getName(), additionalLog));
|
||||||
damageToDo, this.getName(), additionalLog), GameLogLevel.DAMAGE);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1029,7 +1028,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
this.poisonCounters += num;
|
this.poisonCounters += num;
|
||||||
|
|
||||||
game.getEvents().post(new PoisonCounterEvent(this, source, num));
|
game.getEvents().post(new PoisonCounterEvent(this, source, num));
|
||||||
game.getGameLog().add("Poison", this + " receives a poison counter from " + source, GameLogLevel.DAMAGE);
|
game.getGameLog().add(GameEventType.DAMAGE_POISON, this + " receives a poison counter from " + source);
|
||||||
|
|
||||||
this.updateObservers();
|
this.updateObservers();
|
||||||
}
|
}
|
||||||
@@ -1236,30 +1235,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public boolean canMulligan() {
|
public boolean canMulligan() {
|
||||||
return !getZone(ZoneType.Hand).isEmpty();
|
return !getZone(ZoneType.Hand).isEmpty();
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
*
|
|
||||||
* TODO Write javadoc for this method.
|
|
||||||
*
|
|
||||||
* @param player
|
|
||||||
* a Player object
|
|
||||||
* @param playerRating
|
|
||||||
* a GamePlayerRating object
|
|
||||||
* @return an int
|
|
||||||
*/
|
|
||||||
public void doMulligan() {
|
|
||||||
final List<Card> hand = new ArrayList<Card>(getCardsIn(ZoneType.Hand));
|
|
||||||
for (final Card c : hand) {
|
|
||||||
game.getAction().moveToLibrary(c);
|
|
||||||
}
|
|
||||||
shuffle();
|
|
||||||
drawCards(hand.size() - 1);
|
|
||||||
|
|
||||||
game.getEvents().post(new MulliganEvent(this)); // quest listener may interfere here
|
|
||||||
final int newHand = getCardsIn(ZoneType.Hand).size();
|
|
||||||
game.getGameLog().add("Mulligan", this + " has mulliganed down to " + newHand + " cards.", GameLogLevel.MULLIGAN);
|
|
||||||
stats.notifyHasMulliganed();
|
|
||||||
stats.notifyOpeningHandSize(newHand);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -1800,7 +1775,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
game.getAction().checkStateEffects();
|
game.getAction().checkStateEffects();
|
||||||
|
|
||||||
// add to log
|
// add to log
|
||||||
game.getGameLog().add("Land", this + " played " + land, GameLogLevel.LAND);
|
game.getGameLog().add(GameEventType.LAND, this + " played " + land);
|
||||||
|
|
||||||
// play a sound
|
// play a sound
|
||||||
game.getEvents().post(new LandPlayedEvent(this, land));
|
game.getEvents().post(new LandPlayedEvent(this, land));
|
||||||
@@ -3160,7 +3135,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public void onMulliganned() {
|
public void onMulliganned() {
|
||||||
game.getEvents().post(new MulliganEvent(this)); // quest listener may interfere here
|
game.getEvents().post(new MulliganEvent(this)); // quest listener may interfere here
|
||||||
final int newHand = getCardsIn(ZoneType.Hand).size();
|
final int newHand = getCardsIn(ZoneType.Hand).size();
|
||||||
game.getGameLog().add("Mulligan", this + " has mulliganed down to " + newHand + " cards.", GameLogLevel.MULLIGAN);
|
game.getGameLog().add(GameEventType.MULLIGAN, this + " has mulliganed down to " + newHand + " cards.");
|
||||||
stats.notifyHasMulliganed();
|
stats.notifyHasMulliganed();
|
||||||
stats.notifyOpeningHandSize(newHand);
|
stats.notifyOpeningHandSize(newHand);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import forge.Card;
|
|||||||
import forge.CardLists;
|
import forge.CardLists;
|
||||||
import forge.FThreads;
|
import forge.FThreads;
|
||||||
import forge.CardPredicates.Presets;
|
import forge.CardPredicates.Presets;
|
||||||
import forge.GameLogLevel;
|
import forge.GameEventType;
|
||||||
import forge.card.ability.AbilityUtils;
|
import forge.card.ability.AbilityUtils;
|
||||||
import forge.card.cardfactory.CardFactory;
|
import forge.card.cardfactory.CardFactory;
|
||||||
import forge.card.cardfactory.CardFactoryUtil;
|
import forge.card.cardfactory.CardFactoryUtil;
|
||||||
@@ -311,7 +311,7 @@ public class MagicStack extends MyObservable implements Iterable<SpellAbilitySta
|
|||||||
AbilityUtils.resolve(sp, false);
|
AbilityUtils.resolve(sp, false);
|
||||||
//sp.resolve();
|
//sp.resolve();
|
||||||
sp.resetOnceResolved();
|
sp.resetOnceResolved();
|
||||||
game.getGameLog().add("Mana", sp.getSourceCard() + " - " + sp.getDescription(), GameLogLevel.MANA);
|
game.getGameLog().add(GameEventType.MANA, sp.getSourceCard() + " - " + sp.getDescription());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -355,7 +355,7 @@ public class MagicStack extends MyObservable implements Iterable<SpellAbilitySta
|
|||||||
}
|
}
|
||||||
sb.append(".");
|
sb.append(".");
|
||||||
|
|
||||||
game.getGameLog().add("AddToStack", sb.toString(), GameLogLevel.STACK);
|
game.getGameLog().add(GameEventType.STACK_ADD, sb.toString());
|
||||||
//============= GameLog ======================
|
//============= GameLog ======================
|
||||||
|
|
||||||
// if activating player slips through the cracks, assign activating
|
// if activating player slips through the cracks, assign activating
|
||||||
@@ -604,7 +604,7 @@ public class MagicStack extends MyObservable implements Iterable<SpellAbilitySta
|
|||||||
|
|
||||||
boolean thisHasFizzled = this.hasFizzled(sa, source, false);
|
boolean thisHasFizzled = this.hasFizzled(sa, source, false);
|
||||||
String messageForLog = thisHasFizzled ? source.getName() + " ability fizzles." : sa.getStackDescription();
|
String messageForLog = thisHasFizzled ? source.getName() + " ability fizzles." : sa.getStackDescription();
|
||||||
game.getGameLog().add("ResolveStack", messageForLog, GameLogLevel.STACK);
|
game.getGameLog().add(GameEventType.STACK_RESOLVE, messageForLog);
|
||||||
if (thisHasFizzled) { // Fizzle
|
if (thisHasFizzled) { // Fizzle
|
||||||
// TODO: Spell fizzles, what's the best way to alert player?
|
// TODO: Spell fizzles, what's the best way to alert player?
|
||||||
Log.debug(source.getName() + " ability fizzles.");
|
Log.debug(source.getName() + " ability fizzles.");
|
||||||
|
|||||||
@@ -11,13 +11,18 @@ import javax.swing.JScrollPane;
|
|||||||
import javax.swing.SwingConstants;
|
import javax.swing.SwingConstants;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import forge.Command;
|
import forge.Command;
|
||||||
import forge.GameLog;
|
import forge.GameLog;
|
||||||
import forge.GameLogEntry;
|
import forge.GameLogEntry;
|
||||||
import forge.GameLogLevel;
|
import forge.GameEventType;
|
||||||
import forge.Singletons;
|
import forge.Singletons;
|
||||||
|
import forge.control.FControl;
|
||||||
import forge.game.MatchController;
|
import forge.game.MatchController;
|
||||||
|
import forge.game.player.LobbyPlayer;
|
||||||
|
import forge.game.player.PlayerStatistics;
|
||||||
import forge.gui.toolbox.FButton;
|
import forge.gui.toolbox.FButton;
|
||||||
import forge.gui.toolbox.FLabel;
|
import forge.gui.toolbox.FLabel;
|
||||||
import forge.gui.toolbox.FOverlay;
|
import forge.gui.toolbox.FOverlay;
|
||||||
@@ -175,17 +180,29 @@ public class ViewWinLose {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
lblTitle.setText(match.getLastGameOutcome().getWinner().getName() + " Won!");
|
lblTitle.setText(composeTitle(match));
|
||||||
|
|
||||||
GameLog log = match.getCurrentGame().getGameLog();
|
GameLog log = match.getCurrentGame().getGameLog();
|
||||||
|
|
||||||
for (GameLogEntry o : log.getLogEntriesExact(GameLogLevel.GAME_OUTCOME))
|
for (GameLogEntry o : log.getLogEntriesExact(GameEventType.GAME_OUTCOME))
|
||||||
pnlOutcomes.add(new FLabel.Builder().text(o.message).fontSize(14).build(), "h 20!");
|
pnlOutcomes.add(new FLabel.Builder().text(o.message).fontSize(14).build(), "h 20!");
|
||||||
|
|
||||||
for (GameLogEntry o : log.getLogEntriesExact(GameLogLevel.MATCH_RESULTS))
|
for (GameLogEntry o : log.getLogEntriesExact(GameEventType.MATCH_RESULTS))
|
||||||
lblStats.setText(o.message);
|
lblStats.setText(o.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String composeTitle(MatchController match) {
|
||||||
|
LobbyPlayer guiPlayer = FControl.SINGLETON_INSTANCE.getLobby().getGuiPlayer();
|
||||||
|
int nHumansInGame = 0;
|
||||||
|
for(Pair<LobbyPlayer, PlayerStatistics> pps : match.getLastGameOutcome()) {
|
||||||
|
if( pps.getKey() == guiPlayer )
|
||||||
|
nHumansInGame++;
|
||||||
|
}
|
||||||
|
LobbyPlayer winner = match.getLastGameOutcome().getWinner();
|
||||||
|
String title = nHumansInGame == 1 ? "You " + (winner == guiPlayer ? "won!" : "lost!") : winner.getName() + " Won!";
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
/** @return {@link forge.gui.toolbox.FButton} */
|
/** @return {@link forge.gui.toolbox.FButton} */
|
||||||
public FButton getBtnContinue() {
|
public FButton getBtnContinue() {
|
||||||
return this.btnContinue;
|
return this.btnContinue;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import javax.swing.border.EmptyBorder;
|
|||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import forge.GameLog;
|
import forge.GameLog;
|
||||||
import forge.GameLogEntry;
|
import forge.GameLogEntry;
|
||||||
import forge.GameLogLevel;
|
import forge.GameEventType;
|
||||||
import forge.gui.framework.DragCell;
|
import forge.gui.framework.DragCell;
|
||||||
import forge.gui.framework.DragTab;
|
import forge.gui.framework.DragTab;
|
||||||
import forge.gui.framework.EDocID;
|
import forge.gui.framework.EDocID;
|
||||||
@@ -119,7 +119,7 @@ public enum VLog implements IVDoc<CLog> {
|
|||||||
|
|
||||||
// TODO - some option to make this configurable is probably desirable
|
// TODO - some option to make this configurable is probably desirable
|
||||||
// By default, grab everything log level 3 or less.
|
// By default, grab everything log level 3 or less.
|
||||||
final List<GameLogEntry> data = model.getLogEntries(GameLogLevel.DAMAGE);
|
final List<GameLogEntry> data = model.getLogEntries(GameEventType.DAMAGE);
|
||||||
final int size = data.size();
|
final int size = data.size();
|
||||||
|
|
||||||
pnl.removeAll();
|
pnl.removeAll();
|
||||||
|
|||||||
Reference in New Issue
Block a user