Add skill for aware, body and control.
This commit is contained in:
1 parent
ae3e2f0d86
commit
15bb37b248
7 files changed
+254
-14
No files matched your search
@@ -0,0 +1,69 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
|
||||
const baseUrl = typeof window !== 'undefined'
|
||||
? window.location.origin
|
||||
: process.env.VITE_VERCEL_URL || 'http://localhost:5173' // Fallback for your server env
|
||||
|
||||
export function Awareness() {
|
||||
|
||||
const [stats, setStats] = useState([])
|
||||
const [skills, setSkills] = useState([])
|
||||
|
||||
useEffect(() => {
|
||||
fetch(`${baseUrl}/characters/collateral/stats.json`)
|
||||
.then(r => r.json())
|
||||
.then(j => setStats(j))
|
||||
|
||||
fetch(`${baseUrl}/characters/collateral/skills.json`)
|
||||
.then(r => r.json())
|
||||
.then(j => setSkills(j))
|
||||
})
|
||||
|
||||
|
||||
return (
|
||||
<main>
|
||||
<table className="cyber-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>AWARENESS SKILLS</th>
|
||||
<th>RANKS</th>
|
||||
<th>STAT</th>
|
||||
<th>BASE</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>CONCENTRATION</td>
|
||||
<td>{skills.concentration}</td>
|
||||
<td>{stats.will}</td>
|
||||
<td>{stats.will + skills.concentration}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CONCEAL / REVEAL OBJECT</td>
|
||||
<td>{skills.cro}</td>
|
||||
<td>{stats.int}</td>
|
||||
<td>{stats.int + skills.cro}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>LIP READING</td>
|
||||
<td>{skills.lipreading}</td>
|
||||
<td>{stats.int}</td>
|
||||
<td>{stats.int + skills.lipreading}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PERCEPTION</td>
|
||||
<td>{skills.perception}</td>
|
||||
<td>{stats.int}</td>
|
||||
<td>{stats.int + skills.perception}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>TRACKING</td>
|
||||
<td>{skills.tracking}</td>
|
||||
<td>{stats.int}</td>
|
||||
<td>{stats.int + skills.tracking}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user