It has 20 charges. By expending any number of charges up to a maximum of your Intelligence modifier (min. 1) as an action, you can fire a small lightning bolt from the gun at one target. You make the attack with advantage if the target is wearing or made of metal. On a hit, the gun deals 1d10 lightning damage per charge expended. Treat this attack as a spell attack using your Intelligence modifier.