5 Commits

Author SHA1 Message Date
56ff013178 Armor categories 2022-11-21 08:35:20 +01:00
8785a38a10 Armor categories 2022-11-21 08:34:49 +01:00
0b3a82f4b7 Update spells structure + minor changes 2022-11-17 13:18:32 +01:00
2b00991e16 Rework skills and modules 2022-11-15 21:39:08 +01:00
e796fac928 Rework skills and modules 2022-11-15 21:17:26 +01:00
18 changed files with 126 additions and 19 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

BIN
images/icons/skill1.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

BIN
images/icons/spell1.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -36,8 +36,6 @@ export class Avd12Actor extends Actor {
}
if (data.type == 'character') {
const skills = await Avd12Utility.loadCompendium("fvtt-avd12.skills")
data.items = skills.map(i => i.toObject())
}
if (data.type == 'npc') {
}

View File

@ -16,7 +16,7 @@ export class Avd12ItemSheet extends ItemSheet {
template: "systems/fvtt-avd12/templates/item-sheet.hbs",
dragDrop: [{ dragSelector: null, dropSelector: null }],
width: 620,
height: 550,
height: 'fit-content',
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }]
});
}
@ -119,9 +119,10 @@ export class Avd12ItemSheet extends ItemSheet {
/* -------------------------------------------- */
async _onDrop(event) {
const levelIndex = Number($(event.toElement).data("level-index"))
const choiceIndex = Number($(event.toElement).data("choice-index"))
let li = $(event.toElement).parents(".item")
const levelIndex = Number(li.data("level-index"))
const choiceIndex = Number(li.data("choice-index"))
let data = event.dataTransfer.getData('text/plain')
let dataItem = JSON.parse(data)
let item = fromUuidSync(dataItem.uuid)
@ -203,7 +204,11 @@ export class Avd12ItemSheet extends ItemSheet {
html.find('.add-module-level').click(ev => {
let levels = duplicate(this.object.system.levels)
levels.push({ choices: [ {selected: false, features: {} }, {selected: false, features: {} } ] })
if ( (levels.length+1) % 2 == 0) {
levels.push({ choices: [ {selected: false, features: {} }, {selected: false, features: {} } ] })
}else {
levels.push({ choices: [ {selected: false, features: {} } ] })
}
this.object.update({ 'system.levels': levels })
})

View File

@ -5,7 +5,7 @@ export class Avd12RollDialog extends Dialog {
/* -------------------------------------------- */
static async create(actor, rollData) {
let options = { classes: ["Avd12Dialog"], width: 540, height: 340, 'z-index': 99999 };
let options = { classes: ["Avd12Dialog"], width: 540, height: 'fit-content', 'z-index': 99999 };
let html = await renderTemplate('systems/fvtt-avd12/templates/dialogs/roll-dialog-generic.html', rollData);
return new CrucibleRollDialog(actor, rollData, html, options);

View File

@ -152,12 +152,15 @@ export class Avd12Utility {
'systems/fvtt-avd12/templates/items/partial-item-nav.hbs',
'systems/fvtt-avd12/templates/items/partial-item-description.hbs',
'systems/fvtt-avd12/templates/items/partial-common-item-fields.hbs',
'systems/fvtt-avd12/templates/items/partial-options-damage-types.hbs',
'systems/fvtt-avd12/templates/items/partial-options-weapon-types.hbs',
'systems/fvtt-avd12/templates/items/partial-options-weapon-categories.hbs',
'systems/fvtt-avd12/templates/items/partial-options-attributes.hbs',
'systems/fvtt-avd12/templates/items/partial-options-equipment-types.hbs',
'systems/fvtt-avd12/templates/items/partial-options-armor-types.hbs',
'systems/fvtt-avd12/templates/items/partial-options-spell-types.hbs',
'systems/fvtt-avd12/templates/items/partial-options-spell-levels.hbs',
'systems/fvtt-avd12/templates/items/partial-options-spell-schools.hbs',
'systems/fvtt-avd12/templates/items/partial-options-focus-bond.hbs',
'systems/fvtt-avd12/templates/items/partial-options-focus-treatment.hbs',
'systems/fvtt-avd12/templates/items/partial-options-focus-core.hbs',

View File

@ -35,7 +35,7 @@
],
"title": "AnyVenture D12 RPG",
"url": "https://www.uberwald.me/gitea/public/fvtt-avd12",
"version": "10.0.4",
"download": "https://www.uberwald.me/gitea/public/fvtt-avd12/archive/fvtt-avd12-v10.0.4.zip",
"version": "10.0.9",
"download": "https://www.uberwald.me/gitea/public/fvtt-avd12/archive/fvtt-avd12-v10.0.9.zip",
"background": "systems/fvtt-avd12/images/ui/avd12_welcome_page.webp"
}

View File

@ -404,6 +404,15 @@
},
"spell": {
"spelltype": "",
"actions": "",
"chargeeffect": "",
"school": "",
"damage": "",
"damagetype": "",
"range": 0,
"components": "",
"reaction": false,
"sustained": false,
"level":"",
"value": 0,
"description": ""
@ -413,6 +422,7 @@
"commonitem"
],
"equipped": false,
"category": "",
"description": ""
},
"shield": {

View File

@ -21,6 +21,15 @@
{{> systems/fvtt-avd12/templates/items/partial-common-item-fields.hbs}}
<li class="flexrow">
<label class="item-field-label-long">Armor type</label>
<select class="item-field-label-long" type="text" name="system.category" value="{{system.category}}" data-dtype="String">
{{#select system.category}}
{{> systems/fvtt-avd12/templates/items/partial-options-armor-types.hbs}}
{{/select}}
</select>
</li>
<li class="flexrow">
<label class="item-field-label-long">Equipped</label>
<input type="checkbox" class="item-field-label-short" name="system.equipped" {{checked system.equipped}} />

View File

@ -32,19 +32,19 @@
<ul class="ul-level1">
{{#each level.choices as |choice choiceIndex|}}
<li class="">
<h3 class="item-field-label-long">Level choice {{add choiceIndex 1}}</h3></li>
<li class="item flexrow" data-level-index="{{../index}}" data-choice-index="{{choiceIndex}}">
<div class="drop-module-step" data-choice-index="{{choiceIndex}}" data-level-index="{{../index}}">
<label data-choice-index="{{choiceIndex}}" data-level-index="{{../index}}">Drop traits/actions/... here !</label>
<h3 class="item-field-label-long">Level choice {{add choiceIndex 1}}</h3>
</li>
<li class="item flexrow" data-level-index="{{@../index}}" data-choice-index="{{choiceIndex}}">
<div class="drop-module-step">
<label>Drop traits/actions/... here !</label>
</div>
<span class="item-field-label-short">&nbsp;</span>
<label class="item-field-label-short">Selected</label>
<input type="checkbox" class="item-field-label-short choice-level-selected" {{checked choice.selected}} />
</li>
{{#each choice.features as |feature id|}}
<li class="flexrow item" data-level-index="{{../index}}" data-choice-index="{{choiceIndex}}" data-feature-id="{{feature._id}}" >
<label class="item-field-label-medium">{{feature.name}}</label>
<label class="item-field-label-long2">{{{feature.descriptionHTML}}}</label>
<li class="flexrow item" data-level-index="{{@../../index}}" data-choice-index="{{choiceIndex}}" data-feature-id="{{feature._id}}" >
<label class="item-field-label-long2">{{feature.name}}</label>
<div class="item-controls item-controls-fixed">
<a class="item-control module-feature-delete" title="Delete Feature"><i class="fas fa-trash"></i></a>
</div>

View File

@ -25,7 +25,6 @@
{{> systems/fvtt-avd12/templates/items/partial-options-spell-types.hbs}}
{{/select}}
</select>
</li>
<li class="flexrow">
@ -37,6 +36,59 @@
</select>
</li>
<li class="flexrow">
<label class="item-field-label-long">Actions</label>
<input type="text" class="item-field-label-long2" name="system.actions" value="{{system.actions}}" data-dtype="String"/>
</li>
<li class="flexrow">
<label class="item-field-label-long">Charge Effect</label>
<input type="text" class="item-field-label-long2" name="system.chargeeffect" value="{{system.chargeeffect}}" data-dtype="String"/>
</li>
<li class="flexrow">
<label class="item-field-label-long">School</label>
<select class="item-field-label-long" type="text" name="system.school" value="{{system.school}}" data-dtype="String">
{{#select system.school}}
{{> systems/fvtt-avd12/templates/items/partial-options-spell-schools.hbs}}
{{/select}}
</select>
</li>
<li class="flexrow">
<label class="item-field-label-long">Damage</label>
<input type="text" class="item-field-label-short" name="system.damage" value="{{system.damage}}" data-dtype="String"/>
</li>
<li class="flexrow">
<label class="item-field-label-long">Damage Type</label>
<select class="item-field-label-long" type="text" name="system.damagetype" value="{{system.damagetype}}" data-dtype="String">
{{#select system.damagetype}}
{{> systems/fvtt-avd12/templates/items/partial-options-damage-types.hbs}}
{{/select}}
</select>
</li>
<li class="flexrow">
<label class="item-field-label-long">Range</label>
<input type="text" class="item-field-label-short" name="system.range" value="{{system.range}}" data-dtype="Number"/>
</li>
<li class="flexrow">
<label class="item-field-label-long">Components</label>
<input type="text" class="item-field-label-long2" name="system.components" value="{{system.components}}" data-dtype="String"/>
</li>
<li class="flexrow">
<label class="item-field-label-long">Reaction?</label>
<input type="checkbox" class="item-field-label-short" name="system.reaction" {{checked system.reaction}} />
</li>
<li class="flexrow">
<label class="item-field-label-long">Sustained?</label>
<input type="checkbox" class="item-field-label-short" name="system.sustained" {{checked system.sustained}} />
</li>
</ul>
</div>
</div>

View File

@ -90,7 +90,11 @@
<label class="item-field-label-long">{{upperFirst key}}</label>
<div class="flexrow">
<label class="item-field-label-short">Type</label>
<input type="text" class="item-field-label-short" name="system.damages.{{key}}.damagetype" value="{{damage.damagetype}}" data-dtype="Number"/>
<select class="item-field-label-long" type="text" name="system.damages.{{key}}.damagetype" value="{{system.damagetype}}" data-dtype="String">
{{#select system.damagetype}}
{{> systems/fvtt-avd12/templates/items/partial-options-damage-types.hbs}}
{{/select}}
</select>
</div>
<div class="flexrow">
<label class="item-field-label-short">Dice</label>

View File

@ -0,0 +1,5 @@
<option value="unarmed">Unarmed</option>
<option value="light">Light Armor</option>
<option value="medium">Medium Armor</option>
<option value="heavy">Heavy Armor</option>
<option value="ultraheavy">Ultra-Heavy Armor</option>

View File

@ -0,0 +1,8 @@
<option value="physical">Physical</option>
<option value="psychic">Psychic</option>
<option value="fire">Fire</option>
<option value="lightning">Lightning</option>
<option value="cold">Cold</option>
<option value="dark">Dark</option>
<option value="divine">Divine</option>
<option value="arcane">Arcane</option>

View File

@ -0,0 +1,12 @@
<option value="abjuration">Abjuration</option>
<option value="evocation">Evocation</option>
<option value="tansmutation">Transmutation</option>
<option value="divine">Divine</option>
<option value="druidic">Druidic</option>
<option value="necromancy">Necromancy</option>
<option value="auguration">Auguration</option>
<option value="illusion">Illusion</option>
<option value="draconic">Draconic</option>
<option value="cosmic">Cosmic</option>
<option value="fiend">Fiend</option>
<option value="fey">Fey</option>

View File

@ -5,3 +5,4 @@
<option value="sonic">Sonic</option>
<option value="vision">Vision</option>
<option value="touchmelee">Touch/Melee Attack</option>
<option value="utility">Utility</option>