Many changes
Handle it
This commit is contained in:
parent
bf09402bc5
commit
214e0aa5e0
366 changed files with 24353 additions and 2096 deletions
31
player/modifiers/modifier.gd
Normal file
31
player/modifiers/modifier.gd
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
class_name Modifier extends Resource
|
||||
|
||||
enum ModifierType {
|
||||
ADDITIVE, # Simply adds values (e.g., +5 damage)
|
||||
MULTIPLICATIVE, # Multiplies by a percentage (e.g., 20% more damage)
|
||||
OVERRIDE, # Completely replaces the value
|
||||
CONDITIONAL # Applies under certain conditions
|
||||
}
|
||||
|
||||
@export var id: String
|
||||
@export var display_name: String
|
||||
@export var description: String
|
||||
@export var icon: Texture
|
||||
@export var rarity: int
|
||||
@export var modifier_type: ModifierType = ModifierType.ADDITIVE
|
||||
@export var priority: int = 0 # Higher priority modifiers apply first
|
||||
|
||||
# Called when the modifier is added to a weapon or ability
|
||||
func on_equip(_owner) -> void:
|
||||
pass
|
||||
|
||||
# Called when the modifier is removed
|
||||
func on_unequip(_owner) -> void:
|
||||
pass
|
||||
|
||||
# Override in child classes for specific modification logic
|
||||
func modify_projectile(_projectile) -> void:
|
||||
pass
|
||||
|
||||
func modify_ability(_ability) -> void:
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue