Skip to content

Commit d980aec

Browse files
Fritcher36Epicus7
authored andcommitted
feat(bible): heal on punches
close #1123 issue #704 PR #1190
1 parent 2148dbf commit d980aec

File tree

1 file changed

+22
-8
lines changed
  • code/game/objects/items/weapons/storage

1 file changed

+22
-8
lines changed

code/game/objects/items/weapons/storage/bible.dm

+22-8
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,30 @@
2121
/obj/item/weapon/spacecash/bundle/c50,
2222
)
2323

24-
/obj/item/weapon/storage/bible/afterattack(atom/A, mob/user as mob, proximity)
25-
if(!proximity) return
24+
/obj/item/weapon/storage/bible/afterattack(atom/target, mob/user, proximity)
25+
if(!proximity)
26+
return
27+
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
28+
user.do_attack_animation(target)
2629
if(user.mind && (user.mind.assigned_role == "Chaplain"))
27-
if(A.reagents && A.reagents.has_reagent(/datum/reagent/water)) //blesses all the water in the holder
28-
to_chat(user, "<span class='notice'>You bless \the [A].</span>") // I wish it was this easy in nethack
29-
var/water2holy = A.reagents.get_reagent_amount(/datum/reagent/water)
30-
A.reagents.del_reagent(/datum/reagent/water)
31-
A.reagents.add_reagent(/datum/reagent/water/holywater,water2holy)
30+
if (ishuman(target))
31+
var/mob/living/carbon/human/human_target = target
32+
if(prob(10))
33+
human_target.adjustBrainLoss(5)
34+
to_chat(human_target, SPAN_WARNING("You feel dumber."))
35+
visible_message(SPAN_WARNING("[user] beats [human_target] over the head with [src]!"))
36+
visible_message(SPAN_WARNING("[user] heals [human_target] with the power of [src.deity_name]!"))
37+
human_target.visible_message(SPAN_WARNING("May the power of [src.deity_name] compel you to be healed!"))
38+
playsound(src.loc, "punch", 25, 1, -1)
39+
human_target.heal_overall_damage(20,20)
40+
else
41+
if(target.reagents && target.reagents.has_reagent(/datum/reagent/water)) //blesses all the water in the holder
42+
user.visible_message(SPAN_NOTICE("You bless \the [target]."))
43+
var/water2holy = target.reagents.get_reagent_amount(/datum/reagent/water)
44+
target.reagents.del_reagent(/datum/reagent/water)
45+
target.reagents.add_reagent(/datum/reagent/water/holywater,water2holy)
3246

33-
/obj/item/weapon/storage/bible/attackby(obj/item/weapon/W as obj, mob/user as mob)
47+
/obj/item/weapon/storage/bible/attackby(obj/item/weapon/W, mob/user)
3448
if (src.use_sound)
3549
playsound(src.loc, src.use_sound, 50, 1, -5)
3650
return ..()

0 commit comments

Comments
 (0)