Manage weapons

This commit is contained in:
LeRatierBretonnien 2023-01-23 20:51:06 +01:00
parent 8e00d3e599
commit 108cda292e
5 changed files with 66 additions and 45 deletions

View File

@ -242,8 +242,8 @@ export class Avd12Actor extends Actor {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
prepareWeapon(weapon) { prepareWeapon(weapon) {
console.log(weapon) //console.log(weapon)
weapon.attackBonus = this.system.bonus.weapon.attack + this.system.bonus[weapon.system.weapontype].attack weapon.attackBonus = this.system.bonus.weapon.attack + weapon.system.attackbonus + this.system.bonus[weapon.system.weapontype].attack
let bonusDamage = this.system.bonus.weapon.damage + this.system.bonus[weapon.system.weapontype].damage let bonusDamage = this.system.bonus.weapon.damage + this.system.bonus[weapon.system.weapontype].damage
this.addDamages(weapon.system.damages.primary, bonusDamage) this.addDamages(weapon.system.damages.primary, bonusDamage)
bonusDamage = this.system.bonus.weapon.damage + this.system.bonus[weapon.system.weapontype].crits bonusDamage = this.system.bonus.weapon.damage + this.system.bonus[weapon.system.weapontype].crits

View File

@ -64,7 +64,7 @@
], ],
"title": "AnyVenture D12 RPG", "title": "AnyVenture D12 RPG",
"url": "https://www.uberwald.me/gitea/public/fvtt-avd12", "url": "https://www.uberwald.me/gitea/public/fvtt-avd12",
"version": "10.0.21", "version": "10.0.22",
"download": "https://www.uberwald.me/gitea/public/fvtt-avd12/archive/fvtt-avd12-v10.0.21.zip", "download": "https://www.uberwald.me/gitea/public/fvtt-avd12/archive/fvtt-avd12-v10.0.22.zip",
"background": "systems/fvtt-avd12/images/ui/avd12_welcome_page.webp" "background": "systems/fvtt-avd12/images/ui/avd12_welcome_page.webp"
} }

View File

@ -492,6 +492,7 @@
"templates": [ "templates": [
"commonitem" "commonitem"
], ],
"attackbonus": 0,
"minrange": 0, "minrange": 0,
"maxrange": 0, "maxrange": 0,
"throwrange": 0, "throwrange": 0,

View File

@ -54,7 +54,7 @@
</select> </select>
</div> </div>
{{#if spell}} {{#if (or spell weapon)}}
{{else}} {{else}}
<div class="flexrow"> <div class="flexrow">

View File

@ -1,43 +1,3 @@
<li class='flexrow'>
<label class='item-field-label-long'>
Focus Points Bonus
</label>
<input
type='text'
class='item-field-label-short'
name='system.focuspointsbonus'
value="{{system.focuspointsbonus}}"
data-dtype='Number'
/>
<label class='item-field-label-short'>
&nbsp;
</label>
<label class='item-field-label-long'>
Focus Regen Bonus
</label>
<input
type='text'
class='item-field-label-short'
name='system.focusregenbonus'
value="{{system.focusregenbonus}}"
data-dtype='Number'
/>
</li>
<li class='flexrow'>
<label class='item-field-label-long'>
Burn Chance Bonus
</label>
<input
type='text'
class='item-field-label-short'
name='system.burnchancebonus'
value="{{system.burnchancebonus}}"
data-dtype='Number'
/>
</li>
<li class='flexrow'> <li class='flexrow'>
<h3 class='item-field-label-long'> <h3 class='item-field-label-long'>
@ -91,6 +51,26 @@
{{/each}} {{/each}}
</li> </li>
{{#if (eq type "weapon")}}
<li class='flexrow'>
<div>
<label class='item-field-label-short'>
Attack Bonus
</label>
<input
type='text'
class='item-field-label-short padd-right'
name="system.attackbonus"
value="{{system.attackbonus}}"
data-dtype='Number'
/>
<label>
&nbsp;
</label>
</div>
</li>
{{/if}}
<li class='flexrow'> <li class='flexrow'>
<h3 class='item-field-label-long'> <h3 class='item-field-label-long'>
Focus Focus
@ -126,6 +106,46 @@
<span>Spell Damage Bonus : {{focusData.spellDamageBonus}} </span> <span>Spell Damage Bonus : {{focusData.spellDamageBonus}} </span>
</li> </li>
{{/if}} {{/if}}
<li class='flexrow'>
<label class='item-field-label-long'>
Focus Points Bonus
</label>
<input
type='text'
class='item-field-label-short'
name='system.focuspointsbonus'
value="{{system.focuspointsbonus}}"
data-dtype='Number'
/>
<label class='item-field-label-short'>
&nbsp;
</label>
<label class='item-field-label-long'>
Focus Regen Bonus
</label>
<input
type='text'
class='item-field-label-short'
name='system.focusregenbonus'
value="{{system.focusregenbonus}}"
data-dtype='Number'
/>
</li>
<li class='flexrow'>
<label class='item-field-label-long'>
Burn Chance Bonus
</label>
<input
type='text'
class='item-field-label-short'
name='system.burnchancebonus'
value="{{system.burnchancebonus}}"
data-dtype='Number'
/>
</li>
<li class='flexrow'> <li class='flexrow'>
<h3 class='item-field-label-long'> <h3 class='item-field-label-long'>