mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
fixed interactions between effects which replace a token and effects which care about tokens after they've been made
This commit is contained in:
parent
0540557455
commit
676c3a8bb4
2 changed files with 31 additions and 7 deletions
|
|
@ -238,6 +238,14 @@ public abstract class TokenImpl extends MageObjectImpl implements Token {
|
|||
}
|
||||
}
|
||||
putOntoBattlefieldHelper(event, game, source, tapped, attacking, attackedPlayer, created);
|
||||
event.getTokens()
|
||||
.keySet()
|
||||
.stream()
|
||||
.map(Token::getLastAddedTokenIds)
|
||||
.flatMap(Collection::stream)
|
||||
.distinct()
|
||||
.filter(uuid -> !this.lastAddedTokenIds.contains(uuid))
|
||||
.forEach(this.lastAddedTokenIds::add);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue