- "Discard to heal" actions now shows the card to the opponent, the same way, as in case of played events.

This commit is contained in:
marcins78@gmail.com
2012-03-05 04:22:02 +00:00
parent dfc69488d7
commit 0508abaa31
3 changed files with 21 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.effects.DiscardCardsFromHandEffect;
import com.gempukku.lotro.logic.effects.HealCharactersEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
import java.util.Collections;
import java.util.List;
@@ -44,11 +45,18 @@ public class AbstractAlly extends AbstractPermanent {
return _race;
}
protected final List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
protected final List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canHealByDiscarding(game.getGameState(), game.getModifiersQuerying(), self)) {
// TODO this is not really an activated action...
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(new DiscardCardsFromHandEffect(null, playerId, Collections.singleton(self), false));
action.appendCost(
new UnrespondableEffect() {
@Override
protected void doPlayEffect(LotroGame game) {
game.getGameState().eventPlayed(self);
}
});
PhysicalCard active = Filters.findFirstActive(game.getGameState(), game.getModifiersQuerying(), Filters.name(self.getBlueprint().getName()));
if (active != null)

View File

@@ -8,6 +8,7 @@ import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.effects.DiscardCardsFromHandEffect;
import com.gempukku.lotro.logic.effects.HealCharactersEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
import java.util.Collections;
import java.util.List;
@@ -46,10 +47,17 @@ public abstract class AbstractCompanion extends AbstractPermanent {
&& PlayConditions.checkRuleOfNine(game.getGameState(), game.getModifiersQuerying(), self);
}
protected final List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
protected final List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canHealByDiscarding(game.getGameState(), game.getModifiersQuerying(), self)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(new DiscardCardsFromHandEffect(null, playerId, Collections.singleton(self), false));
action.appendCost(
new UnrespondableEffect() {
@Override
protected void doPlayEffect(LotroGame game) {
game.getGameState().eventPlayed(self);
}
});
PhysicalCard active = Filters.findFirstActive(game.getGameState(), game.getModifiersQuerying(), Filters.name(self.getBlueprint().getName()));
if (active != null)

View File

@@ -1,4 +1,7 @@
<pre style="font-size:80%">
<b>5 Mar. 2012</b>
- "Discard to heal" actions now shows the card to the opponent, the same way, as in case of played events.
<b>3 Mar. 2012</b>
- "The Palantir of Orthanc, Recovered Seeing Stone" should no longer discard itself.
- "With All Possible Speed" can be played in skirmish phase only.