Compare commits

...

2 Commits

Author SHA1 Message Date
502887a820 Fix #169 Add new ability stuff 2022-11-29 21:38:43 +01:00
b5755db5ca Fix #169 Add new ability stuff 2022-11-29 21:21:03 +01:00
6 changed files with 28 additions and 12 deletions

View File

@ -354,13 +354,13 @@ export class PegasusActorSheet extends ActorSheet {
/* -------------------------------------------- */
/** @override */
setPosition(options = {}) {
/*setPosition(options = {}) {
const position = super.setPosition(options);
const sheetBody = this.element.find(".sheet-body");
const bodyHeight = position.height - 192;
sheetBody.css("height", bodyHeight);
return position;
}
}*/
/* -------------------------------------------- */
async _onDropItem(event, dragData) {

View File

@ -146,6 +146,9 @@ export class PegasusActor extends Actor {
modifier -= effect.system.effectlevel
}
}
if (effect.type == "ability" && effect.system.statusaffected && effect.system.statusaffected == "mt") {
modifier += effect.system.statusmodifier
}
}
return PegasusUtility.getDiceValue(this.system.statistics.mnd.value) + this.system.statistics.mnd.mod + PegasusUtility.getDiceValue(this.system.statistics.mnd.bonuseffect) + modifier
}
@ -162,6 +165,9 @@ export class PegasusActor extends Actor {
modifier -= effect.system.effectlevel
}
}
if (effect.type == "ability" && effect.system.statusaffected && effect.system.statusaffected == "kbv") {
modifier += effect.system.statusmodifier
}
}
return this.system.statistics.phy.value + this.system.statistics.phy.mod + this.system.statistics.phy.bonuseffect + modifier
}
@ -1595,7 +1601,6 @@ export class PegasusActor extends Actor {
}
}
console.log("Ablities", this.name, abilities)
let nrg = duplicate(this.system.nrg)
let bonus = 0
for (let effect of effects) {
@ -1726,6 +1731,16 @@ export class PegasusActor extends Actor {
delirium.bonus += Number(ability.system.statusmodifier)
updates[`system.secondary.delirium`] = delirium
}
if (ability.system.statusaffected == 'socialhealth') {
let socialhealth = duplicate(this.system.secondary.socialhealth)
socialhealth.bonus += Number(ability.system.statusmodifier)
updates[`system.secondary.socialhealth`] = delirium
}
if (ability.system.statusaffected == 'stealthhealth') {
let stealthhealth = duplicate(this.system.secondary.stealthhealth)
stealthhealth.bonus += Number(ability.system.statusmodifier)
updates[`system.secondary.stealthhealth`] = delirium
}
}
if (directUpdate) {
await this.update(updates)

View File

@ -60,7 +60,6 @@ export class PegasusItemSheet extends ItemSheet {
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
optionsDiceList: PegasusUtility.getOptionsDiceList(),
optionsStatusList: PegasusUtility.getOptionsStatusList(),
data: itemData.system,
description: await TextEditor.enrichHTML(this.object.system.description, {async: true}),
limited: this.object.limited,

View File

@ -369,14 +369,9 @@ export class PegasusUtility {
this.optionsDiceList = optionsDiceList;
this.optionsLevel = optionsLevel;
this.optionsStatusList = '<option value="notapplicable">Not applicable</option><option value="health">Health</option><option value="nrg">NRG</option><option value="delirium">Delirium</option>';
}
/* -------------------------------------------- */
static getOptionsStatusList() {
return this.optionsStatusList;
}
/* -------------------------------------------- */
static getOptionsDiceList() {
return this.optionsDiceList;

View File

@ -253,7 +253,7 @@
],
"title": "Pegasus RPG",
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
"version": "10.2.4",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.2.4.zip",
"version": "10.2.5",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.2.5.zip",
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
}

View File

@ -29,7 +29,14 @@
<li class="flexrow"><label class="generic-label">Affected status</label>
<select class="competence-base flexrow" type="text" name="system.statusaffected" value="{{data.statusaffected}}" data-dtype="String">
{{#select data.statusaffected}}
{{{optionsStatusList}}}
<option value="notapplicable">Not Applicable</option>
<option value="health">Health</option>
<option value="delirium">Delirium</option>
<option value="socialhealth">Social Health</option>
<option value="stealthhealth">Stealth Health</option>
<option value="nrg">NRG</option>
<option value="mt">MT</option>
<option value="kbv">KBV</option>
{{/select}}
</select>
</li>