diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm
index 798d2714330..304c7d11f5f 100644
--- a/code/game/gamemodes/vampire/vampire.dm
+++ b/code/game/gamemodes/vampire/vampire.dm
@@ -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 = "
U:[mind.vampire.bloodusable]
T:[mind.vampire.bloodtotal]
"
+ handle_vampire_cloak()
+ if(istype(loc, /turf/space))
+ check_sun()
+ mind.vampire.nullified = max(0, mind.vampire.nullified - 1)
\ No newline at end of file
diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm
index e6c2109125e..c03af44cad8 100644
--- a/code/game/gamemodes/vampire/vampire_powers.dm
+++ b/code/game/gamemodes/vampire/vampire_powers.dm
@@ -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 << "You are incapacitated."
return 0
+ if(vampire.nullified)
+ if(!fullpower)
+ src << "Something is blocking your powers!"
+ return 0
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))
+ if(!fullpower)
src << "Your powers are useless on this holy ground."
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
diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm
index 637741c2d08..665daf9966f 100644
--- a/code/game/objects/items/weapons/weaponry.dm
+++ b/code/game/objects/items/weapons/weaponry.dm
@@ -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 << "The nullrod's power interferes with your own!"
+ 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))
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 0d4cf6101b8..2fbe738ac60 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -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 = " U:[mind.vampire.bloodusable]
T:[mind.vampire.bloodtotal]
"
- 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)