Many changes
Handle it
This commit is contained in:
parent
bf09402bc5
commit
214e0aa5e0
366 changed files with 24353 additions and 2096 deletions
25
player/modifiers/projectile_size_additive.gd
Normal file
25
player/modifiers/projectile_size_additive.gd
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
class_name ProjectileSizeAdditive extends Modifier
|
||||
|
||||
@export var size_increase: float = 0.5 # +50% bigger
|
||||
|
||||
func _init():
|
||||
id = "size_additive"
|
||||
display_name = "Enlarged Projectiles"
|
||||
description = "Increases projectile size by %d%%" % (size_increase * 100)
|
||||
modifier_type = ModifierType.ADDITIVE
|
||||
|
||||
func apply_stats_modification(final_stats: Dictionary, base_stats: Dictionary) -> void:
|
||||
if final_stats.has("projectile_size"):
|
||||
final_stats.projectile_size += size_increase
|
||||
|
||||
func modify_projectile(projectile) -> void:
|
||||
# This will be called when the projectile is created
|
||||
# Scale is often handled in the recalculate_stats method, but we can also add visual effects here
|
||||
projectile.connect("on_spawned", _on_projectile_spawned)
|
||||
|
||||
func _on_projectile_spawned(projectile):
|
||||
# Add a trail effect for larger projectiles
|
||||
if projectile.scale.x > 1.2:
|
||||
pass
|
||||
#var trail = preload("res://scenes/projectile_trail.tscn").instantiate()
|
||||
#projectile.add_child(trail)
|
||||
Loading…
Add table
Add a link
Reference in a new issue