<commit_before>/* 
	JCavernApplet.java

	Title:			JCavern And Glen
	Author:			<NAME>
	Description:	
*/

package jcavern;

/**
 * A Sword is a Thing the player uses to attack combatants.
 *
 * @author	<NAME>
 * @version	$Id$
 */
public class Sword extends Treasure
{
	public static final double	kWearFraction = 0.1;
	
	private int					mStrength;
	private int					mCharges;
	
	public Sword(String aName, int strength)
	{
		super(aName);
		mStrength = strength;
		
		/* charges := charges + Random(10) + 2; */
		mCharges = (int) (Math.random() * 10 + 2);<commit_msg>add an extra constructor for when you want to explicitly set the number of charges for a sword<commit_after>/* 
	JCavernApplet.java

	Title:			JCavern And Glen
	Author:			<NAME>
	Description:	
*/

package jcavern;

/**
 * A Sword is a Thing the player uses to attack combatants.
 *
 * @author	<NAME>
 * @version	$Id$
 */
public class Sword extends Treasure
{
	public static final double	kWearFraction = 0.1;
	
	private int					mStrength;
	private int					mCharges;
	
	public Sword(String aName, int strength)
	{
		/* charges := charges + Random(10) + 2; */
		this(aName, strength, (int) (Math.random() * 10 + 2));
	}
	
	public Sword(String aName, int strength, int charges)
	{
		super(aName);
		mStrength = strength;
		mCharges = charges;
{'fraction_non_alphanumeric': 0.11145272867025365, 'fraction_numerical': 0.012298232129131437, 'mean_word_length': 3.3112582781456954, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4793001', 'n_tokens_mistral': 525, 'n_tokens_neox': 447, 'n_words': 146}