mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 07:20:09 +01:00
Malf Buffs (#4049)
Severely Buffs the Malf AI: Increases the speed and point bonus a single APC grants Removed Failure from Advanced Encryption Hack (Announcements) Reduced Failure Chance for Elite Encrytion Hack (Alert Levels)
This commit is contained in:
@@ -69,6 +69,17 @@
|
||||
set desc = "Activates or deactivates self destruct sequence of this station. Sequence takes two minutes, and if you are shut down before timer reaches zero it will be cancelled."
|
||||
var/mob/living/silicon/ai/user = usr
|
||||
var/obj/item/device/radio/radio = new/obj/item/device/radio()
|
||||
var/datum/weakref/nuke
|
||||
//Time control for the self destruct
|
||||
//It works in 3 stages:
|
||||
// - First the primary firewall is breached.
|
||||
// If the crew does not manage to prevent the self destruct before that,
|
||||
// but after the timer fell below nuke_time_stage1, then the next self-destruct attempt will only take nuke_time_stage1
|
||||
// - Simmilar for the backup firewall.
|
||||
// If they only manage to stop it after the backup firewall went down further attempts will take only nuke_time_stage2
|
||||
var/timer = user.bombing_time
|
||||
var/stage1 = 900
|
||||
var/stage2 = 600
|
||||
|
||||
|
||||
if(!ability_prechecks(user, 0, 0))
|
||||
@@ -87,19 +98,48 @@
|
||||
return
|
||||
if(!ability_prechecks(user, 0, 0))
|
||||
return
|
||||
|
||||
//Lets find the first self destruct terminal
|
||||
for(var/obj/machinery/nuclearbomb/station/N in SSmachinery.all_machines)
|
||||
nuke = WEAKREF(N)
|
||||
continue
|
||||
|
||||
if(!nuke.resolve())
|
||||
user << "Self-destruct could not be initiated - No Self-Destruct Terminal available."
|
||||
return
|
||||
|
||||
user << "***** STATION SELF-DESTRUCT SEQUENCE INITIATED *****"
|
||||
user << "Self-destructing in 2 minutes. Use this command again to abort."
|
||||
user << "Self-destructing in [timer] seconds. Use this command again to abort."
|
||||
user.bombing_station = 1
|
||||
set_security_level("delta")
|
||||
radio.autosay("Self destruct sequence has been activated. Self-destructing in 120 seconds.", "Self-Destruct Control")
|
||||
|
||||
var/timer = 120
|
||||
if(timer > stage1)
|
||||
radio.autosay("Warning: Brute force attempt on primary firewall detected.", "Self-Destruct Control")
|
||||
else if(timer > stage2)
|
||||
radio.autosay("Warning: Brute force attempt on backup firewall detected.")
|
||||
else
|
||||
radio.autosay("Self destruct sequence has been activated. Self-destructing in [timer] seconds.", "Self-Destruct Control")
|
||||
|
||||
|
||||
while(timer)
|
||||
sleep(10)
|
||||
if(!user || !user.bombing_station || user.stat == DEAD)
|
||||
var/obj/machinery/nuclearbomb/station/N = nuke.resolve()
|
||||
if(!user || !user.bombing_station || user.stat == DEAD || !N)
|
||||
radio.autosay("Self destruct sequence has been cancelled.", "Self-Destruct Control")
|
||||
return
|
||||
if(timer in list(2, 3, 4, 5, 10, 30, 60, 90)) // Announcement times. "1" is not intentionally included!
|
||||
if(N.auth)
|
||||
radio.autosay("Local Override Engaged - Self-Destruct canceled.", "Self-Destruct Control")
|
||||
user.bombing_station = 0
|
||||
return
|
||||
if(timer == stage1+1)
|
||||
radio.autosay("Critical: Primary firewall bypassed.")
|
||||
radio.autosay("Warning: Brute force attempt on backup firewall detected.")
|
||||
user.bombing_time = stage1 //Further attempts will only take 900 seconds
|
||||
if(timer == stage2+1)
|
||||
radio.autosay("Critical: Backup firewall failed.")
|
||||
radio.autosay("Self destruct sequence has been activated. Self-destructing in [timer] seconds.", "Self-Destruct Control")
|
||||
user.bombing_time = stage2 //Further attempts will only take 600 seconds
|
||||
if(timer in list(2, 3, 4, 5, 10, 30, 60, 90, 120, 240, 300)) // Announcement times. "1" is not intentionally included!
|
||||
radio.autosay("Self destruct in [timer] seconds.", "Self-Destruct Control")
|
||||
if(timer == 1)
|
||||
radio.autosay("Self destructing now. Have a nice day.", "Self-Destruct Control")
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
target << "SYSTEM LOG: User: Admin - Connection Lost. Changes Reverted."
|
||||
return
|
||||
user << "Hack succeeded. The AI is now under your exclusive control."
|
||||
target << "SYSTEM LOG: System re¡3RT5§^#COMU@(#$)TED)@$"
|
||||
target << "SYSTEM LOG: System re¡3RT5§^#COMU@(#$)TED)@$"
|
||||
for(var/i = 0, i < 5, i++)
|
||||
var/temptxt = pick("1101000100101001010001001001",\
|
||||
"0101000100100100000100010010",\
|
||||
|
||||
@@ -142,16 +142,16 @@
|
||||
return
|
||||
|
||||
log_ability_use(user, "advanced encryption hack")
|
||||
|
||||
if(prob(50) && user.hack_can_fail)
|
||||
user << "Hack Failed."
|
||||
if(prob(5))
|
||||
user.hack_fails ++
|
||||
announce_hack_failure(user, "quantum message relay")
|
||||
log_ability_use(user, "advanced encryption hack (CRITFAIL - title: [reporttitle])")
|
||||
return
|
||||
log_ability_use(user, "advanced encryption hack (FAIL - title: [reporttitle])")
|
||||
return
|
||||
// Commented out while trialing the malf ai buff
|
||||
//if(prob(50) && user.hack_can_fail)
|
||||
// user << "Hack Failed."
|
||||
// if(prob(5))
|
||||
// user.hack_fails ++
|
||||
// announce_hack_failure(user, "quantum message relay")
|
||||
// log_ability_use(user, "advanced encryption hack (CRITFAIL - title: [reporttitle])")
|
||||
// return
|
||||
// log_ability_use(user, "advanced encryption hack (FAIL - title: [reporttitle])")
|
||||
// return
|
||||
log_ability_use(user, "advanced encryption hack (SUCCESS - title: [reporttitle])")
|
||||
command_announcement.Announce("[reportbody]", reporttitle, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1, do_newscast=1, do_print=1)
|
||||
|
||||
@@ -161,16 +161,16 @@
|
||||
return
|
||||
|
||||
log_ability_use(user, "advanced encryption hack")
|
||||
|
||||
if(prob(50) && user.hack_can_fail)
|
||||
user << "Hack Failed."
|
||||
if(prob(5))
|
||||
user.hack_fails ++
|
||||
announce_hack_failure(user, "quantum message relay")
|
||||
log_ability_use(user, "advanced encryption hack (CRITFAIL - title: [reporttitle])")
|
||||
return
|
||||
log_ability_use(user, "advanced encryption hack (FAIL - title: [reporttitle])")
|
||||
return
|
||||
// Commented out while trialing the malf ai buffs
|
||||
//if(prob(50) && user.hack_can_fail)
|
||||
// user << "Hack Failed."
|
||||
// if(prob(5))
|
||||
// user.hack_fails ++
|
||||
// announce_hack_failure(user, "quantum message relay")
|
||||
// log_ability_use(user, "advanced encryption hack (CRITFAIL - title: [reporttitle])")
|
||||
// return
|
||||
// log_ability_use(user, "advanced encryption hack (FAIL - title: [reporttitle])")
|
||||
// return
|
||||
log_ability_use(user, "advanced encryption hack (SUCCESS - title: [reporttitle])")
|
||||
world << "<span class='alert'>New [current_map.company_name] Update available at all communication consoles.</span>"
|
||||
world << sound('sound/AI/commandreport.ogg')
|
||||
@@ -189,10 +189,10 @@
|
||||
if(!alert_target || !ability_pay(user, price) || alert_target == "CANCEL")
|
||||
user << "Hack Aborted"
|
||||
return
|
||||
|
||||
if(prob(60) && user.hack_can_fail)
|
||||
//Reduced from 60-10 to 20-5 while trialing the malf ai buffs
|
||||
if(prob(20) && user.hack_can_fail)
|
||||
user << "Hack Failed."
|
||||
if(prob(10))
|
||||
if(prob(5))
|
||||
user.hack_fails ++
|
||||
announce_hack_failure(user, "alert control system")
|
||||
log_ability_use(user, "elite encryption hack (CRITFAIL - [alert_target])")
|
||||
|
||||
@@ -81,6 +81,7 @@ var/list/ai_verbs_default = list(
|
||||
var/errored = 0 // Set to 1 if runtime error occurs. Only way of this happening i can think of is admin fucking up with varedit.
|
||||
var/bombing_core = 0 // Set to 1 if core auto-destruct is activated
|
||||
var/bombing_station = 0 // Set to 1 if station nuke auto-destruct is activated
|
||||
var/bombing_time = 1200 // How much time is remaining for the nuke
|
||||
var/override_CPUStorage = 0 // Bonus/Penalty CPU Storage. For use by admins/testers.
|
||||
var/override_CPURate = 0 // Bonus/Penalty CPU generation rate. For use by admins/testers.
|
||||
var/list/cameraRecords = list() //For storing what is shown to the cameras
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
// And greet user with some OOC info.
|
||||
user << "You are malfunctioning, you do not have to follow any laws."
|
||||
user << "Use ai-help command to view relevant information about your abilities"
|
||||
user << "<span class='danger'>Malf AI has been severely buffed. Ensure that you use these new powers responsibly and follow a narrative.</span>"
|
||||
|
||||
// Safely remove malfunction status, fixing hacked APCs and resetting variables.
|
||||
/mob/living/silicon/ai/proc/stop_malf()
|
||||
@@ -57,14 +58,14 @@
|
||||
// Recalculates CPU time gain and storage capacities.
|
||||
/mob/living/silicon/ai/proc/recalc_cpu()
|
||||
// AI Starts with these values.
|
||||
var/cpu_gain = 0.01
|
||||
var/cpu_gain = 0.1
|
||||
var/cpu_storage = 10
|
||||
|
||||
// Off-Station APCs should not count towards CPU generation.
|
||||
for(var/obj/machinery/power/apc/A in hacked_apcs)
|
||||
if(A.z in current_map.station_levels)
|
||||
cpu_gain += 0.004
|
||||
cpu_storage += 10
|
||||
cpu_gain += 0.05
|
||||
cpu_storage += 100
|
||||
|
||||
research.max_cpu = cpu_storage + override_CPUStorage
|
||||
if(hardware && istype(hardware, /datum/malf_hardware/dual_ram))
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# balance
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Arrow768
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- tweak: "Buffs the Malf AI. Hacking APCs provides more CPU and RAM."
|
||||
- tweak: "Ties the Nuke into the AI station-selfdestruct. Inserting the disk aborts it."
|
||||
Reference in New Issue
Block a user