Wednesday, 27 August 2025 01:54:42

This commit is contained in:
2025-08-27 01:54:43 -04:00
parent 4fe431a8e0
commit ac25e55bf3
12 changed files with 244 additions and 203 deletions

View File

@@ -11,26 +11,20 @@ public partial class Caffeinated : Condition
_timer.WaitTime = _countdown;
_timer.Autostart = true;
AddChild(_timer);
// GetNode<Timer>("Timer").Timeout += Fire;
if (OWNER is Worker)
_timer.Timeout += Fire;
if (_owner is Worker)
{
((Worker)OWNER)._staminaCanDrain = false;
((Worker)_owner)._agility._effective += 3;
}
}
public override void Fire()
{
_expired = true;
if (_target != null)
if (_owner is Worker)
{
if (_target is Worker)
{
Worker target = (Worker)_target;
target._stamina -= 1;
target._staminaCanDrain = true;
target._conditions.Remove(this);
}
_target = null;
((Worker)_owner)._agility._effective -= 3;
((Worker)_owner)._conditions.RemoveChild(this);
}
}
}