This commit is contained in:
2025-08-15 19:31:22 +02:00
parent 894235569e
commit cae1f48035
16 changed files with 334 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
// 📚 Create placeholder RollTables for Crits + Psychic Phenomena/Perils (with icons)
const icon = {Energy:"⚡", Impact:"🔨", Rending:"🗡️", Explosive:"💥"};
const dmgTypes = ["Energy","Impact","Rending","Explosive"];
const locs = ["Head","Body","Left Arm","Right Arm","Left Leg","Right Leg"];
async function makeCrit(dtype, loc){
const name = `Crit: ${dtype} - ${loc}`;
if (game.tables.getName(name)) return;
const results = [];
for (let i=1;i<=5;i++){
results.push({type:0, text:`${icon[dtype]||""} ${dtype}/${loc} — wpis ${i} (uzupełnij z PDF)`, weight:1, range:[i,i]});
}
await RollTable.implementation.create({name, formula:"1d5", replacement:true, displayRoll:false, results});
}
async function makeWide(name, emoji){
if (game.tables.getName(name)) return;
const results = [];
for (let i=0;i<20;i++){
const lo=i*5+1, hi=i*5+5;
results.push({type:0, text:`${emoji} ${name} ${lo}-${hi} — wpis (uzupełnij z PDF)`, weight:1, range:[lo,hi]});
}
await RollTable.implementation.create({name, formula:"1d100", replacement:true, displayRoll:false, results});
}
for (const d of dmgTypes) for (const l of locs) await makeCrit(d,l);
await makeWide("Psychic Phenomena","🌀");
await makeWide("Perils of the Warp","☠️");
ui.notifications.info("Utworzono puste tabele: Crits (4×6) + Phenomena + Perils.");