Fixes how passive perception is calculated.

The base value of 10 was left out.
This commit is contained in:
2021-03-25 01:20:35 -07:00
parent 6d95a5f094
commit 2e46676ecd

View File

@@ -666,13 +666,13 @@ public class Monster: NSManagedObject {
StringHelper.safeEqualsIgnoreCase($0.name, "Perception")
})
if (perceptionSkill == nil) {
return wisdomModifier
return 10 + wisdomModifier
} else if (perceptionSkill?.wrappedProficiency == ProficiencyType.expertise) {
return wisdomModifier + proficiencyBonus + proficiencyBonus
return 10 + wisdomModifier + proficiencyBonus + proficiencyBonus
} else if (perceptionSkill?.wrappedProficiency == ProficiencyType.proficient) {
return wisdomModifier + proficiencyBonus
return 10 + wisdomModifier + proficiencyBonus
} else {
return wisdomModifier
return 10 + wisdomModifier
}
}
}