mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
* 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:
parent
4a86a9a01e
commit
4f2c21a146
3 changed files with 36 additions and 8 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue