Fixed the modifiers not getting performing player
This commit is contained in:
@@ -755,7 +755,7 @@ public class BuiltLotroCardBlueprint implements LotroCardBlueprint {
|
||||
|
||||
List<Modifier> result = new LinkedList<>();
|
||||
for (ModifierSource inPlayModifier : sources) {
|
||||
ActionContext actionContext = new DefaultActionContext(null, game, self, null, null);
|
||||
ActionContext actionContext = new DefaultActionContext(self.getOwner(), game, self, null, null);
|
||||
result.add(inPlayModifier.getModifier(actionContext));
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -539,4 +539,31 @@ public class NewCardsAtTest extends AbstractAtTest {
|
||||
playerDecided(P1, "0");
|
||||
playerDecided(P1, "");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void roamingDiscount() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
initializeSimplestGame();
|
||||
|
||||
final PhysicalCardImpl orcAssassin1 = createCard(P2, "1_262");
|
||||
final PhysicalCardImpl orcAssassin2 = createCard(P2, "1_262");
|
||||
|
||||
_game.getGameState().addCardToZone(_game, orcAssassin1, Zone.HAND);
|
||||
_game.getGameState().addCardToZone(_game, orcAssassin2, Zone.HAND);
|
||||
|
||||
skipMulligans();
|
||||
|
||||
_game.getGameState().setTwilight(10);
|
||||
|
||||
playerDecided(P1, "");
|
||||
|
||||
int twilight = _game.getGameState().getTwilightPool();
|
||||
playerDecided(P2, getCardActionId(P2, "Play Orc Assassin"));
|
||||
assertEquals(twilight - 4, _game.getGameState().getTwilightPool());
|
||||
|
||||
playerDecided(P2, getCardActionId(P2, "Play Orc Assassin"));
|
||||
assertEquals(twilight - 4 - 3, _game.getGameState().getTwilightPool());
|
||||
|
||||
assertEquals(Zone.SHADOW_CHARACTERS, orcAssassin1.getZone());
|
||||
assertEquals(Zone.SHADOW_CHARACTERS, orcAssassin2.getZone());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user