Merge pull request #3905 from Aurorablade/GuardianUpdate

Antagus Minor:Spritus
This commit is contained in:
Fox McCloud
2016-03-20 18:40:26 -04:00
6 changed files with 118 additions and 52 deletions
+2
View File
@@ -96,6 +96,8 @@ var/datum/global_hud/global_hud = new()
var/obj/screen/lingchemdisplay
var/obj/screen/lingstingdisplay
var/obj/screen/guardianhealthdisplay
var/obj/screen/blobpwrdisplay
var/obj/screen/blobhealthdisplay
var/obj/screen/vampire_blood_display
@@ -6,17 +6,17 @@
response_help = "passes through"
response_disarm = "flails at"
response_harm = "punches"
icon = 'icons/mob/mob.dmi'
icon_state = "stand"
icon_living = "stand"
icon_dead = "stand"
icon = 'icons/mob/guardian.dmi'
icon_state = "magicOrange"
icon_living = "magicOrange"
icon_dead = "magicOrange"
speed = 0
a_intent = I_HARM
stop_automated_movement = 1
floating = 1
attack_sound = 'sound/weapons/punch1.ogg'
minbodytemp = 0
maxbodytemp = 10000000
maxbodytemp = INFINITY
min_oxy = 0
max_oxy = INFINITY
min_tox = 0
@@ -33,7 +33,6 @@
melee_damage_upper = 15
AIStatus = AI_OFF
var/summoned = FALSE
var/animated_manifest = FALSE
var/cooldown = 0
var/damage_transfer = 1 //how much damage from each attack we transfer to the owner
var/mob/living/summoner
@@ -60,7 +59,7 @@
src << "You moved out of range, and were pulled back! You can only move [range] meters from [summoner.real_name]"
visible_message("<span class='danger'>The [src] jumps back to its user.</span>")
Recall()
if(summoned && !summoner)
if(summoned && !summoner && !adminseal)
src << "<span class='danger'>You somehow lack a summoner! As a result, you dispel!</span>"
ghostize()
qdel()
@@ -80,6 +79,17 @@
summoner << "<span class='danger'><B>Your [name] died somehow!</span></B>"
summoner.death()
/mob/living/simple_animal/hostile/guardian/handle_hud_icons_health()
if(summoner)
var/resulthealth
if(iscarbon(summoner))
resulthealth = round((abs(config.health_threshold_dead - summoner.health) / abs(config.health_threshold_dead - summoner.maxHealth)) * 100)
else
resulthealth = round((summoner.health / summoner.maxHealth) * 100)
hud_used.guardianhealthdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#efeeef'>[resulthealth]%</font></div>"
/mob/living/simple_animal/hostile/guardian/adjustBruteLoss(amount) //The spirit is invincible, but passes on damage to the summoner
var/damage = amount * damage_transfer
if (summoner)
@@ -118,20 +128,16 @@
return
if(!summoner) return
if(loc == summoner)
loc = get_turf(summoner)
forceMove(get_turf(summoner))
src.client.eye = loc
cooldown = world.time + 30
if(animated_manifest)
var/end_icon = icon_state
icon_state = "parasite_forming"
spawn(6)
icon_state = end_icon
/mob/living/simple_animal/hostile/guardian/proc/Recall()
if(cooldown > world.time)
return
if(!summoner) return
loc = summoner
new /obj/effect/overlay/temp/guardian/phase/out(get_turf(src))
forceMove(summoner)
buckled = null
cooldown = world.time + 30
@@ -204,8 +210,10 @@
/mob/living/simple_animal/hostile/guardian/proc/ToggleLight()
if(!luminosity)
set_light(3)
src << "<span class='notice'>You activate your light.</span>"
else
set_light(0)
src << "<span class='notice'>You deactivate your light.</span>"
//////////////////////////TYPES OF GUARDIANS
@@ -226,6 +234,7 @@
magic_fluff_string = "..And draw the Wizard, bringer of endless chaos!"
tech_fluff_string = "Boot sequence complete. Crowd control modules activated. Holoparasite swarm online."
bio_fluff_string = "Your scarab swarm finishes mutating and stirs to life, ready to sow havoc at random."
var/toggle = FALSE
/mob/living/simple_animal/hostile/guardian/fire/Life() //Dies if the summoner dies
..()
@@ -233,13 +242,29 @@
summoner.ExtinguishMob()
summoner.adjust_fire_stacks(-20)
/mob/living/simple_animal/hostile/guardian/fire/ToggleMode()
if(src.loc == summoner)
if(toggle)
src << "You switch to dispersion mode, and will teleport victims away from your master."
toggle = FALSE
else
src << "You switch to deception mode, and will turn your victims against their allies."
toggle = TRUE
/mob/living/simple_animal/hostile/guardian/fire/AttackingTarget()
..()
if(prob(45))
if(istype(target, /atom/movable))
var/atom/movable/M = target
if(!M.anchored && M != summoner)
do_teleport(M, M, 10)
if(..())
if(toggle)
if(ishuman(target) && !summoner)
spawn(0)
new /obj/effect/hallucination/delusion(target.loc, target, force_kind="custom", duration=200, skip_nearby=0, custom_icon = src.icon_state, custom_icon_file = src.icon)
else
if(prob(45))
if(istype(target, /atom/movable))
var/atom/movable/M = target
if(!M.anchored && M != summoner)
new /obj/effect/overlay/temp/guardian/phase/out(get_turf(M))
do_teleport(M, M, 10)
new /obj/effect/overlay/temp/guardian/phase/out(get_turf(M))
/mob/living/simple_animal/hostile/guardian/fire/Crossed(AM as mob|obj)
..()
@@ -446,7 +471,9 @@
if((Z.temperature > 270) && (Z.temperature < 360))
var/pressure = Z.return_pressure()
if((pressure > 20) && (pressure < 550))
new /obj/effect/overlay/temp/guardian/phase/out(get_turf(A))
do_teleport(A, beacon, 0)
new /obj/effect/overlay/temp/guardian/phase(get_turf(A))
else
src << "<span class='danger'><B>The beacon isn't in a safe location!</span></B>"
else
@@ -476,7 +503,10 @@
ranged_cooldown_cap = 1
projectilesound = 'sound/effects/hit_on_shattered_glass.ogg'
ranged = 1
rapid = 1
range = 13
see_invisible = SEE_INVISIBLE_MINIMUM
see_in_dark = 8
playstyle_string = "As a ranged type, you have only light damage resistance, but are capable of spraying shards of crystal at incredibly high speed. You can also deploy surveillance snares to monitor enemy movement. Finally, you can switch to scout mode, in which you can't attack, but can move without limit."
magic_fluff_string = "..And draw the Sentinel, an alien master of ranged combat."
tech_fluff_string = "Boot sequence complete. Ranged combat modules active. Holoparasite swarm online."
@@ -507,6 +537,14 @@
else
src << "<span class='danger'><B>You have to be recalled to toggle modes!</span></B>"
/mob/living/simple_animal/hostile/guardian/ranged/ToggleLight()
if(see_invisible == SEE_INVISIBLE_MINIMUM)
src << "<span class='notice'>You deactivate your night vision.</span>"
see_invisible = SEE_INVISIBLE_LIVING
else
src << "<span class='notice'>You activate your night vision.</span>"
see_invisible = SEE_INVISIBLE_MINIMUM
/mob/living/simple_animal/hostile/guardian/ranged/verb/Snare()
set name = "Set Surveillance Trap"
set category = "Guardian"
@@ -675,7 +713,6 @@
else
gaurdiantype = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians
var/pickedtype = /mob/living/simple_animal/hostile/guardian/punch
var/picked_color = pick("#FFFFFF","#000000","#808080","#A52A2A","#FF0000","#8B0000","#DC143C","#FFA500","#FFFF00","#008000","#00FF00","#006400","#00FFFF","#0000FF","#000080","#008080","#800080","#4B0082")
switch(gaurdiantype)
if("Chaos")
@@ -705,29 +742,42 @@
user.verbs += /mob/living/proc/guardian_comm
user.verbs += /mob/living/proc/guardian_recall
user.verbs += /mob/living/proc/guardian_reset
var/magic_suite = pick("Wands","Cups","Swords","Pentacles")
var/picked_name = pick("Aries", "Leo", "Sagittarius", "Taurus", "Virgo", "Capricorn", "Gemini", "Libra", "Aquarius", "Cancer", "Scorpio", "Pisces")
var/color
var/picked_name
var/picked_color = pick("#FFFFFF","#000000","#808080","#A52A2A","#FF0000","#8B0000","#DC143C","#FFA500","#FFFF00","#008000","#00FF00","#006400","#00FFFF","#0000FF","#000080","#008080","#800080","#4B0082")
switch (theme)
if("magic")
G.name = "[mob_name] of [magic_suite]"
G.color = picked_color
G.real_name = "[mob_name] of [magic_suite]"
color = pick("Pink", "Red", "Orange", "Green", "Blue")
picked_name = pick("Aries", "Leo", "Sagittarius", "Taurus", "Virgo", "Capricorn", "Gemini", "Libra", "Aquarius", "Cancer", "Scorpio", "Pisces")
G.name = "[picked_name] [color]"
G.real_name = "[picked_name] [color]"
G.icon_living = "[theme][color]"
G.icon_state = "[theme][color]"
G.icon_dead = "[theme][color]"
user << "[G.magic_fluff_string]."
if("tech")
var/colour = pick("orange", "neon", "pink", "red", "blue", "green")
G.name = "[picked_name] [capitalize(colour)]"
G.real_name = "[picked_name] [capitalize(colour)]"
G.icon_living = "parasite[colour]"
G.icon_state = "parasite[colour]"
G.icon_dead = "parasite[colour]"
G.animated_manifest = TRUE
color = pick("Rose", "Peony", "Lily", "Daisy", "Zinnia", "Ivy", "Iris", "Petunia", "Violet", "Lilac", "Orchid") //technically not colors, just flowers that can be specific colors
picked_name = pick("Gallium", "Indium", "Thallium", "Bismuth", "Aluminium", "Mercury", "Iron", "Silver", "Zinc", "Titanium", "Chromium", "Nickel", "Platinum", "Tellurium", "Palladium", "Rhodium", "Cobalt", "Osmium", "Tungsten", "Iridium")
G.name = "[picked_name] [color]"
G.real_name = "[picked_name] [color]"
G.icon_living = "[theme][color]"
G.icon_state = "[theme][color]"
G.icon_dead = "[theme][color]"
user << "[G.tech_fluff_string]."
G.speak_emote = list("states")
if("bio")
G.icon = 'icons/mob/mob.dmi'
picked_name = pick("brood", "hive", "nest")
user << "[G.bio_fluff_string]."
G.name = "[mob_name] [picked_name]"
G.name = "[picked_name] swarm"
G.color = picked_color
G.real_name = "[mob_name] [picked_name]"
G.real_name = "[picked_name] swarm"
G.icon_living = "headcrab"
G.icon_state = "headcrab"
G.attacktext = "swarms"
@@ -798,17 +848,17 @@
///HUD
/datum/hud/proc/guardian_hud(ui_style = 'icons/mob/screen1_midnight.dmi')
/datum/hud/proc/guardian_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
adding = list()
var/obj/screen/using
guardianhealthdisplay = new /obj/screen/guardian()
guardianhealthdisplay.name = "summoner health"
guardianhealthdisplay.screen_loc = ui_health
guardianhealthdisplay.mouse_opacity = 0
adding += guardianhealthdisplay
using = new /obj/screen/guardian/Manifest()
using.screen_loc = ui_rhand
adding += using
@@ -834,12 +884,11 @@
mymob.client.screen += adding
//HUD BUTTONS
/obj/screen/guardian
icon = 'icons/mob/guardian.dmi'
icon_state = "base"
/obj/screen/guardian/Manifest
icon_state = "manifest"
@@ -882,6 +931,7 @@
var/mob/living/simple_animal/hostile/guardian/G = usr
G.Communicate()
/obj/screen/guardian/ToggleLight
icon_state = "light"
name = "Toggle Light"
+10
View File
@@ -43,6 +43,16 @@
icon_state = "purplecrack"
duration = 6
/obj/effect/overlay/temp/guardian
randomdir = 0
/obj/effect/overlay/temp/guardian/phase
duration = 5
icon_state = "phasein"
/obj/effect/overlay/temp/guardian/phase/out
icon_state = "phaseout"
/obj/effect/overlay/temp/emp
name = "emp sparks"
icon = 'icons/effects/effects.dmi'
+12 -8
View File
@@ -325,29 +325,33 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/effect/hallucination/delusion
var/list/image/delusions = list()
/obj/effect/hallucination/delusion/New(loc,var/mob/living/carbon/T)
/obj/effect/hallucination/delusion/New(loc, mob/living/carbon/T, force_kind = null, duration = 300,skip_nearby = 1, custom_icon = null, custom_icon_file = null)
target = T
var/image/A = null
var/kind = rand(1,3)
var/kind = force_kind ? force_kind : pick("clown", "corgi", "carp", "skeleton", "demon")
for(var/mob/living/carbon/human/H in living_mob_list)
if(H == target)
continue
if(H in view(target))
if(skip_nearby && (H in view(target)))
continue
switch(kind)
if(1)//Clown
if("clown")//Clown
A = image('icons/mob/animal.dmi',H,"clown")
if(2)//Carp
if("carp")//Carp
A = image('icons/mob/animal.dmi',H,"carp")
if(3)//Corgi
if("corgi")//Corgi
A = image('icons/mob/pets.dmi',H,"corgi")
if(4)//Skeletons
if("skeleton")//Skeletons
A = image('icons/mob/human.dmi',H,"skeleton_s")
if("demon")//Demon
A = image('icons/mob/mob.dmi',H,"daemon")
if("custom")
A = image(custom_icon_file, H, custom_icon)
A.override = 1
if(target.client)
delusions |= A
target.client.images |= A
sleep(300)
sleep(duration)
for(var/image/I in delusions)
if(target.client)
target.client.images.Remove(I)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 40 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 233 KiB