initial fudgin on wep and arms.
This commit is contained in:
1 parent
18298c35d4
commit
9b27c948ce
3 files changed
+88
No files matched your search
@@ -0,0 +1,50 @@
|
|||||||
|
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 wandr = await fetch(`${baseUrl}/characters/collateral/weaponsandarmor.json`)
|
||||||
|
.then(r => {
|
||||||
|
console.log(r)
|
||||||
|
return r.json()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function Armor({ armor }) {
|
||||||
|
return (
|
||||||
|
<table className="cyber-table">
|
||||||
|
<tbody>
|
||||||
|
<tr style={{lineHeight: 1}}>
|
||||||
|
<td>Head Armor: {armor.displayheadarmor}</td>
|
||||||
|
<td>SP: {armor.displayheadarmorsp}</td>
|
||||||
|
<td>Penalty: {armor.dislpayheadarmorpenalty}</td>
|
||||||
|
</tr>
|
||||||
|
<tr style={{lineHeight: 1}}>
|
||||||
|
<td>Body Armor: {armor.displaybodyarmor}</td>
|
||||||
|
<td>SP: {armor.displaybodyarmorsp}</td>
|
||||||
|
<td>Penalty: {armor.displaybodyarmorpenalty}</td>
|
||||||
|
</tr>
|
||||||
|
<tr style={{lineHeight: 1}}>
|
||||||
|
<td>Shield:</td>
|
||||||
|
<td>HP:</td>
|
||||||
|
<td>Penalty:</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function Weapons({ weapons }) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export function WeaponsAndArmor() {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Armor armor={wandr}/>
|
||||||
|
<Weapons weapons={wandr.displayweapons} />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@ import { Details } from "../details/details"
|
|||||||
import { Stats } from "../details/stats"
|
import { Stats } from "../details/stats"
|
||||||
import { Humanity } from "../details/humanity"
|
import { Humanity } from "../details/humanity"
|
||||||
import { Health } from "../details/health"
|
import { Health } from "../details/health"
|
||||||
|
import { WeaponsAndArmor } from "../details/weaponsandarmor"
|
||||||
|
|
||||||
export function meta({ }: Route.MetaArgs) {
|
export function meta({ }: Route.MetaArgs) {
|
||||||
return [
|
return [
|
||||||
@@ -64,6 +65,8 @@ export default function Home() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<WeaponsAndArmor />
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"displayheadarmor": "Lotos Smart Helm",
|
||||||
|
"displayheadarmorsp": 11,
|
||||||
|
"dislpayheadarmorpenalty": 0,
|
||||||
|
"displaybodyarmor": "Light Metal Gear",
|
||||||
|
"displaybodyarmorsp": 16,
|
||||||
|
"displaybodyarmorpenalty": 2,
|
||||||
|
"displayshield": "",
|
||||||
|
"displayshieldhp": 0,
|
||||||
|
"displayshieldpenalty": 0,
|
||||||
|
"displayweapons": [
|
||||||
|
{
|
||||||
|
"name": "Popup EQ HSMG x2",
|
||||||
|
"features": ["T.UP (EQ)", "Auto(4)", "D.MAG", "S.LINK"],
|
||||||
|
"magazine": 120,
|
||||||
|
"damage": "3d6",
|
||||||
|
"rof": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Popup Dragon",
|
||||||
|
"features": ["T.UP (SLOT)", "Burn(4)", "S.CHOKE"],
|
||||||
|
"magazine": 2,
|
||||||
|
"damage": "3d6/5d6",
|
||||||
|
"rof": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "China Lake EQ GL",
|
||||||
|
"features": ["T.UP (EQ)", "AoE(5)", "Select D.MAG", "S.LINK"],
|
||||||
|
"magazine": 6,
|
||||||
|
"damage": "6d6",
|
||||||
|
"rof": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
Reference in new issue
Block a user