Compare commits
No commits in common. "a1be0791a01d47cfb84adc0e18693d7ec9b3eabd" and "d11e457200c20d50a0f67c29a79bd092db3a9cbb" have entirely different histories.
a1be0791a0
...
d11e457200
10 changed files with 145 additions and 289 deletions
15
.vscode/launch.json
vendored
15
.vscode/launch.json
vendored
|
@ -1,15 +0,0 @@
|
||||||
{
|
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"type": "chrome",
|
|
||||||
"request": "launch",
|
|
||||||
"name": "Launch Chrome against localhost",
|
|
||||||
"url": "http://127.0.0.1:5500",
|
|
||||||
"webRoot": "${workspaceFolder}"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
37
README
37
README
|
@ -1,37 +0,0 @@
|
||||||
## Spells
|
|
||||||
|
|
||||||
### JSON structure
|
|
||||||
|
|
||||||
| field | type | value |
|
|
||||||
| ------------------------ | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
||||||
| id | _number_ | unique id for the spell, for localization purpose |
|
|
||||||
| name | _string_ | spell's name |
|
|
||||||
| source | _number_ | where the spell is coming from |
|
|
||||||
| page | _number_ | page source |
|
|
||||||
| srd | _boolean_ | is this a srd or a creation |
|
|
||||||
| level | _number_ | spell's level |
|
|
||||||
| school | _string_ | spell school : "A" : Abjuration,"C" : Conjuration, "D": Divination, "E": Enchantment, "N": Necromancy, "T" : Transmutation, "I" : Illusion, "V" : Evocation |
|
|
||||||
| time | _array_ | incantation time |
|
|
||||||
| time.number | _number_ | |
|
|
||||||
| time.unit | _string_ | |
|
|
||||||
| range | _module_ | |
|
|
||||||
| range.type | _string_ | point by default, but can be cone, sphere, cylinder, special |
|
|
||||||
| range.distance | _module_ | |
|
|
||||||
| range.distance.type | _string_ | feet or meter or other unit measure |
|
|
||||||
| range.distance.amount | _number_ | amount of distance in `range.distance.type` |
|
|
||||||
| components | _module_ | |
|
|
||||||
| components.v | _boolean_ | verbal component |
|
|
||||||
| components.s | _boolean_ | somatic component |
|
|
||||||
| components.m | _string_ | materials components |
|
|
||||||
| duration | _array_ | |
|
|
||||||
| duration.type | _string_ | timed, permanent, special or instant |
|
|
||||||
| duration.duration | _module_ | |
|
|
||||||
| duration.duration.type | _string_ | minute or hours |
|
|
||||||
| duration.duration.amount | _number_ | amount of `duration.duration.type` |
|
|
||||||
| concentration | _boolena_ | does spell need concentration ? |
|
|
||||||
| desc | _array_ | markdown description of the spell |
|
|
||||||
| damageInflict | _string_ | |
|
|
||||||
| conditionInflict | _string_ | |
|
|
||||||
| savingThrow | _array_ | array of string of saving Throw available |
|
|
||||||
| miscTags | _array_ | |
|
|
||||||
| | | |
|
|
|
@ -1,81 +0,0 @@
|
||||||
{
|
|
||||||
"spell": [
|
|
||||||
{
|
|
||||||
"id": 0,
|
|
||||||
"name": "Acid Arrow",
|
|
||||||
"source": "GRI",
|
|
||||||
"page": 110,
|
|
||||||
"srd": true,
|
|
||||||
"level": 2,
|
|
||||||
"school": "E",
|
|
||||||
"time": [
|
|
||||||
{
|
|
||||||
"number": 1,
|
|
||||||
"unit": "action"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"range": {
|
|
||||||
"type": "point",
|
|
||||||
"distance": {
|
|
||||||
"type": "feet",
|
|
||||||
"amount": 90
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"components": {
|
|
||||||
"v": true,
|
|
||||||
"s": true,
|
|
||||||
"m": "powdered rhubarb leaf and an adder’s stomach"
|
|
||||||
},
|
|
||||||
"duration": [
|
|
||||||
{
|
|
||||||
"type": "instant"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"desc": [
|
|
||||||
"A shimmering green arrow streaks toward a target within range and bursts in a spray of acid."
|
|
||||||
],
|
|
||||||
"damageInflict": ["acid"],
|
|
||||||
"savingThrow": [""],
|
|
||||||
"miscTags": ["", ""],
|
|
||||||
"areaTags": ["", ""]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"name": "Acid Blob",
|
|
||||||
"source": "GRI",
|
|
||||||
"page": 110,
|
|
||||||
"srd": false,
|
|
||||||
"level": 1,
|
|
||||||
"school": "E",
|
|
||||||
"time": [
|
|
||||||
{
|
|
||||||
"number": 1,
|
|
||||||
"unit": "action"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"range": {
|
|
||||||
"type": "point",
|
|
||||||
"distance": {
|
|
||||||
"type": "feet",
|
|
||||||
"amount": 90
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"components": {
|
|
||||||
"v": true,
|
|
||||||
"s": true
|
|
||||||
},
|
|
||||||
"duration": [
|
|
||||||
{
|
|
||||||
"type": "instant"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"desc": [
|
|
||||||
"A yellowish bubble shoots from your pointed finger toward a creature of your choice within range"
|
|
||||||
],
|
|
||||||
"damageInflict": ["acid"],
|
|
||||||
"savingThrow": [""],
|
|
||||||
"miscTags": ["", ""],
|
|
||||||
"areaTags": ["", ""]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,81 +1,64 @@
|
||||||
{
|
{ "spell": [ {
|
||||||
"spell": [
|
"name": "Acid Splash",
|
||||||
{
|
"source": "PHB",
|
||||||
"id": 0,
|
"page": 211,
|
||||||
"name": "Flèche Acide",
|
"srd": true,
|
||||||
"source": "GRI",
|
"basicRules": true,
|
||||||
"page": 188,
|
"level": 0,
|
||||||
"srd": true,
|
"school": "C",
|
||||||
"level": 2,
|
"time": [
|
||||||
"school": "V",
|
{
|
||||||
"time": [
|
"number": 1,
|
||||||
{
|
"unit": "action"
|
||||||
"number": 1,
|
}
|
||||||
"unit": "action"
|
],
|
||||||
}
|
"range": {
|
||||||
],
|
"type": "point",
|
||||||
"range": {
|
"distance": {
|
||||||
"type": "point",
|
"type": "feet",
|
||||||
"distance": {
|
"amount": 60
|
||||||
"type": "m",
|
}
|
||||||
"amount": 27
|
},
|
||||||
}
|
"components": {
|
||||||
},
|
"v": true,
|
||||||
"components": {
|
"s": true
|
||||||
"v": true,
|
},
|
||||||
"s": true,
|
"duration": [
|
||||||
"m": "de la poudre de feuille de rhubarbe et un estomac de vipère"
|
{
|
||||||
},
|
"type": "instant"
|
||||||
"duration": [
|
}
|
||||||
{
|
],
|
||||||
"type": "instant"
|
"entries": [
|
||||||
}
|
"You hurl a bubble of acid. Choose one creature you can see within range, or choose two creatures you can see within range that are within 5 feet of each other. A target must succeed on a Dexterity saving throw or take {@damage 1d6} acid damage.",
|
||||||
],
|
"This spell's damage increases by {@dice 1d6} when you reach 5th level ({@damage 2d6}), 11th level ({@damage 3d6}), and 17th level ({@damage 4d6})."
|
||||||
"desc": [
|
],
|
||||||
"Une flèche verte et chatoyante file droit vers une cible située à portée avant d’éclater et de l’arroser d’acide."
|
"scalingLevelDice": {
|
||||||
],
|
"label": "acid damage",
|
||||||
"damageInflict": ["acid"],
|
"scaling": {
|
||||||
"savingThrow": [""],
|
"1": "1d6",
|
||||||
"miscTags": ["", ""],
|
"5": "2d6",
|
||||||
"areaTags": ["", ""]
|
"11": "3d6",
|
||||||
},
|
"17": "4d6"
|
||||||
{
|
}
|
||||||
"id": 1,
|
},
|
||||||
"name": "Bille Acide",
|
"damageInflict": [
|
||||||
"source": "GRI",
|
"acid"
|
||||||
"page": 134,
|
],
|
||||||
"srd": false,
|
"savingThrow": [
|
||||||
"level": 1,
|
"dexterity"
|
||||||
"school": "V",
|
],
|
||||||
"time": [
|
"miscTags": [
|
||||||
{
|
"SCL",
|
||||||
"number": 1,
|
"SGT"
|
||||||
"unit": "action"
|
],
|
||||||
}
|
"areaTags": [
|
||||||
],
|
"ST",
|
||||||
"range": {
|
"MT"
|
||||||
"type": "point",
|
]
|
||||||
"distance": {
|
},
|
||||||
"type": "m",
|
}
|
||||||
"amount": 27
|
|
||||||
}
|
|
||||||
},
|
]
|
||||||
"components": {
|
|
||||||
"v": true,
|
|
||||||
"s": true
|
|
||||||
},
|
|
||||||
"duration": [
|
|
||||||
{
|
|
||||||
"type": "instant"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"desc": [
|
|
||||||
"Vous fixez du regard une cible à portée en tendant un doigt vers elle, et une bille jaunâtre jaillit dans sa direction"
|
|
||||||
],
|
|
||||||
"damageInflict": ["acid"],
|
|
||||||
"savingThrow": ["Constitution"],
|
|
||||||
"miscTags": ["", ""],
|
|
||||||
"areaTags": ["", ""]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
64
data/spells/spells-grimoire.json
Normal file
64
data/spells/spells-grimoire.json
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
{ "spell": [ {
|
||||||
|
"name": "Acid Splash",
|
||||||
|
"source": "PHB",
|
||||||
|
"page": 211,
|
||||||
|
"srd": true,
|
||||||
|
"basicRules": true,
|
||||||
|
"level": 0,
|
||||||
|
"school": "C",
|
||||||
|
"time": [
|
||||||
|
{
|
||||||
|
"number": 1,
|
||||||
|
"unit": "action"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"range": {
|
||||||
|
"type": "point",
|
||||||
|
"distance": {
|
||||||
|
"type": "feet",
|
||||||
|
"amount": 60
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"components": {
|
||||||
|
"v": true,
|
||||||
|
"s": true
|
||||||
|
},
|
||||||
|
"duration": [
|
||||||
|
{
|
||||||
|
"type": "instant"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"entries": [
|
||||||
|
"You hurl a bubble of acid. Choose one creature you can see within range, or choose two creatures you can see within range that are within 5 feet of each other. A target must succeed on a Dexterity saving throw or take {@damage 1d6} acid damage.",
|
||||||
|
"This spell's damage increases by {@dice 1d6} when you reach 5th level ({@damage 2d6}), 11th level ({@damage 3d6}), and 17th level ({@damage 4d6})."
|
||||||
|
],
|
||||||
|
"scalingLevelDice": {
|
||||||
|
"label": "acid damage",
|
||||||
|
"scaling": {
|
||||||
|
"1": "1d6",
|
||||||
|
"5": "2d6",
|
||||||
|
"11": "3d6",
|
||||||
|
"17": "4d6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"damageInflict": [
|
||||||
|
"acid"
|
||||||
|
],
|
||||||
|
"savingThrow": [
|
||||||
|
"dexterity"
|
||||||
|
],
|
||||||
|
"miscTags": [
|
||||||
|
"SCL",
|
||||||
|
"SGT"
|
||||||
|
],
|
||||||
|
"areaTags": [
|
||||||
|
"ST",
|
||||||
|
"MT"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
|
@ -24,11 +24,11 @@
|
||||||
<div><i class="fa-solid fa-wand-sparkles"></i></div>
|
<div><i class="fa-solid fa-wand-sparkles"></i></div>
|
||||||
<div data-localize="btn-spells">spells</div>
|
<div data-localize="btn-spells">spells</div>
|
||||||
</button>
|
</button>
|
||||||
<button onclick="window.location.href='monsters.html';" disabled>
|
<button onclick="window.location.href='monsters.html';">
|
||||||
<div><i class="fa-solid fa-dragon"></i></div>
|
<div><i class="fa-solid fa-dragon"></i></div>
|
||||||
<div data-localize="btn-monsters">monsters</div>
|
<div data-localize="btn-monsters">monsters</div>
|
||||||
</button>
|
</button>
|
||||||
<button onclick="window.location.href='items.html';" disabled>
|
<button onclick="window.location.href='items.html';">
|
||||||
<div><i class="fa-solid fa-hand-sparkles"></i></div>
|
<div><i class="fa-solid fa-hand-sparkles"></i></div>
|
||||||
<div data-localize="btn-items">items</div>
|
<div data-localize="btn-items">items</div>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
|
// In a browser where the language is set to French
|
||||||
$("[data-localize]").localize("main", { pathPrefix: "lang" });
|
$("[data-localize]").localize("main", { pathPrefix: "lang" });
|
||||||
|
|
||||||
// You can also override the language detection, and pass in a language code
|
// You can also override the language detection, and pass in a language code
|
||||||
|
|
29
js/spells.js
29
js/spells.js
|
@ -1,29 +0,0 @@
|
||||||
var normaliseLang;
|
|
||||||
normaliseLang = function (lang) {
|
|
||||||
lang = lang.replace(/_/, "-").toLowerCase();
|
|
||||||
if (lang.length > 3) {
|
|
||||||
lang = lang.substring(0, 3) + lang.substring(3).toUpperCase();
|
|
||||||
}
|
|
||||||
return lang;
|
|
||||||
};
|
|
||||||
|
|
||||||
$.defaultLanguage = normaliseLang(
|
|
||||||
navigator.languages && navigator.languages.length > 0
|
|
||||||
? navigator.languages[0]
|
|
||||||
: navigator.language || navigator.userLanguage
|
|
||||||
);
|
|
||||||
var lang = normaliseLang( $.defaultLanguage);
|
|
||||||
|
|
||||||
fetch('data/spells/spells-grimoire-fr.json')
|
|
||||||
.then((response) => response.json())
|
|
||||||
.then((json) => JSON.parse(json));
|
|
||||||
|
|
||||||
|
|
||||||
var string jsonsource = ''.concat("../data/spells/spells-grimoire-",navigator.languages[0].slice(0,2),".json");
|
|
||||||
|
|
||||||
import data from jsonsource assert { type: 'json' };
|
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
var yourHtml = JSON;
|
|
||||||
|
|
||||||
document.getElementById("spell-list").innerHTML = yourHtml;
|
|
|
@ -3,10 +3,10 @@
|
||||||
"desc": "Une gamme d'outils pour les joueurs et les meneurs de Dragons.",
|
"desc": "Une gamme d'outils pour les joueurs et les meneurs de Dragons.",
|
||||||
"terms": {
|
"terms": {
|
||||||
"Fateforge": "Dragons"
|
"Fateforge": "Dragons"
|
||||||
},
|
},
|
||||||
"btn-spells": "Sorts",
|
"btn-spells": "Sorts",
|
||||||
"btn-monsters": "Créatures",
|
"btn-monsters": "Créatures",
|
||||||
"btn-items": "Objets Magiques",
|
"btn-items": "Objets Magiques",
|
||||||
"CUVD": "Site non-officiel pour Dragons créé(e). Utilise des contenus protégés par la propriété intellectuelle © Agate RPG, avec l’aimable permission de l’éditeur dans le cadre de la licence CUVD.",
|
"CUVD": "Site non-officiel pour Dragons créé(e). Utilise des contenus protégés par la propriété intellectuelle © Agate RPG, avec l’aimable permission de l’éditeur dans le cadre de la licence CUVD.",
|
||||||
"link": "Rejoignez la communauté : <a href='www.dragons-rpg.com'>www.dragons-rpg.com</a>"
|
"link": "Rejoignez la communauté : <a href='www.dragons-rpg.com'>www.dragons-rpg.com</a>"
|
||||||
}
|
}
|
||||||
|
|
39
spells.html
39
spells.html
|
@ -1,5 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
@ -15,43 +14,15 @@
|
||||||
<button onclick="changeLangFR()">French</button>
|
<button onclick="changeLangFR()">French</button>
|
||||||
|
|
||||||
<h1>FateforgeTools</h1>
|
<h1>FateforgeTools</h1>
|
||||||
<h2 data-localize="btn-spells">Spells</h2>
|
<h2 data-localize="btn-spells">Spells</h2>
|
||||||
|
|
||||||
<div class="container" style="display: flex;">
|
|
||||||
|
|
||||||
<div class="view-col" id="list">
|
|
||||||
<div id="sublistcontainer" class="sublist sublist--resizable">
|
|
||||||
<div id="sublistsort" class="btn-group">
|
|
||||||
<button class="btn-xs" data-sort="name" data-localize="spell-name">Name</button>
|
|
||||||
<button class="btn-xs" data-sort="level" data-localize="spell-level">Level</button>
|
|
||||||
<button class="btn-xs" data-sort="time" data-localize="spell-time">Time</button>
|
|
||||||
<button class="btn-xs" data-sort="school" data-localize="spell-school">School</button>
|
|
||||||
<button class="btn-xs" data-sort="concentration" title="Concentration" data-localize="spell-concentration">C.</button>
|
|
||||||
<button class="btn-xs" data-sort="range">Range</button>
|
|
||||||
</div>
|
|
||||||
<div id="spell-list" class="list subspells">
|
|
||||||
<!-- populate with JS -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="view-col" id="content">
|
|
||||||
<table id="pagecontent" class="w-100 stats">
|
|
||||||
<tr><th class="border" colspan="6"></th></tr>
|
|
||||||
<tr><td colspan="6" class="initial-message">Select a spell from the list to view it here</td></tr>
|
|
||||||
<tr><th class="border" colspan="6"></th></tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" src="lib/jquery.min.js"></script>
|
<script type="text/javascript" src="lib/jquery.min.js"></script>
|
||||||
<script type="text/javascript" src="lib/jquery.localize-dev.js"></script>
|
<script type="text/javascript" src="lib/jquery.localize.js"></script>
|
||||||
<script type="text/javascript" src="js/language.js"></script>
|
<script type="text/javascript" src="js/language.js"></script>
|
||||||
<script type="module" src="js/spells.js"></script>
|
|
||||||
|
|
||||||
<script src="https://kit.fontawesome.com/126cdd0e29.js" crossorigin="anonymous"></script>
|
<script src="https://kit.fontawesome.com/126cdd0e29.js" crossorigin="anonymous"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
Loading…
Reference in a new issue