forked from External/mage
[FIN] Fix Summon: Brynhildr
1. Was looking for STUN counters being added rather than LORE counters. 2. Was not accounting for if Summon: Brynhildr was entering with a counter, such as on the first turn it was played.
This commit is contained in:
parent
b33ecac6bd
commit
b715043d4a
1 changed files with 7 additions and 2 deletions
|
|
@ -139,12 +139,17 @@ class SummonBrynhildrWatcher extends Watcher {
|
|||
@Override
|
||||
public void watch(GameEvent event, Game game) {
|
||||
if (event.getType() != GameEvent.EventType.COUNTER_ADDED
|
||||
|| !CounterType.STUN.getName().equals(event.getData())) {
|
||||
|| !CounterType.LORE.getName().equals(event.getData())) {
|
||||
return;
|
||||
}
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
int offset = 0;
|
||||
if (permanent == null) {
|
||||
permanent = game.getPermanentEntering(event.getTargetId());
|
||||
offset++;
|
||||
}
|
||||
if (permanent != null) {
|
||||
map.computeIfAbsent(new MageObjectReference(permanent, game), x -> new HashSet<>())
|
||||
map.computeIfAbsent(new MageObjectReference(permanent, game, offset), x -> new HashSet<>())
|
||||
.add(event.getPlayerId());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue