Skip to content

Commit

Permalink
Merge pull request #475 from symposion/roll20-shaped-scripts-468
Browse files Browse the repository at this point in the history
Roll20 shaped scripts 468
  • Loading branch information
symposion authored Apr 13, 2017
2 parents 9ed44ed + 60e451c commit d5cc172
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 40 deletions.
15 changes: 14 additions & 1 deletion data/5eSRDData.js

Large diffs are not rendered by default.

29 changes: 0 additions & 29 deletions lib/modules/config-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class ConfigUi extends ShapedModule {
reflexMenu: new CustomSaveTypeMenu(this.myState.config, ShapedConfig.configOptionsSpec, 'reflex'),
willMenu: new CustomSaveTypeMenu(this.myState.config, ShapedConfig.configOptionsSpec, 'will'),
textMenu: new NewCharacterTextSizeMenu(this.myState.config, ShapedConfig.configOptionsSpec),
varsMenu: new VariantsMenu(this.myState.config, ShapedConfig.configOptionsSpec),
seMenu: new SheetEnhancementsMenu(this.myState.config, ShapedConfig.configOptionsSpec),
displayMenu: new DisplayMenu(this.myState.config, ShapedConfig.configOptionsSpec),
msMenu: new MeasurementSystemsMenu(this.myState.config, ShapedConfig.configOptionsSpec),
Expand Down Expand Up @@ -299,9 +298,6 @@ class MainMenu extends ConfigMenu {
}) +
this.makeOptionRow({
title: 'Char. Sheet Enhancements', path: 'seMenu', command: '', linkText: 'view -->',
}) +
this.makeOptionRow({
title: 'Houserules & Variants', path: 'varsMenu', command: '', linkText: 'view -->',
});

return {
Expand Down Expand Up @@ -886,31 +882,6 @@ class NewCharacterTextSizeMenu extends ConfigMenu {
}
}


class VariantsMenu extends ConfigMenu {
getMenuParts() {
const root = 'variants';
const menu = 'varsMenu';
const spec = this.specRoot.variants;

const optionRows =
this.makeQuerySetting({
path: `${root}.rests.longRestHPRecovery`, title: 'Long Rest HP Recovery', menuCmd: menu,
spec: spec.rests.longRestHPRecovery(),
}) +
this.makeQuerySetting({
path: `${root}.rests.longRestHDRecovery`, title: 'Long Rest HD Recovery', menuCmd: menu,
spec: spec.rests.longRestHDRecovery(),
});

return {
title: 'Houserules & Variants',
footerText: this.backToMainMenuButton(),
optionRows,
};
}
}

class SheetEnhancementsMenu extends ConfigMenu {
getMenuParts() {
const root = 'sheetEnhancements';
Expand Down
4 changes: 2 additions & 2 deletions resources/mmFormatSpec.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,9 @@
},
{
"name": "cost",
"type": "number",
"type": "string",
"bare": true,
"pattern": "^\\s*\\(\\s*(?:costs )?(\\d+) actions\\s*\\)",
"pattern": "^\\s*\\(\\s*(?:costs )?([\\d-]+) actions\\s*\\)",
"matchGroup": 1,
"minOccurs": 0
},
Expand Down
2 changes: 1 addition & 1 deletion test/data/ancientGoldDragon.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
},
{
"name": "Wing Attack",
"cost": 2,
"cost": "2",
"text": "The dragon beats its wings. Each creature within 15 feet of the dragon must succeed on a DC 25 Dexterity saving throw or take 17 (2d6 + 10) bludgeoning damage and be knocked prone. The dragon can then fly up to halfits flying speed."
}
]
Expand Down
2 changes: 1 addition & 1 deletion test/data/ancientWhiteDragon.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
},
{
"name": "Wing Attack",
"cost": 2,
"cost": "2",
"text": "The dragon beats its wings. Each creature within 15 feet of the dragon must succeed on a DC 22 Dexterity saving throw or take 15 (2d6 + 8) bludgeoning damage and be knocked prone. The dragon can then fly up to half its flying speed."
}
],
Expand Down
6 changes: 3 additions & 3 deletions test/data/lich.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@
},
{
"name": "Paralyzing Touch",
"cost": 2,
"cost": "2",
"text": "The lich uses its\nParalyzing Touch."
},
{
"name": "Frightening Gaze",
"cost": 2,
"cost": "2",
"text": "The lich fixes its gaze on one creature it can see within 10 feet of it. The target must succeed on a DC 18 Wisdom saving throw against this magic or become frightened for 1 minute. The frightened target can repeat the saving throw at the end of each ofits turns, ending the effect on itselfon a success. Ifa target's saving throw is successfulorthe effect ends for it, the target is immune to the lich's gaze for the next 24 hours."
},
{
"name": "Disrupt Life",
"cost": 3,
"cost": "3",
"text": "Each living creature within 20 feet of the lich must make a DC 18 Constitution saving throw against this magic, taking 21 (6d6) necrotic damage on a failed save, or half as much damage on a successful one."
}
]
Expand Down
2 changes: 1 addition & 1 deletion test/test-entity-lookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ describe('entity-lookup', function () {
el.configureEntity('classes', [SpellManager.getSpellDenormaliser(), spellListGrouper.entityProcessor],
EntityLookup.getVersionChecker('2.0.0', 'classes'));

let jsonFiles = glob.sync('../5eshapedscriptdata/sources/*.json');
let jsonFiles = glob.sync('../5eshapedscriptdata/sources/{public,private}/*.json');
expect(jsonFiles).to.not.be.empty;
const phb = jsonFiles.find(file => file.indexOf('PlayersHandbook') !== -1);
const srd = jsonFiles.find(file => file.indexOf('SRD') !== -1);
Expand Down
2 changes: 1 addition & 1 deletion test/test-json-validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('json-validator', function () {
});


const monsterFiles = glob.sync('../5eshapedscriptdata/sources/*.json')
const monsterFiles = glob.sync('../5eshapedscriptdata/sources/{public,private}/*.json')
.filter(file => file.indexOf('MonsterManual') === -1);
expect(monsterFiles).to.not.be.empty;
monsterFiles.forEach(function (jsonFile) {
Expand Down
2 changes: 1 addition & 1 deletion test/test-srd-converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe('srd-converter', function () {
return;
}

const monsterFiles = glob.sync('../5eshapedscriptdata/sources/*.json');
const monsterFiles = glob.sync('../5eshapedscriptdata/sources/{public,private}/*.json');
monsterFiles.should.not.be.empty;
monsterFiles.forEach(function (jsonFile) {
describe(`JSON file: ${jsonFile}`, function () {
Expand Down

0 comments on commit d5cc172

Please sign in to comment.