Fixed Final Cry, hate weird corner cases and special phase for just one card...

This commit is contained in:
marcins78@gmail.com
2011-10-25 15:14:22 +00:00
parent 2526b87d81
commit b9a63600b8
5 changed files with 31 additions and 15 deletions

View File

@@ -2,12 +2,16 @@ package com.gempukku.lotro.cards.set2.moria;
import com.gempukku.lotro.cards.AbstractResponseOldEvent;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Side;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.timing.Effect;
import com.gempukku.lotro.logic.effects.WoundCharactersEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
@@ -30,19 +34,17 @@ public class Card2_057 extends AbstractResponseOldEvent {
}
@Override
public List<PlayEventAction> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
// if (PlayConditions.canPlayCardDuringPhase(game, (Phase) null, self)) {
// if (effect.getType() == EffectResult.Type.END_OF_PHASE
// && game.getGameState().getCurrentPhase() == Phase.SKIRMISH
// && Filters.filter(game.getGameState().getSkirmish().getShadowCharacters(), game.getGameState(), game.getModifiersQuerying(), Filters.name("The Balrog"), Filters.hasAttached(Filters.name("Whip of Many Thongs"))).size() > 0) {
// PlayEventAction action = new PlayEventAction(self);
// action.appendEffect(
// new WoundCharactersEffect(self, Filters.and(Filters.type(CardType.COMPANION), Filters.inSkirmish)));
// action.appendEffect(
// new WoundCharactersEffect(self, Filters.and(Filters.type(CardType.COMPANION), Filters.inSkirmish)));
// return Collections.singletonList(action);
// }
// }
public List<PlayEventAction> getOptionalAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (effectResult.getType() == EffectResult.Type.SKIRMISH_ABOUT_TO_END
&& Filters.filter(game.getGameState().getSkirmish().getShadowCharacters(), game.getGameState(), game.getModifiersQuerying(),
Filters.name("The Balrog"), Filters.hasAttached(Filters.name("Whip of Many Thongs"))).size() > 0) {
PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new WoundCharactersEffect(self, CardType.COMPANION, Filters.inSkirmish));
action.appendEffect(
new WoundCharactersEffect(self, CardType.COMPANION, Filters.inSkirmish));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -18,6 +18,8 @@ public abstract class EffectResult {
PUT_ON_THE_ONE_RING, REMOVE_BURDEN, ADD_BURDEN,
SKIRMISH_ABOUT_TO_END,
WHEN_MOVE_FROM, WHEN_FELLOWSHIP_MOVES, WHEN_MOVE_TO,
REVEAL_CARDS_FROM_HAND,
INITIATIVE_CHANGE

View File

@@ -7,10 +7,12 @@ import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.game.state.Skirmish;
import com.gempukku.lotro.logic.effects.OverwhelmedEffect;
import com.gempukku.lotro.logic.effects.SkirmishResolvedEffect;
import com.gempukku.lotro.logic.effects.TriggeringResultEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.Effect;
import com.gempukku.lotro.logic.timing.RuleUtils;
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
import com.gempukku.lotro.logic.timing.results.SkirmishAboutToEndResult;
import java.util.Collections;
import java.util.Iterator;
@@ -94,6 +96,8 @@ public class ResolveSkirmishAction implements Action {
else
effects.add(new SkirmishResolvedEffect(fpList(fellowshipCharacter), shadowCharacters));
effects.add(new TriggeringResultEffect(new SkirmishAboutToEndResult(), "Skirmish about to end"));
effects.add(new UnrespondableEffect() {
@Override
public void doPlayEffect(LotroGame game) {

View File

@@ -0,0 +1,9 @@
package com.gempukku.lotro.logic.timing.results;
import com.gempukku.lotro.logic.timing.EffectResult;
public class SkirmishAboutToEndResult extends EffectResult {
public SkirmishAboutToEndResult() {
super(Type.SKIRMISH_ABOUT_TO_END);
}
}

View File

@@ -1,6 +1,5 @@
TO DO:
Critical:
- Fix "Final Cry"
Next priority:
30. Watching game replay after it's finished and sharing the game replay with others via code.