From 57aee714fcad180d2b4aed6d8a34c2afed6e01f5 Mon Sep 17 00:00:00 2001 From: Marshall Date: Tue, 23 Jun 2015 20:29:19 -0400 Subject: [PATCH] Breaking Point updates per PR comments --- Mage.Sets/src/mage/sets/judgment/BreakingPoint.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/sets/judgment/BreakingPoint.java b/Mage.Sets/src/mage/sets/judgment/BreakingPoint.java index 9dbac26535..a9c3d93a4a 100644 --- a/Mage.Sets/src/mage/sets/judgment/BreakingPoint.java +++ b/Mage.Sets/src/mage/sets/judgment/BreakingPoint.java @@ -69,7 +69,7 @@ class BreakingPointDestroyEffect extends OneShotEffect { public BreakingPointDestroyEffect() { super(Outcome.Benefit); - this.staticText = "Any player may have Breaking Point deal 6 damage to him or her. If no one does, destroy all creatures. Creatures destroyed this way can't be regenerated."; + this.staticText = "Any player may have {this} deal 6 damage to him or her. If no one does, destroy all creatures. Creatures destroyed this way can't be regenerated."; } public BreakingPointDestroyEffect(final BreakingPointDestroyEffect effect) { @@ -83,6 +83,11 @@ class BreakingPointDestroyEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { + return false; + } + StackObject spell = null; for(StackObject object : game.getStack()){ if(object instanceof Spell && object.getSourceId().equals(source.getSourceId())){ @@ -91,9 +96,9 @@ class BreakingPointDestroyEffect extends OneShotEffect { } if(spell != null){ boolean destroyCreatures = true; - for(UUID uuid : game.getPlayerList()){ + for(UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)){ Player player = game.getPlayer(uuid); - if(player != null && player.chooseUse(Outcome.Detriment, "Have " + spell.getName() + " deal 6 damage to you?", game)){ + if(player != null && player.chooseUse(Outcome.Detriment, "Have " + spell.getLogName() + " deal 6 damage to you?", game)){ destroyCreatures = false; player.damage(6, source.getSourceId(), game, false, true); game.informPlayers(player.getLogName() + " has " + spell.getName() + " deal 6 to him or her");