mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
[NEO] Implemented Goro-Goro, Disciple of Ryusei
This commit is contained in:
parent
d2a10c3c45
commit
b60b7525c0
7 changed files with 156 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
package mage.filter.predicate.permanent;
|
||||
|
||||
import mage.counters.Counter;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -13,8 +13,12 @@ public enum CounterAnyPredicate implements Predicate<Permanent> {
|
|||
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
return input.getCounters(game).values().stream().anyMatch(counter -> counter.getCount() > 0);
|
||||
|
||||
return input
|
||||
.getCounters(game)
|
||||
.values()
|
||||
.stream()
|
||||
.mapToInt(Counter::getCount)
|
||||
.anyMatch(x -> x > 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
package mage.filter.predicate.permanent;
|
||||
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -19,7 +19,7 @@ public enum EnchantedPredicate implements Predicate<Permanent> {
|
|||
.stream()
|
||||
.map(game::getPermanent)
|
||||
.filter(Objects::nonNull)
|
||||
.anyMatch(permanent -> permanent.isEnchantment(game));
|
||||
.anyMatch(permanent -> permanent.hasSubtype(SubType.AURA, game));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
package mage.filter.predicate.permanent;
|
||||
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.Counter;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum ModifiedPredicate implements Predicate<Permanent> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Permanent input, Game game) {
|
||||
return input
|
||||
.getCounters(game)
|
||||
.values()
|
||||
.stream()
|
||||
.mapToInt(Counter::getCount)
|
||||
.anyMatch(x -> x > 0)
|
||||
|| input
|
||||
.getAttachments()
|
||||
.stream()
|
||||
.map(game::getPermanent)
|
||||
.filter(Objects::nonNull)
|
||||
.anyMatch(permanent -> permanent.hasSubtype(SubType.EQUIPMENT, game)
|
||||
|| (permanent.hasSubtype(SubType.AURA, game)
|
||||
&& permanent.isControlledBy(input.getControllerId())));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "modified";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DragonSpiritToken extends TokenImpl {
|
||||
|
||||
public DragonSpiritToken() {
|
||||
super("Dragon Spirit token", "5/5 red Dragon Spirit creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add(SubType.DRAGON);
|
||||
subtype.add(SubType.SPIRIT);
|
||||
power = new MageInt(5);
|
||||
toughness = new MageInt(5);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
|
||||
public DragonSpiritToken(final DragonSpiritToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public DragonSpiritToken copy() {
|
||||
return new DragonSpiritToken(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue