mirror of
https://github.com/magefree/mage.git
synced 2025-12-29 23:12:10 -08:00
[ONE] Implement Skrelv's Hive
This commit is contained in:
parent
f0ea399ac6
commit
d244e52ede
4 changed files with 106 additions and 0 deletions
|
|
@ -0,0 +1,40 @@
|
|||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.hint.ConditionHint;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
|
||||
public enum CorruptedCondition implements Condition {
|
||||
instance;
|
||||
private static final Hint hint = new ConditionHint(instance, "An opponent has three or more poison counters");
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return game.getOpponents(source.getControllerId())
|
||||
.stream()
|
||||
.map(game::getPlayer)
|
||||
.filter(Objects::nonNull)
|
||||
.map(Player::getCounters)
|
||||
.anyMatch(counters -> counters.getCount(CounterType.POISON) >= 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "an opponent has three or more poison counters";
|
||||
}
|
||||
|
||||
public static Hint getHint() {
|
||||
return hint;
|
||||
}
|
||||
}
|
||||
|
|
@ -17,6 +17,7 @@ public enum AbilityWord {
|
|||
COHORT("Cohort"),
|
||||
CONSTELLATION("Constellation"),
|
||||
CONVERGE("Converge"),
|
||||
CORRUPTED("Corrupted"),
|
||||
COUNCILS_DILEMMA("Council's dilemma"),
|
||||
COVEN("Coven"),
|
||||
DELIRIUM("Delirium"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue