forked from External/mage
[TLA] Implement Kyoshi Island Plaza
This commit is contained in:
parent
6efb4e5df4
commit
c602edeca3
24 changed files with 243 additions and 302 deletions
|
|
@ -0,0 +1,55 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum ShrinesYouControlCount implements DynamicValue {
|
||||
WHERE_X("X", "the number of Shrines you control"),
|
||||
FOR_EACH("1", "Shrine you control");
|
||||
|
||||
private static final Hint hint = new ValueHint("Shrines you control", WHERE_X);
|
||||
|
||||
public static Hint getHint() {
|
||||
return hint;
|
||||
}
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.SHRINE);
|
||||
|
||||
private final String number;
|
||||
private final String message;
|
||||
|
||||
ShrinesYouControlCount(String number, String message) {
|
||||
this.number = number;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
return game.getBattlefield().count(filter, sourceAbility.getControllerId(), sourceAbility, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShrinesYouControlCount copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return number;
|
||||
}
|
||||
}
|
||||
|
|
@ -54,6 +54,7 @@ public class GainLifeEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
// TODO: this text generation probably needs reworking
|
||||
if (staticText != null && !staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -902,6 +902,13 @@ public final class StaticFilters {
|
|||
FILTER_CONTROLLED_SAMURAI_OR_WARRIOR.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterControlledPermanent FILTER_ANOTHER_CONTROLLED_SHRINE = new FilterControlledPermanent(SubType.SHRINE, "another Shrine you control");
|
||||
|
||||
static {
|
||||
FILTER_ANOTHER_CONTROLLED_SHRINE.add(AnotherPredicate.instance);
|
||||
FILTER_ANOTHER_CONTROLLED_SHRINE.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterPlaneswalkerPermanent FILTER_PERMANENT_PLANESWALKER = new FilterPlaneswalkerPermanent();
|
||||
|
||||
static {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue