Fix wrong source of damage for Chandra's Ignition

This commit is contained in:
LoneFox 2015-07-07 12:34:50 +03:00
parent 1e5a8e2a57
commit 859bfd9bf3

View file

@ -87,13 +87,13 @@ class ChandrasIgnitionEffect extends OneShotEffect {
if (targetCreature != null && targetCreature.getPower().getValue() > 0) {
for (Permanent creature : game.getState().getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), source.getSourceId(), game)) {
if (!creature.getId().equals(targetCreature.getId())) {
creature.damage(targetCreature.getPower().getValue(), source.getSourceId(), game, false, true);
creature.damage(targetCreature.getPower().getValue(), targetCreature.getId(), game, false, true);
}
}
for(UUID opponentId : game.getOpponents(source.getControllerId())) {
Player opponent = game.getPlayer(opponentId);
if (opponent != null) {
opponent.damage(targetCreature.getPower().getValue(), source.getSourceId(), game, false, true);
opponent.damage(targetCreature.getPower().getValue(), targetCreature.getId(), game, false, true);
}
}
}