|
21 | 21 | /obj/item/weapon/spacecash/bundle/c50,
|
22 | 22 | )
|
23 | 23 |
|
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) |
26 | 29 | 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) |
32 | 46 |
|
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) |
34 | 48 | if (src.use_sound)
|
35 | 49 | playsound(src.loc, src.use_sound, 50, 1, -5)
|
36 | 50 | return ..()
|
0 commit comments