valeros
April 14th, 2020, 03:48
Simple ammo counter for the 4E ruleset by using code from the 5E ruleset.
The ammo only displays with the weapon on the combat tab of the full character sheet or the main tab if the mini character sheet. (That was existing functionality.) It does not display with the power on the Powers tab (though using a power will still decrement the ammo.)
Since the actual weapon databasenode used in an attack is not passed in the call to perform an attack (and I was not willing to find all the places attacks can be called from and fixing it there), the ammo is decremented based on the weapon name. So if you have two weapons named the same, it will decrement from the first one it finds. It does try to distinguish between the melee and thrown version of the same weapon (e.g., a dagger), but otherwise the first match is used.
The ammo only displays with the weapon on the combat tab of the full character sheet or the main tab if the mini character sheet. (That was existing functionality.) It does not display with the power on the Powers tab (though using a power will still decrement the ammo.)
Since the actual weapon databasenode used in an attack is not passed in the call to perform an attack (and I was not willing to find all the places attacks can be called from and fixing it there), the ammo is decremented based on the weapon name. So if you have two weapons named the same, it will decrement from the first one it finds. It does try to distinguish between the melee and thrown version of the same weapon (e.g., a dagger), but otherwise the first match is used.