fixed the parity between air and land enemies. +added a lot of new cards

This commit is contained in:
2023-11-11 19:03:01 +11:00
parent afc0a19b36
commit b0f8a37f60
99 changed files with 1795 additions and 188 deletions

View File

@ -2,5 +2,5 @@ extends StatusEffect
class_name StatusOnFire
func proc():
affected.damage(stats.potency)
func proc(affected, stacks, existing_effects):
affected.damage(stats.potency * stacks)

View File

@ -0,0 +1,9 @@
extends StatusEffect
class_name StatusCold
func on_attached(affected, existing_effects):
affected.movement_speed_penalty -= stats.potency
func on_removed(affected, existing_effects):
affected.movement_speed_penalty += stats.potency

View File

@ -1,44 +1,19 @@
extends Node
extends RefCounted
class_name StatusEffect
signal expired(effect : StatusEffect)
var stats : StatusStats
var affected :
set(value):
affected = value
on_attached()
var cooldown := 0.0
var other_cooldown := 0.0
var time_since_proc := 0.0
var time_existed := 0.0
func on_attached():
func on_attached(affected, existing_effects):
pass
func on_removed():
expired.emit(self)
func proc():
func on_removed(affected, existing_effects):
pass
func _ready():
other_cooldown = 1.0 / stats.proc_frequency
func _process(delta: float) -> void:
time_existed += delta
if time_existed >= stats.duration:
on_removed()
queue_free()
return
if stats.proc_frequency > 0.0:
cooldown += delta
if cooldown >= other_cooldown:
cooldown -= other_cooldown
proc()
func proc(affected, stacks, existing_effects):
pass

View File

@ -0,0 +1,6 @@
extends StatusEffect
class_name StatusPoison
func proc(affected, stacks, existing_effects):
affected.damage(stats.potency * stacks)

View File

@ -0,0 +1,5 @@
extends StatusEffect
class_name StatusRadioactive
func proc(affected, stacks, existing_effects):
affected.damage(stats.potency * stacks)

View File

@ -2,17 +2,9 @@ extends StatusEffect
class_name StatusSticky
func on_attached():
super.on_attached()
affected.movement_speed = affected.stats.movement_speed * (1.0 - stats.potency)
func on_attached(affected, existing_effects):
affected.movement_speed_penalty -= stats.potency
func on_removed():
super.on_removed()
var siblings = get_parent().get_children()
var stickies = 0
for node in siblings:
if node is StatusSticky:
stickies += 1
if stickies == 1:
affected.movement_speed = affected.stats.movement_speed
func on_removed(affected, existing_effects):
affected.movement_speed_penalty += stats.potency