"Abandoning Reason for Madness"
"Can You Protect Me From Yourself?"
This commit is contained in:
@@ -1,21 +1,32 @@
|
||||
package com.gempukku.lotro.cards.effects;
|
||||
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.timing.ChooseableCost;
|
||||
import com.gempukku.lotro.logic.timing.ChooseableEffect;
|
||||
import com.gempukku.lotro.logic.timing.Cost;
|
||||
import com.gempukku.lotro.logic.timing.CostResolution;
|
||||
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
|
||||
|
||||
public class AddBurdenEffect extends UnrespondableEffect implements ChooseableEffect, Cost {
|
||||
public class AddBurdenEffect extends UnrespondableEffect implements ChooseableEffect, ChooseableCost {
|
||||
private String _playerId;
|
||||
private int _count;
|
||||
|
||||
public AddBurdenEffect(String playerId) {
|
||||
this(playerId, 1);
|
||||
}
|
||||
|
||||
public AddBurdenEffect(String playerId, int count) {
|
||||
_playerId = playerId;
|
||||
_count = count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Add a burden";
|
||||
return "Add " + _count + " burden(s)";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayCost(LotroGame game) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -25,14 +36,14 @@ public class AddBurdenEffect extends UnrespondableEffect implements ChooseableEf
|
||||
|
||||
@Override
|
||||
public CostResolution playCost(LotroGame game) {
|
||||
game.getGameState().sendMessage(_playerId + " adds a burden");
|
||||
game.getGameState().addBurdens(1);
|
||||
game.getGameState().sendMessage(_playerId + " adds " + _count + " burden(s)");
|
||||
game.getGameState().addBurdens(_count);
|
||||
return new CostResolution(null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doPlayEffect(LotroGame game) {
|
||||
game.getGameState().sendMessage(_playerId + " adds a burden");
|
||||
game.getGameState().addBurdens(1);
|
||||
game.getGameState().sendMessage(_playerId + " adds " + _count + " burden(s)");
|
||||
game.getGameState().addBurdens(_count);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.gempukku.lotro.cards.set3.isengard;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndDiscardCardsFromHandEffect;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
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.effects.DrawCardEffect;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Set: Realms of Elf-lords
|
||||
* Side: Shadow
|
||||
* Culture: Isengard
|
||||
* Twilight Cost: 1
|
||||
* Type: Event
|
||||
* Game Text: Shadow: Spot an [ISENGARD] minion to discard up to 3 cards from hand and draw an equal number of cards.
|
||||
*/
|
||||
public class Card3_049 extends AbstractEvent {
|
||||
public Card3_049() {
|
||||
super(Side.SHADOW, Culture.ISENGARD, "Abandoning Reason for Madness", Phase.SHADOW);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.ISENGARD), Filters.type(CardType.MINION));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTwilightCost() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndDiscardCardsFromHandEffect(action, playerId, 0, 3, Filters.any()) {
|
||||
@Override
|
||||
protected void cardsBeingDiscarded(Collection<PhysicalCard> cardsBeingDiscarded) {
|
||||
int cardsCount = cardsBeingDiscarded.size();
|
||||
action.appendEffect(
|
||||
new DrawCardEffect(playerId, cardsCount));
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user