Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

Commit

Permalink
v1.198.4
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGiddyLimit committed Jan 10, 2024
1 parent e3bf75f commit 5ffd4ac
Show file tree
Hide file tree
Showing 26 changed files with 473 additions and 322 deletions.
2 changes: 0 additions & 2 deletions .github/set-deployed-flag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ version=$1

# Set the IS_DEPLOYED variable for production.
sed -i 's/IS_DEPLOYED\s*=\s*undefined/IS_DEPLOYED='"\"${version}\""'/g' js/utils.js

sed -i 's#DEPLOYED_IMG_ROOT\s*=\s*undefined#DEPLOYED_IMG_ROOT='"\"https://raw.githubusercontent.com/5etools-mirror-2/5etools-img/main/\""'#g' js/utils.js
5 changes: 5 additions & 0 deletions .github/set-img-root.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -e

sed -i 's#DEPLOYED_IMG_ROOT\s*=\s*undefined#DEPLOYED_IMG_ROOT='"\"https://raw.githubusercontent.com/5etools-mirror-2/5etools-img/main/\""'#g' js/utils.js
5 changes: 3 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@ jobs:
- name: Checkout
uses: actions/checkout@master

- name: Set Deployed Flag
- name: Set Deployed Flag and Image Root
run: |
bash ./.github/set-deployed-flag.sh ${{ github.ref_name }}
bash ./.github/set-img-root.sh
# Notably: remove anything which should not be added to the service worker manifest:
# - `homebrew`
# - `prerelease`
- name: Cleanup
run: |
rm -rf .gitmodules *.md *.zip scss spellcheck homebrew prerelease
rm -rf *.md *.zip scss spellcheck homebrew prerelease
ls -lah
# Remove entries from the `.gitignore` so the gh-pages action can correctly add+commit them to the pages branch
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

1 change: 1 addition & 0 deletions converter.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ <h3 class="conv__head">Output</h3>
<div class="split-v-center conv__out_control__wrp">
<button id="editable" class="btn btn-sm btn-default">Enable Editing</button>
<div class="ve-flex-v-center">
<button id="preview" class="btn btn-sm btn-default mr-2">Preview</button>
<button id="save_local" class="btn btn-sm btn-default hidden mr-2">Save to Homebrew</button>

<div class="btn-group ve-flex-vh-center">
Expand Down
2 changes: 1 addition & 1 deletion css/main.css

Large diffs are not rendered by default.

28 changes: 21 additions & 7 deletions data/bestiary/bestiary-coa.json
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,9 @@
"note": "from nonmagical attacks that aren't adamantine",
"cond": true
}
]
],
"tokenCredit": "Jeferson Cordeiro",
"hasToken": true
},
{
"name": "Asmodeus",
Expand Down Expand Up @@ -3136,7 +3138,9 @@
"fire",
"lightning",
"slashing"
]
],
"tokenCredit": "Unknown",
"hasToken": true
},
{
"name": "Devorastus",
Expand Down Expand Up @@ -4493,7 +4497,9 @@
"note": "from nonmagical attacks that aren't adamantine",
"cond": true
}
]
],
"tokenCredit": "Artguyonthefly",
"hasToken": true
},
{
"name": "Glasya",
Expand Down Expand Up @@ -4908,7 +4914,9 @@
"speed": {
"walk": 0
},
"spellcasting": null
"spellcasting": null,
"tokenCredit": "Irene Meniconi",
"hasToken": true
},
{
"name": "Halog",
Expand Down Expand Up @@ -5171,7 +5179,9 @@
},
"immune": [
"cold"
]
],
"tokenCredit": "Caverns of the Snow Witch",
"hasToken": true
},
{
"name": "Jenevere",
Expand Down Expand Up @@ -5495,12 +5505,14 @@
]
}
},
"tokenCredit": "CrazyMind351",
"damageTags": [
"B",
"L",
"P",
"R"
]
],
"hasToken": true
},
{
"name": "Lesser Tyrant Shadow",
Expand Down Expand Up @@ -7131,7 +7143,9 @@
],
"int": 16,
"wis": 16,
"cha": 16
"cha": 16,
"tokenCredit": "Konstantin Vavilov",
"hasToken": true
},
{
"name": "Rimmon",
Expand Down
5 changes: 5 additions & 0 deletions data/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -2624,6 +2624,11 @@
"date": "2024-01-06",
"txt": "- Added Dynamic Map Viewer support to Dungeons of Drakkenheim\n- Added \"Legacy\" Miscellaneous filter to various list pages\n- Added \"Legacy\" marker to Omnisearch results\n- (Fixed typos/added tags)"
},
{
"ver": "1.197.4",
"date": "2024-01-10",
"txt": "- Added \"One D&D\" filter to Prerelease Content Manager \"Get Prerelease Content\" view\n- Switched \"Added [date]\" column to \"Published [date]\" in Prerelease Content Manager \"Get Prerelease Content\" view\n- Added tokens for Chains of Asmodeus NPCs/other creatures\n- (Brew) Added \"Preview\" button to text converter output\n- (Brew) Added support for \"month\" spell durations\n- (Brew) Fixed homebrew content which depends on prerelease content failing to load that prerelease content\n- (Fixed typos/added tags)"
},
{
"ver": "1.198.0",
"date": "2024-01-06",
Expand Down
10 changes: 9 additions & 1 deletion js/converter-feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,15 @@ class BaseParserFeature extends BaseParser {
}
handleStack();

if (pres.length) state.entity.prerequisite = pres;
if (!pres.length) return;

const presDeduped = [];
pres.forEach(pre => {
if (presDeduped.some(it => CollectionUtil.deepEquals(pre, it))) return;
presDeduped.push(pre);
});

state.entity.prerequisite = presDeduped;
}
}

Expand Down
8 changes: 6 additions & 2 deletions js/converter-spell.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,17 @@ class SpellParser extends BaseParser {
unit = unit.toLowerCase().trim();
switch (unit) {
case "days":
case "weeks":
case "months":
case "years":
case "hours":
case "minutes":
case "actions":
case "rounds": return unit.slice(0, -1);

case "day":
case "week":
case "month":
case "year":
case "hour":
case "minute":
Expand Down Expand Up @@ -441,7 +445,7 @@ class SpellParser extends BaseParser {
if (dur.toLowerCase() === "special") return stats.duration = [{type: "special"}];
if (dur.toLowerCase() === "permanent") return stats.duration = [{type: "permanent"}];

const mConcOrUpTo = /^(concentration, )?up to (\d+|an?) (hour|minute|turn|round|week|day|year)(?:s)?$/i.exec(dur);
const mConcOrUpTo = /^(concentration, )?up to (\d+|an?) (hour|minute|turn|round|week|month|day|year)(?:s)?$/i.exec(dur);
if (mConcOrUpTo) {
const amount = mConcOrUpTo[2].toLowerCase().startsWith("a") ? 1 : Number(mConcOrUpTo[2]);
const out = {type: "timed", duration: {type: this._getCleanTimeUnit(mConcOrUpTo[3], true, options), amount}, concentration: true};
Expand All @@ -450,7 +454,7 @@ class SpellParser extends BaseParser {
return stats.duration = [out];
}

const mTimed = /^(\d+) (hour|minute|turn|round|week|day|year)(?:s)?$/i.exec(dur);
const mTimed = /^(\d+) (hour|minute|turn|round|week|month|day|year)(?:s)?$/i.exec(dur);
if (mTimed) return stats.duration = [{type: "timed", duration: {type: this._getCleanTimeUnit(mTimed[2], true, options), amount: Number(mTimed[1])}}];

const mDispelledTriggered = /^until dispelled( or triggered)?$/i.exec(dur);
Expand Down
Loading

0 comments on commit 5ffd4ac

Please sign in to comment.