version 1 by Philip Black

Every thing has a number called the maximum shots. The maximum shots of a ranged weapon is usually 0.
Every thing has a number called the current shots. The current shots of a ranged weapon is usually 0.
Definition: a ranged weapon is unloaded if its current shots is 0 and its maximum shots is greater than 0.
Definition: a ranged weapon is waiting to be reloaded if its current shots is 0 and its maximum shots is greater than 0.
A ranged weapon has a text called the shots text. The shots text of a ranged weapon is usually "shots".
A ranged weapon has a text called the reload text. The reload text of a ranged weapon is usually "reload".
A ranged weapon has a text called the reload stem text. The reload stem text of a ranged weapon is usually "reload".
A thing has a text called the out of ammo text. The out of ammo text of a thing is usually "You pull the trigger, but nothing happens -- you're out of ammo! ▶[o]RELOAD[x]◀".
[Maximum shots: number of rounds the weapon can be used when fully loaded. Current shots: number of shots still loaded. Maximum load time: number of rounds it takes to load the weapon. Current load time: number of rounds it still takes to load the weapon.]
[Set maximum shots to 0 for any weapon that shouldn't use these statistics. Set maximum load time to -1 in case a weapon cannot be reloaded. NEVER set maximum load time to 0 for a weapon with maximum shots not 0.]
[The basic system does NOT deal with ammo. Everyone is assumed to have infinite ammunition.]
[After printing the name of a ranged weapon (called item) when taking inventory (this is the show ammo in inventory rule):
[if the maximum shots of item is not 0 and the current shots of item is not 0] ([current shots of item] of [maximum shots of item] [shots text of item] left)[end if]]
[After an actor hitting when the maximum shots of the global attacker weapon is greater than 0 (this is the decrease ammo rule):
decrease the current shots of the global attacker weapon by 1;
continue the action;]