mirror of
https://github.com/ershisan99/www.git
synced 2025-12-18 12:34:17 +00:00
count rerolls
This commit is contained in:
@@ -83,6 +83,7 @@ type Game = {
|
|||||||
logOwnerFinalJokers: string[] // Log owner's final jokers
|
logOwnerFinalJokers: string[] // Log owner's final jokers
|
||||||
opponentFinalJokers: string[] // Opponent's final jokers
|
opponentFinalJokers: string[] // Opponent's final jokers
|
||||||
events: LogEvent[]
|
events: LogEvent[]
|
||||||
|
rerolls: number
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper to initialize a new game object
|
// Helper to initialize a new game object
|
||||||
@@ -111,6 +112,7 @@ const initGame = (id: number, startDate: Date): Game => ({
|
|||||||
logOwnerFinalJokers: [],
|
logOwnerFinalJokers: [],
|
||||||
opponentFinalJokers: [],
|
opponentFinalJokers: [],
|
||||||
events: [],
|
events: [],
|
||||||
|
rerolls: 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Helper to format duration
|
// Helper to format duration
|
||||||
@@ -471,6 +473,7 @@ export default function LogParser() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
currentGame.rerolls++
|
||||||
} else if (lineLower.includes('usedcard')) {
|
} else if (lineLower.includes('usedcard')) {
|
||||||
// Log owner used card
|
// Log owner used card
|
||||||
const match = line.match(/card:([^,\n]+)/i)
|
const match = line.match(/card:([^,\n]+)/i)
|
||||||
@@ -662,6 +665,10 @@ export default function LogParser() {
|
|||||||
: 'Guest'}{' '}
|
: 'Guest'}{' '}
|
||||||
({ownerLabel})
|
({ownerLabel})
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
<strong>Rerolls:</strong>{' '}
|
||||||
|
{game.rerolls || 'Unknown'}
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<strong>Deck:</strong> {game.deck || 'Unknown'}
|
<strong>Deck:</strong> {game.deck || 'Unknown'}
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user