This commit is contained in:
Forrest 2026-10-01 23:01:56 -04:00
parent 0cba7f5ee0
commit 32ed347b58
172 changed files with 5464 additions and 582 deletions

View file

@ -39,7 +39,9 @@ static func add_bugs(s: Dictionary, r: Dictionary, n: int, source: String, by: i
State.say(s, "ECC Memory blocks %s's Bug counters on %s." % [source, State.anomaly_name(s, r)])
State.fired(s, "ECC Memory", r.player)
return false
var counters := State.counters_of(State.anomaly(s, r))
State.anomaly(s, r).bugs += n
State.emit_counters(s, r, counters)
State.fired(s, source, by)
State.say(s, "%s: %s gets %d Bug counter%s (%d total)." % [source, State.anomaly_name(s, r), n, "" if n == 1 else "s", State.anomaly(s, r).bugs])
return true
@ -47,10 +49,12 @@ static func add_bugs(s: Dictionary, r: Dictionary, n: int, source: String, by: i
static func infect(s: Dictionary, r: Dictionary, n: int, source: String, by: int, permanent := false) -> void:
var av := State.anomaly(s, r)
var counters := State.counters_of(av)
if permanent:
av.permanentInfection += n
else:
av.infection += n
State.emit_counters(s, r, counters)
State.fired(s, source, by)
State.say(s, "%s: %s gets %s %sInfection counter%s (%d total)." % [source, State.anomaly_name(s, r), "an" if n == 1 else str(n), "permanent " if permanent else "", "" if n == 1 else "s", av.infection + av.permanentInfection])