mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
RPG
This commit is contained in:
@@ -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.");
|
||||
Reference in New Issue
Block a user