This commit is contained in:
Artur
2020-02-28 14:11:38 +02:00
parent 5bd62d129f
commit 5d3f3fc06a
21 changed files with 200 additions and 65 deletions
@@ -25,7 +25,7 @@
HandleStarving() // Death
HandleDeath() // Standard Update
update_hud()// Daytime Sleep in Coffin
if (SSticker.mode.is_daylight() && !HAS_TRAIT_FROM(owner.current, TRAIT_DEATHCOMA, "bloodsucker"))
if(SSticker.mode.is_daylight() && !HAS_TRAIT_FROM(owner.current, TRAIT_DEATHCOMA, "bloodsucker"))
if(istype(owner.current.loc, /obj/structure/closet/crate/coffin))
Torpor_Begin()
// Wait before next pass
@@ -82,15 +82,15 @@
/datum/antagonist/bloodsucker/proc/HandleHealing(mult = 1)
// NOTE: Mult of 0 is just a TEST to see if we are injured and need to go into Torpor!
//It is called from your coffin on close (by you only)
if(poweron_masquerade == TRUE || owner.current.AmStaked())
if(poweron_masquerade == TRUE || owner.current.AmStaked() || owner?.reagents?.has_reagent(/datum/reagent/consumable/garlic)
return FALSE
owner.current.adjustStaminaLoss(-1.5 + (regenRate * -7) * mult, 0) // Humans lose stamina damage really quickly. Vamps should heal more.
owner.current.adjustCloneLoss(-0.1 * (regenRate * 2) * mult, 0)
owner.current.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1 * (regenRate * 4) * mult) //adjustBrainLoss(-1 * (regenRate * 4) * mult, 0)
// No Bleeding
if(ishuman(owner.current)) //NOTE Current bleeding is horrible, not to count the amount of blood ballistics delete.
if(ishuman(owner.current) && bleed_rate => 0) //NOTE Current bleeding is horrible, not to count the amount of blood ballistics delete.
var/mob/living/carbon/human/H = owner.current
H.bleed_rate = 0
H.bleed_rate =- 1
if(iscarbon(owner.current)) // Damage Heal: Do I have damage to ANY bodypart?
var/mob/living/carbon/C = owner.current
var/costMult = 1 // Coffin makes it cheaper
@@ -305,17 +305,17 @@
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/mob/proc/CheckBloodsuckerEatFood(var/food_nutrition)
if (!isliving(src))
if(!isliving(src))
return
var/mob/living/L = src
if(!L.AmBloodsucker())
return
// We're a vamp? Try to eat food...
// We're a bloodsucker? Try to eat food...
var/datum/antagonist/bloodsucker/bloodsuckerdatum = mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
bloodsuckerdatum.handle_eat_human_food(food_nutrition)
bloodsuckerdatum.bloodsucker_disgust(food_nutrition)
/datum/antagonist/bloodsucker/proc/handle_eat_human_food(var/food_nutrition) // Called from snacks.dm and drinks.dm
/datum/antagonist/bloodsucker/proc/bloodsucker_disgust(var/food_nutrition) // Called from snacks.dm and drinks.dm
set waitfor = FALSE
if(!owner.current || !iscarbon(owner.current))
return
@@ -655,13 +655,13 @@
var/datum/antagonist/vassal/mob_V = M.mind.has_antag_datum(ANTAG_DATUM_VASSAL)
// Check 2) If they are a BLOODSUCKER, then are they my Master?
if (mob_V && atom_B == mob_V.master)
return TRUE // SUCCESS!
return TRUE
// Check 3) If I am a BLOODSUCKER, then are they my Vassal?
if (mob_B && atom_V && (atom_V in mob_B.vassals))
return TRUE // SUCCESS!
return TRUE
// Check 4) If we are both VASSAL, then do we have the same master?
if (atom_V && mob_V && atom_V.master == mob_V.master)
return TRUE // SUCCESS!
return TRUE
return FALSE
@@ -719,12 +719,12 @@
invisibility = INVISIBILITY_ABSTRACT
/obj/screen/bloodsucker/proc/update_counter(value, valuecolor)
invisibility = 0 // Make Visible
invisibility = 0
/obj/screen/bloodsucker/blood_counter // NOTE: Look up /obj/screen/devil/soul_counter in _onclick / hud / human.dm
icon = 'icons/mob/actions/bloodsucker.dmi'//'icons/mob/screen_gen.dmi'
/obj/screen/bloodsucker/blood_counter
icon = 'icons/mob/actions/bloodsucker.dmi'
name = "Blood Consumed"
icon_state = "blood_display"//"power_display"
icon_state = "blood_display"
screen_loc = ui_blood_display
/obj/screen/bloodsucker/blood_counter/update_counter(value, valuecolor)
@@ -749,22 +749,22 @@
/datum/antagonist/bloodsucker/proc/update_sunlight(value, amDay = FALSE)
// No Hud? Get out.
if (!owner.current.hud_used)
if(!owner.current.hud_used)
return
// Update Sun Time
if (owner.current.hud_used.sunlight_display)
if(owner.current.hud_used.sunlight_display)
var/valuecolor = "#BBBBFF"
if (amDay)
if(amDay)
valuecolor = "#FF5555"
else if(value <= 25)
valuecolor = "#FFCCCC"
else if(value < 10)
valuecolor = "#FF5555"
var/value_string = (value >= 60) ? "[round(value / 60, 1)] m" : "[round(value,1)] s"
var/value_string = (value >= 60) ? "[round(value / 60, 1)] m" : "[round(value, 1)] s"
owner.current.hud_used.sunlight_display.update_counter( value_string, valuecolor )
owner.current.hud_used.sunlight_display.icon_state = "sunlight_" + (amDay ? "day":"night")
/obj/screen/bloodsucker/sunlight_counter/update_counter(value, valuecolor)
..()
maptext = "<div align='center' valign='bottom' style='position:relative; top:0px; left:6px'><font color='[valuecolor]'>[value]</font></div>"
maptext = "<div align='center' valign='bottom' style='position:relative; top:0px; left:6px'><font color='[valuecolor]'>[value]</font></div>"
@@ -258,7 +258,7 @@
/obj/structure/bloodsucker/vassalrack/proc/torture_victim(mob/living/user, mob/living/target)
var/datum/antagonist/bloodsucker/bloodsuckerdatum = user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
// Check Bloodmob/living/M, force = FALSE, check_loc = TRUE
var/convert_cost = 200 + 200 * bloodsuckerdatum.vassals
var/convert_cost = 200
if(user.blood_volume < convert_cost + 5)
to_chat(user, "<span class='notice'>You don't have enough blood to initiate the Dark Communion with [target].</span>")
return
@@ -321,15 +321,15 @@
// to_chat(user, "<span class='danger'><i>The ritual has been interrupted!</i></span>")
// useLock = FALSE
// return
user.playsound_local(null, 'sound/effects/explosion_distant.ogg', 40, 1) // Play THIS sound for user only. The "null" is where turf would go if a location was needed. Null puts it right in their head.
target.playsound_local(null, 'sound/effects/explosion_distant.ogg', 40, 1) // Play THIS sound for user only. The "null" is where turf would go if a location was needed. Null puts it right in their head.
target.playsound_local(null, 'sound/effects/singlebeat.ogg', 40, 1) // Play THIS sound for user only. The "null" is where turf would go if a location was needed. Null puts it right in their head.
user.playsound_local(null, 'sound/effects/explosion_distant.ogg', 40, TRUE)
target.playsound_local(null, 'sound/effects/explosion_distant.ogg', 40, TRUE)
target.playsound_local(null, 'sound/effects/singlebeat.ogg', 40, TRUE)
target.Jitter(25)
target.emote("laugh")
//remove_victim(target) // Remove on CLICK ONLY!
useLock = FALSE
/obj/structure/bloodsucker/vassalrack/proc/do_torture(mob/living/user, mob/living/target, mult=1)
/obj/structure/bloodsucker/vassalrack/proc/do_torture(mob/living/user, mob/living/target, mult = 1)
var/torture_time = 15 // Fifteen seconds if you aren't using anything. Shorter with weapons and such.
var/torture_dmg_brute = 2
var/torture_dmg_burn = 0
@@ -67,6 +67,12 @@
if(display_error)
to_chat(owner, "<span class='warning'>Your victim's blood is not suitable for you to take.</span>")
return FALSE
if(iscarbon(owner))
//We want to check if the target is wearing a garlic necklance.
if(istype(owner.get_item_by_slot(SLOT_NECK), /obj/item/clothing/neck/garlic_necklace))
if(display_error)
to_chat(owner, "<span class='warning'>Your victim is wearing a garlic clove on their neck! Disgusting!</span>")
return FALSE
return TRUE
// If I'm not grabbing someone, find me someone nearby.
@@ -140,7 +146,7 @@
to_chat(user, "<span class='notice'>You lean quietly toward [target] and secretly draw out your fangs...</span>")
else
to_chat(user, "<span class='warning'>You pull [target] close to you and draw out your fangs...</span>")
if(!do_mob(user, target, feed_time,0,1,extra_checks=CALLBACK(src, .proc/ContinueActive, user, target)))//sleep(10)
if(!do_mob(user, target, feed_time, 0, 1, extra_checks = CALLBACK(src, .proc/ContinueActive, user, target)))//sleep(10)
to_chat(user, "<span class='warning'>Your feeding was interrupted.</span>")
//DeactivatePower(user,target)
return
@@ -166,7 +172,7 @@
var/deadmessage = target.stat == DEAD ? "" : " <i>[target.p_they(TRUE)] looks dazed, and will not remember this.</i>"
user.visible_message("<span class='notice'>[user] puts [target]'s wrist up to [user.p_their()] mouth.</span>", \
"<span class='notice'>You secretly slip your fangs into [target]'s wrist.[deadmessage]</span>", \
vision_distance = notice_range, ignored_mobs=target) // Only people who AREN'T the target will notice this action.
vision_distance = notice_range, ignored_mobs = target) // Only people who AREN'T the target will notice this action.
// Warn Feeder about Witnesses...
var/was_unnoticed = TRUE
for(var/mob/living/M in viewers(notice_range, owner))
@@ -299,7 +305,7 @@
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "drankkilled", /datum/mood_event/drankkilled) // BAD // in bloodsucker_life.dm
/datum/action/bloodsucker/feed/ContinueActive(mob/living/user, mob/living/target)
return ..() && target && (!target_grappled || user.pulling == target)// Active, and still Antag,
return ..() && target && (!target_grappled || user.pulling == target) && sucking_checks(target, TRUE, TRUE) // Active, and still Antag,
// NOTE: We only care about pulling if target started off that way. Mostly only important for Aggressive feed.
/datum/action/bloodsucker/feed/proc/ApplyVictimEffects(mob/living/target)
@@ -179,6 +179,18 @@
tastes = list("bread" = 1)
foodtype = GRAIN
/obj/item/reagent_containers/food/snacks/garlicbread
name = "garlic bread"
desc = "Alas, it is limited."
icon = 'icons/obj/food/burgerbread.dmi'
icon_state = "garlicbread"
item_state = "garlicbread"
bonus_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/consumable/vitamin = 2)
list_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/consumable/vitamin = 4, /datum/reagent/consumable/garlic = 2)
bitesize = 3
tastes = list("bread" = 1, "garlic" = 1, "butter" = 1)
foodtype = GRAIN
/obj/item/reagent_containers/food/snacks/deepfryholder
name = "Deep Fried Foods Holder Obj"
desc = "If you can see this description the code for the deep fryer fucked up."
@@ -196,7 +196,7 @@
name = "raw khinkali"
desc = "One hundred khinkalis? Do I look like a pig?"
icon_state = "khinkali"
list_reagents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/consumable/nutriment/vitamin = 1)
list_reagents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/consumable/nutriment/vitamin = 1, /datum/reagent/consumable/garlic = 1)
cooked_type = /obj/item/reagent_containers/food/snacks/khinkali
tastes = list("meat" = 1, "onions" = 1, "garlic" = 1)
foodtype = MEAT
@@ -205,7 +205,7 @@
name = "khinkali"
desc = "One hundred khinkalis? Do I look like a pig?"
icon_state = "khinkali"
list_reagents = list(/datum/reagent/consumable/nutriment = 4, /datum/reagent/consumable/nutriment/vitamin = 2)
list_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/consumable/nutriment/vitamin = 2, /datum/reagent/consumable/garlic = 1)
bitesize = 3
filling_color = "#F0F0F0"
tastes = list("meat" = 1, "onions" = 1, "garlic" = 1)
@@ -125,6 +125,16 @@
result = /obj/item/reagent_containers/food/snacks/baguette
subcategory = CAT_BREAD
/datum/crafting_recipe/food/garlicbread
name = "Garlic Bread"
time = 40
reqs = list(/obj/item/reagent_containers/food/snacks/grown/garlic = 1,
/obj/item/reagent_containers/food/snacks/breadslice/plain = 1,
/obj/item/reagent_containers/food/snacks/butter = 1
)
result = /obj/item/reagent_containers/food/snacks/garlicbread
subcategory = CAT_BREAD
/datum/crafting_recipe/food/butterbiscuit
name = "Butter Biscuit"
reqs = list(
@@ -28,7 +28,8 @@
name = "Raw Khinkali"
reqs = list(
/obj/item/reagent_containers/food/snacks/doughslice = 1,
/obj/item/reagent_containers/food/snacks/faggot = 1
/obj/item/reagent_containers/food/snacks/faggot = 1,
/obj/item/reagent_containers/food/snacks/grown/garlic = 1
)
result = /obj/item/reagent_containers/food/snacks/rawkhinkali
subcategory = CAT_MISCFOOD
+28
View File
@@ -0,0 +1,28 @@
/obj/item/seeds/garlic
name = "pack of garlic seeds"
desc = "A packet of extremely pungent seeds."
icon_state = "seed-garlic"
species = "garlic"
plantname = "Garlic Sprouts"
product = /obj/item/reagent_containers/food/snacks/grown/garlic
yield = 6
potency = 25
growthstages = 3
growing_icon = 'icons/obj/hydroponics/growing_vegetables.dmi'
reagents_add = list(/datum/reagent/consumable/garlic = 0.15, /datum/reagent/consumable/nutriment = 0.1)
/obj/item/reagent_containers/food/snacks/grown/garlic
seed = /obj/item/seeds/garlic
name = "garlic"
desc = "Delicious, but with a potentially overwhelming odor."
icon_state = "garlic"
filling_color = "#C0C9A0"
bitesize_mod = 2
tastes = list("garlic" = 1)
wine_power = 10
/obj/item/clothing/neck/garlic_necklace
name = "garlic necklace"
desc = "A clove of garlic on a string, tied to itself in a circle, just might fit around your neck. For paranoid people who fear getting their blood sucked."
icon_state = "garlic_necklace"
@@ -81,6 +81,9 @@
if(H.blood_volume >= BLOOD_VOLUME_MAXIMUM)
to_chat(H, "<span class='notice'>You're already full!</span>")
return
//This checks whether or not they are wearing a garlic clove on their neck
if(sucking_checks(victim, TRUE, FALSE))
return
if(victim.stat == DEAD)
to_chat(H, "<span class='notice'>You need a living victim!</span>")
return
@@ -92,6 +95,9 @@
to_chat(victim, "<span class='warning'>[H] tries to bite you, but stops before touching you!</span>")
to_chat(H, "<span class='warning'>[victim] is blessed! You stop just in time to avoid catching fire.</span>")
return
//Here we check now for both the garlic cloves on the neck and for blood in the victims bloodstream.
if(sucking_checks(victim, TRUE, TRUE))
return
if(!do_after(H, 30, target = victim))
return
var/blood_volume_difference = BLOOD_VOLUME_MAXIMUM - H.blood_volume //How much capacity we have left to absorb blood
@@ -11,6 +11,7 @@
speed = 0
maxHealth = 250
health = 250
blood_volume = 0
gender = NEUTER
mob_biotypes = NONE
+1 -1
View File
@@ -284,7 +284,7 @@
if(L.mind)
L.mind.transfer_to(S)
if(owner)
to_chat(S, "<span class='userdanger'>You are an animate statue. You cannot move when monitored, but are nearly invincible and deadly when unobserved! Do not harm [owner], your creator.</span>")
to_chat(S, "<span class='userdanger'>You are an animated statue. You cannot move when monitored, but are nearly invincible and deadly when unobserved! Do not harm [owner], your creator.</span>")
P.forceMove(S)
return
else
@@ -423,6 +423,58 @@
M.emote(pick("twitch","giggle"))
..()
/datum/reagent/consumable/garlic //NOTE: having garlic in your blood stops vampires from biting you.
name = "Garlic Juice"
id = "garlic"
description = "Crushed garlic. Chefs love it, but it can make you smell bad."
color = "#FEFEFE"
taste_description = "garlic"
metabolization_rate = 0.15 * REAGENTS_METABOLISM
/datum/reagent/consumable/garlic/on_mob_life(mob/living/carbon/M)
if(isvampire(M)) //incapacitating but not lethal. Unfortunately, vampires cannot vomit.
if(prob(min(25, current_cycle)))
to_chat(M, "<span class='danger'>You can't get the scent of garlic out of your nose! You can barely think...</span>")
M.Paralyze(10)
M.Jitter(10)
return
else if(isbloodsucker(M))
var/datum/antagonist/bloodsucker/bloodsuckerdatum = M.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
switch(method)
if(INGEST)
if(prob(min(30, current_cycle)))
to_chat(M, "<span class='warning'>You cant get the smell of garlic out of your nose! You cant think straight because of it!</span>")
M.Jitter(15)
return
if(prob(min(15, current_cycle)))
M.visible_message("<span class='danger'>Something you ate is burning your stomach!</span>", /
"<span class='warning'>[M] clutches their stomach and falls to the ground!</span>"
)
M.Knockdown(20)
M.emote("scream")
return
if(prob(min(5, current_cycle)))
M.vomit()
return
if(INJECT)
if(prob(min(20, current_cycle)))
to_chat(M, "<span class='warning'>You feel like your veins are boiling!</span>")
M.emote("scream")
M.adjustFireLoss(5)
return
if(prob(min(5, current_cycle)))
to_chat(M, "<span class='danger'>You are trying to purge the contaminants from your blood!</span>")
M.vomit()
return
else if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.job == "Cook")
if(prob(20)) //stays in the system much longer than sprinkles/banana juice, so heals slower to partially compensate
H.heal_bodypart_damage(1, 1, 0)
. = 1
..()
/datum/reagent/consumable/sprinkles
name = "Sprinkles"
value = 3