"Uruk Bloodlust"

This commit is contained in:
marcins78@gmail.com
2011-08-31 10:13:48 +00:00
parent 04128c4ea8
commit 5a4268b45b
11 changed files with 97 additions and 20 deletions

View File

@@ -1,7 +1,7 @@
package com.gempukku.lotro.cards;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.HealCardEffect;
import com.gempukku.lotro.cards.effects.HealCharacterEffect;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Side;
@@ -48,7 +48,7 @@ public class AbstractAlly extends AbstractLotroCardBlueprint {
PhysicalCard active = Filters.findFirstActive(lotroGame.getGameState(), lotroGame.getModifiersQuerying(), Filters.name(self.getBlueprint().getName()));
if (active != null)
action.addEffect(new HealCardEffect(active));
action.addEffect(new HealCharacterEffect(active));
actions.add(action);
}

View File

@@ -1,7 +1,7 @@
package com.gempukku.lotro.cards;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.HealCardEffect;
import com.gempukku.lotro.cards.effects.HealCharacterEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
@@ -55,7 +55,7 @@ public abstract class AbstractCompanion extends AbstractLotroCardBlueprint {
PhysicalCard active = Filters.findFirstActive(lotroGame.getGameState(), lotroGame.getModifiersQuerying(), Filters.name(self.getBlueprint().getName()));
if (active != null)
action.addEffect(new HealCardEffect(active));
action.addEffect(new HealCharacterEffect(active));
actions.add(action);
}

View File

@@ -4,10 +4,10 @@ import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
public class HealCardEffect extends UnrespondableEffect {
public class HealCharacterEffect extends UnrespondableEffect {
private PhysicalCard _physicalCard;
public HealCardEffect(PhysicalCard physicalCard) {
public HealCharacterEffect(PhysicalCard physicalCard) {
_physicalCard = physicalCard;
}

View File

@@ -3,7 +3,7 @@ package com.gempukku.lotro.cards.set1.dwarven;
import com.gempukku.lotro.cards.AbstractAttachable;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
import com.gempukku.lotro.cards.effects.HealCardEffect;
import com.gempukku.lotro.cards.effects.HealCharacterEffect;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
@@ -49,8 +49,8 @@ public class Card1_010 extends AbstractAttachable {
public List<? extends Action> getRequiredWhenActions(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
CostToEffectAction action = new CostToEffectAction(self, "Heal bearer up to 2 times");
action.addEffect(new HealCardEffect(self.getAttachedTo()));
action.addEffect(new HealCardEffect(self.getAttachedTo()));
action.addEffect(new HealCharacterEffect(self.getAttachedTo()));
action.addEffect(new HealCharacterEffect(self.getAttachedTo()));
return Collections.<Action>singletonList(action);
} else if (effectResult.getType() == EffectResult.Type.START_OF_TURN) {
CostToEffectAction action = new CostToEffectAction(self, "Exert bearer at the start of each of your turns");

View File

@@ -3,7 +3,7 @@ package com.gempukku.lotro.cards.set1.dwarven;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.HealCardEffect;
import com.gempukku.lotro.cards.effects.HealCharacterEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
@@ -39,7 +39,7 @@ public class Card1_025 extends AbstractLotroCardBlueprint {
if (self.getZone() == Zone.HAND && PlayConditions.winsSkirmish(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.keyword(Keyword.DWARF))) {
SkirmishResult skirmishResult = (SkirmishResult) effectResult;
PlayEventAction action = new PlayEventAction(self);
action.addEffect(new HealCardEffect(skirmishResult.getWinners().get(0)));
action.addEffect(new HealCharacterEffect(skirmishResult.getWinners().get(0)));
return Collections.<Action>singletonList(action);
}
return null;

View File

@@ -3,7 +3,7 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractAlly;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
import com.gempukku.lotro.cards.effects.HealCardEffect;
import com.gempukku.lotro.cards.effects.HealCharacterEffect;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
@@ -48,7 +48,7 @@ public class Card1_034 extends AbstractAlly {
action.addEffect(new ChooseActiveCardEffect(playerId, "Choose an ELVEN ally", Filters.culture(Culture.ELVEN), Filters.type(CardType.ALLY)) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard elvenAlly) {
action.addEffect(new HealCardEffect(elvenAlly));
action.addEffect(new HealCharacterEffect(elvenAlly));
}
});

View File

@@ -3,7 +3,7 @@ package com.gempukku.lotro.cards.set1.elven;
import com.gempukku.lotro.cards.AbstractAlly;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
import com.gempukku.lotro.cards.effects.HealCardEffect;
import com.gempukku.lotro.cards.effects.HealCharacterEffect;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
@@ -65,7 +65,7 @@ public class Card1_040 extends AbstractAlly {
CostToEffectAction action = new CostToEffectAction(self, "Heal every ally whose home is site 3");
for (PhysicalCard ally : allies)
action.addEffect(new HealCardEffect(ally));
action.addEffect(new HealCharacterEffect(ally));
return Collections.singletonList(action);
}

View File

@@ -4,7 +4,7 @@ import com.gempukku.lotro.cards.AbstractAlly;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
import com.gempukku.lotro.cards.effects.HealCardEffect;
import com.gempukku.lotro.cards.effects.HealCharacterEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.LotroCardBlueprint;
@@ -73,7 +73,7 @@ public class Card1_045 extends AbstractAlly {
CostToEffectAction action = new CostToEffectAction(self, "Heal every ally whose home is site 6");
for (PhysicalCard ally : allies)
action.addEffect(new HealCardEffect(ally));
action.addEffect(new HealCharacterEffect(ally));
return Collections.singletonList(action);
}

View File

@@ -6,7 +6,7 @@ import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.AddTwilightEffect;
import com.gempukku.lotro.cards.effects.ChoiceEffect;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
import com.gempukku.lotro.cards.effects.HealCardEffect;
import com.gempukku.lotro.cards.effects.HealCharacterEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
@@ -65,7 +65,7 @@ public class Card1_059 extends AbstractLotroCardBlueprint {
new ChooseActiveCardEffect(playerId, "Choose Elf to heal", Filters.keyword(Keyword.ELF)) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard elf) {
action.addEffect(new HealCardEffect(elf));
action.addEffect(new HealCharacterEffect(elf));
}
});
}
@@ -80,7 +80,7 @@ public class Card1_059 extends AbstractLotroCardBlueprint {
new ChooseActiveCardEffect(playerId, "Choose Dwarf to heal", Filters.keyword(Keyword.DWARF)) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard dwarf) {
action.addEffect(new HealCardEffect(dwarf));
action.addEffect(new HealCharacterEffect(dwarf));
}
});
}

View File

@@ -0,0 +1,68 @@
package com.gempukku.lotro.cards.set1.isengard;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.HealCharacterEffect;
import com.gempukku.lotro.cards.effects.RemoveTwilightEffect;
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.CostToEffectAction;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.results.SkirmishResult;
import java.util.Collections;
import java.util.List;
/**
* Set: The Fellowship of the Ring
* Side: Shadow
* Culture: Isengard
* Twilight Cost: 3
* Type: Condition
* Game Text: Plays to your support area. Response: If your Uruk-hai wins a skirmish, remove (1) to heal him.
*/
public class Card1_144 extends AbstractLotroCardBlueprint {
public Card1_144() {
super(Side.SHADOW, CardType.CONDITION, Culture.ISENGARD, "Uruk Bloodlust", "1_144");
}
@Override
public int getTwilightCost() {
return 3;
}
@Override
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canPlayShadowCardDuringPhase(game, Phase.SHADOW, self)) {
PlayPermanentAction action = new PlayPermanentAction(self, Zone.SHADOW_SUPPORT);
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends Action> getPlayableWhenActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (PlayConditions.winsSkirmish(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Filters.keyword(Keyword.URUK_HAI), Filters.owner(playerId)))
&& game.getGameState().getTwilightPool() >= 1) {
SkirmishResult skirmishResult = ((SkirmishResult) effectResult);
final CostToEffectAction action = new CostToEffectAction(self, "If your Uruk-hai wins a skirmish, remove (1) to heal him.");
action.addCost(new RemoveTwilightEffect(1));
action.addEffect(
new ChooseActiveCardEffect(playerId, "Choose Uruk-hai to heal", Filters.keyword(Keyword.URUK_HAI), Filters.in(skirmishResult.getWinners())) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard winningUrukHai) {
action.addEffect(new HealCharacterEffect(winningUrukHai));
}
}
);
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -118,6 +118,15 @@ public class Filters {
};
}
public static Filter in(final List<PhysicalCard> cards) {
return new Filter() {
@Override
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
return cards.contains(physicalCard);
}
};
}
public static Filter zone(final Zone zone) {
return new Filter() {
@Override