mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
reduced drone damage + increased health, halved explosion damage (approx) + made exploding more obvious, reduced max drone tech bonus to 6, bit of cleanup in the AI
Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -753,7 +753,6 @@
|
||||
#include "code\modules\events\prison_break.dm"
|
||||
#include "code\modules\events\radiation_storm.dm"
|
||||
#include "code\modules\events\rogue_drones.dm"
|
||||
#include "code\modules\events\rogue_viscerators.dm"
|
||||
#include "code\modules\events\space_ninja.dm"
|
||||
#include "code\modules\events\spacevine.dm"
|
||||
#include "code\modules\events\spider_infestation.dm"
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "hits the"
|
||||
speak = list("ALERT.","Hostile-ile-ile entities dee-twhoooo-wected.","Threat parameterszzzz- szzet.","Bring sub-sub-sub-systems uuuup to combat alert alpha-a-a.")
|
||||
emote_see = list("beeps menacingly","whirrs threateningly","scans it's immediate vicinity")
|
||||
emote_see = list("beeps menacingly","whirrs threateningly","scans its immediate vicinity")
|
||||
a_intent = "harm"
|
||||
stop_automated_movement_when_pulled = 0
|
||||
maxHealth = 100
|
||||
health = 100
|
||||
health = 300
|
||||
maxHealth = 300
|
||||
speed = 4
|
||||
projectiletype = /obj/item/projectile/beam
|
||||
projectiletype = /obj/item/projectile/beam/drone
|
||||
projectilesound = 'sound/weapons/laser3.ogg'
|
||||
destroy_surroundings = 0
|
||||
var/datum/effect/effect/system/ion_trail_follow/ion_trail
|
||||
@@ -33,6 +33,7 @@
|
||||
var/turf/patrol_target
|
||||
var/explode_chance = 1
|
||||
var/disabled = 0
|
||||
var/exploding = 0
|
||||
|
||||
min_oxy = 0
|
||||
max_tox = 0
|
||||
@@ -46,7 +47,7 @@
|
||||
/mob/living/simple_animal/hostile/retaliate/malf_drone/New()
|
||||
..()
|
||||
if(prob(5))
|
||||
projectiletype = /obj/item/projectile/beam/pulse
|
||||
projectiletype = /obj/item/projectile/beam/pulse/drone
|
||||
projectilesound = 'sound/weapons/pulse2.ogg'
|
||||
ion_trail = new
|
||||
ion_trail.set_up(src)
|
||||
@@ -64,49 +65,84 @@
|
||||
//self repair systems have a chance to bring the drone back to life
|
||||
/mob/living/simple_animal/hostile/retaliate/malf_drone/Life()
|
||||
|
||||
//emps and lots of damage can temporarily shut us down
|
||||
if(disabled > 0)
|
||||
stat = UNCONSCIOUS
|
||||
icon_state = "drone_dead"
|
||||
disabled--
|
||||
wander = 0
|
||||
speak_chance = 0
|
||||
if(disabled <= 0)
|
||||
stat = CONSCIOUS
|
||||
icon_state = "drone0"
|
||||
else
|
||||
return
|
||||
wander = 1
|
||||
speak_chance = 5
|
||||
|
||||
//repair a bit of damage
|
||||
if(prob(1))
|
||||
src.visible_message("\red \icon[src] [src] shudders and shakes.")
|
||||
if(stat == DEAD)
|
||||
health = rand(5,15)
|
||||
else if(health < maxHealth)
|
||||
health += rand(5,15)
|
||||
src.visible_message("\red \icon[src] [src] shudders and shakes as some of it's damaged systems come back online.")
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
health += rand(25,100)
|
||||
|
||||
//spark for no reason
|
||||
if(prob(5))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
|
||||
//sometimes our targetting sensors malfunction, and we attack anyone nearby
|
||||
if(prob(disabled ? 0 : 1))
|
||||
if(hostile_drone)
|
||||
src.visible_message("\red \icon[src] [src] retracts several targetting vanes, and dulls it's running lights.")
|
||||
src.visible_message("\blue \icon[src] [src] retracts several targetting vanes, and dulls it's running lights.")
|
||||
hostile_drone = 0
|
||||
else
|
||||
src.visible_message("\red \icon[src] [src] suddenly lights up, and additional targetting vanes slide into place.")
|
||||
hostile_drone = 1
|
||||
|
||||
if(health / maxHealth > 0.75)
|
||||
if(health / maxHealth > 0.9)
|
||||
icon_state = "drone3"
|
||||
explode_chance = 0
|
||||
else if(health / maxHealth > 0.5)
|
||||
else if(health / maxHealth > 0.7)
|
||||
icon_state = "drone2"
|
||||
explode_chance = 0
|
||||
else if(health / maxHealth > 0.25)
|
||||
else if(health / maxHealth > 0.5)
|
||||
icon_state = "drone1"
|
||||
explode_chance = 0.5
|
||||
else
|
||||
else if(health / maxHealth > 0.3)
|
||||
icon_state = "drone0"
|
||||
explode_chance = 5
|
||||
else if(health > 0)
|
||||
//if health gets too low, shut down
|
||||
icon_state = "drone_dead"
|
||||
exploding = 0
|
||||
if(!disabled)
|
||||
if(prob(50))
|
||||
src.visible_message("\blue \icon[src] [src] suddenly shuts down!")
|
||||
else
|
||||
src.visible_message("\blue \icon[src] [src] suddenly lies still and quiet.")
|
||||
disabled = rand(150, 600)
|
||||
walk(src,0)
|
||||
|
||||
if(!disabled && prob(explode_chance))
|
||||
src.visible_message("\red \icon[src] [src] begins to spark and shake violenty!")
|
||||
spawn(rand(30,100))
|
||||
if(!disabled)
|
||||
explosion(get_turf(src), 1, 2, 3, 7)
|
||||
if(exploding && prob(20))
|
||||
if(prob(50))
|
||||
src.visible_message("\red \icon[src] [src] begins to spark and shake violenty!")
|
||||
else
|
||||
src.visible_message("\red \icon[src] [src] sparks and shakes like it's about to explode!")
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
|
||||
if(!exploding && !disabled && prob(explode_chance))
|
||||
exploding = 1
|
||||
stat = UNCONSCIOUS
|
||||
wander = 1
|
||||
walk(src,0)
|
||||
spawn(rand(50,150))
|
||||
if(!disabled && exploding)
|
||||
explosion(get_turf(src), 0, 1, 4, 7)
|
||||
//proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
|
||||
..()
|
||||
|
||||
//ion rifle!
|
||||
@@ -114,10 +150,19 @@
|
||||
health -= rand(3,15) * (severity + 1)
|
||||
disabled = rand(150, 600)
|
||||
hostile_drone = 0
|
||||
walk(src,0)
|
||||
|
||||
/mob/living/simple_animal/Die()
|
||||
src.visible_message("\blue \icon[src] [src] suddenly breaks apart.")
|
||||
..()
|
||||
del(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/malf_drone/Del()
|
||||
//some random debris left behind
|
||||
if(has_loot)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
var/obj/O
|
||||
|
||||
//shards
|
||||
@@ -162,54 +207,69 @@
|
||||
//also drop dummy circuit boards deconstructable for research (loot)
|
||||
var/obj/item/weapon/circuitboard/C
|
||||
|
||||
if(prob(25))
|
||||
//spawn 1-4 boards of a random type
|
||||
var/spawnees = 0
|
||||
var/num_boards = rand(1,4)
|
||||
var/list/options = list(1,2,4,8,16,32,64,128,256, 512)
|
||||
for(var/i=0, i<num_boards, i++)
|
||||
var/chosen = pick(options)
|
||||
options.Remove(options.Find(chosen))
|
||||
spawnees |= chosen
|
||||
|
||||
if(spawnees & 1)
|
||||
C = new(src.loc)
|
||||
C.name = "Drone CPU motherboard"
|
||||
C.origin_tech = "programming=[rand(3,10)]"
|
||||
C.origin_tech = "programming=[rand(3,6)]"
|
||||
|
||||
if(prob(25))
|
||||
if(spawnees & 2)
|
||||
C = new(src.loc)
|
||||
C.name = "Drone neural interface"
|
||||
C.origin_tech = "biotech=[rand(3,10)]"
|
||||
C.origin_tech = "biotech=[rand(3,6)]"
|
||||
|
||||
if(prob(25))
|
||||
if(spawnees & 4)
|
||||
C = new(src.loc)
|
||||
C.name = "Drone suspension processor"
|
||||
C.origin_tech = "magnets=[rand(3,10)]"
|
||||
C.origin_tech = "magnets=[rand(3,6)]"
|
||||
|
||||
if(prob(25))
|
||||
if(spawnees & 8)
|
||||
C = new(src.loc)
|
||||
C.name = "Drone shielding controller"
|
||||
C.origin_tech = "bluespace=[rand(3,10)]"
|
||||
C.origin_tech = "bluespace=[rand(3,6)]"
|
||||
|
||||
if(prob(25))
|
||||
if(spawnees & 16)
|
||||
C = new(src.loc)
|
||||
C.name = "Drone power capacitor"
|
||||
C.origin_tech = "powerstorage=[rand(3,10)]"
|
||||
C.origin_tech = "powerstorage=[rand(3,6)]"
|
||||
|
||||
if(prob(25))
|
||||
if(spawnees & 32)
|
||||
C = new(src.loc)
|
||||
C.name = "Drone hull reinforcer"
|
||||
C.origin_tech = "materials=[rand(3,10)]"
|
||||
C.origin_tech = "materials=[rand(3,6)]"
|
||||
|
||||
if(prob(25))
|
||||
if(spawnees & 64)
|
||||
C = new(src.loc)
|
||||
C.name = "Drone auto-repair system"
|
||||
C.origin_tech = "engineering=[rand(3,10)]"
|
||||
C.origin_tech = "engineering=[rand(3,6)]"
|
||||
|
||||
if(prob(25))
|
||||
if(spawnees & 128)
|
||||
C = new(src.loc)
|
||||
C.name = "Drone plasma overcharge counter"
|
||||
C.origin_tech = "plasma=[rand(3,10)]"
|
||||
C.origin_tech = "plasma=[rand(3,6)]"
|
||||
|
||||
if(prob(25))
|
||||
if(spawnees & 256)
|
||||
C = new(src.loc)
|
||||
C.name = "Drone targetting circuitboard"
|
||||
C.origin_tech = "combat=[rand(3,10)]"
|
||||
C.origin_tech = "combat=[rand(3,6)]"
|
||||
|
||||
if(prob(25))
|
||||
if(spawnees & 512)
|
||||
C = new(src.loc)
|
||||
C.name = "Drone morality core"
|
||||
C.origin_tech = "illegal=[rand(3,10)]"
|
||||
C.name = "Corrupted drone morality core"
|
||||
C.origin_tech = "illegal=[rand(3,6)]"
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/projectile/beam/drone
|
||||
damage = 15
|
||||
|
||||
/obj/item/projectile/beam/pulse/drone
|
||||
damage = 10
|
||||
|
||||
Reference in New Issue
Block a user