mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
[RIX] Added Vona's Hunger.
This commit is contained in:
parent
859242279e
commit
43c732c751
13 changed files with 474 additions and 48 deletions
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.designations.DesignationType;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LvelX2
|
||||
*/
|
||||
public enum CitysBlessingCondition implements Condition {
|
||||
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return game.getPlayer(source.getControllerId()).hasDesignation(DesignationType.CITYS_BLESSING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "If you have the city's blessing";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.abilities.effects.keyword;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.designations.CitysBlessing;
|
||||
import mage.designations.DesignationType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class AscendEffect extends OneShotEffect {
|
||||
|
||||
public AscendEffect() {
|
||||
super(Outcome.Detriment);
|
||||
staticText = "Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.)<br>";
|
||||
}
|
||||
|
||||
public AscendEffect(final AscendEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AscendEffect copy() {
|
||||
return new AscendEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
if (game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_ARTIFACT_CREATURE_ENCHANTMENT_OR_LAND, controller.getId(), game) > 9) {
|
||||
if (!controller.hasDesignation(DesignationType.CITYS_BLESSING)) {
|
||||
controller.addDesignation(new CitysBlessing());
|
||||
game.informPlayers(controller.getLogName() + " gets the city's blessing for the rest of the game.");
|
||||
} else {
|
||||
game.informPlayers(controller.getLogName() + " already has the city's blessing.");
|
||||
}
|
||||
} else {
|
||||
game.informPlayers(controller.getLogName() + " does not get the city's blessing.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
39
Mage/src/main/java/mage/designations/CitysBlessing.java
Normal file
39
Mage/src/main/java/mage/designations/CitysBlessing.java
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.designations;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class CitysBlessing extends Designation {
|
||||
|
||||
public CitysBlessing() {
|
||||
super(DesignationType.CITYS_BLESSING, "RIX");
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,10 @@
|
|||
*/
|
||||
package mage.designations;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.ObjectColor;
|
||||
|
|
@ -14,6 +18,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.costs.mana.ManaCost;
|
||||
import mage.abilities.costs.mana.ManaCosts;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.text.TextPart;
|
||||
import mage.cards.FrameStyle;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
|
@ -23,11 +28,6 @@ import mage.game.events.ZoneChangeEvent;
|
|||
import mage.util.GameLog;
|
||||
import mage.util.SubTypeList;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
|
@ -40,27 +40,35 @@ public abstract class Designation implements MageObject {
|
|||
private static ManaCostsImpl emptyCost = new ManaCostsImpl();
|
||||
|
||||
private String name;
|
||||
private DesignationType designationType;
|
||||
private UUID id;
|
||||
private FrameStyle frameStyle;
|
||||
private Abilities<Ability> abilites = new AbilitiesImpl<>();
|
||||
private String expansionSetCodeForImage;
|
||||
private final boolean unique; // can a designation be added multiple times (false) or only once to an object (true)
|
||||
|
||||
public Designation(String name, String expansionSetCode) {
|
||||
this.name = name;
|
||||
public Designation(DesignationType designationType, String expansionSetCode) {
|
||||
this(designationType, expansionSetCode, true);
|
||||
}
|
||||
|
||||
public Designation(DesignationType designationType, String expansionSetCode, boolean unique) {
|
||||
this.name = designationType.name();
|
||||
this.designationType = designationType;
|
||||
this.id = UUID.randomUUID();
|
||||
this.frameStyle = FrameStyle.M15_NORMAL;
|
||||
this.expansionSetCodeForImage = expansionSetCode;
|
||||
this.unique = unique;
|
||||
}
|
||||
|
||||
public Designation(final Designation designation) {
|
||||
this.id = designation.id;
|
||||
this.name = designation.name;
|
||||
this.designationType = designation.designationType;
|
||||
this.frameStyle = designation.frameStyle;
|
||||
this.abilites = designation.abilites.copy();
|
||||
this.unique = designation.unique;
|
||||
}
|
||||
|
||||
public abstract void start(Game game, UUID controllerId);
|
||||
|
||||
@Override
|
||||
public FrameStyle getFrameStyle() {
|
||||
return frameStyle;
|
||||
|
|
@ -110,6 +118,10 @@ public abstract class Designation implements MageObject {
|
|||
return this.id;
|
||||
}
|
||||
|
||||
public DesignationType getDesignationType() {
|
||||
return designationType;
|
||||
}
|
||||
|
||||
public void setExpansionSetCodeForImage(String expansionSetCodeForImage) {
|
||||
this.expansionSetCodeForImage = expansionSetCodeForImage;
|
||||
}
|
||||
|
|
@ -218,4 +230,38 @@ public abstract class Designation implements MageObject {
|
|||
@Override
|
||||
public void removePTCDA() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param game
|
||||
* @param controllerId
|
||||
*/
|
||||
public void start(Game game, UUID controllerId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAllCreatureTypes() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIsAllCreatureTypes(boolean value) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TextPart> getTextParts() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextPart addTextPart(TextPart textPart) {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
public boolean isUnique() {
|
||||
return unique;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
49
Mage/src/main/java/mage/designations/DesignationType.java
Normal file
49
Mage/src/main/java/mage/designations/DesignationType.java
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.designations;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public enum DesignationType {
|
||||
THE_MONARCH("The Monarch"),
|
||||
CITYS_BLESSING("City's Blessing");
|
||||
|
||||
private final String text;
|
||||
|
||||
DesignationType(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return text;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -27,14 +27,11 @@
|
|||
*/
|
||||
package mage.designations;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.effects.common.BecomesMonarchTargetEffect;
|
||||
import mage.abilities.effects.common.DrawCardTargetEffect;
|
||||
import mage.abilities.text.TextPart;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
|
|
@ -50,40 +47,10 @@ import mage.target.targetpointer.FixedTarget;
|
|||
public class Monarch extends Designation {
|
||||
|
||||
public Monarch() {
|
||||
super("The Monarch", "CN2");
|
||||
super(DesignationType.THE_MONARCH, "CN2");
|
||||
addAbility(new MonarchDrawTriggeredAbility());
|
||||
addAbility(new MonarchDealsCombatDamageToAPlayerTriggeredAbility());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param game
|
||||
* @param controllerId
|
||||
*/
|
||||
@Override
|
||||
public void start(Game game, UUID controllerId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAllCreatureTypes() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIsAllCreatureTypes(boolean value) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TextPart> getTextParts() {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextPart addTextPart(TextPart textPart) {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
}
|
||||
|
||||
// At the beginning of the monarch’s end step, that player draws a card
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ public final class StaticFilters {
|
|||
public static final FilterNonlandCard FILTER_CARD_A_NON_LAND = new FilterNonlandCard("a nonland card");
|
||||
public static final FilterCard FILTER_CARD_ARTIFACT_OR_CREATURE = new FilterCard("artifact or creature card");
|
||||
|
||||
public static final FilterPermanent FILTER_PERMANENT = new FilterPermanent();
|
||||
public static final FilterCreaturePermanent FILTER_ARTIFACT_CREATURE_PERMANENT = new FilterArtifactCreaturePermanent();
|
||||
public static final FilterPermanent FILTER_PERMANENT_ARTIFACT_OR_CREATURE = new FilterPermanent("artifact or creature");
|
||||
public static final FilterPermanent FILTER_PERMANENT_ARTIFACT_CREATURE_OR_ENCHANTMENT = new FilterPermanent("artifact, creature, or enchantment");
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ import mage.constants.RangeOfInfluence;
|
|||
import mage.constants.Zone;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.Counters;
|
||||
import mage.designations.Designation;
|
||||
import mage.designations.DesignationType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.Graveyard;
|
||||
|
|
@ -840,4 +842,11 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
boolean addTargets(Ability ability, Game game);
|
||||
|
||||
String getHistory();
|
||||
|
||||
boolean hasDesignation(DesignationType designationName);
|
||||
|
||||
void addDesignation(Designation designation);
|
||||
|
||||
List<Designation> getDesignations();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ import static mage.constants.Zone.LIBRARY;
|
|||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
import mage.counters.Counters;
|
||||
import mage.designations.Designation;
|
||||
import mage.designations.DesignationType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
|
@ -199,6 +201,8 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
protected UserData userData;
|
||||
protected MatchPlayer matchPlayer;
|
||||
|
||||
protected List<Designation> designations = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* During some steps we can't play anything
|
||||
*/
|
||||
|
|
@ -300,6 +304,8 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
this.castSourceIdManaCosts = player.castSourceIdManaCosts;
|
||||
this.castSourceIdCosts = player.castSourceIdCosts;
|
||||
this.payManaMode = player.payManaMode;
|
||||
|
||||
this.designations.addAll(player.designations);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -363,6 +369,9 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
this.castSourceIdManaCosts = player.getCastSourceIdManaCosts();
|
||||
this.castSourceIdCosts = player.getCastSourceIdCosts();
|
||||
|
||||
this.designations.clear();
|
||||
this.designations.addAll(player.getDesignations());
|
||||
|
||||
// Don't restore!
|
||||
// this.storedBookmark
|
||||
// this.usersAllowedToSeeHandCards
|
||||
|
|
@ -435,6 +444,8 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
this.castSourceIdManaCosts = null;
|
||||
this.castSourceIdCosts = null;
|
||||
this.getManaPool().init(); // needed to remove mana that not empties on step change from previous game if left
|
||||
|
||||
this.designations.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3620,9 +3631,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean scry(int value, Ability source,
|
||||
Game game
|
||||
) {
|
||||
public boolean scry(int value, Ability source, Game game) {
|
||||
game.informPlayers(getLogName() + " scries " + value);
|
||||
Cards cards = new CardsImpl();
|
||||
cards.addAll(getLibrary().getTopCards(game, value));
|
||||
|
|
@ -3655,4 +3664,25 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
return "no available";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasDesignation(DesignationType designationName) {
|
||||
for (Designation designation : designations) {
|
||||
if (designation.getDesignationType().equals(designationName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesignation(Designation designation) {
|
||||
if (!designation.isUnique() || !this.hasDesignation(designation.getDesignationType())) {
|
||||
designations.add(designation);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Designation> getDesignations() {
|
||||
return designations;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue