mirror of
https://github.com/correl/mage.git
synced 2025-03-17 01:06:26 -09:00
fix multitargeting, todo: fix tooltip
This commit is contained in:
parent
4eaf896cff
commit
54a2e7c497
1 changed files with 81 additions and 76 deletions
|
@ -40,8 +40,9 @@ import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class BecomesCreatureTargetEffect extends ContinuousEffectImpl<BecomesCreatureTargetEffect> {
|
public class BecomesCreatureTargetEffect extends ContinuousEffectImpl<BecomesCreatureTargetEffect> {
|
||||||
|
@ -68,7 +69,9 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl<BecomesCre
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
boolean result = false;
|
||||||
|
for (UUID permanentId : targetPointer.getTargets(source)) {
|
||||||
|
Permanent permanent = game.getPermanent(permanentId);
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
switch (layer) {
|
switch (layer) {
|
||||||
case TypeChangingEffects_4:
|
case TypeChangingEffects_4:
|
||||||
|
@ -112,7 +115,9 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl<BecomesCre
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
result |= true;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue