Addint message to Muster and Ambush rules.

This commit is contained in:
marcins78@gmail.com
2011-12-15 20:00:16 +00:00
parent f65bb60d2e
commit 0d4226c73d
3 changed files with 8 additions and 0 deletions

View File

@@ -33,6 +33,10 @@ public class OptionalTriggerAction extends AbstractCostToEffectAction {
return _triggerIdentifier;
}
public void setMessage(String message) {
_message = message;
}
@Override
public Type getType() {
return Type.TRIGGER;

View File

@@ -7,6 +7,7 @@ import com.gempukku.lotro.game.AbstractActionProxy;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.game.state.actions.DefaultActionsEnvironment;
import com.gempukku.lotro.logic.GameUtils;
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
@@ -34,6 +35,7 @@ public class AmbushRule {
if (Filters.and(CardType.MINION, Keyword.AMBUSH, Filters.owner(playerId)).accepts(game.getGameState(), game.getModifiersQuerying(), assignedCard)) {
final int count = game.getModifiersQuerying().getKeywordCount(game.getGameState(), assignedCard, Keyword.AMBUSH);
OptionalTriggerAction action = new OptionalTriggerAction("ambush" + assignedCard.getCardId(), assignedCard);
action.setMessage(playerId + " uses Ambush (" + count + ") from " + GameUtils.getCardLink(assignedCard));
action.setText("Ambush - add " + count);
action.appendEffect(
new AddTwilightEffect(assignedCard, count));

View File

@@ -7,6 +7,7 @@ import com.gempukku.lotro.game.AbstractActionProxy;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.game.state.actions.DefaultActionsEnvironment;
import com.gempukku.lotro.logic.GameUtils;
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect;
import com.gempukku.lotro.logic.effects.DrawCardsEffect;
@@ -34,6 +35,7 @@ public class MusterRule {
for (PhysicalCard musterCard : Filters.filterActive(game.getGameState(), game.getModifiersQuerying(), Keyword.MUSTER)) {
if (playerId.equals(musterCard.getOwner())) {
OptionalTriggerAction action = new OptionalTriggerAction("muster" + musterCard.getCardId(), musterCard);
action.setMessage(playerId + " uses Muster from " + GameUtils.getCardLink(musterCard));
action.setText("Use Muster");
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 1));