mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
* Halvar, God of Battle - fixed rollback error on attached permanent die;
This commit is contained in:
parent
0e916b6e29
commit
6e661e6d97
4 changed files with 10 additions and 6 deletions
|
|
@ -55,8 +55,8 @@ public class AttacksWithCreaturesTriggeredAbility extends TriggeredAbilityImpl {
|
|||
if (game.getCombat().getAttackingPlayerId().equals(getControllerId())) {
|
||||
int attackerCount = 0;
|
||||
for (UUID attackerId : game.getCombat().getAttackers()) {
|
||||
Permanent permanent = game.getPermanent(attackerId);
|
||||
if (permanent != null && filter.match(game.getPermanent(attackerId), game)) {
|
||||
Permanent attacker = game.getPermanent(attackerId);
|
||||
if (attacker != null && filter.match(attacker, game)) {
|
||||
attackerCount++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ public class AttachedToPredicate implements Predicate<Permanent> {
|
|||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
UUID attachedTo = input.getAttachedTo();
|
||||
return attachedTo != null && filter.match(game.getPermanent(attachedTo), game);
|
||||
Permanent permanent = game.getPermanent(attachedTo);
|
||||
return permanent != null && filter.match(permanent, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue