Vampires bugfixes (#29349)

This commit is contained in:
ShiftyRail
2021-04-26 17:43:43 +02:00
committed by GitHub
parent cf6151a62a
commit df9c0cdf9e
13 changed files with 46 additions and 45 deletions

View File

@@ -47,31 +47,31 @@
/spell/targeted/enthrall/cast(var/list/targets, var/mob/user)
if (targets.len > 1)
return FALSE
var/mob/living/target = targets[1]
var/datum/role/vampire/V = isvampire(user)
if (!V)
return FALSE
user.visible_message("<span class='warning'>[user] bites \the [target]'s neck!</span>", "<span class='warning'>You bite \the [target]'s neck and begin the flow of power.</span>")
to_chat(target, "<span class='sinister'>You feel the tendrils of evil [(/datum/power/vampire/charisma in V.current_powers) ? "aggressively" : "slowly"] invade your mind.</span>")
if(do_mob(user, target, (/datum/power/vampire/charisma in V.current_powers) ? 150 : 300))
user.visible_message("<span class='warning'>[user] bites \the [target]'s neck!</span>", "<span class='warning'>You bite \the [target]'s neck and begin the flow of power.</span>")
to_chat(target, "<span class='sinister'>You feel the tendrils of evil [(locate(/datum/power/vampire/charisma) in V.current_powers) ? "aggressively" : "slowly"] invade your mind.</span>")
if(do_mob(user, target, (locate(/datum/power/vampire/charisma) in V.current_powers) ? 150 : 300))
if(user.vampire_power(blood_cost, 0)) // recheck
V.handle_enthrall(target.mind)
else
to_chat(user, "<span class='warning'>Either you or your target moved, and you couldn't finish enthralling them!</span>")
return FALSE
if(!target.client) //There is not a player "in control" of this corpse, so there is no one to inform.
var/mob/dead/observer/ghost = mind_can_reenter(target.mind)
if(ghost)
var/mob/ghostmob = ghost.get_top_transmogrification()
if(ghostmob) //A ghost has been found, and it still belongs to this corpse. There's nothing preventing them from being revived.
to_chat(ghostmob, "<span class='interface big'><span class='bold'>The vampire has enthralled your corpse. You will be their servant when you return to the living. Blood and power to your Lord. (Check your notes for the current identity of your master upon revival.)</span>")
V.remove_blood(blood_cost)
/spell/targeted/enthrall/critfail(var/list/targets, var/mob/user)
@@ -81,4 +81,4 @@
H.confused = max(10, H.confused)
var/datum/role/vampire/V = isvampire(user)
if (V)
V.remove_blood(blood_cost)
V.remove_blood(blood_cost)