Add rollTables
This commit is contained in:
@ -302,7 +302,7 @@ export class CrucibleActor extends Actor {
|
||||
// Compute whole enc
|
||||
let enc = 0
|
||||
for (let item of equipments) {
|
||||
item.data.idrDice = CrucibleUtility.getDiceFromLevel(Number(item.data.idr))
|
||||
//item.data.idrDice = CrucibleUtility.getDiceFromLevel(Number(item.data.idr))
|
||||
if (item.data.equipped) {
|
||||
if (item.data.iscontainer) {
|
||||
enc += item.data.contentsEnc
|
||||
@ -323,23 +323,6 @@ export class CrucibleActor extends Actor {
|
||||
this.encCurrent = enc
|
||||
this.containersTree = equipments.filter(item => item.data.containerid == "") // Returns the root of equipements without container
|
||||
|
||||
// Manages slow effect
|
||||
let overCapacity = Math.floor(this.encCurrent / this.getEncumbranceCapacity())
|
||||
this.encHindrance = Math.floor(this.encCurrent / this.getEncumbranceCapacity())
|
||||
|
||||
//console.log("Capacity", overCapacity, this.encCurrent / this.getEncumbranceCapacity() )
|
||||
let effect = this.data.items.find(item => item.type == "effect" && item.data.data.slow)
|
||||
if (overCapacity >= 4) {
|
||||
if (!effect) {
|
||||
effect = await CrucibleUtility.getEffectFromCompendium("Slowed")
|
||||
effect.data.slow = true
|
||||
this.createEmbeddedDocuments('Item', [effect])
|
||||
}
|
||||
} else {
|
||||
if (effect) {
|
||||
this.deleteEmbeddedDocuments('Item', [effect.id])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -589,7 +572,8 @@ export class CrucibleActor extends Actor {
|
||||
let armor = this.getEquippedArmor()
|
||||
if (armor) {
|
||||
armor = duplicate(armor)
|
||||
let diceValue = armor.data.absorprionroll
|
||||
let diceColor = armor.data.absorprionroll
|
||||
let rollTable = CrucibleUtility.getRollTableFromDiceColor( diceColor)
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user