diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm
index 6d2d1654c29..83d2db583de 100644
--- a/code/game/gamemodes/malfunction/malfunction.dm
+++ b/code/game/gamemodes/malfunction/malfunction.dm
@@ -10,6 +10,7 @@
var/malf_mode_declared = 0
var/boom = 0
var/apcs = 0 //Adding dis to track how many APCs the AI hacks. --NeoFite
+ var/win = 0
/datum/game_mode/malfunction/announce()
world << "The current game mode is - AI Malfunction!"
@@ -79,13 +80,15 @@
/datum/game_mode/malfunction/process()
- AI_win_timeleft = AI_win_timeleft - apcs //Victory timer now de-increments based on how many APCs are hacked. --NeoFite
+ if (apcs >= 3)
+ AI_win_timeleft = AI_win_timeleft - (apcs/3) //Victory timer now de-increments based on how many APCs are hacked. --NeoFite
// if(AI_win_timeleft == 1200) // Was 1790
// malf_mode_declared = 1
check_win()
/datum/game_mode/malfunction/check_win()
- if (AI_win_timeleft <= 0)
+ if (AI_win_timeleft <= 0 && !win)
+ win = 1
world << "The AI has won!"
world << "It has fully taken control of all of [station_name()]'s systems."
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index a28039d325b..e3da1de39ec 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -54,8 +54,8 @@
var/datum/game_mode/malfunction/malf = ticker.mode
for (var/datum/mind/malfai in malf.malf_ai)
if (src.mind == malfai)
- if (malf.apcs > 0)
- stat(null, "Time until station control secured: [max(malf.AI_win_timeleft/malf.apcs, 0)] seconds")
+ if (malf.apcs >= 3)
+ stat(null, "Time until station control secured: [max(malf.AI_win_timeleft/(malf.apcs/3), 0)] seconds")
if(!src.stat)
stat(null, text("System integrity: [(src.health+100)/2]%"))