mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 20:11:59 -08:00
fixed Simic Manipulator implementation
This commit is contained in:
parent
3b18494054
commit
afcf3a43d2
3 changed files with 22 additions and 63 deletions
|
|
@ -37,6 +37,8 @@ import mage.MageObjectImpl;
|
|||
import mage.Mana;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.*;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.RemoveVariableCountersTargetCost;
|
||||
import mage.abilities.effects.common.NameACardEffect;
|
||||
import mage.abilities.mana.ActivatedManaAbilityImpl;
|
||||
import mage.cards.repository.PluginClassloaderRegistery;
|
||||
|
|
@ -417,6 +419,19 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
|||
ability.getTargets().add(new TargetCreaturePermanent(filter2));
|
||||
}
|
||||
break;
|
||||
case SIMIC_MANIPULATOR: //Simic Manipulator only
|
||||
xValue = 0;
|
||||
for (Cost cost : ability.getCosts()) {
|
||||
if (cost instanceof RemoveVariableCountersTargetCost) {
|
||||
xValue = ((RemoveVariableCountersTargetCost) cost).getAmount();
|
||||
break;
|
||||
}
|
||||
}
|
||||
ability.getTargets().clear();
|
||||
FilterCreaturePermanent newFilter = new FilterCreaturePermanent("creature with power less than or equal to " + xValue);
|
||||
newFilter.add(new PowerPredicate(ComparisonType.FEWER_THAN, xValue + 1));
|
||||
ability.addTarget(new TargetCreaturePermanent(newFilter));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,5 +12,6 @@ public enum TargetAdjustment {
|
|||
X_POWER_LEQ, CHOSEN_NAME,
|
||||
CHOSEN_COLOR,
|
||||
VERSE_COUNTER_TARGETS,
|
||||
TREASURE_COUNTER_POWER
|
||||
TREASURE_COUNTER_POWER,
|
||||
SIMIC_MANIPULATOR
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue