Skip to content

Commit

Permalink
v1.0.4
Browse files Browse the repository at this point in the history
- It turns out pirates don't use ammo for melee weapons.
  - Melee weapons will no longer complain about invalid ammo.
  • Loading branch information
sneat authored Sep 17, 2024
2 parents 447e48e + 11e770a commit f96fa79
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v1.0.4

- It turns out pirates don't use ammo for melee weapons.
- Melee weapons will no longer complain about invalid ammo.

# v1.0.3

- Prompt the player when they try to reload a weapon that has run out of ammo.
Expand Down
3 changes: 3 additions & 0 deletions module/api/action/character/character-attack-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ const isAttackValid = (weapon, ammo) => {
* @returns {Boolean}
*/
const isAmmoValid = (weapon, ammo) => {
if (!weapon.usesAmmo) {
return true;
}
if (!ammo) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion system.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "pirateborg",
"title": "PIRATE BORG",
"description": "Foundry VTT system for PIRATE BORG.",
"version": "v1.0.3",
"version": "v1.0.4",
"compatibility": {
"minimum": "11",
"verified": "12"
Expand Down

0 comments on commit f96fa79

Please sign in to comment.