package dev.kkorolyov.killstreek.item;

import dev.kkorolyov.killstreek.utility.BoundedValue;
import dev.kkorolyov.pancake.component.Sprite;

/**
 * An offensive equippable.
 */
public class Weapon extends Equippable {
	private final float rate;
	private boolean twoHanded;

	/**
	 * Constructs a new weapon.
	 * @param name weapon name
	 * @param sprite weapon visual
	 * @param durability weapon durability
	 * @param value damage value
	 * @param rate weapon fire rate in s
	 * @param twoHanded whether this weapon requires both weapon slots to equip
	 */
	public Weapon(String name, Sprite sprite, BoundedValue<Integer> durability, int value, int rate, boolean twoHanded) {
		super(name, sprite, durability, value);

		this.rate = rate;
		this.twoHanded = twoHanded;
	}

	/** @return fire rate in s */
	public float getRate() {
		return rate;
	}

	/** @return {@code true} if this weapon requires both weapon slots to equip */
	public boolean isTwoHanded() {
		return twoHanded;
	}
}

@@ -248,33 +248,39 @@
 private 
-boolean twoHanded
+final int requiredSlots
 ;%0A%0A%09/**%0A
@@ -491,73 +491,74 @@
 ram 
-twoHanded whether this weapon requires both weapon slots to equip
+requiredSlots number of weapon slots required to equip this weapon
 %0A%09 *
@@ -661,25 +661,25 @@
 te, 
-boolean twoHanded
+int requiredSlots
 ) %7B%0A
@@ -752,29 +752,37 @@
 his.
-twoHanded = twoHanded
+requiredSlots = requiredSlots
 ;%0A%09%7D
@@ -876,36 +876,25 @@
 urn 
-%7B@code true%7D if this
+number of
  weapon 
 requ
@@ -893,74 +893,75 @@
 pon 
+slots 
 require
-s both weapon slots to equip */%0A%09public boolean isTwoHanded
+d to equip this weapon */%0A%09public int getRequiredSlots
 () %7B
@@ -974,17 +974,21 @@
 urn 
-twoHanded
+requiredSlots
 ;%0A%09%7D

Change Weapon.twoHanded to arbitrary number of required slots