forked from public/bol
Corrections sur encaissement
This commit is contained in:
parent
f1a3f2df36
commit
ade88fb54b
@ -607,16 +607,18 @@ export class BoLActor extends Actor {
|
|||||||
|
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
heroReroll() {
|
heroReroll() {
|
||||||
if (this.type == 'character') {
|
if (this.type == 'character' || this.system.villainy == 'adversary') {
|
||||||
return this.system.resources.hero.value > 0;
|
return this.system.resources.hero.value > 0;
|
||||||
} else {
|
|
||||||
if (this.system.villainy == 'adversary') {
|
|
||||||
return this.system.resources.hero.value > 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
/*-------------------------------------------- */
|
||||||
|
getHeroPoints() {
|
||||||
|
if (this.type == 'character' || this.system.villainy == 'adversary') {
|
||||||
|
return this.system.resources.hero.value
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
getResourcesFromType() {
|
getResourcesFromType() {
|
||||||
let resources = {};
|
let resources = {};
|
||||||
|
@ -491,6 +491,7 @@ export class BoLRoll {
|
|||||||
if (defender) { // If target is selected
|
if (defender) { // If target is selected
|
||||||
rollData.defence = defender.defenseValue
|
rollData.defence = defender.defenseValue
|
||||||
rollData.armorMalus = defender.armorMalusValue
|
rollData.armorMalus = defender.armorMalusValue
|
||||||
|
rollData.defenderHeroPoints = defender.getHeroPoints()
|
||||||
rollData.shieldBlock = 'none'
|
rollData.shieldBlock = 'none'
|
||||||
let shields = defender.shields
|
let shields = defender.shields
|
||||||
//console.log("Defender stats", defender)
|
//console.log("Defender stats", defender)
|
||||||
@ -578,7 +579,7 @@ export class BoLRoll {
|
|||||||
const isMalus = (rollData.bmDice < 0)
|
const isMalus = (rollData.bmDice < 0)
|
||||||
|
|
||||||
let rollbase = rollData.attrValue + rollData.aptValue
|
let rollbase = rollData.attrValue + rollData.aptValue
|
||||||
if (rollData.weapon && rollData.weapon.system.properties.onlymodifier) {
|
if (rollData.weapon?.system.properties.onlymodifier) {
|
||||||
rollbase = 0
|
rollbase = 0
|
||||||
}
|
}
|
||||||
let diceData = BoLUtility.getDiceData()
|
let diceData = BoLUtility.getDiceData()
|
||||||
|
@ -611,6 +611,7 @@ export class BoLUtility {
|
|||||||
attackId: rollData.id,
|
attackId: rollData.id,
|
||||||
attacker: rollData.attacker,
|
attacker: rollData.attacker,
|
||||||
defender: defender,
|
defender: defender,
|
||||||
|
defenderHeroPoints:defender.getHeroPoints(),
|
||||||
defenderWeapons: defenderWeapons,
|
defenderWeapons: defenderWeapons,
|
||||||
damageTotal: rollData.damageTotal,
|
damageTotal: rollData.damageTotal,
|
||||||
damagesIgnoresArmor: rollData.damagesIgnoresArmor,
|
damagesIgnoresArmor: rollData.damagesIgnoresArmor,
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
],
|
],
|
||||||
"url": "https://www.uberwald.me/gitea/public/bol",
|
"url": "https://www.uberwald.me/gitea/public/bol",
|
||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"version": "11.0.13",
|
"version": "11.0.14",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
"verified": "11"
|
"verified": "11"
|
||||||
@ -202,7 +202,7 @@
|
|||||||
],
|
],
|
||||||
"socket": true,
|
"socket": true,
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/bol/raw/v10/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/bol/raw/v10/system.json",
|
||||||
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v11.0.13.zip",
|
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v11.0.14.zip",
|
||||||
"background": "systems/bol/ui/page_accueil.webp",
|
"background": "systems/bol/ui/page_accueil.webp",
|
||||||
"gridDistance": 1.5,
|
"gridDistance": 1.5,
|
||||||
"gridUnits": "m",
|
"gridUnits": "m",
|
||||||
|
@ -8,15 +8,13 @@
|
|||||||
<button class="damage-handling" data-defense-mode="damage-with-armor" data-attack-id="{{attackId}}">{{localize "BOL.chat.witharmor"}}</button>
|
<button class="damage-handling" data-defense-mode="damage-with-armor" data-attack-id="{{attackId}}">{{localize "BOL.chat.witharmor"}}</button>
|
||||||
<button class="damage-handling" data-defense-mode="damage-without-armor" data-attack--id="{{attackId}}">{{localize "BOL.chat.withoutarmor"}}</button>
|
<button class="damage-handling" data-defense-mode="damage-without-armor" data-attack--id="{{attackId}}">{{localize "BOL.chat.withoutarmor"}}</button>
|
||||||
|
|
||||||
{{#if isHeroAdversary}}
|
{{#if (gt defenderHeroPoints 0)}}
|
||||||
{{#if (gt defender.system.resources.hero.value 0)}}
|
|
||||||
<button class="damage-handling" data-defense-mode="hero-reduce-damage" data-attack-id="{{attackId}}">{{localize "BOL.chat.shakeoff"}}</button>
|
<button class="damage-handling" data-defense-mode="hero-reduce-damage" data-attack-id="{{attackId}}">{{localize "BOL.chat.shakeoff"}}</button>
|
||||||
|
|
||||||
{{#each defenderWeapons as |weapon idx|}}
|
{{#each defenderWeapons as |weapon idx|}}
|
||||||
<button class="damage-handling" data-defense-mode="hero-in-extremis" data-attack-id="{{@root.attackId}}" data-weapon-id="{{weapon._id}}">{{localize "BOL.chat.splinteredshield" name=weapon.name}}</button>
|
<button class="damage-handling" data-defense-mode="hero-in-extremis" data-attack-id="{{@root.attackId}}" data-weapon-id="{{weapon._id}}">{{localize "BOL.chat.splinteredshield" name=weapon.name}}</button>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<button class="damage-handling" data-defense-mode="damage-not-applied" data-attack-id="{{attackId}}">{{localize "BOL.chat.nodamage"}}</button>
|
<button class="damage-handling" data-defense-mode="damage-not-applied" data-attack-id="{{attackId}}">{{localize "BOL.chat.nodamage"}}</button>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user