mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
Fixed implementation of team-controlled effects
This commit is contained in:
parent
21578709bc
commit
c7f57d8c68
15 changed files with 116 additions and 84 deletions
|
|
@ -38,11 +38,8 @@ import mage.constants.SubType;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.TargetController;
|
import mage.filter.common.FilterTeamPermanent;
|
||||||
import mage.filter.FilterPermanent;
|
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -51,11 +48,10 @@ import mage.target.common.TargetCreaturePermanent;
|
||||||
*/
|
*/
|
||||||
public class AuroraChampion extends CardImpl {
|
public class AuroraChampion extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterPermanent(SubType.WARRIOR, "another Warrior");
|
private static final FilterTeamPermanent filter = new FilterTeamPermanent(SubType.WARRIOR, "another Warrior");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new AnotherPredicate());
|
filter.add(new AnotherPredicate());
|
||||||
filter.add(Predicates.not(new ControllerPredicate(TargetController.OPPONENT)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public AuroraChampion(UUID ownerId, CardSetInfo setInfo) {
|
public AuroraChampion(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -38,11 +38,8 @@ import mage.constants.SubType;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.TargetController;
|
import mage.filter.common.FilterTeamPermanent;
|
||||||
import mage.filter.FilterPermanent;
|
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -50,11 +47,10 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
*/
|
*/
|
||||||
public class BullRushBruiser extends CardImpl {
|
public class BullRushBruiser extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterPermanent(SubType.WARRIOR, "another Warrior");
|
private static final FilterTeamPermanent filter = new FilterTeamPermanent(SubType.WARRIOR, "another Warrior");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new AnotherPredicate());
|
filter.add(new AnotherPredicate());
|
||||||
filter.add(Predicates.not(new ControllerPredicate(TargetController.OPPONENT)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public BullRushBruiser(UUID ownerId, CardSetInfo setInfo) {
|
public BullRushBruiser(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -35,12 +35,9 @@ import mage.constants.SubType;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.TargetController;
|
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.common.FilterTeamPermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -48,11 +45,10 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
*/
|
*/
|
||||||
public class DecoratedChampion extends CardImpl {
|
public class DecoratedChampion extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterPermanent(SubType.WARRIOR, "another Warrior");
|
private static final FilterTeamPermanent filter = new FilterTeamPermanent(SubType.WARRIOR, "another Warrior");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(new AnotherPredicate());
|
filter.add(new AnotherPredicate());
|
||||||
filter.add(Predicates.not(new ControllerPredicate(TargetController.OPPONENT)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public DecoratedChampion(UUID ownerId, CardSetInfo setInfo) {
|
public DecoratedChampion(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.TargetController;
|
import mage.filter.common.FilterTeamCreaturePermanent;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -48,11 +45,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
*/
|
*/
|
||||||
public class DwarvenLightsmith extends CardImpl {
|
public class DwarvenLightsmith extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures your team controls");
|
private static final FilterTeamCreaturePermanent filter = new FilterTeamCreaturePermanent("creatures your team controls");
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.not(new ControllerPredicate(TargetController.OPPONENT)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public DwarvenLightsmith(UUID ownerId, CardSetInfo setInfo) {
|
public DwarvenLightsmith(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}");
|
||||||
|
|
|
||||||
|
|
@ -41,11 +41,8 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.TargetController;
|
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.common.FilterTeamPermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -53,11 +50,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
*/
|
*/
|
||||||
public class KhorvathBrightflame extends CardImpl {
|
public class KhorvathBrightflame extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterPermanent(SubType.KNIGHT, "Knights your team controls");
|
private static final FilterTeamPermanent filter = new FilterTeamPermanent(SubType.KNIGHT, "Knights your team controls");
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.not(new ControllerPredicate(TargetController.OPPONENT)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public KhorvathBrightflame(UUID ownerId, CardSetInfo setInfo) {
|
public KhorvathBrightflame(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}");
|
||||||
|
|
|
||||||
|
|
@ -40,10 +40,7 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.TargetController;
|
import mage.filter.common.FilterTeamPermanent;
|
||||||
import mage.filter.FilterPermanent;
|
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
@ -83,11 +80,7 @@ public class NimbusChampion extends CardImpl {
|
||||||
|
|
||||||
class NimbusChampionEffect extends OneShotEffect {
|
class NimbusChampionEffect extends OneShotEffect {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterPermanent(SubType.WARRIOR, "Warriors your team controls");
|
private static final FilterTeamPermanent filter = new FilterTeamPermanent(SubType.WARRIOR, "Warriors your team controls");
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.not(new ControllerPredicate(TargetController.OPPONENT)));
|
|
||||||
}
|
|
||||||
|
|
||||||
NimbusChampionEffect() {
|
NimbusChampionEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,8 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.TargetController;
|
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterTeamPermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -50,14 +46,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
*/
|
*/
|
||||||
public class RushbladeCommander extends CardImpl {
|
public class RushbladeCommander extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Warrior creatures your team controls");
|
private static final FilterTeamPermanent filter = new FilterTeamPermanent(SubType.WARRIOR, "Warriors your team controls");
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.not(
|
|
||||||
new ControllerPredicate(TargetController.OPPONENT)
|
|
||||||
));
|
|
||||||
filter.add(new SubtypePredicate(SubType.WARRIOR));
|
|
||||||
}
|
|
||||||
|
|
||||||
public RushbladeCommander(UUID ownerId, CardSetInfo setInfo) {
|
public RushbladeCommander(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{R}");
|
||||||
|
|
|
||||||
|
|
@ -38,11 +38,8 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.TargetController;
|
import mage.filter.common.FilterTeamPermanent;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -50,10 +47,9 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
*/
|
*/
|
||||||
public class SickleDancer extends CardImpl {
|
public class SickleDancer extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.WARRIOR, "Warrior creature");
|
private static final FilterTeamPermanent filter = new FilterTeamPermanent(SubType.WARRIOR, "Warrior creature");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(Predicates.not(new ControllerPredicate(TargetController.OPPONENT)));
|
|
||||||
filter.add(new AnotherPredicate());
|
filter.add(new AnotherPredicate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,11 +39,8 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.TargetController;
|
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.common.FilterTeamPermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -51,11 +48,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
*/
|
*/
|
||||||
public class SylviaBrightspear extends CardImpl {
|
public class SylviaBrightspear extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterPermanent(SubType.DRAGON, "Dragons your team controls");
|
private static final FilterTeamPermanent filter = new FilterTeamPermanent(SubType.DRAGON, "Dragons your team controls");
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.not(new ControllerPredicate(TargetController.OPPONENT)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public SylviaBrightspear(UUID ownerId, CardSetInfo setInfo) {
|
public SylviaBrightspear(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||||
|
|
|
||||||
|
|
@ -37,11 +37,8 @@ import mage.constants.SubType;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.TargetController;
|
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.common.FilterTeamPermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
|
||||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.target.common.TargetOpponent;
|
import mage.target.common.TargetOpponent;
|
||||||
|
|
@ -86,11 +83,10 @@ public class ThrasherBrute extends CardImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ThrasherBruteFilter extends FilterPermanent {
|
class ThrasherBruteFilter extends FilterTeamPermanent {
|
||||||
|
|
||||||
ThrasherBruteFilter() {
|
ThrasherBruteFilter() {
|
||||||
super();
|
super();
|
||||||
this.add(Predicates.not(new ControllerPredicate(TargetController.OPPONENT)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ThrasherBruteFilter(final ThrasherBruteFilter effect) {
|
ThrasherBruteFilter(final ThrasherBruteFilter effect) {
|
||||||
|
|
|
||||||
|
|
@ -185,13 +185,16 @@ public abstract class ActivatedAbilityImpl extends AbilityImpl implements Activa
|
||||||
switch (mayActivate) {
|
switch (mayActivate) {
|
||||||
case ANY:
|
case ANY:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NOT_YOU:
|
case NOT_YOU:
|
||||||
if (controlsAbility(playerId, game)) {
|
if (controlsAbility(playerId, game)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case TEAM:
|
||||||
|
if (game.getPlayer(controllerId).hasOpponent(playerId, game)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case OPPONENT:
|
case OPPONENT:
|
||||||
if (!game.getPlayer(controllerId).hasOpponent(playerId, game)) {
|
if (!game.getPlayer(controllerId).hasOpponent(playerId, game)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,5 @@ package mage.constants;
|
||||||
*/
|
*/
|
||||||
public enum TargetController {
|
public enum TargetController {
|
||||||
|
|
||||||
ACTIVE, ANY, YOU, NOT_YOU, OPPONENT, OWNER, CONTROLLER_ATTACHED_TO, NEXT
|
ACTIVE, ANY, YOU, NOT_YOU, OPPONENT, TEAM, OWNER, CONTROLLER_ATTACHED_TO, NEXT
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
package mage.filter.common;
|
||||||
|
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class FilterTeamCreaturePermanent extends FilterCreaturePermanent {
|
||||||
|
|
||||||
|
public FilterTeamCreaturePermanent() {
|
||||||
|
this("creature your team controls");
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilterTeamCreaturePermanent(String name) {
|
||||||
|
super(name);
|
||||||
|
this.add(new ControllerPredicate(TargetController.TEAM));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilterTeamCreaturePermanent(SubType subtype, String name) {
|
||||||
|
super(subtype, name);
|
||||||
|
this.add(new ControllerPredicate(TargetController.TEAM));
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilterTeamCreaturePermanent(final FilterTeamCreaturePermanent filter) {
|
||||||
|
super(filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FilterTeamCreaturePermanent copy() {
|
||||||
|
return new FilterTeamCreaturePermanent(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
package mage.filter.common;
|
||||||
|
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class FilterTeamPermanent extends FilterPermanent {
|
||||||
|
|
||||||
|
public FilterTeamPermanent() {
|
||||||
|
this("permanent your team controls");
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilterTeamPermanent(String name) {
|
||||||
|
super(name);
|
||||||
|
this.add(new ControllerPredicate(TargetController.TEAM));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilterTeamPermanent(SubType subtype, String name) {
|
||||||
|
super(subtype, name);
|
||||||
|
this.add(new ControllerPredicate(TargetController.TEAM));
|
||||||
|
}
|
||||||
|
|
||||||
|
public FilterTeamPermanent(final FilterTeamPermanent filter) {
|
||||||
|
super(filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FilterTeamPermanent copy() {
|
||||||
|
return new FilterTeamPermanent(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -58,9 +58,14 @@ public class ControllerPredicate implements ObjectPlayerPredicate<ObjectPlayer<C
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case TEAM:
|
||||||
|
if (!game.getPlayer(playerId).hasOpponent(object.getControllerId(), game)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case OPPONENT:
|
case OPPONENT:
|
||||||
if (!object.getControllerId().equals(playerId) &&
|
if (!object.getControllerId().equals(playerId)
|
||||||
game.getPlayer(playerId).hasOpponent(object.getControllerId(), game)) {
|
&& game.getPlayer(playerId).hasOpponent(object.getControllerId(), game)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue