Compare commits
4 Commits
fvtt-pegas
...
fvtt-pegas
Author | SHA1 | Date | |
---|---|---|---|
72ff709682 | |||
588c6655b3 | |||
9de2bc48b8 | |||
460fd1f0d6 |
@ -1467,7 +1467,7 @@ export class PegasusActor extends Actor {
|
|||||||
updates['system.momentum.max'] = momentum
|
updates['system.momentum.max'] = momentum
|
||||||
}
|
}
|
||||||
|
|
||||||
let mrLevel = (this.system.statistics.agi.value + this.system.statistics.str.value) - this.system.statistics.phy.value
|
let mrLevel = (this.system.statistics.agi.value + + this.system.statistics.agi.mod + this.system.statistics.str.value + this.system.statistics.str.mod) - (this.system.statistics.phy.value+this.system.statistics.phy.mod)
|
||||||
mrLevel = (mrLevel < 1) ? 1 : mrLevel;
|
mrLevel = (mrLevel < 1) ? 1 : mrLevel;
|
||||||
if (mrLevel != this.system.mr.value) {
|
if (mrLevel != this.system.mr.value) {
|
||||||
updates['system.mr.value'] = mrLevel
|
updates['system.mr.value'] = mrLevel
|
||||||
@ -1573,6 +1573,7 @@ export class PegasusActor extends Actor {
|
|||||||
for (let e of effects) {
|
for (let e of effects) {
|
||||||
meleeBonus += Number(e.system.effectlevel)
|
meleeBonus += Number(e.system.effectlevel)
|
||||||
}
|
}
|
||||||
|
this.baseMDL = this.system.biodata.sizenum + this.system.biodata.sizebonus + this.system.statistics.str.value + this.system.statistics.str.bonuseffect + meleeBonus
|
||||||
let weaponsMelee = this.items.filter(it => it.type == "weapon" && it.system.damagestatistic.toLowerCase() == "str")
|
let weaponsMelee = this.items.filter(it => it.type == "weapon" && it.system.damagestatistic.toLowerCase() == "str")
|
||||||
for (let w of weaponsMelee) {
|
for (let w of weaponsMelee) {
|
||||||
let damage = Number(w.system.damage) + this.system.biodata.sizenum + this.system.biodata.sizebonus + this.system.statistics.str.value + this.system.statistics.str.bonuseffect + meleeBonus
|
let damage = Number(w.system.damage) + this.system.biodata.sizenum + this.system.biodata.sizebonus + this.system.statistics.str.value + this.system.statistics.str.bonuseffect + meleeBonus
|
||||||
@ -1606,6 +1607,7 @@ export class PegasusActor extends Actor {
|
|||||||
if (role?.name?.toLowerCase() == "defender") { // Add defender bonus to ADRL
|
if (role?.name?.toLowerCase() == "defender") { // Add defender bonus to ADRL
|
||||||
roleBonus = this.getRoleLevel()
|
roleBonus = this.getRoleLevel()
|
||||||
}
|
}
|
||||||
|
this.baseADRL = roleBonus + this.system.statistics.phy.value + this.system.statistics.phy.bonuseffect + this.system.biodata.sizenum + this.system.biodata.sizebonus
|
||||||
let armors = this.items.filter(it => it.type == "armor")
|
let armors = this.items.filter(it => it.type == "armor")
|
||||||
for (let a of armors) {
|
for (let a of armors) {
|
||||||
let adrl = roleBonus + this.system.statistics.phy.value + this.system.statistics.phy.bonuseffect + this.system.biodata.sizenum + this.system.biodata.sizebonus + a.system.resistance + armorBonus
|
let adrl = roleBonus + this.system.statistics.phy.value + this.system.statistics.phy.bonuseffect + this.system.biodata.sizenum + this.system.biodata.sizebonus + a.system.resistance + armorBonus
|
||||||
@ -1618,7 +1620,10 @@ export class PegasusActor extends Actor {
|
|||||||
this.updateEmbeddedDocuments('Item', updates)
|
this.updateEmbeddedDocuments('Item', updates)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
getBaseADRL() {
|
||||||
|
|
||||||
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
parseStatEffects() {
|
parseStatEffects() {
|
||||||
if (this.system.biodata.noautobonus) { // If we are in "no-bonus mode
|
if (this.system.biodata.noautobonus) { // If we are in "no-bonus mode
|
||||||
@ -2145,6 +2150,8 @@ export class PegasusActor extends Actor {
|
|||||||
rollData.noBonusDice = this.checkNoBonusDice()
|
rollData.noBonusDice = this.checkNoBonusDice()
|
||||||
rollData.dicePool = []
|
rollData.dicePool = []
|
||||||
rollData.subKey = subKey
|
rollData.subKey = subKey
|
||||||
|
rollData.MDL = this.baseMDL
|
||||||
|
rollData.ADRL = this.baseADRL
|
||||||
|
|
||||||
if (subKey == "melee-dmg" || subKey == "ranged-dmg" || subKey == "power-dmg") {
|
if (subKey == "melee-dmg" || subKey == "ranged-dmg" || subKey == "power-dmg") {
|
||||||
rollData.isDamage = true
|
rollData.isDamage = true
|
||||||
|
@ -16,7 +16,7 @@ export class PegasusCombatTracker extends CombatTracker {
|
|||||||
let combatData = await super.getData()
|
let combatData = await super.getData()
|
||||||
for (let t of combatData.turns) {
|
for (let t of combatData.turns) {
|
||||||
let c = game.combat.combatants.get(t.id)
|
let c = game.combat.combatants.get(t.id)
|
||||||
t.displayTIC = (c.actor.isOwner && c.actor.hasPlayerOwner) || (c.actor.type == "npc" && game.user.isGM)
|
t.displayTIC = (c.actor.isOwner && c.actor.hasPlayerOwner && !game.user.isGM) || (c.actor.type == "npc" && !c.actor.hasPlayerOwner && game.user.isGM)
|
||||||
let TICs = c.getFlag("world", "TICs")
|
let TICs = c.getFlag("world", "TICs")
|
||||||
if (TICs) {
|
if (TICs) {
|
||||||
t.TICs = TICs
|
t.TICs = TICs
|
||||||
|
@ -104,6 +104,12 @@ export class PegasusRollDialog extends Dialog {
|
|||||||
if (armor) {
|
if (armor) {
|
||||||
armor.applied = toggled
|
armor.applied = toggled
|
||||||
}
|
}
|
||||||
|
this.rollData.armorUsed = false
|
||||||
|
for(let a of this.rollData.armorsList) {
|
||||||
|
if (a.applied) {
|
||||||
|
this.rollData.armorUsed = true
|
||||||
|
}
|
||||||
|
}
|
||||||
console.log("Armor", armorIdx, toggled)
|
console.log("Armor", armorIdx, toggled)
|
||||||
PegasusUtility.updateArmorDicePool(this.rollData)
|
PegasusUtility.updateArmorDicePool(this.rollData)
|
||||||
}
|
}
|
||||||
@ -120,6 +126,12 @@ export class PegasusRollDialog extends Dialog {
|
|||||||
}
|
}
|
||||||
weapon.applied = toggled
|
weapon.applied = toggled
|
||||||
}
|
}
|
||||||
|
this.rollData.weaponUsed = false
|
||||||
|
for(let a of this.rollData.weaponsList) {
|
||||||
|
if (a.applied) {
|
||||||
|
this.rollData.weaponUsed = true
|
||||||
|
}
|
||||||
|
}
|
||||||
console.log("Weapon", weaponIdx, toggled, weapon)
|
console.log("Weapon", weaponIdx, toggled, weapon)
|
||||||
PegasusUtility.updateDamageDicePool(this.rollData)
|
PegasusUtility.updateDamageDicePool(this.rollData)
|
||||||
}
|
}
|
||||||
|
@ -244,15 +244,15 @@
|
|||||||
"flags": {}
|
"flags": {}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"primaryTokenAttribute": "secondary.health.status",
|
"primaryTokenAttribute": "",
|
||||||
"secondaryTokenAttribute": "secondary.delirium.status",
|
"secondaryTokenAttribute": "",
|
||||||
"socket": true,
|
"socket": true,
|
||||||
"styles": [
|
"styles": [
|
||||||
"styles/simple.css"
|
"styles/simple.css"
|
||||||
],
|
],
|
||||||
"title": "Pegasus RPG",
|
"title": "Pegasus RPG",
|
||||||
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
||||||
"version": "11.0.13",
|
"version": "11.0.17",
|
||||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v11.0.13.zip",
|
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v11.0.17.zip",
|
||||||
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
|
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
|
||||||
}
|
}
|
@ -57,7 +57,16 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if (eq subKey "melee-dmg")}}
|
||||||
|
{{#if (not weaponUsed)}}
|
||||||
|
<li>MDL : {{MDL}}</li>
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#if (eq subKey "dmg-res")}}
|
{{#if (eq subKey "dmg-res")}}
|
||||||
|
{{#if (not armorUsed)}}
|
||||||
|
<li>ADRL : {{ADRL}}</li>
|
||||||
|
{{/if}}
|
||||||
{{#each armorsList as |armor idx|}}
|
{{#each armorsList as |armor idx|}}
|
||||||
{{#if armor.applied}}
|
{{#if armor.applied}}
|
||||||
<li>ADRL: {{armor.adrl}}</li>
|
<li>ADRL: {{armor.adrl}}</li>
|
||||||
|
Reference in New Issue
Block a user