forked from External/mage
Refactoring
We don't need to override basic methods to just call the basic method again.
This commit is contained in:
parent
b626bf6866
commit
a9f2c8c407
6 changed files with 4 additions and 25 deletions
|
|
@ -66,11 +66,7 @@ public class CastFromGraveyardWatcher extends Watcher {
|
|||
if (event.getType() == GameEvent.EventType.SPELL_CAST && event.getZone().equals(Zone.GRAVEYARD)) {
|
||||
Spell spell = (Spell) game.getObject(event.getTargetId());
|
||||
if (spell != null) {
|
||||
HashSet<Integer> zcc = spellsCastFromGraveyard.get(spell.getSourceId());
|
||||
if (zcc == null) {
|
||||
zcc = new HashSet<>();
|
||||
spellsCastFromGraveyard.put(spell.getSourceId(), zcc);
|
||||
}
|
||||
HashSet<Integer> zcc = spellsCastFromGraveyard.computeIfAbsent(spell.getSourceId(), k -> new HashSet<>());
|
||||
zcc.add(spell.getZoneChangeCounter(game));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue