Friday, 22 August 2025 01:17:08

This commit is contained in:
2025-08-22 01:17:10 -04:00
parent 2eb95b18fd
commit 4fe431a8e0
18 changed files with 172 additions and 56 deletions

View File

@@ -0,0 +1,36 @@
using Godot;
using System;
public partial class Caffeinated : Condition
{
public Caffeinated(Node2D OWNER) : base(OWNER)
{
_triggers.Add(Trigger.On.Time);
_countdown = 2;
_timer.OneShot = true;
_timer.WaitTime = _countdown;
_timer.Autostart = true;
AddChild(_timer);
// GetNode<Timer>("Timer").Timeout += Fire;
if (OWNER is Worker)
{
((Worker)OWNER)._staminaCanDrain = false;
}
}
public override void Fire()
{
_expired = true;
if (_target != null)
{
if (_target is Worker)
{
Worker target = (Worker)_target;
target._stamina -= 1;
target._staminaCanDrain = true;
target._conditions.Remove(this);
}
_target = null;
}
}
}

View File

@@ -0,0 +1 @@
uid://ciwja82k4ihw6

View File

@@ -16,7 +16,7 @@ public partial class Spiky : Condition
{
Worker target = (Worker)_target;
target._rotationalForce += 10;
target.ChangeHealth(-1, _owner);
// target.ChangeHealth(-1, _owner);
}
_target = null;
}

View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dtnwf7i53hix6"]
[ext_resource type="Script" path="res://Gameplay/Effects/Spiky.cs" id="1_pcknv"]
[node name="Spiky" type="Node"]
script = ExtResource("1_pcknv")