"Hobbiton Brewer"

This commit is contained in:
marcins78@gmail.com
2012-02-06 15:13:55 +00:00
parent 3fbe6b62bc
commit bcc6ec4b2c

View File

@@ -0,0 +1,67 @@
package com.gempukku.lotro.cards.set15.shire;
import com.gempukku.lotro.cards.AbstractFollower;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.AddBurdenEffect;
import com.gempukku.lotro.cards.effects.PreventCardEffect;
import com.gempukku.lotro.cards.effects.TransferToSupportEffect;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Race;
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.actions.ActivateCardAction;
import com.gempukku.lotro.logic.effects.WoundCharactersEffect;
import com.gempukku.lotro.logic.timing.Effect;
import java.util.Collections;
import java.util.List;
/**
* Set: The Hunters
* Side: Free
* Culture: Shire
* Twilight Cost: 2
* Type: Follower
* Strength: +2
* Game Text: Aid - Add 2 burdens. (At the start of the maneuver phase, you may add 2 burdens to transfer this
* to a companion.)
* To play, spot a Hobbit. Response: If bearer is about to take a wound, transfer Hobbiton Brewer to your support area
* to prevent that wound.
*/
public class Card15_146 extends AbstractFollower {
public Card15_146() {
super(Side.FREE_PEOPLE, 2, 2, 0, 0, Culture.SHIRE, "Hobbiton Brewer", true);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
&& PlayConditions.canSpot(game, Race.HOBBIT);
}
@Override
protected boolean canPayAidCost(LotroGame game, PhysicalCard self) {
return true;
}
@Override
protected Effect getAidCost(LotroGame game, PhysicalCard self) {
return new AddBurdenEffect(self, 2);
}
@Override
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
if (TriggerConditions.isGettingWounded(effect, game, Filters.hasAttached(self))) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new TransferToSupportEffect(self));
action.appendEffect(
new PreventCardEffect((WoundCharactersEffect) effect, self.getAttachedTo()));
return Collections.singletonList(action);
}
return null;
}
}