mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
[NEO] Implemented Naomi, Pillar of Order
This commit is contained in:
parent
6a6b591549
commit
a76f6fbdf8
5 changed files with 112 additions and 21 deletions
|
|
@ -0,0 +1,24 @@
|
|||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum ControlArtifactAndEnchantmentCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return game.getBattlefield().contains(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT, source, game, 1)
|
||||
&& game.getBattlefield().contains(StaticFilters.FILTER_CONTROLLED_PERMANENT_ENCHANTMENT, source, game, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "you control an artifact and an enchantment";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package mage.abilities.hint.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum ControlArtifactAndEnchantmentHint implements Hint {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public String getText(Game game, Ability ability) {
|
||||
boolean artifact = game.getBattlefield().contains(
|
||||
StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT, ability, game, 1
|
||||
);
|
||||
boolean enchantment = game.getBattlefield().contains(
|
||||
StaticFilters.FILTER_CONTROLLED_PERMANENT_ENCHANTMENT, ability, game, 1
|
||||
);
|
||||
if (artifact) {
|
||||
return "You control and artifact" + (enchantment ? " and an enchantment" : "");
|
||||
} else if (enchantment) {
|
||||
return "You control an enchantment";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ControlArtifactAndEnchantmentHint copy() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue