mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
[MIRROR] Mild Blood Rites QoL and Blood Halberd cleanup + sprites (#3480)
* Mild Blood Rites QoL and Blood Halberd cleanup + sprites (#56924) Blood Rites now uses a radial menu for choosing which version of the spell you want. Blood Halberd, now Bloody Halberd, has had some of it's weirdness as a cult weapon resolved by bringing it under the cultblade parent, ensuring it is babyproof and not able to be turned on others by noncultists. Bloody Halberd now has a new sprite. Additionally, some code guideline cleanup, as well as making the cult longsword use the x64 sprites I added for the dark blade a while back. * Mild Blood Rites QoL and Blood Halberd cleanup + sprites * Update coats.dm Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com> Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
This commit is contained in:
co-authored by
necromanceranne
Gandalf2k15
parent
183d7b8518
commit
6129d078bb
@@ -603,7 +603,7 @@
|
||||
candidate.color = "black"
|
||||
if(do_after(user, 90, target = candidate))
|
||||
candidate.emp_act(EMP_HEAVY)
|
||||
var/list/constructs = list(
|
||||
var/static/list/constructs = list(
|
||||
"Juggernaut" = image(icon = 'icons/mob/cult.dmi', icon_state = "juggernaut"),
|
||||
"Wraith" = image(icon = 'icons/mob/cult.dmi', icon_state = "wraith"),
|
||||
"Artificer" = image(icon = 'icons/mob/cult.dmi', icon_state = "artificer")
|
||||
@@ -661,7 +661,7 @@
|
||||
|
||||
/obj/item/melee/blood_magic/construction/proc/check_menu(mob/user)
|
||||
if(!istype(user))
|
||||
return FALSE
|
||||
CRASH("The cult construct selection radial menu was accessed by something other than a valid user.")
|
||||
if(user.incapacitated() || !user.Adjacent(src))
|
||||
return FALSE
|
||||
return TRUE
|
||||
@@ -695,7 +695,7 @@
|
||||
|
||||
/obj/item/melee/blood_magic/manipulator/examine(mob/user)
|
||||
. = ..()
|
||||
. += "Blood spear, blood bolt barrage, and blood beam cost [BLOOD_SPEAR_COST], [BLOOD_BARRAGE_COST], and [BLOOD_BEAM_COST] charges respectively."
|
||||
. += "Bloody halberd, blood bolt barrage, and blood beam cost [BLOOD_HALBERD_COST], [BLOOD_BARRAGE_COST], and [BLOOD_BEAM_COST] charges respectively."
|
||||
|
||||
/obj/item/melee/blood_magic/manipulator/afterattack(atom/target, mob/living/carbon/human/user, proximity)
|
||||
if(proximity)
|
||||
@@ -803,23 +803,27 @@
|
||||
|
||||
/obj/item/melee/blood_magic/manipulator/attack_self(mob/living/user)
|
||||
if(iscultist(user))
|
||||
var/list/options = list("Blood Spear (150)", "Blood Bolt Barrage (300)", "Blood Beam (500)")
|
||||
var/choice = input(user, "Choose a greater blood rite...", "Greater Blood Rites") as null|anything in options
|
||||
if(!choice)
|
||||
var/static/list/spells = list(
|
||||
"Bloody Halberd (150)" = image(icon = 'icons/obj/items_and_weapons.dmi', icon_state = "occultpoleaxe0"),
|
||||
"Blood Bolt Barrage (300)" = image(icon = 'icons/obj/guns/projectile.dmi', icon_state = "arcane_barrage"),
|
||||
"Blood Beam (500)" = image(icon = 'icons/obj/items_and_weapons.dmi', icon_state = "disintegrate")
|
||||
)
|
||||
var/choice = show_radial_menu(user, src, spells, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE)
|
||||
if(!check_menu(user))
|
||||
to_chat(user, "<span class='cultitalic'>You decide against conducting a greater blood rite.</span>")
|
||||
return
|
||||
switch(choice)
|
||||
if("Blood Spear (150)")
|
||||
if(uses < BLOOD_SPEAR_COST)
|
||||
to_chat(user, "<span class='cultitalic'>You need [BLOOD_SPEAR_COST] charges to perform this rite.</span>")
|
||||
if("Bloody Halberd (150)")
|
||||
if(uses < BLOOD_HALBERD_COST)
|
||||
to_chat(user, "<span class='cultitalic'>You need [BLOOD_HALBERD_COST] charges to perform this rite.</span>")
|
||||
else
|
||||
uses -= BLOOD_SPEAR_COST
|
||||
var/turf/T = get_turf(user)
|
||||
uses -= BLOOD_HALBERD_COST
|
||||
var/turf/current_position = get_turf(user)
|
||||
qdel(src)
|
||||
var/datum/action/innate/cult/spear/S = new(user)
|
||||
var/obj/item/cult_spear/rite = new(T)
|
||||
S.Grant(user, rite)
|
||||
rite.spear_act = S
|
||||
var/datum/action/innate/cult/halberd/halberd_act_granted = new(user)
|
||||
var/obj/item/melee/cultblade/halberd/rite = new(current_position)
|
||||
halberd_act_granted.Grant(user, rite)
|
||||
rite.halberd_act = halberd_act_granted
|
||||
if(user.put_in_hands(rite))
|
||||
to_chat(user, "<span class='cultitalic'>A [rite.name] appears in your hand!</span>")
|
||||
else
|
||||
@@ -849,3 +853,10 @@
|
||||
else
|
||||
to_chat(user, "<span class='cultitalic'>You need a free hand for this rite!</span>")
|
||||
qdel(rite)
|
||||
|
||||
/obj/item/melee/blood_magic/manipulator/proc/check_menu(mob/living/user)
|
||||
if(!istype(user))
|
||||
CRASH("The Blood Rites manipulator radial menu was accessed by something other than a valid user.")
|
||||
if(user.incapacitated() || !user.Adjacent(src))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "render"
|
||||
inhand_icon_state = "cultdagger"
|
||||
worn_icon_state = "render"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
inhand_x_dimension = 32
|
||||
@@ -36,8 +37,11 @@
|
||||
desc = "A sword humming with unholy energy. It glows with a dim red light."
|
||||
icon_state = "cultblade"
|
||||
inhand_icon_state = "cultblade"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
worn_icon_state = "cultblade"
|
||||
lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/64x64_righthand.dmi'
|
||||
inhand_x_dimension = 64
|
||||
inhand_y_dimension = 64
|
||||
flags_1 = CONDUCT_1
|
||||
sharpness = SHARP_EDGED
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
@@ -60,8 +64,8 @@
|
||||
user.visible_message("<span class='warning'>A powerful force shoves [user] away from [target]!</span>", \
|
||||
"<span class='cultlarge'>\"You shouldn't play with sharp things. You'll poke someone's eye out.\"</span>")
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.apply_damage(rand(force/2, force), BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
var/mob/living/carbon/human/miscreant = user
|
||||
miscreant.apply_damage(rand(force/2, force), BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
else
|
||||
user.adjustBruteLoss(rand(force/2,force))
|
||||
return
|
||||
@@ -631,56 +635,62 @@
|
||||
to_chat(user, "<span class='warning'>\The [src] can only transport items!</span>")
|
||||
|
||||
|
||||
/obj/item/cult_spear
|
||||
name = "blood halberd"
|
||||
desc = "A sickening spear composed entirely of crystallized blood."
|
||||
icon_state = "bloodspear0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/polearms_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/polearms_righthand.dmi'
|
||||
slot_flags = 0
|
||||
/obj/item/melee/cultblade/halberd
|
||||
name = "bloody halberd"
|
||||
desc = "A halberd with a volatile axehead made from crystallized blood. It seems linked to its creator. And, admittedly, more of a poleaxe than a halberd."
|
||||
icon_state = "occultpoleaxe0"
|
||||
inhand_icon_state = "occultpoleaxe0"
|
||||
base_icon_state = "occultpoleaxe0"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
force = 17
|
||||
throwforce = 40
|
||||
throw_speed = 2
|
||||
armour_penetration = 30
|
||||
block_chance = 30
|
||||
attack_verb_continuous = list("attacks", "impales", "stabs", "tears", "lacerates", "gores")
|
||||
attack_verb_simple = list("attack", "impale", "stab", "tear", "lacerate", "gore")
|
||||
slot_flags = null
|
||||
attack_verb_continuous = list("attacks", "slices", "shreds", "sunders", "lacerates", "cleaves")
|
||||
attack_verb_simple = list("attack", "slice", "shred", "sunder", "lacerate", "cleave")
|
||||
sharpness = SHARP_EDGED
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
var/datum/action/innate/cult/spear/spear_act
|
||||
var/datum/action/innate/cult/halberd/halberd_act
|
||||
var/wielded = FALSE // track wielded status on item
|
||||
|
||||
/obj/item/cult_spear/Initialize()
|
||||
/obj/item/melee/cultblade/halberd/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
|
||||
/obj/item/cult_spear/ComponentInitialize()
|
||||
/obj/item/melee/cultblade/halberd/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 100, 90)
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=17, force_wielded=24, icon_wielded="bloodspear1")
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=17, force_wielded=24)
|
||||
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/cult_spear/proc/on_wield(obj/item/source, mob/user)
|
||||
/obj/item/melee/cultblade/halberd/proc/on_wield(obj/item/source, mob/user)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
wielded = TRUE
|
||||
|
||||
/// triggered on unwield of two handed item
|
||||
/obj/item/cult_spear/proc/on_unwield(obj/item/source, mob/user)
|
||||
/obj/item/melee/cultblade/halberd/proc/on_unwield(obj/item/source, mob/user)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/cult_spear/update_icon_state()
|
||||
icon_state = "bloodspear0"
|
||||
/obj/item/melee/cultblade/halberd/update_icon_state()
|
||||
if(wielded)
|
||||
icon_state = "occultpoleaxe1"
|
||||
inhand_icon_state = "occultpoleaxe1"
|
||||
else
|
||||
icon_state = "[base_icon_state]"
|
||||
inhand_icon_state = "[base_icon_state]"
|
||||
|
||||
/obj/item/cult_spear/Destroy()
|
||||
if(spear_act)
|
||||
qdel(spear_act)
|
||||
..()
|
||||
/obj/item/melee/cultblade/halberd/Destroy()
|
||||
if(halberd_act)
|
||||
QDEL_NULL(halberd_act)
|
||||
return ..()
|
||||
|
||||
/obj/item/cult_spear/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
/obj/item/melee/cultblade/halberd/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
var/turf/T = get_turf(hit_atom)
|
||||
if(isliving(hit_atom))
|
||||
var/mob/living/L = hit_atom
|
||||
@@ -693,11 +703,11 @@
|
||||
else if(!..())
|
||||
if(!L.anti_magic_check())
|
||||
L.Paralyze(50)
|
||||
break_spear(T)
|
||||
break_halberd(T)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/cult_spear/proc/break_spear(turf/T)
|
||||
/obj/item/melee/cultblade/halberd/proc/break_halberd(turf/T)
|
||||
if(src)
|
||||
if(!T)
|
||||
T = get_turf(src)
|
||||
@@ -708,7 +718,7 @@
|
||||
playsound(T, 'sound/effects/glassbr3.ogg', 100)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/cult_spear/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
/obj/item/melee/cultblade/halberd/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(wielded)
|
||||
final_block_chance *= 2
|
||||
if(prob(final_block_chance))
|
||||
@@ -722,34 +732,34 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/action/innate/cult/spear
|
||||
/datum/action/innate/cult/halberd
|
||||
name = "Bloody Bond"
|
||||
desc = "Call the blood spear back to your hand!"
|
||||
desc = "Call the bloody halberd back to your hand!"
|
||||
background_icon_state = "bg_demon"
|
||||
button_icon_state = "bloodspear"
|
||||
var/obj/item/cult_spear/spear
|
||||
var/obj/item/melee/cultblade/halberd/halberd
|
||||
var/cooldown = 0
|
||||
|
||||
/datum/action/innate/cult/spear/Grant(mob/user, obj/blood_spear)
|
||||
/datum/action/innate/cult/halberd/Grant(mob/user, obj/blood_halberd)
|
||||
. = ..()
|
||||
spear = blood_spear
|
||||
halberd = blood_halberd
|
||||
button.screen_loc = "6:157,4:-2"
|
||||
button.moved = "6:157,4:-2"
|
||||
|
||||
/datum/action/innate/cult/spear/Activate()
|
||||
if(owner == spear.loc || cooldown > world.time)
|
||||
/datum/action/innate/cult/halberd/Activate()
|
||||
if(owner == halberd.loc || cooldown > world.time)
|
||||
return
|
||||
var/ST = get_turf(spear)
|
||||
var/OT = get_turf(owner)
|
||||
if(get_dist(OT, ST) > 10)
|
||||
to_chat(owner,"<span class='cult'>The spear is too far away!</span>")
|
||||
var/halberd_location = get_turf(halberd)
|
||||
var/owner_location = get_turf(owner)
|
||||
if(get_dist(owner_location, halberd_location) > 10)
|
||||
to_chat(owner,"<span class='cult'>The halberd is too far away!</span>")
|
||||
else
|
||||
cooldown = world.time + 20
|
||||
if(isliving(spear.loc))
|
||||
var/mob/living/L = spear.loc
|
||||
L.dropItemToGround(spear)
|
||||
L.visible_message("<span class='warning'>An unseen force pulls the blood spear from [L]'s hands!</span>")
|
||||
spear.throw_at(owner, 10, 2, owner)
|
||||
if(isliving(halberd.loc))
|
||||
var/mob/living/current_owner = halberd.loc
|
||||
current_owner.dropItemToGround(halberd)
|
||||
current_owner.visible_message("<span class='warning'>An unseen force pulls the bloody halberd from [current_owner]'s hands!</span>")
|
||||
halberd.throw_at(owner, 10, 2, owner)
|
||||
|
||||
|
||||
/obj/item/gun/ballistic/rifle/enchanted/arcane_barrage/blood
|
||||
|
||||
Reference in New Issue
Block a user