[STX] Implemented Show of Confidence

This commit is contained in:
Evan Kranzler 2021-04-10 21:55:32 -04:00
parent 63ae80c711
commit 79b7d49e83
3 changed files with 94 additions and 8 deletions

View file

@ -10,14 +10,9 @@ import mage.game.events.GameEvent.EventType;
import mage.game.stack.Spell;
import mage.watchers.Watcher;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.*;
/**
*
* @author LevelX2
*/
public class SpellsCastWatcher extends Watcher {
@ -73,11 +68,11 @@ public class SpellsCastWatcher extends Watcher {
}
public List<Spell> getSpellsCastThisTurn(UUID playerId) {
return spellsCast.get(playerId);
return spellsCast.computeIfAbsent(playerId, x -> new ArrayList<>());
}
public List<Spell> getSpellsCastFromGraveyardThisTurn(UUID playerId) {
return spellsCastFromGraveyard.get(playerId);
return spellsCastFromGraveyard.computeIfAbsent(playerId, x -> new ArrayList<>());
}
public int getNumberOfNonCreatureSpells() {