"Gondorian Captain"

This commit is contained in:
marcins78@gmail.com
2011-11-02 16:06:53 +00:00
parent f7f6b503d3
commit 5f8fae6fcd
3 changed files with 87 additions and 87 deletions

View File

@@ -0,0 +1,66 @@
package com.gempukku.lotro.cards.set7.gondor;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.choose.ChooseAndPutCardFromDiscardOnTopOfDeckEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: The Return of the King
* Side: Free
* Culture: Gondor
* Twilight Cost: 3
* Type: Condition • Support Area
* Game Text: To play, spot 3 [GONDOR] companions. While no opponent controls a site, wound a minion at the start
* of each regroup phase. Regroup: Discard this condition to place a [GONDOR] fortification from your discard pile
* on top of your draw deck.
*/
public class Card7_095 extends AbstractPermanent {
public Card7_095() {
super(Side.FREE_PEOPLE, 3, CardType.CONDITION, Culture.GONDOR, Zone.SUPPORT, "Gondor Still Stands", true);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& PlayConditions.canSpot(game, 3, Culture.GONDOR, CardType.COMPANION);
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (PlayConditions.startOfPhase(game, effectResult, Phase.REGROUP)
&& Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.siteControlledByShadowPlayer(self.getOwner())) == 0) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, self.getOwner(), 1, 1, CardType.MINION));
return Collections.singletonList(action);
}
return null;
}
@Override
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.REGROUP, self)
&& PlayConditions.canSelfDiscard(self, game)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new DiscardCardsFromPlayEffect(self, self));
action.appendEffect(
new ChooseAndPutCardFromDiscardOnTopOfDeckEffect(action, playerId, 1, 1, Culture.GONDOR, Keyword.FORTIFICATION));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,18 +1,17 @@
package com.gempukku.lotro.cards.set7.gondor;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.AbstractCompanion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.choose.ChooseAndPutCardFromDiscardOnTopOfDeckEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.effects.RemoveThreatsEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
@@ -21,44 +20,28 @@ import java.util.List;
* Set: The Return of the King
* Side: Free
* Culture: Gondor
* Twilight Cost: 3
* Type: Condition • Support Area
* Game Text: To play, spot 3 [GONDOR] companions. While no opponent controls a site, wound a minion at the start
* of each regroup phase. Regroup: Discard this condition to place a [GONDOR] fortification from your discard pile
* on top of your draw deck.
* Twilight Cost: 2
* Type: Companion • Man
* Strength: 6
* Vitality: 3
* Resistance: 6
* Game Text: Knight. Fellowship: Discard a fortification to remove a threat.
*/
public class Card7_096 extends AbstractPermanent {
public class Card7_096 extends AbstractCompanion {
public Card7_096() {
super(Side.FREE_PEOPLE, 3, CardType.CONDITION, Culture.GONDOR, Zone.SUPPORT, "Gondor Still Stands", true);
super(2, 6, 3, Culture.GONDOR, Race.MAN, null, "Gondorian Captain");
addKeyword(Keyword.KNIGHT);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& PlayConditions.canSpot(game, 3, Culture.GONDOR, CardType.COMPANION);
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (PlayConditions.startOfPhase(game, effectResult, Phase.REGROUP)
&& Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.siteControlledByShadowPlayer(self.getOwner())) == 0) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, self.getOwner(), 1, 1, CardType.MINION));
return Collections.singletonList(action);
}
return null;
}
@Override
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.REGROUP, self)
&& PlayConditions.canSelfDiscard(self, game)) {
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
&& PlayConditions.canDiscardFromPlay(self, game, Keyword.FORTIFICATION)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new DiscardCardsFromPlayEffect(self, self));
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Keyword.FORTIFICATION));
action.appendEffect(
new ChooseAndPutCardFromDiscardOnTopOfDeckEffect(action, playerId, 1, 1, Culture.GONDOR, Keyword.FORTIFICATION));
new RemoveThreatsEffect(self, 1));
return Collections.singletonList(action);
}
return null;

View File

@@ -1,49 +0,0 @@
package com.gempukku.lotro.cards.set7.gondor;
import com.gempukku.lotro.cards.AbstractCompanion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.effects.RemoveThreatsEffect;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: The Return of the King
* Side: Free
* Culture: Gondor
* Twilight Cost: 2
* Type: Companion • Man
* Strength: 6
* Vitality: 3
* Resistance: 6
* Game Text: Knight. Fellowship: Discard a fortification to remove a threat.
*/
public class Card7_097 extends AbstractCompanion {
public Card7_097() {
super(2, 6, 3, Culture.GONDOR, Race.MAN, null, "Gondorian Captain");
addKeyword(Keyword.KNIGHT);
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
&& PlayConditions.canDiscardFromPlay(self, game, Keyword.FORTIFICATION)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Keyword.FORTIFICATION));
action.appendEffect(
new RemoveThreatsEffect(self, 1));
return Collections.singletonList(action);
}
return null;
}
}