Fix Heat Stroke area of influence

This commit is contained in:
Noah Gleason 2018-06-23 11:31:37 -04:00
parent c78cbc40eb
commit 4fc42adb32
No known key found for this signature in database
GPG key ID: 38D5F989A472EC21

View file

@ -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;
}