A few fixes and tweaks in what message is sent to user.
This commit is contained in:
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
|
||||
public class TransferPermanentAction extends DefaultCostToEffectAction {
|
||||
public TransferPermanentAction(final PhysicalCard card, LotroGame game, Filter filter) {
|
||||
super(null, null, "Transfer " + card.getBlueprint().getName());
|
||||
super(card, null, "Transfer " + card.getBlueprint().getName());
|
||||
|
||||
addCost(new ChooseActiveCardsEffect(card.getOwner(), "Choose target to attach to", 1, 1, filter) {
|
||||
@Override
|
||||
|
||||
@@ -42,11 +42,12 @@ public class DiscardCardFromPlayEffect extends AbstractEffect {
|
||||
public EffectResult playEffect(LotroGame game) {
|
||||
_discardedCards = new LinkedList<PhysicalCard>();
|
||||
|
||||
if (game.getModifiersQuerying().canBeDiscardedFromPlay(game.getGameState(), _card, _source)) {
|
||||
if (_source == null || game.getModifiersQuerying().canBeDiscardedFromPlay(game.getGameState(), _card, _source)) {
|
||||
_discardedCards.add(_card);
|
||||
|
||||
GameState gameState = game.getGameState();
|
||||
gameState.sendMessage(_source.getOwner() + " discards " + _card.getBlueprint().getName() + " from play using " + _source.getBlueprint().getName());
|
||||
if (_source != null)
|
||||
gameState.sendMessage(_source.getOwner() + " discards " + _card.getBlueprint().getName() + " from play using " + _source.getBlueprint().getName());
|
||||
gameState.stopAffecting(_card);
|
||||
gameState.removeCardFromZone(_card);
|
||||
gameState.addCardToZone(_card, Zone.DISCARD);
|
||||
|
||||
@@ -43,7 +43,7 @@ public class DiscardCardsFromPlayEffect extends AbstractEffect {
|
||||
List<PhysicalCard> cardsToDiscard = Filters.filterActive(game.getGameState(), game.getModifiersQuerying(), _filter);
|
||||
_discardedCards = new LinkedList<PhysicalCard>();
|
||||
for (PhysicalCard card : cardsToDiscard) {
|
||||
if (game.getModifiersQuerying().canBeDiscardedFromPlay(game.getGameState(), card, _source)) {
|
||||
if (_source == null || game.getModifiersQuerying().canBeDiscardedFromPlay(game.getGameState(), card, _source)) {
|
||||
_discardedCards.add(card);
|
||||
|
||||
GameState gameState = game.getGameState();
|
||||
@@ -68,7 +68,7 @@ public class DiscardCardsFromPlayEffect extends AbstractEffect {
|
||||
}
|
||||
}
|
||||
|
||||
if (_discardedCards.size() > 0)
|
||||
if (_source != null && _discardedCards.size() > 0)
|
||||
game.getGameState().sendMessage(_source.getOwner() + " discards multiple cards from play using " + _source.getBlueprint().getName());
|
||||
return new DiscardCardsFromPlayResult(_discardedCards);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class WoundCharacterEffect extends AbstractEffect {
|
||||
|
||||
@Override
|
||||
public String getText() {
|
||||
return "Wound target";
|
||||
return "Wound " + _woundTarget.getBlueprint().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,17 +2,14 @@ package com.gempukku.lotro.logic.timing.processes.turn.regroup;
|
||||
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Zone;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.GameState;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.timing.processes.GameProcess;
|
||||
import com.gempukku.lotro.logic.timing.processes.turn.EndOfTurnGameProcess;
|
||||
import com.gempukku.lotro.logic.timing.processes.turn.general.EndOfPhaseGameProcess;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DiscardAllMinionsGameProcess implements GameProcess {
|
||||
private LotroGame _game;
|
||||
|
||||
@@ -23,11 +20,8 @@ public class DiscardAllMinionsGameProcess implements GameProcess {
|
||||
@Override
|
||||
public void process() {
|
||||
GameState gameState = _game.getGameState();
|
||||
List<PhysicalCard> minions = Filters.filterActive(gameState, _game.getModifiersQuerying(), Filters.type(CardType.MINION));
|
||||
for (PhysicalCard minion : minions) {
|
||||
gameState.removeCardFromZone(minion);
|
||||
gameState.addCardToZone(minion, Zone.DISCARD);
|
||||
}
|
||||
DiscardCardsFromPlayEffect cards = new DiscardCardsFromPlayEffect(null, Filters.type(CardType.MINION));
|
||||
cards.playEffect(_game);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user