Sync effetcts + initiative

This commit is contained in:
2022-01-28 11:41:19 +01:00
parent 68d7344e90
commit c9261a713a
12 changed files with 34 additions and 102 deletions

View File

@@ -556,25 +556,26 @@ export class PegasusActor extends Actor {
effect = duplicate(effect)
if ( !effect.data.hindrance
&& effect.data.stataffected != "notapplicable"
&& effect.data.stataffected != "special"
&& effect.data.stataffected != "all") {
&& effect.data.stataffected != "special") {
rollData.effectsList.push( { label: effect.name, type: "effect", applied: false, effect: effect, value: effect.data.effectlevel } )
}
}
}
/* -------------------------------------------- */
addArmorsShields( rollData) {
addArmorsShields( rollData, useShield = false) {
let armors = this.getArmors()
let armorLevel = 0
for (let armor of armors) {
armorLevel += armor.data.resistance
}
rollData.armorsList.push( {label: 'Total armor level', type: "other", applied: false, value: armorLevel } )
rollData.armorsList.push( {label: 'Shield level', type: "other", applied: false, value: this.getShieldValue() } )
if (useShield ) {
rollData.armorsList.push( {label: 'Shield level', type: "other", applied: false, value: this.getShieldValue() } )
}
}
/* -------------------------------------------- */
getCommonRollData(statKey = undefined) {
getCommonRollData(statKey = undefined, useShield = false) {
let rollData = PegasusUtility.getBasicRollData()
rollData.alias = this.name
rollData.actorImg = this.img
@@ -592,7 +593,7 @@ export class PegasusActor extends Actor {
}
this.addEffects( rollData)
this.addArmorsShields(rollData)
this.addArmorsShields(rollData, useShield)
return rollData
}
@@ -611,7 +612,7 @@ export class PegasusActor extends Actor {
rollPool(statKey, useShield = false) {
let stat = this.getStat(statKey);
if (stat) {
let rollData = this.getCommonRollData(statKey)
let rollData = this.getCommonRollData(statKey, useShield)
rollData.mode = "stat"
this.startRoll(rollData)
@@ -657,7 +658,8 @@ export class PegasusActor extends Actor {
rollData.mode = "spec"
rollData.title = `Spec. : ${spec.name} `
rollData.specList = [ spec ]
rollData.selectedSpec = spec._id
rollData.specDicesLevel = spec.data.level
this.startRoll(rollData)
} else {
ui.notifications.warn("Specialisation not found !");

View File

@@ -78,14 +78,13 @@ function welcomeMessage() {
content: `<div id="welcome-message-pegasus"><span class="rdd-roll-part">
<strong>Welcome to the Pegasus Engine CORE RPG.</strong>
<br>Created by GMD Online
<p>The Pegasus Engine is a available for free on our website. It is also available as a PDF and in Print format at an affordable price on our website.</p>
<p>It is thanks to all my Official GMD Members and Patreon Members that have made this project possible and allowed for this interface to be provided for free.</p>
<p>The Pegasus Engine is a available for free on our website. It is also available as a PDF and in Print format at an affordable price.</p>
<p>This project has been made possible thanks to all the Official GMD Members and Patreon Members that have supported me and as a result made it possible to supply this interface for free.</p>
<p>In return I have made available a fully detailed Compendium for FREE for all members, which can be obtained from the Members page on my website.</p>
You too can become a supporter for future projects.
<br>Sign up Here:
https://www.gmdonline.co.uk/gmdmemberspage/
<p>GMD Online, GMD CORE RPG logo are © 2018 CORE Worlds and Game Rules © 2001. Interface © 2021 All rights reserved. </p>
<p>Enjoy and become the hero you were born to be!</p></div>
<p>You too can become a supporter for future projects and enjoy amazing rewards.
<br>Sign up Here: https://www.gmdonline.co.uk/gmdmemberspage/</p>
<p>GMD Online, GMD CORE RPG logo are © 2018 CORE Worlds and Game Rules © 2001. Interface © 2021 All rights reserved.</p>
<p>Enjoy and become the hero you were born to be!</p>
` });
}

View File

@@ -131,6 +131,8 @@ export class PegasusRollDialog extends Dialog {
if ( spec) {
this.rollData.specDiceLevel = spec.data.level
$('#specDicesLevel').val(this.rollData.specDiceLevel)
} else {
$('#specDicesLevel').val(0)
}
});
html.find('#statDicesLevel').change((event) => {