Updates rules to be closer to original Y.A.R.N
This commit is contained in:
1 parent
a65607b054
commit
f1e9470710
3 files changed
+50
-18
No files matched your search
+12
-5
@@ -477,7 +477,10 @@
|
||||
hasSubmitted = false;
|
||||
hasVoted = false;
|
||||
updateUI();
|
||||
appendSystemMessage('New round started!');
|
||||
appendSystemMessage(`Round ${gameState.currentRound} started!`);
|
||||
if (gameState.currentRound === gameState.gameSettings.roundLimit) {
|
||||
appendSystemMessage(`It's the final round. Points count double!`);
|
||||
}
|
||||
});
|
||||
|
||||
socket.on('gameOver', (data) => {
|
||||
@@ -553,9 +556,13 @@
|
||||
case 'lobby':
|
||||
if (isHost) {
|
||||
gameBar.innerHTML = `
|
||||
<div class="setting-group">
|
||||
<label>Round Limit:</label>
|
||||
<input type="number" id="round-limit" value="${gameState.gameSettings.roundLimit}" min="3" max="100">
|
||||
</div>
|
||||
<div class="setting-group">
|
||||
<label>Score Limit:</label>
|
||||
<input type="number" id="score-limit" value="${gameState.gameSettings.scoreLimit}" min="10" max="100">
|
||||
<input type="number" id="score-limit" value="${gameState.gameSettings.scoreLimit}" min="0" max="100">
|
||||
</div>
|
||||
<div class="setting-group">
|
||||
<label>Time per Round (sec):</label>
|
||||
@@ -576,8 +583,6 @@
|
||||
} else {
|
||||
gameBar.innerHTML = `
|
||||
<span class="waiting-message">Waiting for host to start the game...</span>
|
||||
<span>Score Limit: ${gameState.gameSettings.scoreLimit}</span>
|
||||
<span>Time Limit: ${gameState.gameSettings.timeLimit}s</span>
|
||||
`;
|
||||
}
|
||||
break;
|
||||
@@ -755,12 +760,14 @@
|
||||
|
||||
function startGame() {
|
||||
const scoreLimit = parseInt(document.getElementById('score-limit').value) || 100;
|
||||
const roundLimit = parseInt(document.getElementById('round-limit').value) || 15;
|
||||
const timeLimit = parseInt(document.getElementById('time-limit').value) || 60;
|
||||
const botCount = parseInt(document.getElementById('bot-count').value) || 0;
|
||||
const startText = document.getElementById('start-text').value;
|
||||
|
||||
socket.emit('startGame', {
|
||||
scoreLimit: Math.max(10, Math.min(9999, scoreLimit)),
|
||||
scoreLimit: Math.max(0, Math.min(9999, scoreLimit)),
|
||||
roundLimit: Math.max(0, Math.min(100, roundLimit)),
|
||||
timeLimit: Math.max(15, Math.min(600, timeLimit)),
|
||||
botCount: Math.max(0, Math.min(5, botCount)),
|
||||
startText
|
||||
|
||||
+3
-2
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta property="og:title" content="Y.A.R.N HTML5" />
|
||||
<meta property="og:description" content="A collaborative story-writing game. Remake of the 2000s GameSpy Arcade classic." />
|
||||
<title>Y.A.R.N. 2026</title>
|
||||
<title>Y.A.R.N. HTML5</title>
|
||||
|
||||
<!-- re-use the same CSS-variables and base look -->
|
||||
<style>
|
||||
@@ -134,7 +134,8 @@
|
||||
<ul>
|
||||
<li>Players have a limited amount of time to write a sentence, selected by the host at game start.</li>
|
||||
<li>Once all players have submitted their sentences, players have 30 seconds to vote for their favorite.</li>
|
||||
<li>The player whose sentence is chosen receives 5 points, plus one point for each vote they received.</li>
|
||||
<li>The player whose sentence is chosen receives 3 bonus points, and all players receive one point for each vote they received.</li>
|
||||
<li>In the case of a tie, the longest sentence receives two extra points and the other sentences tied receive 1 point each.</li>
|
||||
<li>When a player reaches the point limit, they win the game.</li>
|
||||
</ul>
|
||||
<p>Enjoy the story-writing!<br><br>
|
||||
|
||||
Reference in new issue
Block a user