Multiple Shots per Firing 0.0.7
This commit is contained in:
@@ -134,7 +134,8 @@ export class MothershipActor extends Actor {
|
||||
}
|
||||
} else {
|
||||
if (item.data.curShots > 0) {
|
||||
item.data.curShots -= 1;
|
||||
let subAmount = Math.max(item.data.shotsPerFire, 1);
|
||||
item.data.curShots = Math.max(item.data.curShots-subAmount, 0);
|
||||
console.log("Unloading Shots");
|
||||
this.updateEmbeddedEntity('OwnedItem', item);
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"name": "mothership",
|
||||
"title": "Mothership",
|
||||
"description": "The Mothership system for FoundryVTT!",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.7",
|
||||
"minimumCoreVersion": "0.5.5",
|
||||
"compatibleCoreVersion": "0.5.5",
|
||||
"templateVersion": 2,
|
||||
|
||||
@@ -218,6 +218,7 @@
|
||||
"ammo": 10,
|
||||
"shots": 1,
|
||||
"curShots": 0,
|
||||
"shotsPerFire" : 1,
|
||||
"useAmmo": false,
|
||||
"ammoType": "",
|
||||
"critDmg": "",
|
||||
|
||||
@@ -16,6 +16,14 @@
|
||||
<label class="resource-label">Current Shots</label>
|
||||
<input type="text" name="data.curShots" value="{{data.curShots}}" data-dtype="Number" />
|
||||
</div>
|
||||
<div class="resource">
|
||||
<label class="resource-label">Shots Per Firing</label>
|
||||
<input type="text" name="data.shotsPerFire" value="{{data.shotsPerFire}}" data-dtype="String" />
|
||||
</div>
|
||||
<div class="resource">
|
||||
<label class="resource-label">Use Ammo</label>
|
||||
<input type="checkbox" name="data.useAmmo" value="{{data.useAmmo}}" {{#if data.useAmmo}}checked{{/if}} data-dtype="Boolean" />
|
||||
</div>
|
||||
<div class="resource">
|
||||
<label class="resource-label">Ammunition</label>
|
||||
<input type="text" name="data.ammo" value="{{data.ammo}}" data-dtype="Number" />
|
||||
@@ -24,10 +32,6 @@
|
||||
<label class="resource-label">Ammo Type</label>
|
||||
<input type="text" name="data.ammoType" value="{{data.ammoType}}" data-dtype="String" />
|
||||
</div>
|
||||
<div class="resource">
|
||||
<label class="resource-label">Use Ammo</label>
|
||||
<input type="checkbox" name="data.useAmmo" value="{{data.useAmmo}}" {{#if data.useAmmo}}checked{{/if}} data-dtype="Boolean" />
|
||||
</div>
|
||||
<div class="resource">
|
||||
<label class="resource-label">Critical Damage</label>
|
||||
<input type="text" name="data.critDmg" value="{{data.critDmg}}" data-dtype="String" />
|
||||
|
||||
Reference in New Issue
Block a user