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,63 @@
|
||||
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 Control() {
|
||||
|
||||
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>CONTROL SKILLS</th>
|
||||
<th>RANKS</th>
|
||||
<th>STAT</th>
|
||||
<th>BASE</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>DRIVE LAND VEHICLE</td>
|
||||
<td>{skills.driveland}</td>
|
||||
<td>{stats.dex}</td>
|
||||
<td>{stats.dex + skills.driveland}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PILOT AIR VEHICLE</td>
|
||||
<td>{skills.pilotair}</td>
|
||||
<td>{stats.dex}</td>
|
||||
<td>{stats.dex + skills.pilotair}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PILOT SEA VEHICLE</td>
|
||||
<td>{skills.lipreading}</td>
|
||||
<td>{stats.dex}</td>
|
||||
<td>{stats.dex + skills.pilotsea}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RIDING</td>
|
||||
<td>{skills.riding}</td>
|
||||
<td>{stats.dex}</td>
|
||||
<td>{stats.dex + skills.riding}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user