mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00: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.token.Token;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class BecomesCreatureTargetEffect extends ContinuousEffectImpl<BecomesCreatureTargetEffect> {
|
||||
|
@ -68,7 +69,9 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl<BecomesCre
|
|||
|
||||
@Override
|
||||
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) {
|
||||
switch (layer) {
|
||||
case TypeChangingEffects_4:
|
||||
|
@ -97,7 +100,7 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl<BecomesCre
|
|||
case AbilityAddingRemovingEffects_6:
|
||||
if (sublayer == SubLayer.NA) {
|
||||
if (token.getAbilities().size() > 0) {
|
||||
for (Ability ability: token.getAbilities()) {
|
||||
for (Ability ability : token.getAbilities()) {
|
||||
permanent.addAbility(ability);
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +115,9 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl<BecomesCre
|
|||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
result |= true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue