This commit is contained in:
marcins78
2013-03-15 17:59:35 +00:00
parent e83b9f3691
commit 87cfdb1df3
2 changed files with 32 additions and 10 deletions

View File

@@ -26,7 +26,7 @@ var set20 = {
'20_25': 'http://lotrtcg.org/coreset/dunland/plundered.png',
'20_26': 'http://lotrtcg.org/coreset/dunland/savagetactics.png',
'20_27': 'http://lotrtcg.org/coreset/dunland/runningrampant.png',
'20_28': 'http://lotrtcg.org/coreset/dunland/sneakattack.png',
'20_28': 'http://lotrtcg.org/coreset/dunland/sneakattack(r1).png',
'20_29': 'http://lotrtcg.org/coreset/dunland/dunlendingwarcry.png',
'20_30': 'http://lotrtcg.org/coreset/dunland/warclub.png',
'20_31': 'http://lotrtcg.org/coreset/dunland/hillmanaxe.png',

View File

@@ -2,28 +2,37 @@ package com.gempukku.lotro.cards.set20.dunland;
import com.gempukku.lotro.cards.AbstractEvent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.AddUntilStartOfPhaseModifierEffect;
import com.gempukku.lotro.cards.modifiers.CantBeAssignedAgainstModifier;
import com.gempukku.lotro.cards.effects.AddUntilStartOfPhaseActionProxyEffect;
import com.gempukku.lotro.cards.effects.TakeControlOfASiteEffect;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.common.Side;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.AbstractActionProxy;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* 2
* Sneak Attack
* Dunland Event • Assignment
* Spot a [Dunland] Man and a site you control to spot an unbound companion. Until the regroup phase,
* that companion may not be assigned to skirmish a [Dunland] man.
* Event • Maneuver
* Spot a [Dunland] Man and a site you control to spot an unbound companion.
* Until the regroup phase, each time that companion loses a skirmish involving a [Dunland] Man, you may
* take control of a site.
* http://lotrtcg.org/coreset/dunland/sneakattack(r1).png
*/
public class Card20_028 extends AbstractEvent {
public Card20_028() {
super(Side.SHADOW, 2, Culture.DUNLAND, "Sneak Attack", Phase.ASSIGNMENT);
super(Side.SHADOW, 2, Culture.DUNLAND, "Sneak Attack", Phase.MANEUVER);
}
@Override
@@ -39,10 +48,23 @@ public class Card20_028 extends AbstractEvent {
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose an unbound companion", Filters.unboundCompanion) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard companion) {
protected void cardSelected(LotroGame game, final PhysicalCard companion) {
action.appendEffect(
new AddUntilStartOfPhaseModifierEffect(
new CantBeAssignedAgainstModifier(self, null, companion, Filters.and(Culture.DUNLAND, Race.MAN)), Phase.REGROUP));
new AddUntilStartOfPhaseActionProxyEffect(
new AbstractActionProxy() {
@Override
public List<? extends OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult) {
if (TriggerConditions.losesSkirmishInvolving(game, effectResult, companion, Filters.and(Culture.DUNLAND, Race.MAN))
&& playerId.equals(self.getOwner())) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.setVirtualCardAction(true);
action.appendEffect(
new TakeControlOfASiteEffect(self, playerId));
return Collections.singletonList(action);
}
return null;
}
}, Phase.REGROUP));
}
});
return action;