More tests againts rolls
This commit is contained in:
@@ -42,12 +42,20 @@ export default class AwEActor extends Actor {
|
||||
const attribute = this.system.attributes[attributeId]
|
||||
if (!attribute) return null
|
||||
|
||||
// Collect knowledge bonuses from embedded Field items
|
||||
const knowledgeBonuses = this.itemTypes.field?.map(f => ({
|
||||
label: f.name,
|
||||
bonus: f.system.knowledgeBonus ?? ""
|
||||
})).filter(f => f.bonus !== "") ?? []
|
||||
|
||||
return AwERoll.prompt({
|
||||
attributeKey: attributeId,
|
||||
modifier: attribute.mod ?? 0,
|
||||
actorId: this.id,
|
||||
actorName: this.name,
|
||||
actorImage: this.img,
|
||||
attributeKey: attributeId,
|
||||
modifier: attribute.mod ?? 0,
|
||||
attributeBonus: attribute.bonus ?? 0,
|
||||
knowledgeBonuses,
|
||||
actorId: this.id,
|
||||
actorName: this.name,
|
||||
actorImage: this.img,
|
||||
...options
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user