symposion / roll20-shaped-scripts

Support script for 5e Shaped Character Sheet on Roll20.net
http://roll20.net/
7 stars 5 forks source link

Cost of legendary action of a monster is not an integer #468

Closed mlenser closed 7 years ago

mlenser commented 7 years ago

Illithilich from Volos: { "name": "Cast Spell", "text": "The illithilich uses a spell slot to cast a 1st-, 2nd-, or 3rd-level spell that it has prepared. Doing so costs 1 legendary action per level of the spell.", "cost": "1-3" }

That and "Recharges after the Illusionist Casts an Illusion Spell of 1st Level or Higher" style formats will not be currently captured on the sheet.

Resulting error: JSON import error for VolosGuideToMonsters entity group: Illithilich: legendaryActions[Cast Spell].cost: Value "1-3" should have been a number

symposion commented 7 years ago

Urgh, this is really creaking at the seams now. I can relax the validation but obviously it will break the uses stuff. I wonder what the right answer is for the future here?

My original concept (a long time ago) for the sheet - script interaction was basically that for things like this, the script could have an extension framework of pluggable handlers. You could register an illithlichSpellCastLegendaryHandler that would watch for this legendary action, and then prompt you with a list of illusion spells of 1-3rd level in the chat window. That would make clicking on an item like this (or other things like dragon breath weapons) less pointless - and it could also then handle decrementing the uses appropriately based on the level of the spell selected.

If you think like this stuff might be a vaguely decent idea I'll write up some of it into an enhancement issue and maybe one day someone may implement it!