mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
* Spellskite - Fixed a bug that target could not always be chnaged to Spellskite if other modes already targeted Spellskite.
This commit is contained in:
parent
ae4125209b
commit
115512ad9b
1 changed files with 4 additions and 8 deletions
|
|
@ -127,16 +127,12 @@ class SpellskiteEffect extends OneShotEffect {
|
|||
boolean validTargets = false;
|
||||
do {
|
||||
for (Target target : targets) {
|
||||
if (target.getTargets().contains(source.getSourceId())) { // You can't change a traget to Spellskite, if Spellskite is already targeted by this target
|
||||
continue;
|
||||
}
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
String name = getTargetName(targetId, game);
|
||||
if (targetId.equals(source.getSourceId())
|
||||
|| target.getTargets().contains(source.getSourceId())) {
|
||||
// you can't change this target to source because the source is already another targetId of that target.
|
||||
twoTimesTarget = true;
|
||||
continue;
|
||||
}
|
||||
if (target.canTarget(stackObject.getControllerId(), source.getSourceId(), sourceAbility, game)
|
||||
&& !twoTimesTarget) {
|
||||
if (target.canTarget(stackObject.getControllerId(), source.getSourceId(), sourceAbility, game)) {
|
||||
validTargets = true;
|
||||
if (name != null
|
||||
&& controller.chooseUse(Outcome.Neutral, "Change target from " + name + " to " + sourceObject.getLogName() + '?', source, game)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue