From 87c56b4b23ba387d52c22ffae6e67cc0487250c4 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sat, 14 Dec 2013 05:19:54 -0500 Subject: [PATCH] Vampire commit 2 --- baystation12.dme | 7 ++ code/_onclick/hud/hud.dm | 6 +- code/datums/mind.dm | 5 +- code/game/gamemodes/vampire/hud.dm | 9 +++ code/game/gamemodes/vampire/vampire.dm | 36 +++++++++- code/game/gamemodes/vampire/vampire_powers.dm | 71 ++++++++++++++++++- code/game/machinery/cloning.dm | 22 +++--- code/modules/mob/living/carbon/carbon.dm | 6 ++ code/modules/mob/living/carbon/human/life.dm | 7 ++ code/modules/mob/living/login.dm | 19 +++-- code/modules/virus2/disease2.dm | 1 + code/setup.dm | 3 +- 12 files changed, 162 insertions(+), 30 deletions(-) create mode 100644 code/game/gamemodes/vampire/hud.dm diff --git a/baystation12.dme b/baystation12.dme index efde1247b12..acf86b37278 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -152,6 +152,7 @@ #include "code\datums\helper_datums\teleport.dm" #include "code\datums\helper_datums\topic_input.dm" #include "code\datums\spells\area_teleport.dm" +#include "code\datums\spells\charge.dm" #include "code\datums\spells\conjure.dm" #include "code\datums\spells\dumbfire.dm" #include "code\datums\spells\emplosion.dm" @@ -249,11 +250,13 @@ #include "code\game\gamemodes\revolution\revolution.dm" #include "code\game\gamemodes\revolution\rp_revolution.dm" #include "code\game\gamemodes\traitor\traitor.dm" +#include "code\game\gamemodes\vampire\hud.dm" #include "code\game\gamemodes\vampire\vampire.dm" #include "code\game\gamemodes\vampire\vampire_powers.dm" #include "code\game\gamemodes\vox\vox.dm" #include "code\game\gamemodes\vox\heist\heist.dm" #include "code\game\gamemodes\vox\trade\trade.dm" +#include "code\game\gamemodes\wizard\artefact.dm" #include "code\game\gamemodes\wizard\rightandwrong.dm" #include "code\game\gamemodes\wizard\soulstone.dm" #include "code\game\gamemodes\wizard\spellbook.dm" @@ -1168,6 +1171,7 @@ #include "code\modules\projectiles\ammunition\bullets.dm" #include "code\modules\projectiles\ammunition\magazines.dm" #include "code\modules\projectiles\guns\energy.dm" +#include "code\modules\projectiles\guns\magic.dm" #include "code\modules\projectiles\guns\projectile.dm" #include "code\modules\projectiles\guns\energy\laser.dm" #include "code\modules\projectiles\guns\energy\nuclear.dm" @@ -1175,6 +1179,8 @@ #include "code\modules\projectiles\guns\energy\special.dm" #include "code\modules\projectiles\guns\energy\stun.dm" #include "code\modules\projectiles\guns\energy\temperature.dm" +#include "code\modules\projectiles\guns\magic\staff.dm" +#include "code\modules\projectiles\guns\magic\wand.dm" #include "code\modules\projectiles\guns\projectile\automatic.dm" #include "code\modules\projectiles\guns\projectile\bow.dm" #include "code\modules\projectiles\guns\projectile\launcher.dm" @@ -1188,6 +1194,7 @@ #include "code\modules\projectiles\projectile\change.dm" #include "code\modules\projectiles\projectile\energy.dm" #include "code\modules\projectiles\projectile\force.dm" +#include "code\modules\projectiles\projectile\magic.dm" #include "code\modules\projectiles\projectile\special.dm" #include "code\modules\reagents\Chemistry-Colours.dm" #include "code\modules\reagents\Chemistry-Holder.dm" diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 1918b3deaa7..dd13a83e708 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -96,6 +96,7 @@ var/datum/global_hud/global_hud = new() var/obj/screen/lingchemdisplay var/obj/screen/blobpwrdisplay var/obj/screen/blobhealthdisplay + var/obj/screen/vampire_blood_display var/obj/screen/alien_plasma_display var/obj/screen/r_hand_hud_object var/obj/screen/l_hand_hud_object @@ -188,7 +189,10 @@ datum/hud/New(mob/owner) robot_hud() else if(isobserver(mymob)) ghost_hud() - + else if(isovermind(mymob)) + blob_hud() + else if(mymob.mind && mymob.mind.vampire) + vampire_hud() //Triggered when F12 is pressed (Unless someone changed something in the DMF) /mob/verb/button_pressed_F12() diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 4f93aad29ce..baf53fd2531 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -71,6 +71,8 @@ datum/mind if(changeling) current.remove_changeling_powers() current.verbs -= /datum/changeling/proc/EvolutionMenu + if(vampire) + current.remove_vampire_powers() current.mind = null nanomanager.user_transferred(current, new_character) @@ -82,7 +84,8 @@ datum/mind if(changeling) new_character.make_changeling() - + if(vampire) + new_character.make_vampire() if(active) new_character.key = key //now transfer the key to link the client to our new body diff --git a/code/game/gamemodes/vampire/hud.dm b/code/game/gamemodes/vampire/hud.dm new file mode 100644 index 00000000000..44b34d00e0f --- /dev/null +++ b/code/game/gamemodes/vampire/hud.dm @@ -0,0 +1,9 @@ +/datum/hud/proc/vampire_hud(ui_style = 'icons/mob/screen1_Midnight.dmi') + + vampire_blood_display = new /obj/screen() + vampire_blood_display.name = "Vampire Blood" + vampire_blood_display.icon_state = "dark128" + vampire_blood_display.screen_loc = "14:28,9:15" + vampire_blood_display.layer = 20 + + mymob.client.screen += list(vampire_blood_display) \ No newline at end of file diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm index 35ccec0392d..e7cd739eb2d 100644 --- a/code/game/gamemodes/vampire/vampire.dm +++ b/code/game/gamemodes/vampire/vampire.dm @@ -224,8 +224,32 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha if(findtext("[handler]","vampire_")) verbs += handler*/ for(var/i = 1; i <= 3; i++) // CHANGE TO 3 RATHER THAN 12 AFTER TESTING IS DONE - mind.vampire.powers.Add(i) + if(!(i in mind.vampire.powers)) + mind.vampire.powers.Add(i) + + for(var/n in mind.vampire.powers) + switch(n) + if(VAMP_SHAPE) + verbs += /client/proc/vampire_shapeshift + if(VAMP_VISION) + continue + if(VAMP_DISEASE) + verbs += /client/proc/vampire_disease + if(VAMP_CLOAK) + verbs += /client/proc/vampire_cloak + if(VAMP_BATS) + verbs += /client/proc/vampire_bats + if(VAMP_SCREAM) + verbs += /client/proc/vampire_screech + if(VAMP_JAUNT) + verbs += /client/proc/vampire_jaunt + if(VAMP_BLINK) + verbs += /client/proc/vampire_shadowstep + if(VAMP_SLAVE) + verbs += /client/proc/vampire_enthrall + if(VAMP_FULL) + continue /mob/proc/remove_vampire_powers() for(var/handler in typesof(/client/proc)) if(findtext("[handler]","vampire_")) @@ -301,6 +325,11 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha // Commented out until we can figured out a way to stop this from spamming. //src << "\blue Your rejuvination abilities have improved and will now heal you over time when used." + // TIER 3.5 (/vg/) + if(vamp.bloodtotal >= 250) + if(!(VAMP_BLINK in vamp.powers)) + vamp.powers.Add(VAMP_BLINK) + // TIER 4 if(vamp.bloodtotal >= 300) if(!(VAMP_JAUNT in vamp.powers)) @@ -343,8 +372,11 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha if(VAMP_SLAVE) src << "\blue You have gained the Enthrall ability which at a heavy blood cost allows you to enslave a human that is not loyal to any other for a random period of time." verbs += /client/proc/vampire_enthrall + if(VAMP_BLINK) + src << "\blue You have gained the ability to shadowstep, which makes you disappear into nearby shadows at the cost of blood." + verbs += /client/proc/vampire_shadowstep if(VAMP_FULL) - src << "\blue You have reached your full potential and are no longer weak to the effects of anything holy and your vision has been improved greatyl." + src << "\blue You have reached your full potential and are no longer weak to the effects of anything holy and your vision has been improved greatly." //no verb //prepare for copypaste /datum/game_mode/proc/update_vampire_icons_added(datum/mind/vampire_mind) diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index efe60907559..e1be67310dc 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -20,7 +20,11 @@ if(vampire.bloodusable < required_blood) src << "You require at least [required_blood] units of usable blood to do that!" return 0 - + //chapel check + if(istype(loc.loc, /area/chapel)) + if(!(VAMP_FULL in vampire.powers)) + src << "Your powers are useless on this holy ground." + return 0 return 1 /mob/proc/vampire_can_reach(mob/M as mob, active_range = 1) @@ -124,7 +128,9 @@ shutdown.spreadtype = "None" shutdown.uniqueID = rand(0,10000) shutdown.effects += holder - shutdown.speed = 10 + shutdown.speed = 1 + shutdown.stage = 2 + shutdown.clicks = 185 infect_virus2(C,shutdown,0) M.current.remove_vampire_blood(100) M.current.verbs -= /client/proc/vampire_disease @@ -254,7 +260,7 @@ if(!C.mind) src << "\red [C.name]'s mind is not there for you to enthrall." return 0 - if(/obj/item/weapon/implant/traitor in C.contents || /obj/item/weapon/implant/loyalty in C.contents || C.mind in ticker.mode.vampires || C.mind.vampire || C.mind in ticker.mode.enthralled) + if((/obj/item/weapon/implant/traitor in C.contents) || (/obj/item/weapon/implant/loyalty in C.contents )||( C.mind in ticker.mode.vampires )||( C.mind.vampire )||( C.mind in ticker.mode.enthralled )) C.visible_message("[C] seems to resist the takeover!", "You feel a familiar sensation in your skull that quickly dissipates.") return 0 if(!ishuman(C)) @@ -269,6 +275,8 @@ var/ref = "\ref[src.mind]" if(!(ref in ticker.mode.thralls)) ticker.mode.thralls[ref] = list(H.mind) + else + ticker.mode.thralls[ref] += H.mind ticker.mode.enthralled.Add(H.mind) ticker.mode.enthralled[H.mind] = src.mind H.mind.special_role = "VampThrall" @@ -360,6 +368,63 @@ M.current.verbs -= /client/proc/vampire_jaunt spawn(600) M.current.verbs += /client/proc/vampire_jaunt +// Blink for vamps +// Less smoke spam. +/client/proc/vampire_shadowstep() + set category = "Vampire" + set name = "Shadowstep (30)" + set desc = "Vanish into the shadows." + var/datum/mind/M = usr.mind + if(!M) return + + // Teleport radii + var/inner_tele_radius = 0 + var/outer_tele_radius = 6 + + // Maximum lighting_lumcount. + var/max_lum = 1 + + if(M.current.vampire_power(30, 0)) + if(M.current.buckled) M.current.buckled.unbuckle() + spawn(0) + var/list/turfs = new/list() + for(var/turf/T in range(usr,outer_tele_radius)) + if(T in range(usr,inner_tele_radius)) continue + if(istype(T,/turf/space)) continue + if(T.density) continue + if(T.x>world.maxx-outer_tele_radius || T.xworld.maxy-outer_tele_radius || T.y max_lum) continue + turfs += T + + if(!turfs.len) + usr << "\red You cannot find darkness to step to." + return + + var/turf/picked = pick(turfs) + + if(!picked || !isturf(picked)) + return + M.current.ExtinguishMob() + if(M.current.buckled) + M.current.buckled.unbuckle() + var/atom/movable/overlay/animation = new /atom/movable/overlay( get_turf(usr) ) + animation.name = usr.name + animation.density = 0 + animation.anchored = 1 + animation.icon = usr.icon + animation.alpha = 127 + animation.layer = 5 + //animation.master = src + usr.loc = picked + spawn(10) + del(animation) + M.current.verbs -= /client/proc/vampire_shadowstep + spawn(20) + M.current.verbs += /client/proc/vampire_shadowstep + /mob/proc/remove_vampire_blood(amount = 0) var/bloodold if(!mind || !mind.vampire) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index d27ff99a947..5934fabe807 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -166,19 +166,17 @@ // -- Mode/mind specific stuff goes here - switch(ticker.mode.name) - if("revolution") - if((H.mind in ticker.mode:revolutionaries) || (H.mind in ticker.mode:head_revolutionaries)) - ticker.mode.update_all_rev_icons() //So the icon actually appears - if("nuclear emergency") - if(H.mind in ticker.mode.syndicates) - ticker.mode.update_all_synd_icons() - if("cult") - if (H.mind in ticker.mode.cult) - ticker.mode.add_cultist(src.occupant.mind) - ticker.mode.update_all_cult_icons() //So the icon actually appears - if("\ref[H.mind]" in ticker.mode.implanter || H.mind in ticker.mode.implanted) + if((H.mind in ticker.mode:revolutionaries) || (H.mind in ticker.mode:head_revolutionaries)) + ticker.mode.update_all_rev_icons() //So the icon actually appears + if(H.mind in ticker.mode.syndicates) + ticker.mode.update_all_synd_icons() + if (H.mind in ticker.mode.cult) + ticker.mode.add_cultist(src.occupant.mind) + ticker.mode.update_all_cult_icons() //So the icon actually appears + if(("\ref[H.mind]" in ticker.mode.implanter) || (H.mind in ticker.mode.implanted)) ticker.mode.update_traitor_icons_added(H.mind) //So the icon actually appears + if(("\ref[H.mind]" in ticker.mode.thralls) || (H.mind in ticker.mode.enthralled)) + ticker.mode.update_vampire_icons_added(H.mind) // -- End mode specific stuff diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index f889de1d79c..86ac0bb0dbc 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1,3 +1,9 @@ +/mob/living/carbon/Login() + ..() + update_hud() + return + + /mob/living/carbon/Move(NewLoc, direct) . = ..() if(.) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index e0838aa2930..a3ec4cbecdd 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -126,6 +126,13 @@ G.process() if(mind && mind.vampire) + if(hud_used) + if(!hud_used.vampire_blood_display) + hud_used.vampire_hud() + //hud_used.human_hud(hud_used.ui_style) + hud_used.vampire_blood_display.maptext_width = 64 + hud_used.vampire_blood_display.maptext_height = 26 + hud_used.vampire_blood_display.maptext = "
U:[mind.vampire.bloodusable]
T:[mind.vampire.bloodtotal]
" handle_vampire_cloak() diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm index e722b03fc74..78fd2a484b4 100644 --- a/code/modules/mob/living/login.dm +++ b/code/modules/mob/living/login.dm @@ -6,21 +6,20 @@ //Round specific stuff like hud updates if(ticker && ticker.mode) - switch(ticker.mode.name) - if("revolution") - if((mind in ticker.mode.revolutionaries) || (src.mind in ticker.mode:head_revolutionaries)) - ticker.mode.update_rev_icons_added(src.mind) - if("cult") - if(mind in ticker.mode:cult) - ticker.mode.update_cult_icons_added(src.mind) - if("nuclear emergency") - if(mind in ticker.mode:syndicates) - ticker.mode.update_all_synd_icons() + if((mind in ticker.mode.revolutionaries) || (src.mind in ticker.mode:head_revolutionaries)) + ticker.mode.update_rev_icons_added(src.mind) + if(mind in ticker.mode:cult) + ticker.mode.update_cult_icons_added(src.mind) + if(mind in ticker.mode:syndicates) + ticker.mode.update_all_synd_icons() var/ref = "\ref[mind]" if(ref in ticker.mode.implanter) ticker.mode.update_traitor_icons_added(mind) if(mind in ticker.mode.implanted) ticker.mode.update_traitor_icons_added(mind) + if((ref in ticker.mode.thralls) || (mind in ticker.mode.enthralled)) + ticker.mode.update_vampire_icons_added(mind) + return return . diff --git a/code/modules/virus2/disease2.dm b/code/modules/virus2/disease2.dm index a43ec5bffdd..dfd96a980c4 100644 --- a/code/modules/virus2/disease2.dm +++ b/code/modules/virus2/disease2.dm @@ -102,6 +102,7 @@ disease.uniqueID = uniqueID disease.speed = speed disease.stage = stage + disease.clicks = clicks for(var/datum/disease2/effectholder/holder in effects) var/datum/disease2/effectholder/newholder = new /datum/disease2/effectholder newholder.effect = new holder.effect.type diff --git a/code/setup.dm b/code/setup.dm index 38cf78a402c..6f182352342 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -787,4 +787,5 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse #define VAMP_SCREAM 9 #define VAMP_JAUNT 10 #define VAMP_SLAVE 11 -#define VAMP_FULL 12 \ No newline at end of file +#define VAMP_BLINK 12 +#define VAMP_FULL 13 \ No newline at end of file