diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm
index f3f476f9788..a1639cdaf3e 100644
--- a/code/__DEFINES/is_helpers.dm
+++ b/code/__DEFINES/is_helpers.dm
@@ -58,6 +58,8 @@
#define isswarmer(A) (istype(A, /mob/living/simple_animal/hostile/swarmer))
+#define isguardian(A) (istype(A, /mob/living/simple_animal/hostile/guardian))
+
#define islimb(A) (istype(A, /obj/item/organ/limb))
// ASSEMBLY HELPERS
diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm
index d947bfa6553..3efbb13d9e3 100644
--- a/code/_onclick/hud/hud.dm
+++ b/code/_onclick/hud/hud.dm
@@ -199,6 +199,8 @@ var/datum/global_hud/global_hud = new()
drone_hud(ui_style)
else if(isswarmer(mymob))
swarmer_hud()
+ else if(isguardian(mymob))
+ guardian_hud()
//Version denotes which style should be displayed. blank or 0 means "next version"
diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm
index 9c0d195af4e..d60b0b1ad6f 100644
--- a/code/modules/mob/living/simple_animal/guardian/guardian.dm
+++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm
@@ -16,6 +16,7 @@
attack_sound = 'sound/weapons/punch1.ogg'
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
+ maxbodytemp = 10000000
attacktext = "punches"
maxHealth = 100000 //The spirit itself is invincible
health = 100000
@@ -39,12 +40,17 @@
if(summoner)
if(summoner.stat == DEAD)
src << "Your summoner has died!"
- visible_message("The [src] dies along with its user!")
+ visible_message("The [src] dies along with its user!")
+ summoner.visible_message("[summoner]'s body is completely consumed by the strain of sustaining [src]!")
+ for(var/obj/item/W in summoner)
+ if(!summoner.unEquip(W))
+ qdel(W)
+ summoner.dust()
ghostize()
qdel(src)
else
src << "Your summoner has died!"
- visible_message("The [src] dies along with its user!")
+ visible_message("The [src] dies along with its user!")
ghostize()
qdel(src)
if(summoner)
@@ -74,7 +80,7 @@
summoner.adjustBruteLoss(damage)
if(damage)
summoner << "Your [name] is under attack! You take damage!"
- summoner.visible_message("Blood sprays from [summoner] as [src] takes damage!")
+ summoner.visible_message("Blood sprays from [summoner] as [src] takes damage!")
if(summoner.stat == UNCONSCIOUS)
summoner << "Your body can't take the strain of sustaining [src] in this condition, it begins to fall apart!"
summoner.adjustCloneLoss(damage/2)
@@ -99,10 +105,7 @@
//Manifest, Recall, Communicate
-/mob/living/simple_animal/hostile/guardian/verb/Manifest()
- set name = "Manifest"
- set category = "Guardian"
- set desc = "Spring forth into battle!"
+/mob/living/simple_animal/hostile/guardian/proc/Manifest()
if(cooldown > world.time)
return
if(loc == summoner)
@@ -114,20 +117,14 @@
spawn(6)
icon_state = end_icon
-/mob/living/simple_animal/hostile/guardian/verb/Recall()
- set name = "Recall"
- set category = "Guardian"
- set desc = "Return to your summoner."
+/mob/living/simple_animal/hostile/guardian/proc/Recall()
if(cooldown > world.time)
return
loc = summoner
buckled = null
cooldown = world.time + 30
-/mob/living/simple_animal/hostile/guardian/verb/Communicate()
- set name = "Communicate"
- set category = "Guardian"
- set desc = "Communicate telepathically with your summoner."
+/mob/living/simple_animal/hostile/guardian/proc/Communicate()
var/input = stripped_input(src, "Please enter a message to tell your summoner.", "Guardian", "")
if(!input) return
@@ -137,6 +134,10 @@
src << "[src]: [input]"
log_say("[src.real_name]/[src.key] : [input]")
+/mob/living/simple_animal/hostile/guardian/proc/ToggleMode()
+ src << "You dont have another mode!"
+
+
/mob/living/proc/guardian_comm()
set name = "Communicate"
set category = "Guardian"
@@ -155,6 +156,13 @@
log_say("[src.real_name]/[src.key] : [text]")
+/mob/living/simple_animal/hostile/guardian/proc/ToggleLight()
+ if(!luminosity)
+ SetLuminosity(3)
+ else
+ SetLuminosity(0)
+
+
//////////////////////////TYPES OF GUARDIANS
@@ -182,7 +190,7 @@
/mob/living/simple_animal/hostile/guardian/fire/AttackingTarget()
..()
- if(prob(30))
+ if(prob(45))
if(istype(target, /atom/movable))
var/atom/movable/M = target
if(!M.anchored && M != summoner)
@@ -203,8 +211,8 @@
/mob/living/simple_animal/hostile/guardian/fire/proc/collision_ignite(AM as mob|obj)
if(istype(AM, /mob/living/))
var/mob/living/M = AM
- if(AM != summoner)
- M.adjust_fire_stacks(7)
+ if(AM != summoner && M.fire_stacks < 7)
+ M.fire_stacks = 7
M.IgniteMob()
/mob/living/simple_animal/hostile/guardian/fire/Bump(AM as mob|obj)
@@ -277,10 +285,7 @@
C.adjustOxyLoss(-5)
C.adjustToxLoss(-5)
-/mob/living/simple_animal/hostile/guardian/healer/verb/ToggleMode()
- set name = "Toggle Mode"
- set category = "Guardian"
- set desc = "Toggle between combat and healing modes."
+/mob/living/simple_animal/hostile/guardian/healer/ToggleMode()
if(src.loc == summoner)
if(toggle)
a_intent = "harm"
@@ -366,6 +371,7 @@
icon_state = "guardian"
damage = 5
damage_type = BRUTE
+ armour_penetration = 100
/mob/living/simple_animal/hostile/guardian/ranged
a_intent = "help"
@@ -385,10 +391,7 @@
var/list/snares = list()
var/toggle = FALSE
-/mob/living/simple_animal/hostile/guardian/ranged/verb/ToggleMode()
- set name = "Toggle Mode"
- set category = "Guardian"
- set desc = "Toggle between combat and scout modes."
+/mob/living/simple_animal/hostile/guardian/ranged/ToggleMode()
if(src.loc == summoner)
if(toggle)
ranged = 1
@@ -475,11 +478,11 @@
if(bomb_cooldown <= world.time && !stat)
var/obj/item/weapon/guardian_bomb/B = new /obj/item/weapon/guardian_bomb(get_turf(A))
src << "Success! Bomb armed!"
- bomb_cooldown = world.time + 400
+ bomb_cooldown = world.time + 200
B.spawner = src
B.disguise (A)
else
- src << "Your powers are on cooldown! You must wait 40 seconds between bombs."
+ src << "Your powers are on cooldown! You must wait 20 seconds between bombs."
/obj/item/weapon/guardian_bomb
name = "bomb"
@@ -677,3 +680,100 @@
new /obj/item/weapon/guardiancreator/tech/choose(src)
new /obj/item/weapon/paper/guardian(src)
return
+
+
+
+
+
+
+
+///HUD
+
+/datum/hud/proc/guardian_hud(ui_style = 'icons/mob/screen_midnight.dmi')
+ adding = list()
+
+ var/obj/screen/using
+
+ using = new /obj/screen/guardian/Manifest()
+ using.screen_loc = ui_rhand
+ adding += using
+
+ using = new /obj/screen/guardian/Recall()
+ using.screen_loc = ui_lhand
+ adding += using
+
+ using = new /obj/screen/guardian/ToggleMode()
+ using.screen_loc = ui_storage1
+ adding += using
+
+ using = new /obj/screen/guardian/ToggleLight()
+ using.screen_loc = ui_back
+ adding += using
+
+ using = new /obj/screen/guardian/Communicate()
+ using.screen_loc = ui_inventory
+ adding += using
+
+ mymob.client.screen = list()
+ mymob.client.screen += mymob.client.void
+ mymob.client.screen += adding
+
+
+
+
+//HUD BUTTONS
+
+/obj/screen/guardian
+ icon = 'icons/mob/guardian.dmi'
+
+/obj/screen/guardian/Manifest
+ icon_state = "manifest"
+ name = "Manifest"
+ desc = "Spring forth into battle!"
+
+/obj/screen/guardian/Manifest/Click()
+ if(isguardian(usr))
+ var/mob/living/simple_animal/hostile/guardian/G = usr
+ G.Manifest()
+
+
+/obj/screen/guardian/Recall
+ icon_state = "recall"
+ name = "Recall"
+ desc = "Return to your user."
+
+/obj/screen/guardian/Recall/Click()
+ if(isguardian(usr))
+ var/mob/living/simple_animal/hostile/guardian/G = usr
+ G.Recall()
+
+/obj/screen/guardian/ToggleMode
+ icon_state = "toggle"
+ name = "Toggle Mode"
+ desc = "Switch between ability modes."
+
+/obj/screen/guardian/ToggleMode/Click()
+ if(isguardian(usr))
+ var/mob/living/simple_animal/hostile/guardian/G = usr
+ G.ToggleMode()
+
+/obj/screen/guardian/Communicate
+ icon_state = "communicate"
+ name = "Communicate"
+ desc = "Communicate telepathically with your user."
+
+/obj/screen/guardian/Communicate/Click()
+ if(isguardian(usr))
+ var/mob/living/simple_animal/hostile/guardian/G = usr
+ G.Communicate()
+
+
+/obj/screen/guardian/ToggleLight
+ icon_state = "light"
+ name = "Toggle Light"
+ desc = "Glow like star dust."
+
+/obj/screen/guardian/ToggleLight/Click()
+ if(isguardian(usr))
+ var/mob/living/simple_animal/hostile/guardian/G = usr
+ G.ToggleLight()
diff --git a/icons/mob/guardian.dmi b/icons/mob/guardian.dmi
new file mode 100644
index 00000000000..9db3fbedc68
Binary files /dev/null and b/icons/mob/guardian.dmi differ