diff --git a/code/__DEFINES/cult.dm b/code/__DEFINES/cult.dm index e9965b2c999..2eadb7e33f2 100644 --- a/code/__DEFINES/cult.dm +++ b/code/__DEFINES/cult.dm @@ -19,6 +19,8 @@ #define RUNELESS_MAX_BLOODCHARGE 1 #define BLOOD_SPEAR_COST 150 #define BLOOD_BARRAGE_COST 300 +#define BLOOD_ORB_COST 50 +#define BLOOD_RECHARGE_COST 75 #define BLOOD_BEAM_COST 500 #define METAL_TO_CONSTRUCT_SHELL_CONVERSION 50 diff --git a/code/game/gamemodes/cult/blood_magic.dm b/code/game/gamemodes/cult/blood_magic.dm index 4eb889b38f7..2583fd693d3 100644 --- a/code/game/gamemodes/cult/blood_magic.dm +++ b/code/game/gamemodes/cult/blood_magic.dm @@ -337,7 +337,7 @@ /datum/action/innate/cult/blood_spell/manipulation name = "Blood Rites" desc = "Empowers your hand to manipulate blood. Use on blood or a noncultist to absorb blood to be used later, use on yourself or another cultist to heal them using absorbed blood. \ - \nUse the spell in-hand to cast advanced rites, such as summoning a magical blood spear or firing blood projectiles out of your hands." + \nUse the spell in-hand to cast advanced rites, such as summoning a magical blood spear, firing blood projectiles out of your hands, and more!" invocation = "Fel'th Dol Ab'orod!" button_icon_state = "manip" charges = 5 @@ -358,19 +358,22 @@ throwforce = 0 throw_range = 0 throw_speed = 0 + /// Does it have a source, AKA bloody empowerment. + var/has_source = TRUE var/invocation var/uses = 1 var/health_cost = 0 //The amount of health taken from the user when invoking the spell var/datum/action/innate/cult/blood_spell/source /obj/item/melee/blood_magic/New(loc, spell) - source = spell - uses = source.charges - health_cost = source.health_cost + if(has_source) + source = spell + uses = source.charges + health_cost = source.health_cost ..() /obj/item/melee/blood_magic/Destroy() - if(!QDELETED(source)) + if(has_source && !QDELETED(source)) if(uses <= 0) source.hand_magic = null qdel(source) @@ -644,6 +647,47 @@ C.put_in_hands(new /obj/item/restraints/legcuffs/bola/cult(user)) C.visible_message("Otherworldly [armour ? "armour" : "equipment"] suddenly appears on [C]!") ..() +//Used by blood rite, to recharge things like viel shifter or the cultest shielded robes +/obj/item/melee/blood_magic/empower + name = "Blood Recharge" + desc = "Can be used on some cult items, to restore them to their previous state." + invocation = "Ditans Gut'ura Inpulsa!" + color = "#9c0651" + has_source = FALSE //special, only availible for a blood cost. + +/obj/item/melee/blood_magic/empower/afterattack(atom/target, mob/user, proximity_flag, click_parameters) + if(proximity_flag) + + //Shielded suit + if(istype(target, /obj/item/clothing/suit/hooded/cultrobes/cult_shield)) + var/obj/item/clothing/suit/hooded/cultrobes/cult_shield/C = target + if(C.current_charges < 3) + uses-- + to_chat(user, "You empower [target] with blood, recharging its shields!") + playsound(user, 'sound/magic/cult_spell.ogg', 25, TRUE) + C.current_charges = 3 + C.shield_state = "shield-cult" + user.update_inv_wear_suit() // The only way a suit can be clicked on is if its on the floor, in the users bag, or on the user, so we will play it safe if it is on the user. + else + to_chat(user, "[target] is already at full charge!") + return + + //Plasteel to runed metal + else if(istype(target, /obj/item/cult_shift)) + var/obj/item/cult_shift/S = target + if(S.uses < 4) + uses-- + to_chat(user, "You empower [target] with blood, recharging its ability to shift!") + playsound(user, 'sound/magic/cult_spell.ogg', 25, TRUE) + S.uses = 4 + S.icon_state = "shifter" + else + to_chat(user, "[target] is already at full charge!") + return + else + to_chat(user, "The spell will not work on [target]!") + return + ..() //Blood Rite: Absorb blood to heal cult members or summon weapons /obj/item/melee/blood_magic/manipulator @@ -654,6 +698,7 @@ /obj/item/melee/blood_magic/manipulator/examine(mob/user) . = ..() . += "Blood spear and blood barrage cost [BLOOD_SPEAR_COST] and [BLOOD_BARRAGE_COST] charges respectively." + . += "Blood orb and blood empower cost [BLOOD_ORB_COST] and [BLOOD_RECHARGE_COST] charges respectively." . += "You have collected [uses] charge\s of blood." // This should really be split into multiple procs @@ -765,6 +810,14 @@ //Draining blood on the floor if(istype(target, /obj/effect/decal/cleanable/blood) || istype(target, /obj/effect/decal/cleanable/trail_holder)) blood_draw(target, user) + if(istype(target, /obj/item/blood_orb)) + var/obj/item/blood_orb/candidate = target + if(candidate.blood) + uses += candidate.blood + to_chat(user, "You obtain [candidate.blood] blood from the orb of blood!") + playsound(user, 'sound/misc/enter_blood.ogg', 50) + qdel(candidate) + ..() /obj/item/melee/blood_magic/manipulator/proc/blood_draw(atom/target, mob/living/carbon/human/user) @@ -790,7 +843,7 @@ uses += max(1, temp) /obj/item/melee/blood_magic/manipulator/attack_self(mob/living/user) - var/list/options = list("Blood Spear (150)", "Blood Bolt Barrage (300)") + var/list/options = list("Blood Orb (50)", "Blood Recharge (75)", "Blood Spear (150)", "Blood Bolt Barrage (300)") var/choice = input(user, "Choose a greater blood rite...", "Greater Blood Rites") as null|anything in options switch(choice) if("Blood Spear (150)") @@ -825,3 +878,39 @@ to_chat(user, "You need a free hand for this rite!") uses += BLOOD_BARRAGE_COST // Refund the charges qdel(rite) + + if("Blood Orb (50)") + if(uses < BLOOD_ORB_COST) + to_chat(user, "You need [BLOOD_ORB_COST] charges to perform this rite.") + else + var/ammount = input("How much blood would you like to transfer? You have [uses] blood.", "How much blood?", 50) as null|num + if(ammount < 50) // No 1 blood orbs, 50 or more. + to_chat(user, "You need to give up at least 50 blood.") + return + if(ammount > uses) // No free blood either + to_chat(user, "You do not have that much blood to give!") + return + uses -= ammount + var/turf/T = get_turf(user) + qdel(src) + var/obj/item/blood_orb/rite = new(T) + rite.blood = ammount + if(user.put_in_hands(rite)) + to_chat(user, "A [rite.name] appears in your hand!") + else + user.visible_message("A [rite.name] appears at [user]'s feet!", \ + "A [rite.name] materializes at your feet.") + + if("Blood Recharge (75)") + if(uses < BLOOD_RECHARGE_COST) + to_chat(user, "You need [BLOOD_RECHARGE_COST] charges to perform this rite.") + else + var/obj/rite = new /obj/item/melee/blood_magic/empower() + uses -= BLOOD_RECHARGE_COST + qdel(src) + if(user.put_in_hands(rite)) + to_chat(user, "Your hand glows with power!") + else + to_chat(user, "You need a free hand for this rite!") + uses += BLOOD_RECHARGE_COST // Refund the charges + qdel(rite) diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 6aa0f896f8f..cd2f7223d52 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -649,3 +649,12 @@ M.adjustHealth(-5) new /obj/effect/temp_visual/cult/sparks(target) ..() + +/obj/item/blood_orb + name = "orb of blood" + icon = 'icons/obj/cult.dmi' + icon_state = "summoning_orb" + item_state = "summoning_orb" + desc = "It's an orb of crystalized blood. Can be used to transfer blood between cultists." + var/blood = 50 +