Fiddling with effects.
This commit is contained in:
@@ -25,7 +25,7 @@ public class AddTokenEffect extends AbstractEffect {
|
||||
|
||||
@Override
|
||||
public boolean isPlayableInFull(LotroGame game) {
|
||||
return true;
|
||||
return _target.getZone().isInPlay();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -40,8 +40,11 @@ public class AddTokenEffect extends AbstractEffect {
|
||||
|
||||
@Override
|
||||
protected FullEffectResult playEffectReturningResult(LotroGame game) {
|
||||
game.getGameState().addTokens(_target, _token, _count);
|
||||
if (isPlayableInFull(game)) {
|
||||
game.getGameState().addTokens(_target, _token, _count);
|
||||
|
||||
return new FullEffectResult(null, true, true);
|
||||
return new FullEffectResult(null, true, true);
|
||||
}
|
||||
return new FullEffectResult(null, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.gempukku.lotro.cards.effects;
|
||||
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.GameState;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
@@ -18,7 +17,7 @@ public class AttachCardEffect extends AbstractEffect {
|
||||
|
||||
@Override
|
||||
public boolean isPlayableInFull(LotroGame game) {
|
||||
return !PlayConditions.nonPlayZone(_targetCard.getZone())
|
||||
return _targetCard.getZone().isInPlay()
|
||||
&& game.getModifiersQuerying().canHavePlayedOn(game.getGameState(), _physicalCard, _targetCard);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,8 @@ public class Card4_155 extends AbstractResponseEvent {
|
||||
&& PlayConditions.canExert(self, game, Filters.name("Grima"))) {
|
||||
ActivateCardEffect activateEffect = (ActivateCardEffect) effect;
|
||||
final PhysicalCard source = activateEffect.getSource();
|
||||
if (Filters.or(Filters.unboundCompanion(), Filters.type(CardType.ALLY)).accepts(game.getGameState(), game.getModifiersQuerying(), source)) {
|
||||
if (!activateEffect.isCancelled()
|
||||
&& Filters.or(Filters.unboundCompanion(), Filters.type(CardType.ALLY)).accepts(game.getGameState(), game.getModifiersQuerying(), source)) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.name("Grima")));
|
||||
|
||||
Reference in New Issue
Block a user