mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* Tinder Wall - Fixed it's damage dealing ability always fizzles (fixes #5005).
This commit is contained in:
parent
45d5baed60
commit
74b126c940
3 changed files with 50 additions and 45 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.filter.predicate.permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -6,6 +5,7 @@ import mage.filter.predicate.Predicate;
|
|||
import mage.game.Game;
|
||||
import mage.game.combat.CombatGroup;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.watchers.common.BlockedAttackerWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -25,6 +25,13 @@ public class BlockedByIdPredicate implements Predicate<Permanent> {
|
|||
if (combatGroup.getBlockers().contains(blockerId) && combatGroup.getAttackers().contains(input.getId())) {
|
||||
return true;
|
||||
}
|
||||
} // Check if the blockerId was blocked before, if it does no longer exists now but so the target attacking is still valid
|
||||
Permanent blocker = game.getPermanentOrLKIBattlefield(blockerId);
|
||||
if (blocker != null) {
|
||||
BlockedAttackerWatcher watcher = (BlockedAttackerWatcher) game.getState().getWatchers().get(BlockedAttackerWatcher.class.getSimpleName());
|
||||
if (watcher != null) {
|
||||
return watcher.creatureHasBlockedAttacker(input, blocker, game);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue