Additional logging tweaks.

- Adding a newline between phases and a header line between turns
- Added announcement for fierce skirmishes
- Added announcement for sanctuary healing
- Added announcement for next skirmish resolution
- Fixed the "start of turn" announcement happening after start of turn triggers
- Added a PC-specific blurb that lists some of the rule differences at the start of game
This commit is contained in:
Christian 'ketura' McCarty
2023-06-24 14:45:56 -05:00
parent 85623af819
commit fc8d6e2732
7 changed files with 21 additions and 7 deletions

View File

@@ -14,18 +14,18 @@ public class StartOfTurnGameProcess implements GameProcess {
SystemQueueAction action = new SystemQueueAction();
action.appendEffect(
new TriggeringResultEffect(new StartOfTurnResult(), "Start of turn"));
action.appendEffect(new UnrespondableEffect() {
@Override
protected void doPlayEffect(LotroGame game) {
var state = game.getGameState();
state.sendMessage("Start of turn.");
state.sendMessage("\n\n========\n\nStart of turn.");
state.sendMessage("Free Peoples player: " + state.getCurrentPlayerId());
}
});
action.appendEffect(
new TriggeringResultEffect(new StartOfTurnResult(), "Start of turn"));
game.getActionsEnvironment().addActionToStack(action);
}

View File

@@ -49,7 +49,7 @@ public class StartOfPhaseGameProcess implements GameProcess {
public void playEffect(LotroGame game) {
((ModifiersLogic) game.getModifiersEnvironment()).signalStartOfPhase(_phase);
((DefaultActionsEnvironment) game.getActionsEnvironment()).signalStartOfPhase(_phase);
game.getGameState().sendMessage("Start of " + _phase + " phase.");
game.getGameState().sendMessage("\nStart of " + _phase + " phase.");
}
});

View File

@@ -58,7 +58,7 @@ public class FellowshipPlayerChoosesToMoveOrStayGameProcess implements GameProce
}
private void playerStays(LotroGame game) {
game.getGameState().sendMessage(game.getGameState().getCurrentPlayerId() + " decides to stay and reconcile. Players will swap roles and end the turn.");
game.getGameState().sendMessage(game.getGameState().getCurrentPlayerId() + " decides to stay and reconcile.");
_nextProcess = game.getFormat().getAdventure().getPlayerStaysGameProcess(game,
new EndOfPhaseGameProcess(Phase.REGROUP,

View File

@@ -20,6 +20,7 @@ public class AfterSkirmishesGameProcess implements GameProcess {
_followingGameProcess = new RegroupGameProcess();
} else if (!gameState.isFierceSkirmishes() && Filters.countActive(game, CardType.MINION, Keyword.FIERCE)>0) {
gameState.setFierceSkirmishes(true);
gameState.sendMessage("Fierce skirmishes.");
_followingGameProcess = new AssignmentGameProcess();
} else {
if (gameState.isFierceSkirmishes())

View File

@@ -7,6 +7,7 @@ import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.Assignment;
import com.gempukku.lotro.game.state.GameState;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.GameUtils;
import com.gempukku.lotro.logic.PlayOrder;
import com.gempukku.lotro.logic.actions.SkirmishPhaseAction;
import com.gempukku.lotro.logic.actions.SystemQueueAction;
@@ -58,6 +59,7 @@ public class PlayoutSkirmishesGameProcess implements GameProcess {
ChooseActiveCardEffect chooseNextSkirmish = new ChooseActiveCardEffect(null, playerChoosingSkirmishOrder, "Choose next skirmish to resolve", Filters.in(skirmishChoice)) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
game.getGameState().sendMessage("Next skirmish to resolve is for " + GameUtils.getCardLink(card));
final Assignment assignment = findAssignment(assignments, card);
game.getGameState().removeAssignment(assignment);
game.getActionsEnvironment().addActionToStack(

View File

@@ -37,6 +37,7 @@ public class SanctuaryRule {
RequiredTriggerAction action = new RequiredTriggerAction(game.getGameState().getCurrentSite());
action.setText("Sanctuary healing");
int healCount = 5 + game.getModifiersQuerying().getSanctuaryHealModifier(game);
game.getGameState().sendMessage("Sanctuary healing. " + game.getGameState().getCurrentPlayerId() + " has " + healCount + " heals available.");
for (int i = 0; i < healCount; i++) {
final int remainingHeals = healCount - i;
ChooseAndHealCharactersEffect healEffect = new ChooseAndHealCharactersEffect(action, game.getGameState().getCurrentPlayerId(), 0, 1, CardType.COMPANION);

View File

@@ -125,7 +125,17 @@ public class LotroServer extends AbstractServer {
_finishedGamesTime.put(gameId, new Date());
}
});
lotroGameMediator.sendMessageToPlayers("You're starting a game of " + gameSettings.getLotroFormat().getName());
var formatName = gameSettings.getLotroFormat().getName();
lotroGameMediator.sendMessageToPlayers("You're starting a game of " + formatName);
if(formatName.contains("PC")) {
lotroGameMediator.sendMessageToPlayers("""
As a reminder, PC formats incorporate the following changes:
- <a href="https://wiki.lotrtcgpc.net/wiki/PC_Errata">PC Errata are in effect</a>
- Set V1 is legal
- Discard piles are public information for both sides
- The game ends after Regroup actions are made (instead of at the start of Regroup)
""");
}
StringBuilder players = new StringBuilder();
Map<String, LotroDeck> decks = new HashMap<>();