mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
Legacy's Allure modified so its ability can be copied
This commit is contained in:
parent
602eee1928
commit
bd415215f5
4 changed files with 21 additions and 26 deletions
|
|
@ -47,6 +47,7 @@ import mage.counters.Counters;
|
|||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
|
|
@ -61,6 +62,7 @@ import mage.target.TargetCard;
|
|||
import mage.target.TargetPermanent;
|
||||
import mage.target.TargetSpell;
|
||||
import mage.target.common.TargetCardInOpponentsGraveyard;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.util.GameLog;
|
||||
import mage.util.SubTypeList;
|
||||
import mage.watchers.Watcher;
|
||||
|
|
@ -405,6 +407,16 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
|||
ability.addTarget(new TargetPermanent(0, xValue, permanentFilter, false));
|
||||
}
|
||||
break;
|
||||
case TREASURE_COUNTER_POWER:
|
||||
sourcePermanent = game.getPermanentOrLKIBattlefield(ability.getSourceId());
|
||||
if (sourcePermanent != null) {
|
||||
xValue = sourcePermanent.getCounters(game).getCount(CounterType.TREASURE);
|
||||
FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creature with power less than or equal to the number of treasure counters on {this}");
|
||||
filter2.add(new PowerPredicate(ComparisonType.FEWER_THAN, xValue + 1));
|
||||
ability.getTargets().clear();
|
||||
ability.getTargets().add(new TargetCreaturePermanent(filter2));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@ package mage.constants;
|
|||
*/
|
||||
public enum TargetAdjustment {
|
||||
|
||||
NONE, X_TARGETS, X_CMC_EQUAL_PERM, X_CMC_EQUAL_GY_CARD, X_POWER_LEQ, CHOSEN_NAME, CHOSEN_COLOR, VERSE_COUNTER_TARGETS
|
||||
NONE, X_TARGETS, X_CMC_EQUAL_PERM, X_CMC_EQUAL_GY_CARD, X_POWER_LEQ, CHOSEN_NAME, CHOSEN_COLOR, VERSE_COUNTER_TARGETS, TREASURE_COUNTER_POWER
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ public enum CounterType {
|
|||
TIME("time"),
|
||||
TOWER("tower"),
|
||||
TRAP("trap"),
|
||||
TREASURE("treasure"),
|
||||
UNITY("unity"),
|
||||
VELOCITY("velocity"),
|
||||
VERSE("verse"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue