the trinity was simple : a rifle or long gun of some sort for ranged fire , a pistol or shotgun for close-quarters gunfighting , and a melee weapon in case they ran out of ammo or had to stay quiet and bash some heads .