diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 98811614770..0ac26d93aab 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -867,4 +867,10 @@ var/global/list/multiverse = list() target.adjust_fire_stacks(20) target.IgniteMob() GiveHint(target,1) - return ..() \ No newline at end of file + return ..() + +/obj/item/organ/internal/heart/cursed/wizard + pump_delay = 60 + heal_brute = 25 + heal_burn = 25 + heal_oxy = 25 \ No newline at end of file diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 5165edb8698..e12d44c46c7 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -403,6 +403,14 @@ item_path = /obj/item/weapon/twohanded/singularityhammer log_name = "SI" +/datum/spellbook_entry/item/cursed_heart + name = "Cursed Heart" + desc = "A heart that has been revived by dark magicks, the user must concentrate to ensure the heart beats, but every beat heals them. It must beat every 6 seconds." + item_path = /obj/item/organ/internal/heart/cursed/wizard + log_name = "CH" + cost = 1 + category = "Defensive" + /datum/spellbook_entry/summon name = "Summon Stuff" category = "Rituals" diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index df21d83c208..27ab9ea3b99 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -191,6 +191,70 @@ S.icon_state = "heart-off" return S +/obj/item/organ/internal/heart/cursed + name = "cursed heart" + desc = "it needs to be pumped..." + icon_state = "cursedheart-off" + icon_base = "cursedheart" + origin_tech = "biotech=5" + organ_action_name = "pump your blood" + var/last_pump = 0 + var/pump_delay = 30 //you can pump 1 second early, for lag, but no more (otherwise you could spam heal) + var/blood_loss = 100 //600 blood is human default, so 5 failures (below 122 blood is where humans die because reasons?) + + //How much to heal per pump, negative numbers would HURT the player + var/heal_brute = 0 + var/heal_burn = 0 + var/heal_oxy = 0 + + +/obj/item/organ/internal/heart/cursed/attack(mob/living/carbon/human/H, mob/living/carbon/human/user, obj/target) + if(H == user && istype(H)) + if(H.species.flags & NO_BLOOD || H.species.exotic_blood) + to_chat(H, "\The [src] is not compatible with your form!") + return + playsound(user,'sound/effects/singlebeat.ogg', 40, 1) + user.drop_item() + insert(user) + else + return ..() + +/obj/item/organ/internal/heart/cursed/on_life() + if(world.time > (last_pump + pump_delay)) + if(ishuman(owner) && owner.client) //While this entire item exists to make people suffer, they can't control disconnects. + var/mob/living/carbon/human/H = owner + H.vessel.remove_reagent("blood", blood_loss) + to_chat(H, "You have to keep pumping your blood!") + if(H.client) + H.client.color = "red" //bloody screen so real + else + last_pump = world.time //lets be extra fair *sigh* + +/obj/item/organ/internal/heart/cursed/insert(mob/living/carbon/M, special = 0) + ..() + if(owner) + to_chat(owner, "Your heart has been replaced with a cursed one, you have to pump this one manually otherwise you'll die!") + +//You are now brea- pumping blood manually +/obj/item/organ/internal/heart/cursed/ui_action_click() + if(world.time < (last_pump + (pump_delay-10))) //no spam + to_chat(owner, "Too soon!") + return + + last_pump = world.time + playsound(owner, 'sound/effects/singlebeat.ogg', 40, 1) + to_chat(owner, "Your heart beats.") + + var/mob/living/carbon/human/H = owner + if(istype(H)) + H.vessel.add_reagent("blood", (blood_loss*0.5))//gain half the blood back from a failure + if(owner.client) + owner.client.color = "" + + H.adjustBruteLoss(-heal_brute) + H.adjustFireLoss(-heal_burn) + H.adjustOxyLoss(-heal_oxy) + /obj/item/organ/internal/lungs name = "lungs" icon_state = "lungs" diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi index 424cf671e88..88161a20b5c 100644 Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ