* Fixed a bug that target event was wrongly created if effects like chnage target of Spellskite didn't change the target.

This commit is contained in:
LevelX2 2016-01-02 16:31:42 +01:00
parent 4a86a9a01e
commit 4f2c21a146
3 changed files with 36 additions and 8 deletions

View file

@ -58,6 +58,9 @@ public class ChangeATargetOfTargetSpellAbilityToSourceEffect extends OneShotEffe
boolean twoTimesTarget = false;
if (targets.size() == 1 && targets.get(0).getTargets().size() == 1) {
Target target = targets.get(0);
if (target.getFirstTarget().equals(source.getSourceId())) {
return true; // Target was already the same source, so no change / target event to create
}
if (target.canTarget(stackObject.getControllerId(), source.getSourceId(), sourceAbility, game)) {
oldTargetName = getTargetName(targets.getFirstTarget(), game);
target.clearChosen();