Adding use card message.
This commit is contained in:
@@ -9,6 +9,7 @@ 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.effects.PlayCardEffect;
|
||||
import com.gempukku.lotro.logic.effects.SendMessageEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
package com.gempukku.lotro.cards.actions;
|
||||
|
||||
import com.gempukku.lotro.cards.effects.*;
|
||||
import com.gempukku.lotro.cards.effects.PayTwilightCostEffect;
|
||||
import com.gempukku.lotro.cards.effects.PutCardIntoDiscardEffect;
|
||||
import com.gempukku.lotro.cards.effects.RemoveCardFromZoneEffect;
|
||||
import com.gempukku.lotro.cards.effects.ShuffleDeckEffect;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Zone;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
||||
import com.gempukku.lotro.logic.effects.PlayCardEffect;
|
||||
import com.gempukku.lotro.logic.effects.SendMessageEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.gempukku.lotro.common.Zone;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
||||
import com.gempukku.lotro.logic.effects.PlayCardEffect;
|
||||
import com.gempukku.lotro.logic.effects.SendMessageEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
|
||||
public class TransferPermanentAction extends DefaultCostToEffectAction {
|
||||
public TransferPermanentAction(final PhysicalCard card, LotroGame game, Filter filter) {
|
||||
super(card, null, "Transfer " + card.getBlueprint().getName());
|
||||
super(null, null, "Transfer " + card.getBlueprint().getName());
|
||||
|
||||
addCost(new ChooseActiveCardsEffect(card.getOwner(), "Choose target to attach to", 1, 1, filter) {
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.gempukku.lotro.logic.actions;
|
||||
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.logic.effects.SendMessageEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -18,6 +19,8 @@ public class DefaultCostToEffectAction implements CostToEffectAction {
|
||||
private int _costsNextIndex = 0;
|
||||
private int _effectsNextIndex = 0;
|
||||
|
||||
private boolean _sentMessage;
|
||||
|
||||
public DefaultCostToEffectAction(PhysicalCard physicalCard, Keyword type, String text) {
|
||||
_physicalCard = physicalCard;
|
||||
_type = type;
|
||||
@@ -49,6 +52,11 @@ public class DefaultCostToEffectAction implements CostToEffectAction {
|
||||
|
||||
@Override
|
||||
public Effect nextEffect() {
|
||||
if (!_sentMessage && _physicalCard != null) {
|
||||
_sentMessage = true;
|
||||
return new SendMessageEffect(_physicalCard.getBlueprint().getName() + " is used");
|
||||
}
|
||||
|
||||
if (_costsNextIndex < _costs.size()) {
|
||||
_costsNextIndex++;
|
||||
return _costs.get(_costsNextIndex - 1);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.gempukku.lotro.cards.effects;
|
||||
package com.gempukku.lotro.logic.effects;
|
||||
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
|
||||
@@ -78,6 +78,6 @@ public class ChooseSeatingOrderGameProcess implements GameProcess {
|
||||
|
||||
@Override
|
||||
public GameProcess getNextProcess() {
|
||||
return new FirstPlayerPlaysSiteGameProcess(_game, _bids);
|
||||
return new FirstPlayerPlaysSiteGameProcess(_game, _bids, _orderedPlayers[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,16 +12,18 @@ import java.util.Map;
|
||||
public class FirstPlayerPlaysSiteGameProcess implements GameProcess {
|
||||
private LotroGame _game;
|
||||
private Map<String, Integer> _bids;
|
||||
private String _firstPlayer;
|
||||
|
||||
public FirstPlayerPlaysSiteGameProcess(LotroGame game, Map<String, Integer> bids) {
|
||||
public FirstPlayerPlaysSiteGameProcess(LotroGame game, Map<String, Integer> bids, String firstPlayer) {
|
||||
_game = game;
|
||||
_bids = bids;
|
||||
_firstPlayer = firstPlayer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process() {
|
||||
GameState gameState = _game.getGameState();
|
||||
PhysicalCard firstSite = Filters.filter(gameState.getAdventureDeck(gameState.getCurrentPlayerId()), gameState, _game.getModifiersQuerying(), Filters.siteNumber(1)).get(0);
|
||||
PhysicalCard firstSite = Filters.filter(gameState.getAdventureDeck(_firstPlayer), gameState, _game.getModifiersQuerying(), Filters.siteNumber(1)).get(0);
|
||||
gameState.removeCardFromZone(firstSite);
|
||||
gameState.addCardToZone(firstSite, Zone.ADVENTURE_PATH);
|
||||
|
||||
@@ -31,6 +33,6 @@ public class FirstPlayerPlaysSiteGameProcess implements GameProcess {
|
||||
|
||||
@Override
|
||||
public GameProcess getNextProcess() {
|
||||
return new PlayRingBearerRingAndAddBurdersGameProcess(_game, _bids);
|
||||
return new PlayRingBearerRingAndAddBurdersGameProcess(_game, _bids, _firstPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,10 +14,12 @@ import java.util.Map;
|
||||
public class PlayRingBearerRingAndAddBurdersGameProcess implements GameProcess {
|
||||
private LotroGame _game;
|
||||
private Map<String, Integer> _bids;
|
||||
private String _firstPlayer;
|
||||
|
||||
public PlayRingBearerRingAndAddBurdersGameProcess(LotroGame game, Map<String, Integer> bids) {
|
||||
public PlayRingBearerRingAndAddBurdersGameProcess(LotroGame game, Map<String, Integer> bids, String firstPlayer) {
|
||||
_game = game;
|
||||
_bids = bids;
|
||||
_firstPlayer = firstPlayer;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -41,6 +43,6 @@ public class PlayRingBearerRingAndAddBurdersGameProcess implements GameProcess {
|
||||
@Override
|
||||
public GameProcess getNextProcess() {
|
||||
GameState gameState = _game.getGameState();
|
||||
return new PlayStartingFellowshipGameProcess(_game, gameState.getPlayerOrder().getClockwisePlayOrder(gameState.getCurrentPlayerId(), false));
|
||||
return new PlayStartingFellowshipGameProcess(_game, gameState.getPlayerOrder().getClockwisePlayOrder(_firstPlayer, false));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,8 +22,7 @@ public class PlayStartingFellowshipGameProcess implements GameProcess {
|
||||
public void process() {
|
||||
String nextPlayer = _playOrder.getNextPlayer();
|
||||
|
||||
if (_game.getGameState().getCurrentPlayerId() != null)
|
||||
_game.getGameState().stopAffectingCardsForCurrentPlayer();
|
||||
_game.getGameState().stopAffectingCardsForCurrentPlayer();
|
||||
|
||||
if (nextPlayer != null) {
|
||||
_game.getGameState().startPlayerTurn(nextPlayer);
|
||||
|
||||
Reference in New Issue
Block a user