mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 15:03:37 +02:00
Removed DestroyOnEmpty from consumables
This commit is contained in:
parent
263c05c307
commit
848a7ab466
65 changed files with 7 additions and 82 deletions
|
|
@ -2461,8 +2461,7 @@
|
|||
"featuresLabel": "Community Feature"
|
||||
},
|
||||
"Consumable": {
|
||||
"consumeOnUse": "Consume On Use",
|
||||
"destroyOnEmpty": "Destroy On Empty"
|
||||
"consumeOnUse": "Consume On Use"
|
||||
},
|
||||
"DomainCard": {
|
||||
"type": "Type",
|
||||
|
|
|
|||
|
|
@ -18,8 +18,7 @@ export default class DHConsumable extends BaseDataItem {
|
|||
const fields = foundry.data.fields;
|
||||
return {
|
||||
...super.defineSchema(),
|
||||
consumeOnUse: new fields.BooleanField({ initial: true }),
|
||||
destroyOnEmpty: new fields.BooleanField({ initial: true })
|
||||
consumeOnUse: new fields.BooleanField({ initial: true })
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -754,20 +754,10 @@ export default class DhpActor extends Actor {
|
|||
resources.forEach(r => {
|
||||
if (r.itemId) {
|
||||
const { path, value } = game.system.api.fields.ActionFields.CostField.getItemIdCostUpdate(r);
|
||||
|
||||
if (
|
||||
r.key === 'quantity' &&
|
||||
r.target.type === 'consumable' &&
|
||||
value === 0 &&
|
||||
r.target.system.destroyOnEmpty
|
||||
) {
|
||||
r.target.delete();
|
||||
} else {
|
||||
updates.items[r.key] = {
|
||||
target: r.target,
|
||||
resources: { [path]: value }
|
||||
};
|
||||
}
|
||||
updates.items[r.key] = {
|
||||
target: r.target,
|
||||
resources: { [path]: value }
|
||||
};
|
||||
} else {
|
||||
const valueFunc = (base, resource, baseMax) => {
|
||||
if (resource.clear) return baseMax && base.inverted ? baseMax : 0;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 60,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 62,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 60,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 62,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 60,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 60,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 62,
|
||||
|
|
|
|||
|
|
@ -89,7 +89,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 60,
|
||||
|
|
|
|||
|
|
@ -134,7 +134,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 62,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 60,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 62,
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 60,
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 62,
|
||||
|
|
|
|||
|
|
@ -89,7 +89,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 60,
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 60,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 62,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 60,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 62,
|
||||
|
|
|
|||
|
|
@ -85,7 +85,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 62,
|
||||
|
|
|
|||
|
|
@ -85,7 +85,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 62,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 60,
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -159,7 +159,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 62,
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 60,
|
||||
|
|
|
|||
|
|
@ -85,7 +85,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 60,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 60,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
}
|
||||
},
|
||||
"consumeOnUse": true,
|
||||
"destroyOnEmpty": true,
|
||||
"attribution": {
|
||||
"source": "Daggerheart SRD",
|
||||
"page": 61,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"id": "daggerheart",
|
||||
"title": "Daggerheart",
|
||||
"description": "An unofficial implementation of the Daggerheart system",
|
||||
"version": "1.9.4",
|
||||
"version": "1.9.5",
|
||||
"compatibility": {
|
||||
"minimum": "13.346",
|
||||
"verified": "13.351",
|
||||
|
|
|
|||
|
|
@ -10,8 +10,5 @@
|
|||
|
||||
<span>{{localize "DAGGERHEART.ITEMS.Consumable.consumeOnUse"}}</span>
|
||||
{{formField systemFields.consumeOnUse value=source.system.consumeOnUse}}
|
||||
|
||||
<span>{{localize "DAGGERHEART.ITEMS.Consumable.destroyOnEmpty"}}</span>
|
||||
{{formField systemFields.destroyOnEmpty value=source.system.destroyOnEmpty}}
|
||||
</fieldset>
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue