Zeeshaun fecbefc15c
Some checks failed
Deploy Promiscuity Auth API / deploy (push) Successful in 1m59s
Deploy Promiscuity Character API / deploy (push) Successful in 1m16s
Deploy Promiscuity Inventory API / deploy (push) Has been cancelled
Deploy Promiscuity Locations API / deploy (push) Has been cancelled
Deploy Promiscuity Mail API / deploy (push) Has been cancelled
Deploy Promiscuity World API / deploy (push) Has been cancelled
Deploy Promiscuity Crafting API / deploy (push) Has been cancelled
k8s smoke test / test (push) Has been cancelled
Recommiting glbs for LFS
2026-05-12 15:34:12 -05:00

31 lines
968 B
GDScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# weapon.gd
extends Resource
class_name iWeapon
# This acts as an interface base class.
# --- Common Stats ---
@export var weapon_name: String = "Unnamed Weapon"
@export var damage: float = 10.0
@export var attack_speed: float = 1.0 # attacks per second
@export var range: float = 1.5 # meters; melee = short, ranged = long
@export var knockback: float = 0.0
@export var stamina_cost: float = 5.0
# --- Rangedspecific Stats ---
@export var projectile_scene: PackedScene # null for melee
@export var projectile_speed: float = 20.0
@export var ammo_type: String = "" # e.g. "arrows", "bullets"
@export var ammo_per_shot: int = 1
# --- Meleespecific Stats ---
@export var swing_arc: float = 90.0 # degrees
@export var hitbox_size: float = 1.0
# --- Interface Methods ---
func attack(user):
push_error("Weapon.attack() not implemented in subclass")
return null
func can_attack(user) -> bool:
return true