extends Resource
class_name WeaponData

## Resource that stores weapon statistics and properties
## Can be reused for both equipped weapons and world pickups

enum Hand { MAIN_HAND, OFF_HAND, TWO_HAND }

@export_category("Weapon Info")
@export var weapon_name: String = "Weapon"
@export_multiline var description: String = ""
@export var hand_type: Hand = Hand.MAIN_HAND

@export_category("Combat Stats")
@export var damage: float = 10.0
@export var attack_range: float = 3.0
@export var attack_cooldown: float = 0.5
@export var attack_animation: String = "Attack1"  # Animation to play when attacking
@export var knockback_force: float = 8.0  # How much to push the target back

@export_category("Defense Stats")
@export var can_block: bool = false
@export_range(0.0, 1.0) var block_reduction: float = 0.5  # Percentage of damage blocked (0.5 = 50%)

@export_category("Visual")
@export var mesh_scene: PackedScene  # The 3D mesh for this weapon
@export var icon: Texture2D  # Optional icon for UI

@export_category("Physics (for world pickups)")
@export var pickup_radius: float = 1.5  # How close player needs to be to pick up
@export var weight: float = 1.0  # Mass when dropped in world
