add ranged skills

This commit is contained in:
iamBadgers committed 2026-10-20 17:19:48 -07:00
1 parent cb1bbe52e4
commit f3e73e85d7
3 files changed
+76 -2

No files matched your search

+5 -1
View File
@@ -5,8 +5,9 @@ import { Body } from "../skills/body";
import { Control } from "../skills/control";
import { Education } from "../skills/education"
import { Fighting } from "../skills/fighting"
import { Details } from "../details/details"
import { Performance } from "../skills/performance"
import { Ranged } from "../skills/ranged"
import { Details } from "../details/details"
export function meta({ }: Route.MetaArgs) {
return [
@@ -34,6 +35,9 @@ export default function Home() {
<Fighting />
<Performance />
</div>
<div className="flex-col stats-and-skills-skill-column">
<Ranged />
</div>
</main >
);
+65
View File
@@ -0,0 +1,65 @@
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
const st = await fetch(`${baseUrl}/characters/collateral/stats.json`)
.then(r => r.json());
const sk = await
fetch(`${baseUrl}/characters/collateral/skills.json`)
.then(r => r.json());
export function Ranged() {
const [stats, setStats] = useState(st)
const [skills, setSkills] = useState(sk)
return (
<main>
<table className="cyber-table">
<thead>
<tr>
<th style={{ width: "70%" }}>RANGE SKILLS</th>
<th style={{ width: "10%" }}>RANKS</th>
<th style={{ width: "10%" }}>STAT</th>
<th style={{ width: "10%" }}>BASE</th>
</tr>
</thead>
<tbody>
<tr>
<td>ARCHERY</td>
<td>{skills.archery}</td>
<td>{stats.ref}</td>
<td>{stats.ref + skills.archery}</td>
</tr>
<tr>
<td>AUTOFIRE</td>
<td>{skills.eautofire}</td>
<td>{stats.ref}</td>
<td>{stats.ref + skills.autofire}</td>
</tr>
<tr>
<td>HANDGUN</td>
<td>{skills.handgun}</td>
<td>{stats.ref}</td>
<td>{stats.ref + skills.handun}</td>
</tr>
<tr>
<td>HEAVY WEAPONS</td>
<td>{skills.heavyweapons}</td>
<td>{stats.dex}</td>
<td>{stats.dex + skills.meleeweapons}</td>
</tr>
<tr>
<td>SHOULDER ARMS</td>
<td>{skills.heavyweapons}</td>
<td>{stats.ref}</td>
<td>{stats.ref + skills.heavyweapons}</td>
</tr>
</tbody>
</table>
</main>
)
}
+6 -1
View File
@@ -35,5 +35,10 @@
"brawling": 2,
"evasion": 2,
"meleeweapons": 0,
"acting": 6
"acting": 6,
"archery": 0,
"autofire": 8,
"handgun": 2,
"heavyweapons": 6,
"shoulderarms": 0
}