Switch to v11

This commit is contained in:
LeRatierBretonnien 2023-09-11 20:34:33 +02:00
parent ba50c86800
commit 6a3cb66391
15 changed files with 213 additions and 88 deletions

View File

@ -1,25 +1,28 @@
{ {
"ITEM": { "TYPES": {
"TypeRace": "Race", "Item": {
"TypeRole": "Role", "Race": "Race",
"TypeAbility": "Ability", "Role": "Role",
"TypeSpecialisation": "Specialisation", "Ability": "Ability",
"TypePerk": "Perk", "Specialisation": "Specialisation",
"TypePower": "Power", "Perk": "Perk",
"TypeArmor": "Armor", "Power": "Power",
"TypeShield": "Shield", "Armor": "Armor",
"TypeEquipment": "Equipment", "Shield": "Shield",
"TypeWeapon": "Weapon", "Equipment": "Equipment",
"TypeEffect": "Effect", "Weapon": "Weapon",
"TypeMoney": "Money", "Effect": "Effect",
"TypeVirtue": "Virtue", "Money": "Money",
"TypeVice": "Vice", "Virtue": "Virtue",
"TypeVehiclehull": "Vehicule Hull", "Vice": "Vice",
"TypePowercoremodule": "Power Core Module", "Vehiclehull": "Vehicule Hull",
"TypeMobilitymodule": "Mobility Module", "Powercoremodule": "Power Core Module",
"TypeCombatmodule": "Combat Module", "Mobilitymodule": "Mobility Module",
"TypeVehiclemodule": "Vehicle Module", "Combatmodule": "Combat Module",
"TypeVehicleweaponmodule" : "Vehicle Weapon Module", "Vehiclemodule": "Vehicle Module",
"TypePropulsionmodule": "Propulsion module" "Vehicleweaponmodule" : "Vehicle Weapon Module",
"Propulsionmodule": "Propulsion module"
}
} }
} }

View File

@ -41,6 +41,7 @@ export class PegasusActorSheet extends ActorSheet {
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)), effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
limited: this.object.limited, limited: this.object.limited,
specs: this.actor.getSpecs( ), specs: this.actor.getSpecs( ),
config: game.system.pegasus.config,
optionsDiceList: PegasusUtility.getOptionsDiceList(), optionsDiceList: PegasusUtility.getOptionsDiceList(),
optionsLevel: PegasusUtility.getOptionsLevel(), optionsLevel: PegasusUtility.getOptionsLevel(),
weapons: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getWeapons()) ), weapons: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getWeapons()) ),

View File

@ -112,6 +112,14 @@ export class PegasusActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
prepareDerivedData() { prepareDerivedData() {
if (this.system.secondary.stealthhealth) {
this.update({"system.secondary": {"-=stealthhealth": null}} )
}
if (this.system.secondary.socialhealth) {
this.update({"system.secondary": {"-=socialhealth": null}} )
}
if (!this.traumaState) { if (!this.traumaState) {
this.traumaState = "none" this.traumaState = "none"
} }
@ -668,7 +676,7 @@ export class PegasusActor extends Actor {
for (let spec of specThreat) { for (let spec of specThreat) {
tl += PegasusUtility.getDiceValue(spec.system.level) tl += PegasusUtility.getDiceValue(spec.system.level)
} }
tl += this.system.nrg.absolutemax + this.system.secondary.health.max + this.system.secondary.delirium.max tl += this.system.nrg.absolutemax /* NO MORE USED + this.system.secondary.health.max + this.system.secondary.delirium.max*/
tl += this.getPerks().length * 5 tl += this.getPerks().length * 5
let weapons = this.getWeapons() let weapons = this.getWeapons()
@ -781,11 +789,12 @@ export class PegasusActor extends Actor {
if (stunAbove > 0) { if (stunAbove > 0) {
ChatMessage.create({ content: `${this.name} Stun threshold has been exceeded.` }) ChatMessage.create({ content: `${this.name} Stun threshold has been exceeded.` })
} }
/* NO MORE AUTOMATION HERE
if (incDec > 0 && stunAbove > 0) { if (incDec > 0 && stunAbove > 0) {
let delirium = duplicate(myself.system.secondary.delirium) let delirium = duplicate(myself.system.secondary.delirium)
delirium.value -= incDec delirium.value -= incDec
myself.update({ 'system.secondary.delirium': delirium }) myself.update({ 'system.secondary.delirium': delirium })
} }*/
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -1237,6 +1246,7 @@ export class PegasusActor extends Actor {
nrg.max += item.system.features.nrgcost.value nrg.max += item.system.features.nrgcost.value
await this.update({ 'system.nrg': nrg }) await this.update({ 'system.nrg': nrg })
} }
/* NO MORE USED
if (item.system.features.bonushealth.flag) { if (item.system.features.bonushealth.flag) {
let health = duplicate(this.system.secondary.health) let health = duplicate(this.system.secondary.health)
health.value -= Number(item.system.features.bonushealth.value) || 0 health.value -= Number(item.system.features.bonushealth.value) || 0
@ -1254,7 +1264,7 @@ export class PegasusActor extends Actor {
nrg.value -= Number(item.system.features.bonusnrg.value) || 0 nrg.value -= Number(item.system.features.bonusnrg.value) || 0
nrg.max -= Number(item.system.features.bonusnrg.value) || 0 nrg.max -= Number(item.system.features.bonusnrg.value) || 0
await this.update({ 'system.nrg': nrg }) await this.update({ 'system.nrg': nrg })
} }*/
this.disableWeaverPerk(item) this.disableWeaverPerk(item)
PegasusUtility.createChatWithRollMode(item.name, { PegasusUtility.createChatWithRollMode(item.name, {
content: await renderTemplate(`systems/fvtt-pegasus-rpg/templates/chat-perk-ready.html`, { name: this.name, perk: duplicate(item) }) content: await renderTemplate(`systems/fvtt-pegasus-rpg/templates/chat-perk-ready.html`, { name: this.name, perk: duplicate(item) })
@ -1287,6 +1297,7 @@ export class PegasusActor extends Actor {
ui.notifications.warn("Not enough NRG to activate the Perk " + item.name) ui.notifications.warn("Not enough NRG to activate the Perk " + item.name)
} }
} }
/* NO MORE USED
if (item.system.features.bonushealth.flag) { if (item.system.features.bonushealth.flag) {
let health = duplicate(this.system.secondary.health) let health = duplicate(this.system.secondary.health)
health.value += Number(item.system.features.bonushealth.value) || 0 health.value += Number(item.system.features.bonushealth.value) || 0
@ -1298,7 +1309,7 @@ export class PegasusActor extends Actor {
delirium.value += Number(item.system.features.bonusdelirium.value) || 0 delirium.value += Number(item.system.features.bonusdelirium.value) || 0
delirium.max += Number(item.system.features.bonusdelirium.value) || 0 delirium.max += Number(item.system.features.bonusdelirium.value) || 0
await this.update({ 'system.secondary.delirium': delirium }) await this.update({ 'system.secondary.delirium': delirium })
} }*/
if (item.system.features.bonusnrg.flag) { if (item.system.features.bonusnrg.flag) {
let nrg = duplicate(this.system.nrg) let nrg = duplicate(this.system.nrg)
nrg.value += Number(item.system.features.bonusnrg.value) || 0 nrg.value += Number(item.system.features.bonusnrg.value) || 0
@ -1335,16 +1346,13 @@ export class PegasusActor extends Actor {
getTraumaState() { getTraumaState() {
this.traumaState = "none" this.traumaState = "none"
if (this.type == "character") { if (this.type == "character") {
let negDelirium = -Math.floor((this.system.secondary.delirium.max + 1) / 2) if ( this.system.secondary.delirium.status == "trauma") {
if (this.type == "character") {
if (this.system.secondary.delirium.value <= 0 && this.system.secondary.delirium.value >= negDelirium) {
this.traumaState = "trauma" this.traumaState = "trauma"
} }
if (this.system.secondary.delirium.value < negDelirium) { if ( this.system.secondary.delirium.status == "severetrauma") {
this.traumaState = "severetrauma" this.traumaState = "severetrauma"
} }
} }
}
return this.traumaState return this.traumaState
} }
@ -1439,6 +1447,7 @@ export class PegasusActor extends Actor {
if (this.isOwner || game.user.isGM) { if (this.isOwner || game.user.isGM) {
let updates = {} let updates = {}
/* No more used
let phyDiceValue = PegasusUtility.getDiceValue(this.system.statistics.phy.value) + this.system.secondary.health.bonus + this.system.statistics.phy.mod + PegasusUtility.getDiceValue(this.system.statistics.phy.bonuseffect); let phyDiceValue = PegasusUtility.getDiceValue(this.system.statistics.phy.value) + this.system.secondary.health.bonus + this.system.statistics.phy.mod + PegasusUtility.getDiceValue(this.system.statistics.phy.bonuseffect);
if (phyDiceValue != this.system.secondary.health.max) { if (phyDiceValue != this.system.secondary.health.max) {
updates['system.secondary.health.max'] = phyDiceValue updates['system.secondary.health.max'] = phyDiceValue
@ -1467,7 +1476,7 @@ export class PegasusActor extends Actor {
} }
if (this.computeValue) { if (this.computeValue) {
updates['system.secondary.socialhealth.value'] = socDiceValue updates['system.secondary.socialhealth.value'] = socDiceValue
} }*/
let nrgValue = PegasusUtility.getDiceValue(this.system.statistics.foc.value) + this.system.nrg.mod + this.system.statistics.foc.mod + PegasusUtility.getDiceValue(this.system.statistics.foc.bonuseffect) let nrgValue = PegasusUtility.getDiceValue(this.system.statistics.foc.value) + this.system.nrg.mod + this.system.statistics.foc.mod + PegasusUtility.getDiceValue(this.system.statistics.foc.bonuseffect)
if (nrgValue != this.system.nrg.absolutemax) { if (nrgValue != this.system.nrg.absolutemax) {
@ -1511,11 +1520,11 @@ export class PegasusActor extends Actor {
} }
let race = this.getRace() let race = this.getRace()
if (race && race.name && (race.name != this.system.biodata.racename)) { if (race?.name && (race.name != this.system.biodata.racename)) {
updates['system.biodata.racename'] = race.name updates['system.biodata.racename'] = race.name
} }
let role = this.getRole() let role = this.getRole()
if (role && role.name && (role.name != this.system.biodata.rolename)) { if (role?.name && (role.name != this.system.biodata.rolename)) {
updates['system.biodata.rolename'] = role.name updates['system.biodata.rolename'] = role.name
} }
if (Object.entries(updates).length > 0) { if (Object.entries(updates).length > 0) {
@ -1528,22 +1537,82 @@ export class PegasusActor extends Actor {
// Update current hindrance level // Update current hindrance level
let hindrance = this.system.combat.hindrancedice let hindrance = this.system.combat.hindrancedice
if (!this.checkIgnoreHealth()) { if (!this.checkIgnoreHealth()) {
if (this.system.secondary.health.value < 0) { if (this.system.secondary.health.status == "wounded") {
if (this.system.secondary.health.value < -Math.floor((this.system.secondary.health.max + 1) / 2)) { // Severe wounded
hindrance += 3
} else {
hindrance += 1 hindrance += 1
} }
if (this.system.secondary.health.status == "severelywounded") {
hindrance += 3
} }
} }
this.system.combat.hindrancedice = hindrance this.system.combat.hindrancedice = hindrance
this.getTraumaState() this.getTraumaState()
this.cleanupPerksIfTrauma() this.cleanupPerksIfTrauma()
await this.parseStatEffects() this.parseStatEffects()
this.parseDamageValues()
await this.parseStatusEffects() await this.parseStatusEffects()
} }
} }
/* -------------------------------------------- */
getArmorResistanceBonus() {
let bonus = 0
for (let a of armors) {
bonus += Number(a.system.resistance)
}
return bonus
}
/* -------------------------------------------- */
parseDamageValues() {
if (this.system.biodata.noautobonus) { // If we are in "no-bonus mode
return
}
let updates = []
/* Get MDL bonus */
let meleeBonus = 0
let effects = this.items.filter(effect => effect.type == "effect" && effect.system.affectstatus && effect.system.affectstatus == "mdl" && (Number(effect.system.effectlevel) > 0))
for(let e of effects) {
meleeBonus += Number(e.system.effectlevel)
}
let weaponsMelee = this.items.filter( it => it.type == "weapon" && it.system.damagestatistic.toLowerCase() == "str")
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
if (damage != w.system.mdl ) {
updates.push({ _id: w.id, "system.mdl": damage })
}
}
let rangedBonus = 0
effects = this.items.filter(effect => effect.type == "effect" && effect.system.affectstatus && effect.system.affectstatus == "rdl" && (Number(effect.system.effectlevel) > 0))
for(let e of effects) {
rangedBonus += Number(e.system.effectlevel)
}
let weaponsRanged = this.items.filter( it => it.type == "weapon" && it.system.statistic.toLowerCase() == "agi")
for (let w of weaponsRanged) {
let damage = Number(w.system.damage) + rangedBonus
if (damage != w.system.rdl ) {
updates.push({ _id: w.id, "system.rdl": damage })
}
}
let armorBonus = 0
effects = this.items.filter(effect => effect.type == "effect" && effect.system.affectstatus && effect.system.affectstatus == " adrl" && (Number(effect.system.effectlevel) > 0))
for(let e of effects) {
armorBonus += Number(e.system.effectlevel)
}
let armors = this.items.filter( it => it.type == "armor")
for (let a of armors) {
let adrl = this.system.statistics.phy.value + this.system.statistics.phy.bonuseffect + this.system.biodata.sizenum + this.system.biodata.sizebonus + a.system.resistance + armorBonus
if (adrl != a.system.adrl ) {
updates.push({ _id: a.id, "system.adrl": adrl })
}
}
if (updates.length > 0) {
this.updateEmbeddedDocuments('Item', updates)
}
}
/* -------------------------------------------- */ /* -------------------------------------------- */
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
@ -1693,13 +1762,13 @@ export class PegasusActor extends Actor {
if (objetQ) { if (objetQ) {
let newQ = objetQ.system.ammocurrent + incDec; let newQ = objetQ.system.ammocurrent + incDec;
if (newQ >= 0 && newQ <= objetQ.system.ammomax) { if (newQ >= 0 && newQ <= objetQ.system.ammomax) {
const updated = await this.updateEmbeddedDocuments('Item', [{ _id: objetQ.id, 'system.ammocurrent': newQ }]); // pdates one EmbeddedEntity await this.updateEmbeddedDocuments('Item', [{ _id: objetQ.id, 'system.ammocurrent': newQ }]); // pdates one EmbeddedEntity
} }
} }
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async applyAbility(ability, updates = [], directUpdate = false) { async applyAbility(ability, updates = {}, directUpdate = false) {
// manage stat bonus // manage stat bonus
if (!ability.system) { if (!ability.system) {
ability.system = ability.data ability.system = ability.data
@ -1722,6 +1791,7 @@ export class PegasusActor extends Actor {
nrg.mod += Number(ability.system.statusmodifier) nrg.mod += Number(ability.system.statusmodifier)
updates[`system.nrg`] = nrg updates[`system.nrg`] = nrg
} }
/* NO MORE USED
if (ability.system.statusaffected == 'health') { if (ability.system.statusaffected == 'health') {
let health = duplicate(this.system.secondary.health) let health = duplicate(this.system.secondary.health)
health.bonus += Number(ability.system.statusmodifier) health.bonus += Number(ability.system.statusmodifier)
@ -1741,7 +1811,7 @@ export class PegasusActor extends Actor {
let stealthhealth = duplicate(this.system.secondary.stealthhealth) let stealthhealth = duplicate(this.system.secondary.stealthhealth)
stealthhealth.bonus += Number(ability.system.statusmodifier) stealthhealth.bonus += Number(ability.system.statusmodifier)
updates[`system.secondary.stealthhealth`] = delirium updates[`system.secondary.stealthhealth`] = delirium
} }*/
} }
if (directUpdate) { if (directUpdate) {
await this.update(updates) await this.update(updates)
@ -1887,12 +1957,8 @@ export class PegasusActor extends Actor {
/* ROLL SECTION /* ROLL SECTION
/* -------------------------------------------- */ /* -------------------------------------------- */
pushEffect(rollData, effect) { pushEffect(rollData, effect) {
if (this.getTraumaState() == "none" && !this.checkNoBonusDice()) { if ( (this.getTraumaState() == "none" && !this.checkNoBonusDice()) || !effect.system.bonusdice) {
rollData.effectsList.push({ label: effect.name, type: "effect", applied: false, effect: effect, value: effect.system.effectlevel }) rollData.effectsList.push({ label: effect.name, type: "effect", applied: false, effect: effect, value: effect.system.effectlevel })
} else {
if (!effect.system.bonusdice) { // Do not push bonus dice effect when TraumaState is activated
rollData.effectsList.push({ label: effect.name, type: "effect", applied: false, effect: effect, value: effect.system.effectlevel })
}
} }
} }

30
modules/pegasus-config.js Normal file
View File

@ -0,0 +1,30 @@
export const PEGASUS_CONFIG = {
healthStatus: {
healthy: { key: "healthy", name: 'Healthy', hindrance: 0 },
injured: { key: "injured",name: 'Injured',hindrance: 0 },
wounded: { key: "wounded",name: 'Wounded',hindrance: 1, rolls: 'ALL' },
severlywounded: { key: "severlywounded",name: 'Severly Wounded',hindrance: 3, rolls: 'ALL' },
defeated: { key: "defeated",name:'Defeated',hindrance: 3, defeated: true}
},
deliriumStatus: {
stable: { key:'stable', name: 'Stable', hindrance: 0 },
unstable: { key:'unstable',name: 'Unstable', hindrance: 0 },
trauma: { key:'trauma',name: 'Trauma', hindrance: 0, nobonusdice: true },
severetrauma: { key:'severetrauma',name: 'Severe Trauma', hindrance: 0, nobonusdice: true, noperks: true },
defeated: { key:'defeated',name:'Defeated',hindrance: 0, defeated: true}
},
concealmentStatus: {
hidden: { key:'hidden',name: 'Hidden', hindrance: 0 },
covered: { key:'covered',name: 'Covered', hindrance: 0 },
exposed: { key:'exposed',name: 'Exposed', hindrance: 1, rolls: 'STL' },
detected: { key:'detected',name: 'Detected', hindrance: 3, rolls: 'STL'},
located: { key:'located',name: 'Located', hindrance: 0 }
},
confidenceStatus: {
confident: { key:'confident',name: 'Confident', hindrance: 0 },
uncertain: { key:'uncertain',name: 'Uncertain', hindrance: 0 },
shaken: { key:'shaken',name: 'Shaken', hindrance: 0, hasfear: true },
anxious: { key:'anxious',name: 'Anxious', hindrance: 0, nostunrecover: true },
lostface: { key:'lostface',name: 'Lost Face', hindrance: 0 }
}
}

View File

@ -423,7 +423,6 @@ export class PegasusItemSheet extends ItemSheet {
} }
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async _onDrop(event) { async _onDrop(event) {

View File

@ -17,6 +17,7 @@ import { PegasusUtility } from "./pegasus-utility.js";
import { PegasusCombat } from "./pegasus-combat.js"; import { PegasusCombat } from "./pegasus-combat.js";
import { PegasusItem } from "./pegasus-item.js"; import { PegasusItem } from "./pegasus-item.js";
import { PegasusToken } from "./pegasus-token.js"; import { PegasusToken } from "./pegasus-token.js";
import { PEGASUS_CONFIG } from "./pegasus-config.js"
/* -------------------------------------------- */ /* -------------------------------------------- */
/* Foundry VTT Initialization */ /* Foundry VTT Initialization */
@ -58,7 +59,8 @@ Hooks.once("init", async function () {
CONFIG.Actor.documentClass = PegasusActor CONFIG.Actor.documentClass = PegasusActor
CONFIG.Item.documentClass = PegasusItem CONFIG.Item.documentClass = PegasusItem
game.system.pegasus = { game.system.pegasus = {
utility: PegasusUtility utility: PegasusUtility,
config: PEGASUS_CONFIG
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -70,6 +70,11 @@ export class PegasusUtility {
Handlebars.registerHelper('getDice', function (a) { Handlebars.registerHelper('getDice', function (a) {
return PegasusUtility.getDiceFromLevel(a) return PegasusUtility.getDiceFromLevel(a)
}) })
Handlebars.registerHelper('getStatusConfig', function (a) {
let key = a + "Status"
console.log("TABE", key, game.system.pegasus.config[key] )
return game.system.pegasus.config[key]
})
} }
@ -1282,9 +1287,9 @@ export class PegasusUtility {
this.lastRoleEffectProcess = now this.lastRoleEffectProcess = now
console.log("=========================+> Searching/Processing roles effects") console.log("=========================+> Searching/Processing roles effects")
await this.processTactician() /*NO MORE USED : await this.processTactician()*/
await this.processEnhancer() await this.processEnhancer()
await this.processAgitator() /*NO MORE USED : await this.processAgitator()*/
} }

View File

@ -23,8 +23,7 @@
"manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/raw/branch/master/system.json", "manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/raw/branch/master/system.json",
"compatibility": { "compatibility": {
"minimum": "10", "minimum": "10",
"verified": "10", "verified": "11"
"maximum": "10"
}, },
"id": "fvtt-pegasus-rpg", "id": "fvtt-pegasus-rpg",
"packs": [ "packs": [
@ -253,7 +252,7 @@
], ],
"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": "10.2.7", "version": "11.0.3",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.2.7.zip", "download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.2.8.zip",
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp" "background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
} }

View File

@ -171,6 +171,7 @@
"type": "value", "type": "value",
"ismax": true, "ismax": true,
"iscombat": true, "iscombat": true,
"status": "healthy",
"bonus": 0, "bonus": 0,
"max": 0 "max": 0
}, },
@ -180,22 +181,25 @@
"type": "value", "type": "value",
"ismax": true, "ismax": true,
"iscombat": true, "iscombat": true,
"status": "stable",
"bonus": 0, "bonus": 0,
"max": 0 "max": 0
}, },
"stealthhealth": { "concealment": {
"label": "STL Health", "label": "Concealment",
"type": "value", "type": "value",
"value": 0, "value": 0,
"ismax": true, "ismax": true,
"status": "hidden",
"bonus": 0, "bonus": 0,
"max": 0 "max": 0
}, },
"socialhealth": { "confidence": {
"label": "SOC Health", "label": "Confidence",
"type": "value", "type": "value",
"value": 0, "value": 0,
"ismax": true, "ismax": true,
"status": "confident",
"bonus": 0, "bonus": 0,
"max": 0 "max": 0
} }
@ -595,6 +599,7 @@
"armor": { "armor": {
"statistic": "", "statistic": "",
"resistance": "", "resistance": "",
"adrl": 0,
"weight": 0, "weight": 0,
"cost": 0, "cost": 0,
"idr": "", "idr": "",
@ -645,6 +650,8 @@
"weapon": { "weapon": {
"statistic": "", "statistic": "",
"damagestatistic": "", "damagestatistic": "",
"mdl": 0,
"rdl": 0,
"damage": "", "damage": "",
"canbethrown": false, "canbethrown": false,
"cost": 0, "cost": 0,

View File

@ -59,12 +59,6 @@
<div class="stat-item status-block"> <div class="stat-item status-block">
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-status.html}} {{> systems/fvtt-pegasus-rpg/templates/partial-actor-status.html}}
</div> </div>
<!--
<label class="status-small-label">Active NRG</label>
<input type="text" class="padd-right status-small-label no-grow" name="system.nrg.activated" value="{{data.nrg.activated}}" data-dtype="Number"/>
-->
</div> </div>
</div> </div>
</div> </div>

View File

@ -26,6 +26,7 @@
{{/if}} {{/if}}
{{#if isResistance}} {{#if isResistance}}
<li>Armor Resistance Dice : {{armor.system.resistanceDice}}</li> <li>Armor Resistance Dice : {{armor.system.resistanceDice}}</li>
<li>ADRL : {{armor.system.adrl}}</li>
{{/if}} {{/if}}
{{#if stat}} {{#if stat}}
<li>Statistic : {{stat.label}}</li> <li>Statistic : {{stat.label}}</li>
@ -38,6 +39,12 @@
<li>Weapon : {{weaponName}}</li> <li>Weapon : {{weaponName}}</li>
{{/if}} {{/if}}
{{#if weapon}} {{#if weapon}}
{{#if (eq weapon.weapon.system.damagestatistic "str")}}
<li>MDL : {{weapon.weapon.system.mdl}}</li>
{{/if}}
{{#if (eq weapon.weapon.system.statistic "agi")}}
<li>RDL : {{weapon.weapon.system.rdl}}</li>
{{/if}}
{{#if vehicle}} {{#if vehicle}}
<li>Damage type : {{weapon.weapon.system.damagetype}}</li> <li>Damage type : {{weapon.weapon.system.damagetype}}</li>
{{else}} {{else}}

View File

@ -33,6 +33,14 @@
{{/select}} {{/select}}
</select> </select>
</li> </li>
{{#if owner}}
<li class="flexrow">
<label class="generic-label">ADRL</label>
<label class="generic-label">{{data.adrl}}</label>
</li>
{{/if}}
<li class="flexrow"><label class="generic-label">Location Protected</label> <li class="flexrow"><label class="generic-label">Location Protected</label>
<input type="text" class="" name="system.locationprotected" value="{{data.locationprotected}}" data-dtype="String"/> <input type="text" class="" name="system.locationprotected" value="{{data.locationprotected}}" data-dtype="String"/>
</li> </li>

View File

@ -93,13 +93,12 @@
<label class="attribute-value checkbox"><input type="checkbox" name="system.affectstatus" {{checked data.affectstatus}}/></label> <label class="attribute-value checkbox"><input type="checkbox" name="system.affectstatus" {{checked data.affectstatus}}/></label>
</li> </li>
{{#if data.affectstatus}} {{#if data.affectstatus}}
<li class="flexrow"><label class="generic-label">Affected status</label> <li class="flexrow"><label class="generic-label">Affected status/Auto damage</label>
<select class="competence-base flexrow" type="text" name="system.affectedstatus" value="{{data.affectedstatus}}" data-dtype="String"> <select class="competence-base flexrow" type="text" name="system.affectedstatus" value="{{data.affectedstatus}}" data-dtype="String">
{{#select data.affectedstatus}} {{#select data.affectedstatus}}
<option value="health">Health</option> <option value="mdl">MDL</option>
<option value="delirium">Delirium</option> <option value="rdl">RDL</option>
<option value="socialhealth">Social Health</option> <option value="adrl">ADRL</option>
<option value="stealthhealth">Stealth Health</option>
<option value="nrg">NRG</option> <option value="nrg">NRG</option>
<option value="mt">MT</option> <option value="mt">MT</option>
<option value="kbv">KBV</option> <option value="kbv">KBV</option>

View File

@ -38,6 +38,19 @@
</select> </select>
</li> </li>
{{#if (and owner (eq data.damagestatistic "str"))}}
<li class="flexrow">
<label class="generic-label">MDL</label>
<label class="competence-base">{{data.mdl}}</label>
</li>
{{/if}}
{{#if (and owner (eq data.statistic "agi"))}}
<li class="flexrow">
<label class="generic-label">RDL</label>
<label class="competence-base">{{data.rdl}}</label>
</li>
{{/if}}
<li class="flexrow"><label class="generic-label">Item size</label> <li class="flexrow"><label class="generic-label">Item size</label>
<input type="text" class="" name="system.itemsize" value="{{data.itemsize}}" data-dtype="String"/> <input type="text" class="" name="system.itemsize" value="{{data.itemsize}}" data-dtype="String"/>
</li> </li>

View File

@ -1,25 +1,17 @@
<ul class="status-block"> <ul class="status-block">
<li class="item flexrow"> <li class="item flexrow">
<span class="stat-label status-small-label status-col-name"><label class="status-small-label"><strong>Status</strong></label></span> <span class="stat-label status-small-label status-col-name"><label class="status-small-label"><strong>Status</strong></label></span>
<span class="status-header-label status-small-label no-grow"><label class="status-small-label">Cur</label></span> <span class="status-header-label status-small-label no-grow"><label class="status-medium-label">State</label></span>
<span class="status-header-label status-small-label no-grow"><label class="status-small-label">Mod</label></span>
<span class="status-header-label status-small-label no-grow"><label class="status-small-label">Max</label></span>
</li> </li>
{{#each data.secondary as |stat2 key|}} {{#each data.secondary as |stat2 key|}}
<li class="item flexrow " data-attr-key="{{key}}"> <li class="item flexrow " data-attr-key="{{key}}">
<span class="stat-label flexrow status-col-name" name="{{key}}"> <span class="stat-label flexrow status-col-name" name="{{key}}">
<label class="status-small-label"><strong>{{stat2.label}}</strong><br> <label class="status-small-label"><strong>{{stat2.label}}</strong><br>
{{#if (eq key "health")}}
(KOV -{{stat2.max}})
{{/if}}
{{#if (eq key "delirium")}}
(MV -{{stat2.max}})
{{/if}}
</label> </label>
</span> </span>
<input type="text" class="padd-right status-small-label no-grow" name="system.secondary.{{key}}.value" value="{{stat2.value}}" data-dtype="Number"/> <select class="padd-right status-small-label" type="text" name="system.secondary.{{key}}.status" value="{{stat2.status}}" data-dtype="String">
<input type="text" class="padd-right status-small-label no-grow" name="system.secondary.{{key}}.bonus" value="{{stat2.bonus}}" data-dtype="Number" {{@root.disabledBonus}}/> {{selectOptions (getStatusConfig key) selected=stat2.status nameAttr="key" labelAttr="name" }}
<input type="text" class="padd-right status-small-label no-grow" name="system.secondary.{{key}}.max" value="{{stat2.max}}" data-dtype="Number"/> </select>
</li> </li>
{{/each}} {{/each}}
<li class="item flexrow " data-key="nrg"> <li class="item flexrow " data-key="nrg">