Wednesday, 27 August 2025 01:54:42
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user