mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 20:32:06 -08:00
Fix Heat Stroke area of influence
This commit is contained in:
parent
c78cbc40eb
commit
4fc42adb32
1 changed files with 2 additions and 1 deletions
|
|
@ -68,6 +68,7 @@ class HeatStrokeEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
BlockedThisTurnWatcher blockedWatcher = (BlockedThisTurnWatcher) game.getState().getWatchers().get(BlockedThisTurnWatcher.class.getSimpleName());
|
||||
WasBlockedThisTurnWatcher wasBlockedThisTurnWatcher = (WasBlockedThisTurnWatcher) game.getState().getWatchers().get(WasBlockedThisTurnWatcher.class.getSimpleName());
|
||||
Set<Permanent> inROI = new HashSet<>(game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), source.getSourceId(), game));
|
||||
boolean toRet = false;
|
||||
Set<MageObjectReference> toDestroy = new HashSet<>();
|
||||
|
||||
|
|
@ -80,7 +81,7 @@ class HeatStrokeEffect extends OneShotEffect {
|
|||
|
||||
for (MageObjectReference mor : toDestroy) {
|
||||
Permanent permanent = mor.getPermanent(game);
|
||||
if (permanent != null && permanent.isCreature()){
|
||||
if (permanent != null && permanent.isCreature() && inROI.contains(permanent)){
|
||||
permanent.destroy(source.getSourceId(), game, false);
|
||||
toRet = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue