mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Added critical threshold for Adversaries, determining at what number they crit (#1331)
This commit is contained in:
parent
d5b501cb98
commit
f78f8e32b6
5 changed files with 31 additions and 6 deletions
|
|
@ -39,6 +39,7 @@ export default class DhpAdversary extends BaseDataActor {
|
|||
integer: true,
|
||||
label: 'DAGGERHEART.GENERAL.hordeHp'
|
||||
}),
|
||||
criticalThreshold: new fields.NumberField({ required: true, integer: true, min: 1, max: 20, initial: 20 }),
|
||||
damageThresholds: new fields.SchemaField({
|
||||
major: new fields.NumberField({
|
||||
required: true,
|
||||
|
|
@ -54,8 +55,20 @@ export default class DhpAdversary extends BaseDataActor {
|
|||
})
|
||||
}),
|
||||
resources: new fields.SchemaField({
|
||||
hitPoints: resourceField(0, 0, 'DAGGERHEART.GENERAL.HitPoints.plural', true),
|
||||
stress: resourceField(0, 0, 'DAGGERHEART.GENERAL.stress', true)
|
||||
hitPoints: resourceField(
|
||||
0,
|
||||
0,
|
||||
'DAGGERHEART.GENERAL.HitPoints.plural',
|
||||
true,
|
||||
game.i18n.localize('DAGGERHEART.GENERAL.max')
|
||||
),
|
||||
stress: resourceField(
|
||||
0,
|
||||
0,
|
||||
'DAGGERHEART.GENERAL.stress',
|
||||
true,
|
||||
game.i18n.localize('DAGGERHEART.GENERAL.max')
|
||||
)
|
||||
}),
|
||||
rules: new fields.SchemaField({
|
||||
conditionImmunities: new fields.SchemaField({
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@ export default class D20Roll extends DHRoll {
|
|||
DISADVANTAGE: -1
|
||||
};
|
||||
|
||||
static CRITICAL_TRESHOLD = 20;
|
||||
|
||||
static DefaultDialog = D20RollDialog;
|
||||
|
||||
get title() {
|
||||
|
|
@ -37,7 +35,7 @@ export default class D20Roll extends DHRoll {
|
|||
|
||||
get isCritical() {
|
||||
if (!this.d20._evaluated) return;
|
||||
return this.d20.total >= this.constructor.CRITICAL_TRESHOLD;
|
||||
return this.d20.total >= this.data.system.criticalThreshold;
|
||||
}
|
||||
|
||||
get hasAdvantage() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue