"Great Day, Great Hour"

This commit is contained in:
marcins78@gmail.com
2011-11-15 15:25:07 +00:00
parent cd1f5a2e7a
commit 976f997164
4 changed files with 61 additions and 2 deletions

View File

@@ -0,0 +1,56 @@
package com.gempukku.lotro.cards.set10.dwarven;
import com.gempukku.lotro.cards.AbstractResponseEvent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.ExertCharactersEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.results.PlayCardResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Mount Doom
* Side: Free
* Culture: Dwarven
* Twilight Cost: 3
* Type: Event • Response
* Game Text: If an opponent plays a minion, exert a Dwarf who is damage +X to exert that minion X times.
*/
public class Card10_001 extends AbstractResponseEvent {
public Card10_001() {
super(Side.FREE_PEOPLE, 3, Culture.DWARVEN, "Great Day, Great Hour");
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier, ignoreRoamingPenalty)
&& PlayConditions.canExert(self, game, Race.DWARF, Keyword.DAMAGE);
}
@Override
public List<PlayEventAction> getOptionalAfterActions(String playerId, final LotroGame game, EffectResult effectResult, final PhysicalCard self) {
if (PlayConditions.played(game, effectResult, CardType.MINION)) {
PlayCardResult playResult = (PlayCardResult) effectResult;
final PhysicalCard playedMinion = playResult.getPlayedCard();
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.DWARF, Keyword.DAMAGE) {
@Override
protected void forEachCardExertedCallback(PhysicalCard character) {
int damageCount = game.getModifiersQuerying().getKeywordCount(game.getGameState(), character, Keyword.DAMAGE);
for (int i = 0; i < damageCount; i++)
action.appendEffect(
new ExertCharactersEffect(self, playedMinion));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -36,7 +36,8 @@ public class Card8_033 extends AbstractResponseEvent {
@Override
public List<PlayEventAction> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
if (PlayConditions.isGettingKilled(effect, game, Culture.GONDOR, Race.WRAITH)) {
if (PlayConditions.isGettingKilled(effect, game, Culture.GONDOR, Race.WRAITH)
&& checkPlayRequirements(playerId, game, self, 0, false)) {
KillEffect killEffect = (KillEffect) effect;
Collection<PhysicalCard> killedWraiths = Filters.filter(killEffect.getCharactersToBeKilled(), game.getGameState(), game.getModifiersQuerying(), Culture.GONDOR, Race.WRAITH);
List<PlayEventAction> actions = new LinkedList<PlayEventAction>();

View File

@@ -35,7 +35,8 @@ public class Card8_115 extends AbstractResponseEvent {
@Override
public List<PlayEventAction> getOptionalAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (effectResult.getType() == EffectResult.Type.EXERT
&& PlayConditions.canExert(self, game, Filters.unboundCompanion, Race.HOBBIT)) {
&& PlayConditions.canExert(self, game, Filters.unboundCompanion, Race.HOBBIT)
&& checkPlayRequirements(playerId, game, self, 0, false)) {
ExertResult exertResult = (ExertResult) effectResult;
final Collection<PhysicalCard> exertedMinions = Filters.filter(exertResult.getExertedCards(), game.getGameState(), game.getModifiersQuerying(), CardType.MINION);
if (exertedMinions.size() > 0) {

View File

@@ -34,6 +34,7 @@ public class Card8_116 extends AbstractResponseEvent {
@Override
public List<PlayEventAction> getOptionalAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (effectResult.getType() == EffectResult.Type.WHEN_FELLOWSHIP_MOVES
&& checkPlayRequirements(playerId, game, self, 0, false)
&& game.getGameState().getCurrentPhase() == Phase.REGROUP
&& PlayConditions.canExert(self, game, Filters.unboundCompanion, Race.HOBBIT)) {
PlayEventAction action = new PlayEventAction(self);