This commit is contained in:
marcins78
2013-03-19 11:23:11 +00:00
parent 4e0c0e691e
commit c590329bdc
3 changed files with 62 additions and 15 deletions

View File

@@ -347,7 +347,7 @@ var set20 = {
'20_346': 'http://lotrtcg.org/coreset/rohan/tothesmithy(r1).png', '20_346': 'http://lotrtcg.org/coreset/rohan/tothesmithy(r1).png',
'20_347': 'http://lotrtcg.org/coreset/rohan/towhateverend.png', '20_347': 'http://lotrtcg.org/coreset/rohan/towhateverend.png',
'20_348': 'http://lotrtcg.org/coreset/rohan/wallneverbreached.png', '20_348': 'http://lotrtcg.org/coreset/rohan/wallneverbreached.png',
'20_349': 'http://lotrtcg.org/coreset/sauron/baraddurcaptain.png', '20_349': 'http://lotrtcg.org/coreset/sauron/baraddurcaptain(r1).png',
'20_350': 'http://lotrtcg.org/coreset/sauron/blackgateologhai.png', '20_350': 'http://lotrtcg.org/coreset/sauron/blackgateologhai.png',
'20_351': 'http://lotrtcg.org/coreset/sauron/bladeofgorgoroth.png', '20_351': 'http://lotrtcg.org/coreset/sauron/bladeofgorgoroth.png',
'20_352': 'http://lotrtcg.org/coreset/sauron/bladeofmorannon.png', '20_352': 'http://lotrtcg.org/coreset/sauron/bladeofmorannon.png',

View File

@@ -2,39 +2,79 @@ package com.gempukku.lotro.cards.set20.sauron;
import com.gempukku.lotro.cards.AbstractMinion; import com.gempukku.lotro.cards.AbstractMinion;
import com.gempukku.lotro.cards.PlayConditions; import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.SelfExertEffect; import com.gempukku.lotro.cards.effects.SelfExertEffect;
import com.gempukku.lotro.cards.modifiers.conditions.CanSpotFPCulturesCondition;
import com.gempukku.lotro.cards.modifiers.conditions.NotCondition;
import com.gempukku.lotro.common.*; import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters; import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard; import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame; import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction; import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
import com.gempukku.lotro.logic.decisions.MultipleChoiceAwaitingDecision;
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect; import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect;
import com.gempukku.lotro.logic.modifiers.GameHasCondition;
import com.gempukku.lotro.logic.modifiers.KeywordModifier; import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier; import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.timing.Action; import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections; import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* 4 * 5
* •Barad-Dur Captain * •Barad-Dur Captain
* Sauron Minion • Orc * Minion • Orc
* 10 3 6 * 11 3 6
* While you cannot spot 3 Free Peoples cultures, this minion is damage +1. * When you play this minion, name a Free Peoples culture.
* While skirmishing a character of the named culture, this minion is damage +1.
* Skirmish: Exert Barad-Dur Captain to wound a character it is skirmishing. * Skirmish: Exert Barad-Dur Captain to wound a character it is skirmishing.
* http://lotrtcg.org/coreset/sauron/baraddurcaptain(r1).png
*/ */
public class Card20_349 extends AbstractMinion { public class Card20_349 extends AbstractMinion {
public Card20_349() { public Card20_349() {
super(5, 13, 3, 6, Race.ORC, Culture.SAURON, "Barad-Dur Captain", null, true); super(5, 11, 3, 6, Race.ORC, Culture.SAURON, "Barad-Dur Captain", null, true);
} }
@Override @Override
public Modifier getAlwaysOnModifier(LotroGame game, PhysicalCard self) { public Modifier getAlwaysOnModifier(LotroGame game, PhysicalCard self) {
return new KeywordModifier(self, self, return new KeywordModifier(self, self,
new NotCondition(new CanSpotFPCulturesCondition(self.getOwner(), 3)), Keyword.DAMAGE, 1); new GameHasCondition(self, Filters.inSkirmishAgainst((Culture) self.getWhileInZoneData())), Keyword.DAMAGE, 1);
}
@Override
public String getDisplayableInformation(PhysicalCard self) {
if (self.getWhileInZoneData() != null)
return "Chosen culture is " + ((Culture) self.getWhileInZoneData()).getHumanReadable();
return null;
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, final PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, self)) {
if (TriggerConditions.played(game, effectResult, self)) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
final Set<String> possibleCultures = new LinkedHashSet<String>();
for (Culture culture : Culture.values())
if (culture.isFP())
possibleCultures.add(culture.getHumanReadable());
action.appendEffect(
new PlayoutDecisionEffect(self.getOwner(),
new MultipleChoiceAwaitingDecision(1, "Choose a culture", possibleCultures.toArray(new String[possibleCultures.size()])) {
@Override
protected void validDecisionMade(int index, String result) {
self.setWhileInZoneData(Culture.findCultureByHumanReadable(result));
}
}));
return Collections.singletonList(action);
}
}
return null;
} }
@Override @Override

View File

@@ -1,19 +1,22 @@
package com.gempukku.lotro.common; package com.gempukku.lotro.common;
public enum Culture implements Filterable { public enum Culture implements Filterable {
DWARVEN("Dwarven"), ELVEN("Elven"), GANDALF("Gandalf"), GOLLUM("Gollum"), GONDOR("Gondor"), ROHAN("Rohan"), SHIRE("Shire"), DWARVEN("Dwarven", true), ELVEN("Elven", true), GANDALF("Gandalf", true), GOLLUM("Gollum", true), GONDOR("Gondor", true), ROHAN("Rohan", true), SHIRE("Shire", true),
DUNLAND("Dunland"), ISENGARD("Isengard"), MEN("Men"), MORIA("Moria"), ORC("Orc"), RAIDER("Raider"), SAURON("Sauron"), URUK_HAI("Uruk-hai"), WRAITH("Wraith"), DUNLAND("Dunland", false), ISENGARD("Isengard", false), MEN("Men", false), MORIA("Moria", false), ORC("Orc", false), RAIDER("Raider", false),
FALLEN_REALMS("Fallen Realms", false); SAURON("Sauron", false), URUK_HAI("Uruk-hai", false), WRAITH("Wraith", false),
FALLEN_REALMS("Fallen Realms", false, false);
private String _humanReadable; private String _humanReadable;
private boolean _fp;
private boolean _official; private boolean _official;
private Culture(String humanReadable) { private Culture(String humanReadable, boolean fp) {
this(humanReadable, true); this(humanReadable, fp, true);
} }
private Culture(String humanReadable, boolean official) { private Culture(String humanReadable, boolean fp, boolean official) {
_humanReadable = humanReadable; _humanReadable = humanReadable;
_fp = fp;
_official = official; _official = official;
} }
@@ -25,6 +28,10 @@ public enum Culture implements Filterable {
return _humanReadable; return _humanReadable;
} }
public boolean isFP() {
return _fp;
}
public static Culture findCultureByHumanReadable(String humanReadable) { public static Culture findCultureByHumanReadable(String humanReadable) {
for (Culture culture : values()) { for (Culture culture : values()) {
if (culture.getHumanReadable().equals(humanReadable)) if (culture.getHumanReadable().equals(humanReadable))