mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 13:19:18 -08:00
tests: improved load tests (improved progress bar, added effects stats)
This commit is contained in:
parent
f5b901beb4
commit
3405b51aaf
7 changed files with 55 additions and 24 deletions
|
|
@ -1487,8 +1487,12 @@ public class ContinuousEffects implements Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
public int getTotalEffectsCount() {
|
||||
return allEffectsLists.stream().mapToInt(ContinuousEffectsList::size).sum();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Effects: " + allEffectsLists.stream().mapToInt(ContinuousEffectsList::size).sum();
|
||||
return "Effects: " + getTotalEffectsCount();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -314,7 +314,9 @@ public interface Game extends MageItem, Serializable, Copyable<Game> {
|
|||
|
||||
Player getLosingPlayer();
|
||||
|
||||
int getTotalErrorsCount();
|
||||
int getTotalErrorsCount(); // debug only
|
||||
|
||||
int getTotalEffectsCount(); // debug only
|
||||
|
||||
//client event methods
|
||||
void addTableEventListener(Listener<TableEvent> listener);
|
||||
|
|
|
|||
|
|
@ -3547,11 +3547,6 @@ public abstract class GameImpl implements Game {
|
|||
|
||||
}
|
||||
|
||||
protected void removeCreaturesFromCombat() {
|
||||
//20091005 - 511.3
|
||||
getCombat().endCombat(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContinuousEffects getContinuousEffects() {
|
||||
return state.getContinuousEffects();
|
||||
|
|
@ -3694,6 +3689,11 @@ public abstract class GameImpl implements Game {
|
|||
return this.totalErrorsCount.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTotalEffectsCount() {
|
||||
return this.getContinuousEffects().getTotalEffectsCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cheat(UUID ownerId, Map<Zone, String> commands) {
|
||||
if (commands != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue