Fix #73 : Power damage type

This commit is contained in:
sladecraven 2022-09-28 20:21:04 +02:00
parent 18a69ba993
commit 9394e0e851
4 changed files with 19 additions and 10 deletions

View File

@ -1758,7 +1758,7 @@ export class PegasusActor extends Actor {
processSizeBonus( rollData) {
if ( rollData.defenderTokenId) {
let diffSize = rollData.defenderSize - this.system.biodata.sizenum+this.system.biodata.sizebonus
console.log("Diffsize", diffSize)
//console.log("Diffsize", diffSize)
if( rollData.subKey == "melee-atk" || rollData.subKey == "ranged-atk") {
if ( diffSize > 0) {
rollData.effectsList.push({ label: "Size Bonus", type: "effect", applied: false, isdynamic: true, value: diffSize })
@ -1774,7 +1774,7 @@ export class PegasusActor extends Actor {
rollData.effectsList.push({ label: "Size Bonus", type: "effect", applied: false, isdynamic: true, value: Math.abs(diffSize) })
}
}
if( rollData.subKey == "melee-dmg" || rollData.subKey == "ranged-dmg") {
if( rollData.subKey == "melee-dmg" || rollData.subKey == "ranged-dmg" || rollData.subKey == "power-dmg") {
if ( diffSize < 0) {
rollData.effectsList.push({ label: "Size Bonus", type: "effect", applied: false, isdynamic: true, value: Math.abs(diffSize) })
}

View File

@ -566,6 +566,7 @@
"activatedtext": "",
"deactivatedtext": "",
"powerlevelcost": "",
"powerdamagetype": "",
"dmgroll": false,
"dmgstatistic": "",
"description": ""

View File

@ -45,6 +45,10 @@
{{/if}}
{{/if}}
{{#if power}}
<li>Power Damage type : {{power.system.powerdamagetype}}</li>
{{/if}}
{{#if isResistance}}
<li><strong>Defense Result : {{finalScore}}</strong>
{{else}}

View File

@ -104,14 +104,18 @@
data.dmgroll}} /></label>
</li>
{{#if data.dmgroll}}
<li class="flexrow"><label class="generic-label">Related DMG Statistic </label>
<select class="competence-base flexrow" type="text" name="system.dmgstatistic" value="{{data.dmgstatistic}}"
data-dtype="String">
{{#select data.dmgstatistic}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Related DMG Statistic </label>
<select class="competence-base flexrow" type="text" name="system.dmgstatistic" value="{{data.dmgstatistic}}"
data-dtype="String">
{{#select data.dmgstatistic}}
{{> systems/fvtt-pegasus-rpg/templates/partial-options-statistics.html}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Power Damage Type</label>
<input type="text" class="padd-right" name="system.powerdamagetype" value="{{data.powerdamagetype}}"
data-dtype="String" />
</li>
{{/if}}
<li class="flexrow"><label class="generic-label">When purchased display text</label>