Skip to content

Commit

Permalink
feat(ritual item): was been added the execution field for rituals
Browse files Browse the repository at this point in the history
  • Loading branch information
SouOWendel committed Jan 3, 2024
1 parent afa63fd commit 233bcdb
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
17 changes: 11 additions & 6 deletions module/helpers/config.mjs
Expand Up @@ -229,10 +229,15 @@ ordemparanormal.dropdownPowerType = {
* The set of Ability Scores used within the system.
* @type {Object}
*/
ordemparanormal.categories = {
'0': '0',
'1': 'I',
'2': 'II',
'3': 'III',
'4': 'IV'
ordemparanormal.categories = { '0': '0', '1': 'I', '2': 'II', '3': 'III', '4': 'IV' };

/**
* The set of Ability Scores used within the system.
* @type {Object}
*/
ordemparanormal.dropdownExecution = {
'free': 'ordemparanormal.executionChoices.free',
'default': 'ordemparanormal.executionChoices.default',
'complete': 'ordemparanormal.executionChoices.complete',
'reaction': 'ordemparanormal.executionChoices.reaction'
};
9 changes: 7 additions & 2 deletions module/sheets/item-sheet.mjs
Expand Up @@ -41,18 +41,23 @@ export class OrdemItemSheet extends ItemSheet {
// Use a safe clone of the item data for further operations.
const itemData = context.item.data;

// Dropdowns
// Armament's Dropdowns
context.optionWeaponType = CONFIG.ordemparanormal.dropdownWeaponType;
context.optionWeaponSubType = CONFIG.ordemparanormal.dropdownWeaponSubType;
context.optionGripType = CONFIG.ordemparanormal.dropdownWeaponGripType;
context.optionWeaponAmmunition = CONFIG.ordemparanormal.dropdownWeaponAmmunition;
context.optionProficiency = CONFIG.ordemparanormal.dropdownProficiency;
context.optionDamageType = CONFIG.ordemparanormal.dropdownDamageType;
context.optionPowerType = CONFIG.ordemparanormal.dropdownPowerType;

// Attack and Damage Dropdown
context.attributes = CONFIG.ordemparanormal.attributes;
context.attackSkills = CONFIG.ordemparanormal.attackSkills;

// Radiobox
// Ritual's Dropdowns
context.optionExecution = CONFIG.ordemparanormal.dropdownExecution;

// Item's Radiobox
context.categories = CONFIG.ordemparanormal.categories;

// Retrieve the roll data for TinyMCE editors.
Expand Down
1 change: 1 addition & 0 deletions template.json
Expand Up @@ -376,6 +376,7 @@
"ritual": {
"description": "Your text here.",
"circle": 1,
"execution": "",
"range": "",
"areaEffect": "",
"duration": "",
Expand Down
4 changes: 4 additions & 0 deletions templates/item/item-ritual-sheet.html
Expand Up @@ -26,6 +26,10 @@ <h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeh
<div class="resource grid align-items-center">
<label class="resource-label">{{localize "ordemparanormal.circle"}}</label>
<input type="number" name="data.circle" value="{{data.circle}}" data-dtype="Number"/>
<label class="resource-label">{{localize "ordemparanormal.execution"}}</label>
<select name="data.execution" data-dtype="String">
{{ selectOptions optionExecution selected=data.execution localize=true blank="—" }}
</select>
<label class="resource-label">{{localize "ordemparanormal.range"}}</label>
<input type="text" name="data.range" value="{{data.range}}" data-dtype="String"/>
<label class="resource-label">{{localize "ordemparanormal.areaEffect"}}</label>
Expand Down

0 comments on commit 233bcdb

Please sign in to comment.