Add likes/hates to character sheet UI
This commit is contained in:
@@ -11,6 +11,12 @@
|
|||||||
|
|
||||||
$: hand = state.player.hand_cards ? JSON.parse(state.player.hand_cards) : [];
|
$: hand = state.player.hand_cards ? JSON.parse(state.player.hand_cards) : [];
|
||||||
$: scenePirats = state.players.filter(p => p.role === 'pirat');
|
$: scenePirats = state.players.filter(p => p.role === 'pirat');
|
||||||
|
|
||||||
|
function getPlayerName(id) {
|
||||||
|
if (!id) return 'a crewmate';
|
||||||
|
const p = state.players.find(pl => pl.id === id);
|
||||||
|
return p ? displayName(p) : 'Unknown';
|
||||||
|
}
|
||||||
$: duelTargets = scenePirats.filter(p => p.id !== state.player.id && !p.is_dead);
|
$: duelTargets = scenePirats.filter(p => p.id !== state.player.id && !p.is_dead);
|
||||||
// What the chosen duel card becomes as a temporary Obstacle for the defender
|
// What the chosen duel card becomes as a temporary Obstacle for the defender
|
||||||
$: pvpCardObstacle = cardObstacleInfo(pvpCard, $obstacleTable);
|
$: pvpCardObstacle = cardObstacleInfo(pvpCard, $obstacleTable);
|
||||||
@@ -101,6 +107,18 @@
|
|||||||
<p><strong>First Words:</strong> "{state.player.first_words}"</p>
|
<p><strong>First Words:</strong> "{state.player.first_words}"</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{#if state.player.other_like || state.player.other_hate}
|
||||||
|
<div class="sheet-group margin-top">
|
||||||
|
<h4>What the Crew Thinks:</h4>
|
||||||
|
{#if state.player.other_like}
|
||||||
|
<p><strong>👍 Likes:</strong> "{state.player.other_like}" <span class="text-muted">— {getPlayerName(state.player.other_like_from_player_id)}</span></p>
|
||||||
|
{/if}
|
||||||
|
{#if state.player.other_hate}
|
||||||
|
<p><strong>👎 Hates:</strong> "{state.player.other_hate}" <span class="text-muted">— {getPlayerName(state.player.other_hate_from_player_id)}</span></p>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<div class="sheet-group margin-top">
|
<div class="sheet-group margin-top">
|
||||||
<h4>Assigned Secret Techniques (J/Q/K):</h4>
|
<h4>Assigned Secret Techniques (J/Q/K):</h4>
|
||||||
<ul class="techniques-list-sheet">
|
<ul class="techniques-list-sheet">
|
||||||
|
|||||||
Reference in New Issue
Block a user