From c709d862ae09fa149b885d402f671d44a791325c Mon Sep 17 00:00:00 2001 From: North Date: Sun, 11 Mar 2012 17:20:29 +0200 Subject: [PATCH] Fixed Syphon Soul --- .../src/mage/sets/planechase/SyphonSoul.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Mage.Sets/src/mage/sets/planechase/SyphonSoul.java b/Mage.Sets/src/mage/sets/planechase/SyphonSoul.java index 15079ce8751..87f7a1444b2 100644 --- a/Mage.Sets/src/mage/sets/planechase/SyphonSoul.java +++ b/Mage.Sets/src/mage/sets/planechase/SyphonSoul.java @@ -28,9 +28,8 @@ package mage.sets.planechase; import java.util.UUID; - -import mage.Constants; import mage.Constants.CardType; +import mage.Constants.Outcome; import mage.Constants.Rarity; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; @@ -47,6 +46,8 @@ public class SyphonSoul extends CardImpl { super(ownerId, 43, "Syphon Soul", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}"); this.expansionSetCode = "HOP"; this.color.setBlack(true); + + // Syphon Soul deals 2 damage to each other player. You gain life equal to the damage dealt this way. this.getSpellAbility().addEffect(new SyphonSoulEffect()); } @@ -62,7 +63,7 @@ public class SyphonSoul extends CardImpl { class SyphonSoulEffect extends OneShotEffect { public SyphonSoulEffect() { - super(Constants.Outcome.Damage); + super(Outcome.Damage); staticText = "{this} deals 2 damage to each other player. You gain life equal to the damage dealt this way"; } @@ -72,12 +73,15 @@ class SyphonSoulEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - int loseLife = 0; - for (UUID opponentId : game.getOpponents(source.getControllerId())) { - loseLife += game.getPlayer(opponentId).loseLife(2, game); + int damageDealt = 0; + for (UUID playerId : game.getPlayerList()) { + if (!playerId.equals(source.getControllerId())) { + damageDealt += game.getPlayer(playerId).damage(2, source.getSourceId(), game, false, true); + } + } + if (damageDealt > 0) { + game.getPlayer(source.getControllerId()).gainLife(damageDealt, game); } - if (loseLife > 0) - game.getPlayer(source.getControllerId()).gainLife(loseLife, game); return true; }