You've already forked obsidian-visualiser
Character creation UI fixes, updates and resistances are displayed.
This commit is contained in:
@@ -126,7 +126,7 @@ function compileCharacter(character: Character & { username?: string }): Compile
|
||||
health: raceOptions.reduce((p, v) => p + (v.health ?? 0), 0),
|
||||
mana: raceOptions.reduce((p, v) => p + (v.mana ?? 0), 0),
|
||||
race: character.progress.race.index ?? -1,
|
||||
modifier: features.map(e => [e[0], Math.floor(e[1].length / 3)] as [MainStat, number]).reduce((p, v) => { p[v[0]] = v[1]; return p }, {} as Record<MainStat, number>),
|
||||
modifier: features.map(e => [e[0], Math.floor((e[1].length - 1) / 3) + (character.progress.modifiers[e[0]] ?? 0)] as [MainStat, number]).reduce((p, v) => { p[v[0]] = v[1]; return p }, {} as Record<MainStat, number>),
|
||||
level: character.progress.level,
|
||||
features: {
|
||||
action: [],
|
||||
@@ -154,10 +154,12 @@ function compileCharacter(character: Character & { username?: string }): Compile
|
||||
deception: 0
|
||||
},
|
||||
spellslots: 0,
|
||||
artslots: 0,
|
||||
spellranks: {
|
||||
instinct: 0,
|
||||
knowledge: 0,
|
||||
precision: 0
|
||||
precision: 0,
|
||||
arts: 0,
|
||||
},
|
||||
speed: false,
|
||||
defense: {
|
||||
@@ -180,7 +182,7 @@ function compileCharacter(character: Character & { username?: string }): Compile
|
||||
resistance: {
|
||||
stun: [0, 0],
|
||||
bleed: [0, 0],
|
||||
posion: [0, 0],
|
||||
poison: [0, 0],
|
||||
fear: [0, 0],
|
||||
influence: [0, 0],
|
||||
charm: [0, 0],
|
||||
@@ -211,6 +213,8 @@ function applyTrainingOption(stat: MainStat, option: TrainingOption, character:
|
||||
if(option.spellrank) character.spellranks[option.spellrank]++;
|
||||
if(option.defense) option.defense.forEach(e => character.defense[e]++);
|
||||
if(option.resistance) option.resistance.forEach(e => character.resistance[e[0]][e[1] === "attack" ? 0 : 1]++);
|
||||
if(option.spellslot) character.spellslots += option.spellslot in character.modifier ? character.modifier[option.spellslot as MainStat] : option.spellslot as number;
|
||||
if(option.arts) character.artslots += option.arts in character.modifier ? character.modifier[option.arts as MainStat] : option.arts as number;
|
||||
|
||||
option.description.forEach(line => !line.disposable && (last || !line.replaced) && character.features[line.category ?? "misc"].push(line.text));
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ const transport = nodemailer.createTransport({
|
||||
user: config.mail.user,
|
||||
pass: config.mail.passwd,
|
||||
},
|
||||
tls: { rejectUnauthorized: config.mail.port !== "465" },
|
||||
tls: { rejectUnauthorized: false },
|
||||
dkim: {
|
||||
domainName: domain,
|
||||
keySelector: selector,
|
||||
|
||||
Reference in New Issue
Block a user