-
Notifications
You must be signed in to change notification settings - Fork 69
I hurt myself today... Or: Self Damage Infliction Verb #361
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 5 commits
80f6717
37cef64
82de870
390db16
621e3e6
2b54bda
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 |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /mob/living/carbon/human/verb/ouch() | ||
| set category = "IC" | ||
| set name = "Ouch Thyself" | ||
| set desc = "Allows you to damage yourself. Ough." | ||
|
|
||
| var/unfunnyjoke = pick(list("Select Yeowchies", "I hurt myself... today...", "Damage Types", "Pick Thy Poison", "Applicable Pithy Quote", "Dumb Ways To Die", "Toe Stubbage Device")) | ||
| if(prob(0.1)) | ||
| unfunnyjoke = "In 1998, The Undertaker" | ||
| var/damagetype = tgui_input_list(src, "Select a damage type:", unfunnyjoke, list("Brute", "Burn", "Toxin", "Oxygen", "Stamina", "Blood")) | ||
|
Collaborator
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. Probably would be good to use defines instead of hardcoded strings for the lists |
||
| if(!damagetype) | ||
| return | ||
| var/damageamount = tgui_input_number(src, "How much damage should you take:", "Quantify Ouches", 0, INFINITY, 0) | ||
|
Collaborator
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. Please limit this to like, 200 damage. Not infinity. |
||
| if(!damageamount) | ||
| return | ||
| var/tobodyzone = FALSE | ||
| if(damagetype in list("Brute", "Burn")) | ||
| tobodyzone = (tgui_alert(src, "Would you like this damage to be to your selected bodyzone?", "Oughghhghghghghhhh", list("Yes", "No")) == "Yes") | ||
|
Collaborator
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. Again, defines would be good. |
||
| switch(damagetype) | ||
| if("Toxin") | ||
| adjust_tox_loss(damageamount, forced = TRUE) | ||
| if("Oxygen") | ||
| adjust_oxy_loss(damageamount) | ||
| if("Blood") | ||
| adjust_blood_volume(-damageamount, 0, INFINITY) | ||
| if("Stamina") | ||
| adjust_stamina_loss(damageamount) | ||
| if("Burn") | ||
| if(tobodyzone) | ||
| apply_damage(damageamount, BURN, zone_selected) | ||
| else | ||
| adjust_fire_loss(damageamount) | ||
| if("Brute") | ||
|
Collaborator
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. once again, defines |
||
| if(tobodyzone) | ||
| var/typeofbruteselection = tgui_alert(src, "What kinda brute damage we talking?", "Select attack type", list("Blunt", "Piercing", "Lacerating")) | ||
| var/options = list("Blunt" = 0, "Lacerating" = SHARP_EDGED, "Piercing" = SHARP_POINTY) | ||
| var/chosenoption = options[typeofbruteselection] | ||
| apply_damage(damageamount, BRUTE, zone_selected, sharpness = chosenoption) | ||
| else | ||
| adjust_brute_loss(damageamount) | ||
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.
Doesnt TG have a new verb method to use instead of this?