Fix armors

This commit is contained in:
sladecraven 2022-08-26 18:54:40 +02:00
parent fa501abbd5
commit 752fdeaa9e
2 changed files with 5 additions and 5 deletions

View File

@ -752,10 +752,10 @@ export class CrucibleActor extends Actor {
let diceColor = armor.system.absorprionroll let diceColor = armor.system.absorprionroll
let armorResult = await CrucibleUtility.getRollTableFromDiceColor( diceColor, false ) let armorResult = await CrucibleUtility.getRollTableFromDiceColor( diceColor, false )
console.log("Armor log", armorResult) console.log("Armor log", armorResult)
let armorValue = (Number(armorResult.text) - reduce) * multiply let armorValue = (Number(armorResult.text) + reduce) * multiply
if ( advantage || disadvantage) { if ( advantage || disadvantage) {
let armorResult2 = await CrucibleUtility.getRollTableFromDiceColor( diceColor, false ) let armorResult2 = await CrucibleUtility.getRollTableFromDiceColor( diceColor, false )
let armorValue2 = (Number(armorResult2.text) - reduce) * multiply let armorValue2 = (Number(armorResult2.text) + reduce) * multiply
if ( advantage) { if ( advantage) {
armorValue = (armorValue2 > armorValue) ? armorValue2 : armorValue armorValue = (armorValue2 > armorValue) ? armorValue2 : armorValue
messages.push(`Armor advantage - Roll 1 = ${armorValue} - Roll 2 = ${armorValue2}`) messages.push(`Armor advantage - Roll 1 = ${armorValue} - Roll 2 = ${armorValue2}`)

View File

@ -199,15 +199,15 @@
"styles": [ "styles": [
"styles/simple.css" "styles/simple.css"
], ],
"version": "10.0.6", "version": "10.0.7",
"compatibility": { "compatibility": {
"minimum": "10", "minimum": "10",
"verified": "10.278", "verified": "10.279",
"maximum": "10" "maximum": "10"
}, },
"title": "Crucible RPG", "title": "Crucible RPG",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/raw/master/system.json", "manifest": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/raw/master/system.json",
"download": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/archive/fvtt-crucible-rpg-v10.0.6.zip", "download": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/archive/fvtt-crucible-rpg-v10.0.7.zip",
"url": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg", "url": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg",
"background": "images/ui/crucible_welcome_page.webp", "background": "images/ui/crucible_welcome_page.webp",
"id": "fvtt-crucible-rpg" "id": "fvtt-crucible-rpg"