"Brave and Loyal"

This commit is contained in:
marcins78@gmail.com
2011-11-17 20:15:57 +00:00
parent ed5968e0a1
commit 3ee50a59c7

View File

@@ -0,0 +1,46 @@
package com.gempukku.lotro.cards.set10.shire;
import com.gempukku.lotro.cards.AbstractEvent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.ReplaceInSkirmishEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
/**
* Set: Mount Doom
* Side: Free
* Culture: Shire
* Twilight Cost: 0
* Type: Event • Skirmish
* Game Text: If a Hobbit companion is not assigned to a skirmish, exert that Hobbit to have him or her replace
* a companion (except the Ring-bearer) in a skirmish.
*/
public class Card10_105 extends AbstractEvent {
public Card10_105() {
super(Side.FREE_PEOPLE, 0, Culture.SHIRE, "Brave and Loyal", Phase.SKIRMISH);
}
@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.HOBBIT, Filters.notAssignedToSkirmish);
}
@Override
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.HOBBIT, Filters.notAssignedToSkirmish) {
@Override
protected void forEachCardExertedCallback(PhysicalCard character) {
action.appendEffect(
new ReplaceInSkirmishEffect(character, CardType.COMPANION, Filters.not(Keyword.RING_BEARER)));
}
});
return action;
}
}