Vamp update 5

This commit is contained in:
ZomgPonies
2013-12-16 02:37:07 -05:00
parent 0f885c3afa
commit 7658fe255d
4 changed files with 48 additions and 28 deletions
+15 -1
View File
@@ -56,7 +56,7 @@
if(player.assigned_role == job)
possible_vampires -= player
vampire_amount = 1 + round(num_players() / 10)
vampire_amount = max(1,round(num_players() / 10)) //1 + round(num_players() / 10)
if(possible_vampires.len>0)
for(var/i = 0, i < vampire_amount, i++)
@@ -208,6 +208,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
var/iscloaking = 0 // handles the vampire cloak toggle
var/list/powers = list() // list of available powers and passives, see defines in setup.dm
var/mob/living/carbon/human/draining // who the vampire is draining of blood
var/nullified = 0 //Nullrod makes them useless for a short while.
/datum/vampire/New(gend = FEMALE)
gender = gend
@@ -476,3 +477,16 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
fire_stacks++
IgniteMob()
adjustFireLoss(3)
/mob/living/carbon/human/proc/handle_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 = "<div align='left' valign='top' style='position:relative; top:0px; left:6px'> U:<font color='#33FF33' size='1'>[mind.vampire.bloodusable]</font><br> T:<font color='#FFFF00' size='1'>[mind.vampire.bloodtotal]</font></div>"
handle_vampire_cloak()
if(istype(loc, /turf/space))
check_sun()
mind.vampire.nullified = max(0, mind.vampire.nullified - 1)
+18 -1
View File
@@ -9,20 +9,27 @@
return 0
var/datum/vampire/vampire = src.mind.vampire
if(!vampire)
world.log << "[src] has vampire verbs but isn't a vampire."
return 0
var/fullpower = (VAMP_FULL in vampire.powers)
if(src.stat > max_stat)
src << "<span class='warning'>You are incapacitated.</span>"
return 0
if(vampire.nullified)
if(!fullpower)
src << "<span class='warning'>Something is blocking your powers!</span>"
return 0
if(vampire.bloodusable < required_blood)
src << "<span class='warning'>You require at least [required_blood] units of usable blood to do that!</span>"
return 0
//chapel check
if(istype(loc.loc, /area/chapel))
if(!(VAMP_FULL in vampire.powers))
if(!fullpower)
src << "<span class='warning'>Your powers are useless on this holy ground.</span>"
return 0
return 1
@@ -36,6 +43,7 @@
//Chaplains are resistant to vampire powers
if(mind && mind.assigned_role == "Chaplain")
return 0
return 1
/mob/proc/vampire_can_reach(mob/M as mob, active_range = 1)
if(M.loc == src.loc) return 1 //target and source are in the same thing
@@ -72,6 +80,14 @@
M.current.paralysis = 0
//M.vampire.bloodusable -= 10
M.current << "\blue You flush your system with clean blood and remove any incapacitating effects."
spawn(1)
if(M.vampire.bloodtotal >= 200)
for(var/i = 0; i < 5; i++)
M.current.adjustBruteLoss(-2)
M.current.adjustOxyLoss(-5)
M.current.adjustToxLoss(-2)
M.current.adjustFireLoss(-2)
sleep(35)
M.current.verbs -= /client/proc/vampire_rejuvinate
spawn(200)
M.current.verbs += /client/proc/vampire_rejuvinate
@@ -438,6 +454,7 @@
usr.loc = picked
spawn(10)
del(animation)
M.current.remove_vampire_blood(30)
M.current.verbs -= /client/proc/vampire_shadowstep
spawn(20)
M.current.verbs += /client/proc/vampire_shadowstep
+8 -15
View File
@@ -49,21 +49,14 @@
user.Paralyse(20)
return
if (M.stat !=2)
if((M.mind in ticker.mode.cult) && prob(33))
M << "\red The power of [src] clears your mind of the cult's influence!"
user << "\red You wave [src] over [M]'s head and see their eyes become clear, their mind returning to normal."
ticker.mode.remove_cultist(M.mind)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1)
else if(prob(10))
user << "\red The rod slips in your hand."
..()
else
user << "\red The rod appears to do nothing."
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1)
return
if(M.mind)
if(M.mind.vampire)
if(ishuman(M))
if(!(VAMP_FULL in M.mind.vampire.powers))
M << "<span class='warning'>The nullrod's power interferes with your own!</span>"
M.mind.vampire.nullified = max(5, M.mind.vampire.nullified + 2)
..()
/obj/item/weapon/nullrod/afterattack(atom/A, mob/user as mob)
if (istype(A, /turf/simulated/floor))
+7 -11
View File
@@ -126,17 +126,7 @@
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 = "<div align='left' valign='top' style='position:relative; top:0px; left:6px'> U:<font color='#33FF33' size='1'>[mind.vampire.bloodusable]</font><br> T:<font color='#FFFF00' size='1'>[mind.vampire.bloodtotal]</font></div>"
handle_vampire_cloak()
if(istype(loc, /turf/space))
check_sun()
handle_vampire()
/mob/living/carbon/human/calculate_affecting_pressure(var/pressure)
@@ -1086,6 +1076,12 @@
if( prob(2) && health && !hal_crit )
spawn(0)
emote("snore")
if(mind)
if(mind.vampire)
if(istype(loc, /obj/structure/closet/coffin))
adjustBruteLoss(-1)
adjustFireLoss(-1)
adjustToxLoss(-1)
else if(resting)
if(halloss > 0)
adjustHalLoss(-3)