mirror of
https://github.com/correl/mage.git
synced 2025-03-12 17:00:08 -09:00
[ELD] added possible fix for Once Upon a Time intermittently failing (#6954)
This commit is contained in:
parent
8400127de1
commit
f9571398b5
1 changed files with 9 additions and 4 deletions
|
@ -84,13 +84,18 @@ class OnceUponATimeWatcher extends Watcher {
|
|||
|
||||
@Override
|
||||
public void watch(GameEvent event, Game game) {
|
||||
if (GameEvent.EventType.SPELL_CAST == event.getType()) {
|
||||
castSpells.add(event.getPlayerId());
|
||||
switch (event.getType()) {
|
||||
case SPELL_CAST:
|
||||
castSpells.add(event.getPlayerId());
|
||||
return;
|
||||
case BEGINNING_PHASE_PRE:
|
||||
if (game.getTurnNum() == 1) {
|
||||
castSpells.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getSpellsCastThisGame(UUID playerId) {
|
||||
boolean getSpellsCastThisGame(UUID playerId) {
|
||||
return !castSpells.contains(playerId);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue