Skip to content

Commit

Permalink
[foundryvtt#1401, 1626] Add ability to limit dropped spells to a cert…
Browse files Browse the repository at this point in the history
…ain level
  • Loading branch information
arbron committed Aug 22, 2022
1 parent 4af68e8 commit 74dec8d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@
"DND5E.AdvancementItemChoiceHint": "Present the player with a choice of items (such as equipment, features, or spells) that they can choose for their character at one or more levels.",
"DND5E.AdvancementItemChoiceChosen": "Chosen: {current} of {max}",
"DND5E.AdvancementItemChoiceLevelsHint": "Specify how many choices are allowed at each level.",
"DND5E.AdvancementItemChoiceSpellLevelAvailable": "Any Available Level",
"DND5E.AdvancementItemChoiceSpellLevelAvailableWarning": "Only {level} or lower spells can be chosen for this advancement.",
"DND5E.AdvancementItemChoiceSpellLevelSpecificWarning": "Only {level} spells can be chosen for this advancement.",
"DND5E.AdvancementItemChoiceSpellLevelHint": "Only allow choices from spells of this level.",
"DND5E.AdvancementItemChoiceType": "Item Type",
"DND5E.AdvancementItemChoiceTypeHint": "Restrict what Item types can be choosen.",
"DND5E.AdvancementItemChoiceTypeAny": "Anything",
Expand Down
16 changes: 16 additions & 0 deletions templates/advancement/item-choice-config.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@
</div>

{{#if showSpellConfig}}
<div class="form-group">
<label>{{localize "DND5E.SpellLevel"}}</label>
<div class="form-fields">
<select name="data.configuration.spell.level">
{{#select data.configuration.spell.level}}
<option value="">&mdash;</option>
{{#each CONFIG.spellLevels as |label key|}}
<option value="{{key}}">{{label}}</option>
{{/each}}
<option value="available">{{localize "DND5E.AdvancementItemChoiceSpellLevelAvailable"}}</option>
{{/select}}
</select>
</div>
<p class="hint">{{localize "DND5E.AdvancementItemChoiceSpellLevelHint"}}</p>
</div>

{{> "systems/dnd5e/templates/advancement/parts/item-spell-config.html"}}
{{/if}}

Expand Down

0 comments on commit 74dec8d

Please sign in to comment.