Skip to content

Commit

Permalink
[foundryvtt#1401, foundryvtt#1626] Add ability to limit dropped spell…
Browse files Browse the repository at this point in the history
…s to a certain level
  • Loading branch information
arbron committed Dec 29, 2022
1 parent 4455f57 commit 0c22502
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 @@ -136,6 +136,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.hbs
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>

{{> "dnd5e.advancement-spell-config"}}
{{/if}}

Expand Down

0 comments on commit 0c22502

Please sign in to comment.