-
Notifications
You must be signed in to change notification settings - Fork 71
Odious Chalice bugfixes #880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,22 +4,47 @@ | |||||
| icon_state = "o_chalice" | ||||||
| var/stored_blood = 0 | ||||||
| research_value = 30 | ||||||
| COOLDOWN_DECLARE(chalice_alert_cooldown) | ||||||
|
|
||||||
| /obj/item/vtm_artifact/odious_chalice/examine(mob/user) | ||||||
| . = ..() | ||||||
| . += "[src] contains [stored_blood] blood points..." | ||||||
|
|
||||||
| /obj/item/vtm_artifact/odious_chalice/identify(mob/living/artifact_identifier) | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would need to be this but we prob still need to generize it to link / unlink procs.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why would it have to be that? oh, for... picking up and stuff. yeah we'd need some way to unregister the signal and stuff. lemme look into this when i can... |
||||||
| . = ..() | ||||||
| to_chat(owner, span_cult("The Chalice awaits for blood. As long as it remains in your bag, it will draw the blood of your target into it!")) | ||||||
| RegisterSignal(owner, COMSIG_MOB_ITEM_ATTACK, PROC_REF(on_attack)) | ||||||
|
|
||||||
| /obj/item/vtm_artifact/odious_chalice/proc/on_attack(mob/living/source, mob/living/target, mob/living/user, list/modifiers, list/attack_modifiers) | ||||||
| if(!identified) | ||||||
| return | ||||||
| var/obj/item/weapon = source.get_active_held_item() | ||||||
| if(!weapon?.get_sharpness()) | ||||||
| return | ||||||
| if(!prob(50)) | ||||||
| return | ||||||
| if(!(src in source.get_all_contents())) | ||||||
| return | ||||||
| if(!target.bloodpool && !target.blood_volume) | ||||||
| return | ||||||
| stored_blood++ | ||||||
| if(COOLDOWN_FINISHED(src, chalice_alert_cooldown)) | ||||||
| //rather spammy. 1 scene cooldown | ||||||
| balloon_alert(source, "the chalice drinks...") | ||||||
| COOLDOWN_START(src, chalice_alert_cooldown, 1 SCENES) | ||||||
|
|
||||||
| /obj/item/vtm_artifact/odious_chalice/attack(mob/living/M, mob/living/user) | ||||||
| . = ..() | ||||||
| if(!get_kindred_splat(M)) | ||||||
| if(!get_vampire_splat(M)) | ||||||
| return | ||||||
| if(!stored_blood) | ||||||
| if(stored_blood <= 0) | ||||||
| return | ||||||
| if(!identified) | ||||||
| return | ||||||
| M.adjust_brute_loss(-5*stored_blood, TRUE) | ||||||
| M.adjust_fire_loss(-5*stored_blood, TRUE) | ||||||
| M.update_damage_overlays() | ||||||
| M.update_health_hud() | ||||||
| stored_blood-- | ||||||
| playsound(M.loc,'sound/items/drink.ogg', 50, TRUE) | ||||||
| return | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pickup includes the generic pickup behavior i believe so i am unsure if this is a good idea?