mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
[Feature] Armor/Weapon Compendiums (#459)
* Fixed localization * . * Added all Secondary Weapons * Added all armors * Added Tier1 weapons * Tier2 Physical * Tier 2 magical * Tier 3 Physical * Tier 3 Magical * Tier 4 Physical * Tier 4 Magical * Added wheelchairs
This commit is contained in:
parent
8e516df7cb
commit
2c4d3bd4a3
277 changed files with 34221 additions and 431 deletions
|
|
@ -26,19 +26,20 @@ export default class CostField extends fields.ArrayField {
|
|||
}
|
||||
|
||||
static calcCosts(costs) {
|
||||
console.log(costs, CostField.getResources.call(this, costs))
|
||||
console.log(costs, CostField.getResources.call(this, costs));
|
||||
const resources = CostField.getResources.call(this, costs);
|
||||
return costs.map(c => {
|
||||
c.scale = c.scale ?? 1;
|
||||
c.step = c.step ?? 1;
|
||||
c.total = c.value + ((c.scale - 1) * c.step);
|
||||
c.total = c.value + (c.scale - 1) * c.step;
|
||||
c.enabled = c.hasOwnProperty('enabled') ? c.enabled : true;
|
||||
c.max = c.key === 'fear'
|
||||
? game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Resources.Fear)
|
||||
: resources[c.key].isReversed
|
||||
? resources[c.key].max
|
||||
: resources[c.key].value
|
||||
if(c.scalable) c.maxStep = Math.floor(c.max / c.step);
|
||||
c.max =
|
||||
c.key === 'fear'
|
||||
? game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Resources.Fear)
|
||||
: resources[c.key].isReversed
|
||||
? resources[c.key].max
|
||||
: resources[c.key].value;
|
||||
if (c.scalable) c.maxStep = Math.floor(c.max / c.step);
|
||||
return c;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue