pf2e-sage-stats 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -34
- package/dist/app.js +60 -37
- package/dist/index.js +306 -44
- package/package.json +6 -2
- package/src/app.ts +97 -40
- package/src/index.ts +334 -47
- package/status.txt +0 -5
- package/tracker.json +0 -62
package/README.md
CHANGED
|
@@ -4,104 +4,118 @@ sage! macro set name=flat dice="[{o:m} d20 >= {0} flat {...}]" cat=Misc tier=Ser
|
|
|
4
4
|
```
|
|
5
5
|
### Strikes
|
|
6
6
|
```
|
|
7
|
-
sage! macro set name="melee" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::melee.{s:default}:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::melee.{s:default}.desc:} {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`({c:+0} AC) `} {ac} {utils::{t:known}:ac} {{t:none}::{r:ac}:} {c} {{p}::melee.{s:default}.damage:} {...}]" cat=Strikes tier=Server -y
|
|
7
|
+
sage! macro set name="melee" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::melee.{s:default}:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::melee.{s:default}.desc:} {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`({c:+0} AC) `} {ac} {utils::{t:known}:ac} {{t:none}::{r:ac}:} {c} {{p}::melee.{s:default}.damage:} {...}]" cat=Strikes tier=Server -y
|
|
8
8
|
```
|
|
9
9
|
```
|
|
10
|
-
sage! macro set name="ranged" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::ranged.{s:default}:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::ranged.{s:default}.desc:} {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`({c:+0} AC) `} {ac} {utils::{t:known}:ac} {{t:none}::{r:ac}:} {c} {{p}::ranged.{s:default}.damage:} {...}]" cat=Strikes tier=Server -y
|
|
10
|
+
sage! macro set name="ranged" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::ranged.{s:default}:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::ranged.{s:default}.desc:} {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`({c:+0} AC) `} {ac} {utils::{t:known}:ac} {{t:none}::{r:ac}:} {c} {{p}::ranged.{s:default}.damage:} {...}]" cat=Strikes tier=Server -y
|
|
11
11
|
```
|
|
12
12
|
```
|
|
13
|
-
sage! macro set name="spell" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::spells:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) Spell Attack {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`({c:+0} AC) `} {ac} {utils::{t:known}:ac} {{t:none}::{r:ac}:} {c} {...}]" cat=Strikes tier=Server -y
|
|
13
|
+
sage! macro set name="spell" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::spells:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) Spell Attack {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`({c:+0} AC) `} {ac} {utils::{t:known}:ac} {{t:none}::{r:ac}:} {c} {...}]" cat=Strikes tier=Server -y
|
|
14
14
|
```
|
|
15
15
|
### Saves
|
|
16
16
|
```
|
|
17
|
-
sage! macro set name="fort" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::fort:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::fort.info:} Fortitude Save {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Saves tier=Server -y
|
|
17
|
+
sage! macro set name="fort" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::fort:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::fort.info:} Fortitude Save {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Saves tier=Server -y
|
|
18
18
|
```
|
|
19
19
|
```
|
|
20
|
-
sage! macro set name="fortitude" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::fort:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::fort.info:} Fortitude Save {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Saves tier=Server -y
|
|
20
|
+
sage! macro set name="fortitude" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::fort:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::fort.info:} Fortitude Save {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Saves tier=Server -y
|
|
21
21
|
```
|
|
22
22
|
```
|
|
23
|
-
sage! macro set name="ref" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::reflex:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::reflex.info:} Reflex Save {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Saves tier=Server -y
|
|
23
|
+
sage! macro set name="ref" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::reflex:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::reflex.info:} Reflex Save {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Saves tier=Server -y
|
|
24
24
|
```
|
|
25
25
|
```
|
|
26
|
-
sage! macro set name="reflex" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::reflex:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::reflex.info:} Reflex Save {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Saves tier=Server -y
|
|
26
|
+
sage! macro set name="reflex" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::reflex:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::reflex.info:} Reflex Save {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Saves tier=Server -y
|
|
27
27
|
```
|
|
28
28
|
```
|
|
29
|
-
sage! macro set name="will" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::will:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::will.info:} Will Save {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Saves tier=Server -y
|
|
29
|
+
sage! macro set name="will" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::will:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::will.info:} Will Save {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Saves tier=Server -y
|
|
30
30
|
```
|
|
31
31
|
### Initiative
|
|
32
32
|
```
|
|
33
|
-
sage! macro set name="init" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::{s:Perception}:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::initiative.info:} Initiative `({s:Perception}) `{...}]" cat=Initiative tier=Server -y
|
|
33
|
+
sage! macro set name="init" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::{s:Perception}:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::initiative.info:} Initiative `({s:Perception}) `{...}]" cat=Initiative tier=Server -y
|
|
34
34
|
```
|
|
35
35
|
```
|
|
36
|
-
sage! macro set name="initiative" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::{s:Perception}:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::initiative.info:} Initiative `({s:Perception}) `{...}]" cat=Initiative tier=Server -y
|
|
36
|
+
sage! macro set name="initiative" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::{s:Perception}:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::initiative.info:} Initiative `({s:Perception}) `{...}]" cat=Initiative tier=Server -y
|
|
37
37
|
```
|
|
38
|
-
### Skills
|
|
38
|
+
### Skills 1
|
|
39
39
|
```
|
|
40
|
-
sage! macro set name="acrobatics" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::acrobatics:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::acrobatics.info:} Acrobatics Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
40
|
+
sage! macro set name="acrobatics" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::acrobatics:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::acrobatics.info:} Acrobatics Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
41
41
|
```
|
|
42
42
|
```
|
|
43
|
-
sage! macro set name="arcana" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::arcana:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::arcana.info:} Arcana Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
43
|
+
sage! macro set name="arcana" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::arcana:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::arcana.info:} Arcana Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
44
44
|
```
|
|
45
45
|
```
|
|
46
|
-
sage! macro set name="athletics" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::athletics:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::athletics.info:} Athletics Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
46
|
+
sage! macro set name="athletics" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::athletics:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::athletics.info:} Athletics Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
47
47
|
```
|
|
48
48
|
```
|
|
49
|
-
sage! macro set name="crafting" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::crafting:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::crafting.info:} Crafting Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
49
|
+
sage! macro set name="crafting" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::crafting:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::crafting.info:} Crafting Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
50
50
|
```
|
|
51
51
|
```
|
|
52
|
-
sage! macro set name="craft" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::crafting:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::crafting.info:} Crafting Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
52
|
+
sage! macro set name="craft" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::crafting:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::crafting.info:} Crafting Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
53
53
|
```
|
|
54
|
+
### Skills 2
|
|
54
55
|
```
|
|
55
|
-
sage! macro set name="deception" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::deception:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::deception.info:} Deception Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
56
|
+
sage! macro set name="deception" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::deception:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::deception.info:} Deception Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
56
57
|
```
|
|
57
58
|
```
|
|
58
|
-
sage! macro set name="diplomacy" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::diplomacy:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::diplomacy.info:} Diplomacy Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
59
|
+
sage! macro set name="diplomacy" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::diplomacy:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::diplomacy.info:} Diplomacy Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
59
60
|
```
|
|
60
61
|
```
|
|
61
|
-
sage! macro set name="intimidation" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::intimidation:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::intimidation.info:} Intimidation Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
62
|
+
sage! macro set name="intimidation" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::intimidation:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::intimidation.info:} Intimidation Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
62
63
|
```
|
|
63
64
|
```
|
|
64
|
-
sage! macro set name="medicine" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::medicine:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::medicine.info:} Medicine Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
65
|
+
sage! macro set name="medicine" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::medicine:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::medicine.info:} Medicine Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
65
66
|
```
|
|
66
67
|
```
|
|
67
|
-
sage! macro set name="nature" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::nature:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::nature.info:} Nature Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
68
|
+
sage! macro set name="nature" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::nature:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::nature.info:} Nature Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
68
69
|
```
|
|
70
|
+
### Skills 3
|
|
69
71
|
```
|
|
70
|
-
sage! macro set name="occultism" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::occultism:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::occultism.info:} Occultism Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
72
|
+
sage! macro set name="occultism" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::occultism:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::occultism.info:} Occultism Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
71
73
|
```
|
|
72
74
|
```
|
|
73
|
-
sage! macro set name="performance" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::performance:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::performance.info:} Performance Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
75
|
+
sage! macro set name="performance" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::performance:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::performance.info:} Performance Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
74
76
|
```
|
|
75
77
|
```
|
|
76
|
-
sage! macro set name="perfomance" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::performance:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::performance.info:} Performance Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
78
|
+
sage! macro set name="perfomance" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::performance:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::performance.info:} Performance Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
77
79
|
```
|
|
78
80
|
```
|
|
79
|
-
sage! macro set name="religion" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::religion:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::religion.info:} Religion Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
81
|
+
sage! macro set name="religion" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::religion:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::religion.info:} Religion Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
80
82
|
```
|
|
81
83
|
```
|
|
82
|
-
sage! macro set name="society" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::society:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::society.info:} Society Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
84
|
+
sage! macro set name="society" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::society:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::society.info:} Society Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
83
85
|
```
|
|
86
|
+
### Skills 4
|
|
84
87
|
```
|
|
85
|
-
sage! macro set name="stealth" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::stealth:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::stealth.info:} Stealth Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
88
|
+
sage! macro set name="stealth" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::stealth:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::stealth.info:} Stealth Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
86
89
|
```
|
|
87
90
|
```
|
|
88
|
-
sage! macro set name="survival" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::survival:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::survival.info:} Survival Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
91
|
+
sage! macro set name="survival" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::survival:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::survival.info:} Survival Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
89
92
|
```
|
|
90
93
|
```
|
|
91
|
-
sage! macro set name="thievery" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::thievery:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::thievery.info:} Thievery Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
94
|
+
sage! macro set name="thievery" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::thievery:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::thievery.info:} Thievery Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
92
95
|
```
|
|
93
96
|
```
|
|
94
|
-
sage! macro set name="perception" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::perception:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::perception.info:} Perception Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
97
|
+
sage! macro set name="perception" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::perception:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::perception.info:} Perception Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
95
98
|
```
|
|
96
99
|
```
|
|
97
|
-
sage! macro set name="lore" dice="[{{p}::out:m} {flat::{f:none}:} {d:1}d20+{{p}::lore.{0}:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::lore.{0}.info:} {{p}::lore.{0}.name:} Lore Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
100
|
+
sage! macro set name="lore" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::lore.{0}:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::lore.{0}.info:} {{p}::lore.{0}.name:} Lore Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
98
101
|
```
|
|
102
|
+
### Skills 5
|
|
99
103
|
```
|
|
100
|
-
sage! macro set name="assurance" dice="[{{p}::out:m} {flat::{f:none}:} (10)d20+{0:0}-10 {v} {{p}::name:} Assurance Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
104
|
+
sage! macro set name="assurance" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} (10)d20+{0:0}-10 {v} {{p}::name:} Assurance Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
101
105
|
```
|
|
102
106
|
```
|
|
103
|
-
sage! macro set name="skill" dice="[{{p}::out:m} {flat::{f:none}:} d20+{0:0} {v} {{p}::name:} Skill Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
107
|
+
sage! macro set name="skill" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} d20+{0:0} {v} {{p}::name:} Skill Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
104
108
|
```
|
|
105
109
|
```
|
|
106
|
-
sage! macro set name="secret" dice="[{{p}::out:m} {flat::{f:none}:} d20+{{p}::{0}:{a:0}} {v} {{p}::name:} Secret {0} Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
110
|
+
sage! macro set name="secret" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} d20+{{p}::{0}:{a:0}} {v} {{p}::name:} Secret {0} Check {utils::{t:known}:vs} {{t:none}::name:} {utils::{t:known}:`{r:Spell} DC ({c:+0} DC) `} {dc} {utils::{t:known}:dc} {{t:none}::dc.{r:spells}:} {c} {...}]" cat=Skills tier=Server -y
|
|
111
|
+
```
|
|
112
|
+
### Legacy
|
|
113
|
+
```
|
|
114
|
+
sage! macro set name="mstrike" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::melee.{s:default}:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::melee.{s:default}.desc:} vs {{0}::name:} `({c:+0} AC) ` ac {{0}::{r:ac}:} {c} {{p}::melee.{s:default}.damage:} {...}]" cat=Strikes tier=Server -y
|
|
115
|
+
```
|
|
116
|
+
```
|
|
117
|
+
sage! macro set name="rstrike" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::ranged.{s:default}:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) {{p}::ranged.{s:default}.desc:} vs {{0}::name:} `({c:+0} AC) ` ac {{0}::{r:ac}:} {c} {{p}::ranged.{s:default}.damage:} {...}]" cat=Strikes tier=Server -y
|
|
118
|
+
```
|
|
119
|
+
```
|
|
120
|
+
sage! macro set name="sstrike" dice="[{{p}::{o:out}:{o:m}} {x} {flat::{f:none}:{f}} {dice::{d:none}:{d:1}}d20+{{p}::spells:{a:0}} {m} {v} {{p}::name:} (mod `{m:+0}`) Spell Attack vs {{0}::name:} `({c:+0} AC) ` ac {{0}::{r:ac}:} {c} {...}]" cat=Strikes tier=Server -y
|
|
107
121
|
```
|
package/dist/app.js
CHANGED
|
@@ -12,13 +12,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.sortFolder = exports.formatTracker = exports.newtracker = exports.formatHP = exports.formatTable = exports.formatCommand = exports.formatTSV = exports.flatten = exports.parseStatblock = exports.parseTracker = exports.parseJSON = exports.formatJSON = exports.fromatMap = exports.
|
|
15
|
+
exports.screenPlay = exports.sortFolder = exports.formatTracker = exports.newtracker = exports.formatHP = exports.formatTable = exports.formatCommand = exports.formatTSV = exports.flatten = exports.parseStatblock = exports.parseTracker = exports.parseJSON = exports.formatJSON = exports.fromatMap = exports.diceMap = exports.flatMap = exports.stub = void 0;
|
|
16
16
|
const zod_1 = __importDefault(require("zod"));
|
|
17
17
|
const tsv_1 = require("tsv");
|
|
18
18
|
const lodash_1 = require("lodash");
|
|
19
19
|
const dedent_js_1 = __importDefault(require("dedent-js"));
|
|
20
20
|
const abbreviate_1 = __importDefault(require("abbreviate"));
|
|
21
21
|
const pluralize_1 = __importDefault(require("pluralize"));
|
|
22
|
+
const jsdom_1 = require("jsdom");
|
|
22
23
|
const promises_1 = require("fs/promises");
|
|
23
24
|
const schema = zod_1.default.object({
|
|
24
25
|
name: zod_1.default.string(),
|
|
@@ -182,6 +183,7 @@ exports.stub = {
|
|
|
182
183
|
const childSchema = zod_1.default.object({
|
|
183
184
|
name: zod_1.default.string().default(""),
|
|
184
185
|
alias: zod_1.default.string().default(""),
|
|
186
|
+
id: zod_1.default.string().default(""),
|
|
185
187
|
hp: zod_1.default.coerce.number().default(0),
|
|
186
188
|
temphp: zod_1.default.coerce.number().default(0),
|
|
187
189
|
maxhp: zod_1.default.coerce.number().default(10),
|
|
@@ -193,22 +195,15 @@ const charSchema = zod_1.default.object({
|
|
|
193
195
|
state: zod_1.default.union([zod_1.default.literal('empty'), zod_1.default.literal('arrow'), zod_1.default.literal('check'), zod_1.default.literal('cross')]).default('empty'),
|
|
194
196
|
name: zod_1.default.string().default(""),
|
|
195
197
|
alias: zod_1.default.string().default(""),
|
|
198
|
+
id: zod_1.default.string().default(""),
|
|
196
199
|
hp: zod_1.default.coerce.number().default(0),
|
|
197
200
|
temphp: zod_1.default.coerce.number().default(0),
|
|
198
201
|
maxhp: zod_1.default.coerce.number().default(10),
|
|
199
202
|
conditions: zod_1.default.string().default(''),
|
|
200
203
|
children: zod_1.default.array(childSchema).default([]),
|
|
201
204
|
});
|
|
202
|
-
exports.
|
|
203
|
-
|
|
204
|
-
'incredibly-easy': '`(Incredibly Easy)`',
|
|
205
|
-
'very-easy': '`(Very Easy)`',
|
|
206
|
-
'easy': '`(Easy)`',
|
|
207
|
-
'hard': '`(Hard)`',
|
|
208
|
-
'very-hard': '`(Very Easy)`',
|
|
209
|
-
'incredibly-hard': '`(Incredibly Hard)`',
|
|
210
|
-
});
|
|
211
|
-
exports.adjustmentMap = adjustmentMap;
|
|
205
|
+
exports.flatMap = Object.assign(Object.assign({}, ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20].map((v) => ([`${v}`, `d20 >= ${v} flat;`])).reduce((p, [k, v]) => { p[k] = v; return p; }, {}))), { c: 'd20 >= 5 flat;', concealed: 'd20 >= 5 flat;', h: 'd20 >= 11 flat;', hidden: 'd20 >= 11 flat;' });
|
|
206
|
+
exports.diceMap = Object.assign(Object.assign({}, ([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20].map((v) => ([`${v}`, `(${v})`])).reduce((p, [k, v]) => { p[k] = v; return p; }, {}))), { a: '+2', adv: '+2', advantage: '+2', d: '-2', dis: '-2', disadvantage: '-2', f: '+2', for: '+2', fort: '+2', fortune: '+2', m: '-2', mis: '-2', misfortune: '-2' });
|
|
212
207
|
const fromatMap = (name, map) => {
|
|
213
208
|
return tsv_1.TSV.stringify([Object.assign({ name }, map)]);
|
|
214
209
|
};
|
|
@@ -281,10 +276,7 @@ const locateStrikes = (statblock, alias) => {
|
|
|
281
276
|
.replace(/\+\d/g, '')
|
|
282
277
|
.replace(/Weapon\s+Striking(\s+\((Greater|Major)\))?/gi, '')
|
|
283
278
|
.replace(/((Greater|Major)\s+)?Striking/gi, '')
|
|
284
|
-
.replace(/\(
|
|
285
|
-
.replace(/\(Finesse\)/gi, '')
|
|
286
|
-
.replace(/\(\+\)/gi, '')
|
|
287
|
-
.replace(/\(\)/gi, '')
|
|
279
|
+
.replace(/\(.*\)/gi, '')
|
|
288
280
|
.replace(/\s+/g, ' ')
|
|
289
281
|
.trim();
|
|
290
282
|
const bps = /(?<=[^\w']|^)[BbPpSs](?=[^\w]|$)/g;
|
|
@@ -293,6 +285,7 @@ const locateStrikes = (statblock, alias) => {
|
|
|
293
285
|
.replace(/\s+/g, ' ')
|
|
294
286
|
.replace(bps, (m) => m.toUpperCase())
|
|
295
287
|
.replace(/1d/, 'd')
|
|
288
|
+
.replace(/jousting\s+d\d+/g, 'jousting')
|
|
296
289
|
.trim();
|
|
297
290
|
const _dice = dice
|
|
298
291
|
.replace(/\s+/g, ' ')
|
|
@@ -300,6 +293,10 @@ const locateStrikes = (statblock, alias) => {
|
|
|
300
293
|
.replace(/Fire/, 'fire')
|
|
301
294
|
.replace(/Cold/, 'cold')
|
|
302
295
|
.replace(/Electricity/, 'electricity')
|
|
296
|
+
.replace(/Sonic/, 'sonic')
|
|
297
|
+
.replace(/Spirit/, 'spirit')
|
|
298
|
+
.replace(/Acid/, 'acid')
|
|
299
|
+
.replace(/[pP]lus\s(\d+d)/, '+$1')
|
|
303
300
|
.trim();
|
|
304
301
|
const twoHand = _traits.match(/(two-hand|two-handed)\s+(d\d+)/);
|
|
305
302
|
if (twoHand && twoHand[2]) {
|
|
@@ -374,17 +371,7 @@ const toRanged = ([key, value]) => [
|
|
|
374
371
|
[`ranged.${key}.desc`, value.desc],
|
|
375
372
|
...(value.damage ? [[`ranged.${key}.damage`, value.damage]] : []),
|
|
376
373
|
];
|
|
377
|
-
const
|
|
378
|
-
['dc.recall.incredibly-easy', secret ? `||${value - 10}||` : `${value - 10}`],
|
|
379
|
-
['dc.recall.very-easy', secret ? `||${value - 5}||` : `${value - 5}`],
|
|
380
|
-
['dc.recall.easy', secret ? `||${value - 2}||` : `${value - 2}`],
|
|
381
|
-
['dc.recall.default', secret ? `||${value}||` : `${value}`],
|
|
382
|
-
['dc.recall', secret ? `||${value}||` : `${value}`],
|
|
383
|
-
['dc.recall.hard', secret ? `||${value + 2}||` : `${value + 2}`],
|
|
384
|
-
['dc.recall.very-hard', secret ? `||${value + 5}||` : `${value + 5}`],
|
|
385
|
-
['dc.recall.incredibly-hard', secret ? `||${value + 10}||` : `${value + 10}`],
|
|
386
|
-
])(dcByLevel[Math.max(Math.min(level + 1, dcByLevel.length - 1), 0)] + bump);
|
|
387
|
-
const flatten = (stats, secretDC = false, defaultSkills = false, recallDC = false) => {
|
|
374
|
+
const flatten = (stats, secretDC = false, defaultSkills = false) => {
|
|
388
375
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
389
376
|
const untrained = stats.untrained;
|
|
390
377
|
const skills = defaultSkills ? Object.assign({ acrobatics: untrained + stats.attributes.dexterity, arcana: untrained + stats.attributes.intelligence, athletics: untrained + stats.attributes.strength, crafting: untrained + stats.attributes.intelligence, deception: untrained + stats.attributes.charisma, diplomacy: untrained + stats.attributes.charisma, intimidation: untrained + stats.attributes.charisma, medicine: untrained + stats.attributes.wisdom, nature: untrained + stats.attributes.wisdom, occultism: untrained + stats.attributes.intelligence, performance: untrained + stats.attributes.charisma, religion: untrained + stats.attributes.wisdom, society: untrained + stats.attributes.intelligence, stealth: untrained + stats.attributes.dexterity, survival: untrained + stats.attributes.wisdom, thievery: untrained + stats.attributes.dexterity }, stats.skills) : stats.skills;
|
|
@@ -464,9 +451,6 @@ const flatten = (stats, secretDC = false, defaultSkills = false, recallDC = fals
|
|
|
464
451
|
...(0, lodash_1.entries)(skills).map(mod2DC(true, ((_m = stats.bump.skills) !== null && _m !== void 0 ? _m : stats.bump.default))),
|
|
465
452
|
...(0, lodash_1.entries)(stats.extra).map(mod2DC(true, stats.bump.default)),
|
|
466
453
|
] : []),
|
|
467
|
-
...(recallDC ? [
|
|
468
|
-
...recallDCs(stats.level, secretDC, stats.bump.default),
|
|
469
|
-
] : []),
|
|
470
454
|
...(stats.perceptionInfo.length > 0 ? [
|
|
471
455
|
[`perception.info`, `\`(${stats.perceptionInfo.join(', ')})\``]
|
|
472
456
|
] : []),
|
|
@@ -479,9 +463,9 @@ const flatten = (stats, secretDC = false, defaultSkills = false, recallDC = fals
|
|
|
479
463
|
].reduce((p, [key, value]) => { p[key] = value; return p; }, {});
|
|
480
464
|
};
|
|
481
465
|
exports.flatten = flatten;
|
|
482
|
-
const formatTSV = (stats, secretDC = false, defaultSkills = false
|
|
466
|
+
const formatTSV = (stats, secretDC = false, defaultSkills = false) => (tsv_1.TSV.stringify([(0, exports.flatten)(stats, secretDC, defaultSkills)]));
|
|
483
467
|
exports.formatTSV = formatTSV;
|
|
484
|
-
const formatCommand = (stats, secretDC = false, defaultSkills = false
|
|
468
|
+
const formatCommand = (stats, secretDC = false, defaultSkills = false) => (Object.entries((0, exports.flatten)(stats, secretDC, defaultSkills)).map(([k, v]) => `${k}="${v}"`).join(' '));
|
|
485
469
|
exports.formatCommand = formatCommand;
|
|
486
470
|
const formatTable = (table, season, scenario, _name, gm, players) => {
|
|
487
471
|
const name = _name.replace(/[\s-_]/g, ' ').replace(/[^a-zA-Z0-9 ]/g, '');
|
|
@@ -492,7 +476,7 @@ const formatTable = (table, season, scenario, _name, gm, players) => {
|
|
|
492
476
|
@TableBot create "${gameName}" --gm ${gm} --players ${players} --table-name ${tableName} --ooc-table-name ooc-${tableName} --category Game Tables
|
|
493
477
|
\`\`\`
|
|
494
478
|
\`\`\`
|
|
495
|
-
sage! game create name="${gameName}" gameSystem="pf2e" ic=" #${tableName} " ooc=" #ooc-${tableName} " gms=" ${gm} " players=" @${gameName} " dialogPost="post" diceSecret="gm" diceCrit="timestwo" diceOutput=M gmCharName="Хронист"
|
|
479
|
+
sage! game create name="${gameName}" gameSystem="pf2e" ic=" #${tableName} " ooc=" #ooc-${tableName} " gms=" ${gm} " players=" @${gameName} " dialogPost="post" diceSecret="gm" diceCrit="timestwo" diceOutput=M gmCharName="Хронист"
|
|
496
480
|
\`\`\`
|
|
497
481
|
`;
|
|
498
482
|
};
|
|
@@ -545,8 +529,10 @@ const newtracker = (status) => {
|
|
|
545
529
|
};
|
|
546
530
|
exports.newtracker = newtracker;
|
|
547
531
|
const formatTracker = (tracker) => {
|
|
532
|
+
const aliasSpace = (t) => (t.alias.length > 0 ? 0 : 5);
|
|
533
|
+
const nameLengthWithAlias = (t) => t.name.length - aliasSpace(t);
|
|
548
534
|
const nameLength = tracker.reduce((p, c) => {
|
|
549
|
-
const length = c.children.reduce((pp, cc) => pp > cc
|
|
535
|
+
const length = c.children.reduce((pp, cc) => pp > nameLengthWithAlias(cc) ? pp : nameLengthWithAlias(cc), nameLengthWithAlias(c));
|
|
550
536
|
return p > length ? p : length;
|
|
551
537
|
}, 0);
|
|
552
538
|
const hpLength = tracker.reduce((p, c) => {
|
|
@@ -575,15 +561,15 @@ const formatTracker = (tracker) => {
|
|
|
575
561
|
if (tracker[index - 1] && tracker[index - 1].foe !== char.foe) {
|
|
576
562
|
ls.push('');
|
|
577
563
|
}
|
|
578
|
-
const hp = char.foe ? (`-${char.maxhp - char.hp}${char.temphp > 0 ? `+${char.temphp}` : ''}`.padStart(hpLength)) : (`${char.hp}${char.temphp > 0 ? `+${char.temphp}` : ''}
|
|
564
|
+
const hp = !char.foe && char.hp > 0 ? (`${char.hp}${char.temphp > 0 ? `+${char.temphp}` : ''}/${char.maxhp}`.padStart(hpLength)) : char.hp > 0 ? (`-${char.maxhp - char.hp}${char.temphp > 0 ? `+${char.temphp}` : ''}`.padStart(hpLength)) : (`${char.hp}${char.temphp > 0 ? `+${char.temphp}` : ''}`.padStart(hpLength));
|
|
579
565
|
const hpBar = (value, max) => (value <= 0 ? (':crossed:') : value >= max ? (':healthy:') : (hpMap[Math.round((hpMap.length - 1) * value / max)]));
|
|
580
|
-
ls.push((`${stateMap[char.state]}**\` ${char.name.padEnd(nameLength)} ▏${char.alias.padEnd(3)} ▏${hp} \`** ${hpBar(char.hp, char.maxhp)} `));
|
|
566
|
+
ls.push((`${stateMap[char.hp > 0 ? char.state : 'cross']}**\` ${char.name.padEnd(nameLength + aliasSpace(char))}${char.alias.length > 0 ? ` ▏${char.alias.padEnd(3)}` : ''} ▏${hp} \`** ${hpBar(char.hp, char.maxhp)} `));
|
|
581
567
|
if (char.conditions.length > 0) {
|
|
582
568
|
ls.push(`-# ${char.conditions}`);
|
|
583
569
|
}
|
|
584
570
|
for (const child of char.children) {
|
|
585
|
-
const hhp = char.foe ? (`-${child.maxhp - child.hp}${child.temphp > 0 ? `+${child.temphp}` : ''}`.padStart(hpLength)) : (`${child.hp}${child.temphp > 0 ? `+${child.temphp}` : ''}
|
|
586
|
-
ls.push((`:smallnode
|
|
571
|
+
const hhp = !char.foe && child.hp > 0 ? (`${child.hp}${child.temphp > 0 ? `+${child.temphp}` : ''}/${child.maxhp}`.padStart(hpLength)) : child.hp > 0 ? (`-${child.maxhp - child.hp}${child.temphp > 0 ? `+${child.temphp}` : ''}`.padStart(hpLength)) : (`${child.hp}${child.temphp > 0 ? `+${child.temphp}` : ''}`.padStart(hpLength));
|
|
572
|
+
ls.push((`:smallnode:**\` ${child.name.padEnd(nameLength + aliasSpace(child))}${child.alias.length > 0 ? ` ▏${child.alias.padEnd(3)}` : ''} ▏${hhp} \`** ${hpBar(child.hp, child.maxhp)} `));
|
|
587
573
|
if (child.conditions.length > 0) {
|
|
588
574
|
ls.push(`-# ${child.conditions}`);
|
|
589
575
|
}
|
|
@@ -610,3 +596,40 @@ const sortFolder = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
610
596
|
return transformed;
|
|
611
597
|
});
|
|
612
598
|
exports.sortFolder = sortFolder;
|
|
599
|
+
const screenPlay = (htmlContent) => {
|
|
600
|
+
const dom = new jsdom_1.JSDOM(htmlContent);
|
|
601
|
+
const document = dom.window.document;
|
|
602
|
+
const outputLines = [];
|
|
603
|
+
const preambleEntry = document.querySelector('.preamble__entry');
|
|
604
|
+
if (preambleEntry) {
|
|
605
|
+
outputLines.push(`SCENE: ${preambleEntry.textContent}`);
|
|
606
|
+
outputLines.push('');
|
|
607
|
+
}
|
|
608
|
+
// Process all chatlog messages
|
|
609
|
+
const messages = document.querySelectorAll('.chatlog__message');
|
|
610
|
+
messages.forEach(message => {
|
|
611
|
+
var _a, _b, _c, _d;
|
|
612
|
+
const authorElement = message.querySelector('.chatlog__author');
|
|
613
|
+
const contentElement = message.querySelector('.chatlog__content');
|
|
614
|
+
if (!authorElement || !contentElement)
|
|
615
|
+
return;
|
|
616
|
+
const author = (_b = (_a = authorElement.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '';
|
|
617
|
+
const content = (_d = (_c = contentElement.textContent) === null || _c === void 0 ? void 0 : _c.trim()) !== null && _d !== void 0 ? _d : '';
|
|
618
|
+
// Skip bot tags in character names
|
|
619
|
+
const characterName = author.replace(/\s*BOT$/, '');
|
|
620
|
+
// Add character line
|
|
621
|
+
outputLines.push(`${characterName.toUpperCase()}`);
|
|
622
|
+
// Add dialogue/content (wrap long lines)
|
|
623
|
+
const lines = content.split('\n').map((c) => (c
|
|
624
|
+
.replace(/(—|--)/g, '-')
|
|
625
|
+
// eslint-disable-next-line no-irregular-whitespace
|
|
626
|
+
.replace(/(|)/g, '')
|
|
627
|
+
.trim())).filter((c) => c.length);
|
|
628
|
+
for (const line of lines) {
|
|
629
|
+
outputLines.push(` ${line}`);
|
|
630
|
+
}
|
|
631
|
+
outputLines.push('');
|
|
632
|
+
});
|
|
633
|
+
return outputLines.join('\n');
|
|
634
|
+
};
|
|
635
|
+
exports.screenPlay = screenPlay;
|