- If FP player uses Muster, shadow player is now also able to use it.

This commit is contained in:
marcins78
2013-01-04 12:06:45 +00:00
parent 9849e75b92
commit 643b43d8bb
3 changed files with 53 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ public class MusterRule {
PhysicalCard firstMuster = Filters.findFirstActive(game.getGameState(), game.getModifiersQuerying(), Filters.owner(playerId), Keyword.MUSTER); PhysicalCard firstMuster = Filters.findFirstActive(game.getGameState(), game.getModifiersQuerying(), Filters.owner(playerId), Keyword.MUSTER);
if (firstMuster != null) { if (firstMuster != null) {
final OptionalTriggerAction action = new OptionalTriggerAction(firstMuster); final OptionalTriggerAction action = new OptionalTriggerAction(firstMuster);
action.setTriggerIdentifier("muster"); action.setTriggerIdentifier("muster-"+playerId);
action.setVirtualCardAction(true); action.setVirtualCardAction(true);
action.setText("Use Muster"); action.setText("Use Muster");
ChooseAndDiscardCardsFromHandEffect effect = new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, ChooseAndDiscardCardsFromHandEffect effect = new ChooseAndDiscardCardsFromHandEffect(action, playerId, false,

View File

@@ -9,8 +9,6 @@ import com.gempukku.lotro.logic.decisions.AwaitingDecision;
import com.gempukku.lotro.logic.decisions.AwaitingDecisionType; import com.gempukku.lotro.logic.decisions.AwaitingDecisionType;
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException; import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
import com.gempukku.lotro.logic.modifiers.KeywordModifier; import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertTrue;
import org.junit.Test; import org.junit.Test;
import java.util.Collection; import java.util.Collection;
@@ -18,6 +16,9 @@ import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertTrue;
public class TriggersAtTest extends AbstractAtTest { public class TriggersAtTest extends AbstractAtTest {
@Test @Test
public void fpCharWinsSkirmish() throws DecisionResultInvalidException { public void fpCharWinsSkirmish() throws DecisionResultInvalidException {
@@ -200,6 +201,52 @@ public class TriggersAtTest extends AbstractAtTest {
assertEquals(Phase.REGROUP, _game.getGameState().getCurrentPhase()); assertEquals(Phase.REGROUP, _game.getGameState().getCurrentPhase());
} }
@Test
public void musterForShadowSideTriggersCorrectly() throws DecisionResultInvalidException {
initializeSimplestGame();
PhysicalCardImpl musterWitchKing = new PhysicalCardImpl(100, "11_226", P2, _library.getLotroCardBlueprint("11_226"));
PhysicalCardImpl musterWitchKing2 = new PhysicalCardImpl(101, "11_226", P2, _library.getLotroCardBlueprint("11_226"));
skipMulligans();
_game.getGameState().addCardToZone(_game, musterWitchKing, Zone.SHADOW_CHARACTERS);
_game.getGameState().addCardToZone(_game, musterWitchKing2, Zone.HAND);
// End fellowship phase
playerDecided(P1, "");
// End shadow phase
playerDecided(P2, "");
// End maneuver phase
playerDecided(P1, "");
playerDecided(P2, "");
// End archery phase
playerDecided(P1, "");
playerDecided(P2, "");
// End assignment phase
playerDecided(P1, "");
playerDecided(P2, "");
// Assign
playerDecided(P1, "");
playerDecided(P2, "");
// End fierce assignment phase
playerDecided(P1, "");
playerDecided(P2, "");
// Fierce assign
playerDecided(P1, "");
playerDecided(P2, "");
// Start regroup
assertEquals(Phase.REGROUP, _game.getGameState().getCurrentPhase());
}
@Test @Test
public void replaceSiteNotPossibleWithMountDoom() throws DecisionResultInvalidException { public void replaceSiteNotPossibleWithMountDoom() throws DecisionResultInvalidException {
initializeSimplestGame(); initializeSimplestGame();

View File

@@ -5,6 +5,9 @@ response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", -1); response.setDateHeader ("Expires", -1);
%> %>
<pre style="font-size:80%"> <pre style="font-size:80%">
<b>04 Jan. 2013</b>
- If FP player uses Muster, shadow player is now also able to use it.
<b>03 Jan. 2013</b> <b>03 Jan. 2013</b>
- "Legolas, Elven Comrade" now should automatically allow to choose a minion skirmishing an unbound companion. - "Legolas, Elven Comrade" now should automatically allow to choose a minion skirmishing an unbound companion.