Compare commits
2 Commits
fvtt-pegas
...
fvtt-pegas
Author | SHA1 | Date | |
---|---|---|---|
45332702dc | |||
d8215301b4 |
@ -124,9 +124,9 @@ export class PegasusActor extends Actor {
|
|||||||
this.updateSize()
|
this.updateSize()
|
||||||
}
|
}
|
||||||
if (this.type == 'vehicle') {
|
if (this.type == 'vehicle') {
|
||||||
this.computeVehicleStats();
|
this.computeVehicleStats()
|
||||||
}
|
}
|
||||||
super.prepareDerivedData();
|
super.prepareDerivedData()
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -263,8 +263,10 @@ export class PegasusActor extends Actor {
|
|||||||
effect.system.stataffected = "mr"
|
effect.system.stataffected = "mr"
|
||||||
effect.system.bonusdice = true
|
effect.system.bonusdice = true
|
||||||
await this.createEmbeddedDocuments('Item', [effect])
|
await this.createEmbeddedDocuments('Item', [effect])
|
||||||
ChatMessage.create({ content: `Tactician Bonus Dice has been added to ${this.name} (${level})`,
|
ChatMessage.create({
|
||||||
whisper: ChatMessage.getWhisperRecipients('GM') } )
|
content: `Tactician Bonus Dice has been added to ${this.name} (${level})`,
|
||||||
|
whisper: ChatMessage.getWhisperRecipients('GM')
|
||||||
|
})
|
||||||
}
|
}
|
||||||
async removeTacticianEffect() {
|
async removeTacticianEffect() {
|
||||||
let effect = this.items.find(item => item.name.toLowerCase().includes("tactician bonus dice"))
|
let effect = this.items.find(item => item.name.toLowerCase().includes("tactician bonus dice"))
|
||||||
@ -2161,6 +2163,23 @@ addTopSpeedBonus(topspeed, bonus) {
|
|||||||
effect.system.isspeed = speed
|
effect.system.isspeed = speed
|
||||||
await this.createEmbeddedDocuments("Item", [effect])
|
await this.createEmbeddedDocuments("Item", [effect])
|
||||||
}
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
processVehicleStatEffects() {
|
||||||
|
let effects = this.items.filter(effect => effect.type == "effect" && effect.system.genre == "positive" && effect.system.statdice)
|
||||||
|
for (let statKey in this.system.statistics) {
|
||||||
|
let stat = duplicate(this.system.statistics[statKey])
|
||||||
|
let bonus = 0
|
||||||
|
for (let effect of effects) {
|
||||||
|
if (effect.system.stataffected == statKey) {
|
||||||
|
bonus += Number(effect.system.effectlevel)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bonus != stat.bonuseffect) {
|
||||||
|
stat.bonuseffect = bonus
|
||||||
|
this.update({ [`system.statistics.${statKey}`]: stat })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async computeVehicleStats() {
|
async computeVehicleStats() {
|
||||||
@ -2252,6 +2271,7 @@ addTopSpeedBonus(topspeed, bonus) {
|
|||||||
ChatMessage.create({ content: `The vehicle ${this.name} has been destroyed !` })
|
ChatMessage.create({ content: `The vehicle ${this.name} has been destroyed !` })
|
||||||
}
|
}
|
||||||
this.processVehicleArmorShields()
|
this.processVehicleArmorShields()
|
||||||
|
this.processVehicleStatEffects()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +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.285",
|
"verified": "10.286",
|
||||||
"maximum": "10"
|
"maximum": "10"
|
||||||
},
|
},
|
||||||
"id": "fvtt-pegasus-rpg",
|
"id": "fvtt-pegasus-rpg",
|
||||||
@ -253,7 +253,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.1.1",
|
"version": "10.1.2",
|
||||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.1.1.zip",
|
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.1.2.zip",
|
||||||
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
|
"background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp"
|
||||||
}
|
}
|
@ -14,7 +14,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<select class="status-small-label color-class-common" type="text" name="system.statistics.{{key}}.level"
|
<select class="status-small-label color-class-common" type="text" name="system.statistics.{{key}}.level"
|
||||||
value="{{stat.level}}" data-dtype="Number" disabled>
|
value="{{stat.level}}" data-dtype="Number" disabled>
|
||||||
{{#select stat.level}}
|
{{#select (add stat.level stat.bonuseffect)}}
|
||||||
{{#if (eq key "ad")}}
|
{{#if (eq key "ad")}}
|
||||||
{{{@root.optionsLevel}}}
|
{{{@root.optionsLevel}}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
Reference in New Issue
Block a user