Blood Suckers Patch 2 (#14229)

* b

* c

* impressive, very based
This commit is contained in:
tattax
2022-05-28 13:01:06 -03:00
committed by GitHub
parent 36679eb63c
commit 87fdc31fbd
8 changed files with 93 additions and 66 deletions

View File

@@ -16,12 +16,6 @@
return
. = ..()
/mob/living/carbon/human/natural_bodytemperature_stabilization(datum/gas_mixture/environment, delta_time, times_fired)
// Return 0 as your natural temperature. Species proc handle_environment() will adjust your temperature based on this.
if(HAS_TRAIT(src, TRAIT_COLDBLOODED))
return 0
. = ..()
// Overwrites mob/living/life.dm instead of doing handle_changeling
/mob/living/carbon/human/Life(delta_time = (SSmobs.wait/10), times_fired)
. = ..()

View File

@@ -33,6 +33,7 @@
obj_damage = 50
environment_smash = ENVIRONMENT_SMASH_WALLS
speak_emote = list("gnashes")
del_on_death = TRUE
var/satiation = 0
/mob/living/simple_animal/hostile/bloodsucker/giantbat
@@ -141,23 +142,22 @@
/mob/living/simple_animal/hostile/bloodsucker/Destroy() //makes us alive again
if(bloodsucker && mind)
visible_message(span_warning("[src] rapidly transforms into a humanoid figure!"), span_warning("You forcefully return to your normal form."))
playsound(src, 'sound/weapons/slash.ogg', 50, 1)
playsound(src, 'sound/weapons/slash.ogg', 50, TRUE)
mind.transfer_to(bloodsucker)
if(bloodsucker.status_flags & GODMODE)
bloodsucker.status_flags -= GODMODE
bloodsucker.forceMove(get_turf(src))
if(istype(src, /mob/living/simple_animal/hostile/bloodsucker/werewolf) || istype(src, /mob/living/simple_animal/hostile/bloodsucker/possessedarmor))
if(istype(src, /mob/living/simple_animal/hostile/bloodsucker/possessedarmor))
STOP_PROCESSING(SSprocessing, src)
return ..()
/mob/living/simple_animal/hostile/bloodsucker/death()
. = ..()
if(bloodsucker && mind)
mind.transfer_to(bloodsucker)
bloodsucker.death()
bloodsucker.adjustBruteLoss(200)
if(bloodsucker.status_flags & GODMODE)
bloodsucker.status_flags -= GODMODE
qdel(src)
..()
/mob/living/simple_animal/hostile/bloodsucker/proc/devour(mob/living/target)
if(maxHealth > target.maxHealth / 4 + health)
@@ -190,17 +190,16 @@
/// Werewolf ///
///////////////////////////
/mob/living/simple_animal/hostile/bloodsucker/werewolf/Initialize()
/mob/living/simple_animal/hostile/bloodsucker/werewolf/Life(delta_time = (SSmobs.wait/10), times_fired)
. = ..()
START_PROCESSING(SSprocessing, src)
/mob/living/simple_animal/hostile/bloodsucker/werewolf/process()
SEND_SIGNAL(src, COMSIG_LIVING_BIOLOGICAL_LIFE, delta_time, times_fired)
if(bloodsucker)
if(ishuman(bloodsucker))
var/mob/living/carbon/human/user = bloodsucker
if(user.blood_volume < 560)
user.blood_volume += 10
health -= 0.25 //3 minutes to die
adjustFireLoss(2.5)
updatehealth() //3 minutes to die
if(satiation >= 3)
to_chat(src, span_notice("It has been fed. You turn back to normal."))
qdel(src)
@@ -251,9 +250,9 @@
////////////////////////
/mob/living/simple_animal/hostile/bloodsucker/possessedarmor/death()
. = ..()
if(upgraded)
new /obj/structure/bloodsucker/possessedarmor/upgraded(src.loc)
else
new /obj/structure/bloodsucker/possessedarmor(src.loc)
qdel(src)
..()
qdel(src)

View File

@@ -110,7 +110,6 @@
/// These handles the application of antag huds/special abilities
/datum/antagonist/bloodsucker/apply_innate_effects(mob/living/mob_override)
. = ..()
RegisterSignal(owner.current, COMSIG_LIVING_BIOLOGICAL_LIFE, .proc/LifeTick)
if((owner.assigned_role == "Clown"))
var/mob/living/carbon/H = owner.current
@@ -120,7 +119,6 @@
to_chat(owner, "As a vampiric clown, you are no longer a danger to yourself. Your clownish nature has been subdued by your thirst for blood.")
/datum/antagonist/bloodsucker/remove_innate_effects(mob/living/mob_override)
. = ..()
UnregisterSignal(owner.current, COMSIG_LIVING_BIOLOGICAL_LIFE)
if(owner.assigned_role == "Clown")
var/mob/living/carbon/human/H = owner.current
@@ -165,6 +163,39 @@
ClearAllPowersAndStats()
return ..()
/datum/antagonist/bloodsucker/on_body_transfer(mob/living/old_body, mob/living/new_body)
. = ..()
if(istype(new_body, /mob/living/simple_animal/hostile/bloodsucker) || istype(old_body, /mob/living/simple_animal/hostile/bloodsucker))
return
for(var/datum/action/bloodsucker/all_powers as anything in powers)
all_powers.Remove(old_body)
all_powers.Grant(new_body)
var/old_punchdamagelow
var/old_punchdamagehigh
if(ishuman(old_body))
var/mob/living/carbon/human/old_user = old_body
var/datum/species/old_species = old_user.dna.species
old_species.species_traits -= DRINKSBLOOD
//Keep track of what they were
old_punchdamagelow = old_species.punchdamagelow
old_punchdamagehigh = old_species.punchdamagehigh
//Then reset them
old_species.punchdamagelow = initial(old_species.punchdamagelow)
old_species.punchdamagehigh = initial(old_species.punchdamagehigh)
if(ishuman(new_body))
var/mob/living/carbon/human/new_user = new_body
var/datum/species/new_species = new_user.dna.species
new_species.species_traits += DRINKSBLOOD
//Give old punch damage values
new_species.punchdamagelow = old_punchdamagelow
new_species.punchdamagehigh = old_punchdamagehigh
//Give Bloodsucker Traits
for(var/all_traits in bloodsucker_traits)
REMOVE_TRAIT(old_body, all_traits, BLOODSUCKER_TRAIT)
ADD_TRAIT(new_body, all_traits, BLOODSUCKER_TRAIT)
/datum/antagonist/bloodsucker/greet()
. = ..()
var/fullname = ReturnFullName(TRUE)

View File

@@ -82,7 +82,7 @@
for(var/datum/action/bloodsucker/power in bat_powers)
power.Grant(gb)
QDEL_IN(gb, 2 MINUTES)
playsound(gb.loc, 'sound/items/toysqueak1.ogg', 50, 1)
playsound(gb.loc, 'sound/items/toysqueak1.ogg', 50, TRUE)
to_chat(owner, span_notice("You transform into a fatty beast!"))
return ..() //early to not mess with vampire organs proc
bloodsuckerdatum.HealVampireOrgans() //regives you the stuff
@@ -414,10 +414,10 @@
A.visible_message(span_danger("[A] inhales a ton of air!"), span_warning("You prepare to howl!"))
if(!do_mob(A, A, 2.5 SECONDS, TRUE))
return
playsound(A.loc, 'yogstation/sound/creatures/darkspawn_howl.ogg', 50, 1)
playsound(A.loc, 'yogstation/sound/creatures/darkspawn_howl.ogg', 50, TRUE)
A.visible_message(span_userdanger("[A] let's out a chilling howl!"), span_boldwarning("You howl, confusing and deafening nearby mortals."))
for(var/mob/target in range(3, A))
if(target == A && target == A.bloodsucker)
if(target == (A || A.bloodsucker))
continue
if(IS_BLOODSUCKER(target) || IS_VASSAL(target))
continue
@@ -451,15 +451,15 @@
. = ..()
var/mob/living/simple_animal/hostile/bloodsucker/werewolf/A = owner
A.environment_smash = ENVIRONMENT_SMASH_RWALLS
A.harm_intent_damage -= 10
A.melee_damage_lower -= 10
A.melee_damage_upper -= 10
A.obj_damage *= 3
START_PROCESSING(SSprocessing, src)
addtimer(CALLBACK(src, .proc/DeactivatePower), 10 SECONDS)
/datum/action/bloodsucker/gangrel/rabidism/process()
var/mob/living/simple_animal/hostile/bloodsucker/werewolf/A = owner
/datum/action/bloodsucker/gangrel/rabidism/ContinueActive()
return TRUE
/datum/action/bloodsucker/gangrel/rabidism/UsePower(mob/living/user)
. = ..()
var/mob/living/simple_animal/hostile/bloodsucker/werewolf/A = user
for(var/mob/living/all_targets in dview(1, get_turf(A)))
if(all_targets == A && all_targets == A.bloodsucker)
continue
@@ -469,11 +469,7 @@
. = ..()
var/mob/living/simple_animal/hostile/bloodsucker/werewolf/A = owner
A.environment_smash = initial(A.environment_smash)
A.harm_intent_damage = initial(A.harm_intent_damage)
A.melee_damage_lower = initial(A.melee_damage_lower)
A.melee_damage_upper = initial(A.melee_damage_upper)
A.obj_damage = initial(A.obj_damage)
STOP_PROCESSING(SSprocessing, src)
/datum/action/bloodsucker/targeted/tear
name = "Tear"
@@ -491,37 +487,38 @@
check_flags = BP_CANT_USE_IN_TORPOR|BP_CANT_USE_IN_FRENZY|BP_AM_COSTLESS_UNCONSCIOUS
purchase_flags = GANGREL_CAN_BUY
bloodcost = 10
cooldown = 20 SECONDS
cooldown = 7 SECONDS
var/mob/living/mauled
/datum/action/bloodsucker/targeted/tear/FireTargetedPower(atom/target_atom)
. = ..()
var/mob/living/carbon/human/user = owner
mauled = target_atom
user.do_attack_animation(mauled, ATTACK_EFFECT_CLAW)
var/obj/item/bodypart/affecting = mauled.get_bodypart(ran_zone(user.zone_selected))
playsound(get_turf(mauled), 'sound/weapons/slash.ogg', 60, 1, -1)
mauled.apply_damage(15, BRUTE, affecting, mauled.run_armor_check(affecting, "melee", armour_penetration = 10), sharpness = SHARP_EDGED)
START_PROCESSING(SSprocessing, src)
var/mob/living/target = target_atom
user.do_attack_animation(target, ATTACK_EFFECT_CLAW)
if(iscarbon(target))
var/obj/item/bodypart/affecting = target.get_bodypart(ran_zone(user.zone_selected))
playsound(get_turf(target), 'sound/weapons/slash.ogg', 60, TRUE, -1)
target.apply_damage(15, BRUTE, affecting, target.run_armor_check(affecting, "melee", armour_penetration = 10), sharpness = SHARP_EDGED)
mauled = target
Mawl(target)
/datum/action/bloodsucker/targeted/tear/process()
var/mob/living/carbon/human/user = owner
for(var/mob/living/victims in dview(1, get_turf(user)))
spawn(10)
if(!(victims == mauled))
continue
if(IS_BLOODSUCKER(mauled))
continue
if(!do_mob(user, victims, 1 SECONDS))
STOP_PROCESSING(SSprocessing, src)
continue
var/datum/status_effect/saw_bleed/B = victims.has_status_effect(STATUS_EFFECT_SAWBLEED)
user.do_attack_animation(mauled, ATTACK_EFFECT_CLAW)
playsound(get_turf(mauled), 'sound/weapons/slash.ogg', 60, 1, -1)
if(!B)
victims.apply_status_effect(STATUS_EFFECT_SAWBLEED)
else
B.add_bleed(B.bleed_buildup)
/datum/action/bloodsucker/targeted/tear/proc/Mawl(mob/living/target)
var/mob/living/carbon/user = owner
if(!do_mob(user, target, 1 SECONDS))
return
var/datum/status_effect/saw_bleed/B = target.has_status_effect(STATUS_EFFECT_SAWBLEED)
user.do_attack_animation(target, ATTACK_EFFECT_CLAW)
playsound(get_turf(target), 'sound/weapons/slash.ogg', 60, TRUE, -1)
if(!B)
target.apply_status_effect(STATUS_EFFECT_SAWBLEED)
else
B.add_bleed(B.bleed_buildup)
spawn(1 SECONDS)
if(!target.Adjacent(user))
return
user.do_attack_animation(target, ATTACK_EFFECT_CLAW)
playsound(get_turf(target), 'sound/weapons/slash.ogg', 60, TRUE, -1)
B.add_bleed(B.bleed_buildup)
/datum/action/bloodsucker/targeted/tear/CheckValidTarget(atom/target_atom)
. = ..()

View File

@@ -1,11 +1,16 @@
/// Runs from COMSIG_LIVING_BIOLOGICAL_LIFE, handles Bloodsucker constant proccesses.
/datum/antagonist/bloodsucker/proc/LifeTick()
if(isbrain(owner.current))
return
if(!owner)
if(!owner && !owner.current)
INVOKE_ASYNC(src, .proc/HandleDeath)
return
if(istype(owner.current, /mob/living/simple_animal/hostile/bloodsucker))
return
if(isbrain(owner.current))
return
// Deduct Blood
if(owner.current.stat == CONSCIOUS && !HAS_TRAIT(owner.current, TRAIT_NODEATH))
INVOKE_ASYNC(src, .proc/AddBloodVolume, passive_blood_drain) // -.1 currently
@@ -387,7 +392,10 @@
var/mob/living/carbon/human/bloodsucker = owner.current
owner.current.grab_ghost()
to_chat(owner.current, span_warning("You have recovered from Torpor."))
bloodsucker.physiology.brute_mod = initial(bloodsucker.physiology.brute_mod)
if(my_clan == CLAN_LASOMBRA)
bloodsucker.physiology.brute_mod *= 0
else
bloodsucker.physiology.brute_mod = initial(bloodsucker.physiology.brute_mod)
REMOVE_TRAIT(owner.current, TRAIT_RESISTLOWPRESSURE, BLOODSUCKER_TRAIT)
REMOVE_TRAIT(owner.current, TRAIT_DEATHCOMA, BLOODSUCKER_TRAIT)
REMOVE_TRAIT(owner.current, TRAIT_FAKEDEATH, BLOODSUCKER_TRAIT)

View File

@@ -24,12 +24,10 @@
return "Master : [master.owner.name]"
/datum/antagonist/vassal/apply_innate_effects(mob/living/mob_override)
. = ..()
var/mob/living/current_mob = mob_override || owner.current
current_mob.apply_status_effect(/datum/status_effect/agent_pinpointer/vassal_edition)
/datum/antagonist/vassal/remove_innate_effects(mob/living/mob_override)
. = ..()
var/mob/living/current_mob = mob_override || owner.current
current_mob.remove_status_effect(/datum/status_effect/agent_pinpointer/vassal_edition)

View File

@@ -15,7 +15,6 @@
var/datum/action/bloodsucker/fortitude = new /datum/action/bloodsucker/fortitude/hunter()
/datum/antagonist/monsterhunter/apply_innate_effects(mob/living/mob_override)
. = ..()
var/mob/living/current_mob = mob_override || owner.current
ADD_TRAIT(current_mob, TRAIT_NOSOFTCRIT, BLOODSUCKER_TRAIT)
ADD_TRAIT(current_mob, TRAIT_NOCRITDAMAGE, BLOODSUCKER_TRAIT)
@@ -23,7 +22,6 @@
my_kungfu.teach(current_mob, make_temporary = FALSE)
/datum/antagonist/monsterhunter/remove_innate_effects(mob/living/mob_override)
. = ..()
var/mob/living/current_mob = mob_override || owner.current
REMOVE_TRAIT(current_mob, TRAIT_NOSOFTCRIT, BLOODSUCKER_TRAIT)
REMOVE_TRAIT(current_mob, TRAIT_NOCRITDAMAGE, BLOODSUCKER_TRAIT)

View File

@@ -605,6 +605,8 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put
//used in human and monkey handle_environment()
/mob/living/carbon/proc/natural_bodytemperature_stabilization()
var/body_temperature_difference = BODYTEMP_NORMAL - bodytemperature
if(HAS_TRAIT(src, TRAIT_COLDBLOODED)) // Return 0 as your natural temperature. Species proc handle_environment() will adjust your temperature based on this.
return 0
switch(bodytemperature)
if(-INFINITY to BODYTEMP_COLD_DAMAGE_LIMIT) //Cold damage limit is 50 below the default, the temperature where you start to feel effects.
return max((body_temperature_difference * metabolism_efficiency / BODYTEMP_AUTORECOVERY_DIVISOR), BODYTEMP_AUTORECOVERY_MINIMUM)