Add spells, weapon abilities, and durable corpse resurrection

This commit is contained in:
dingo
2026-09-09 18:15:23 -04:00
parent b3c5482558
commit 897c5745bc
49 changed files with 2277 additions and 137 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
import { api, el, type RecordCharacter } from './portal-shared';
import { statLabel } from './character-stats';
type Catalog={crafting?:{materials:{id:string;name:string}[]};gathering?:{resources:{id:string;name:string;output:string}[];consumables:{id:string;name:string}[]};items:{id:string;name:string}[];titles:{id:string;name:string}[]};
type Catalog={powers?:{powers:{id:string;name:string;book:boolean}[]};crafting?:{materials:{id:string;name:string}[]};gathering?:{resources:{id:string;name:string;output:string}[];consumables:{id:string;name:string}[]};items:{id:string;name:string}[];titles:{id:string;name:string}[]};
export function playerContent(record:RecordCharacter,enabled:boolean,onQueued:()=>void){
const root=el('section','','player-content');root.append(el('h3','Manage items and titles'));
if(!enabled){root.append(el('p','A living character or survivor with an available world owner is required.','muted'));return root;}
@@ -18,6 +18,7 @@ export function playerContent(record:RecordCharacter,enabled:boolean,onQueued:()
const v=record.character.view;choice.replaceChildren();
switch(operation.value){
case 'grant-item':
choice.append(new Option('Revival stone','revival_stone'));for(const p of catalog.powers?.powers??[])if(p.book)choice.append(new Option(p.name+' spell book','book_'+p.id));
for(const i of catalog.items)choice.append(new Option(`${i.name} (${i.id})`,i.id));
for(const r of catalog.gathering?.resources??[])if(r.output==='self')choice.append(new Option(r.name,r.id));
for(const i of catalog.gathering?.consumables??[])choice.append(new Option(i.name,i.id));