mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
Deleting old templates
This commit is contained in:
parent
9b3632be2f
commit
aff5998a45
21 changed files with 447 additions and 1015 deletions
|
|
@ -541,12 +541,12 @@ export default class DhpActor extends Actor {
|
|||
}
|
||||
|
||||
canResist(type, resistance) {
|
||||
if (!type) return 0;
|
||||
if (!type?.length) return false;
|
||||
return type.every(t => this.system.resistance[t]?.[resistance] === true);
|
||||
}
|
||||
|
||||
getDamageTypeReduction(type) {
|
||||
if (!type) return 0;
|
||||
if (!type?.length) return 0;
|
||||
const reduction = Object.entries(this.system.resistance).reduce(
|
||||
(a, [index, value]) => (type.includes(index) ? Math.min(value.reduction, a) : a),
|
||||
Infinity
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue