Fixes Wryn's tail and adds the ability to sting (#14507)

* NanoMap Auto-Update (Mon Sep 21 07:07:21 UTC 2020)

* Wryn Sting

Wryn Sting code, Wryn Sting Button Icon Sprites

Co-Authored-By: Marginalorb <6353671+Marginalorb@users.noreply.github.com>

* Update actions.dmi

Co-Authored-By: Marginalorb <6353671+Marginalorb@users.noreply.github.com>

* further wryn fixes and some logging changes

* Changed Wryn Sting per Suggestions

Shout out to @SteelSlayer  and @FlattestGuitar  for their patience in teaching me how to make these changes possible!

Co-Authored-By: Marginalorb <6353671+Marginalorb@users.noreply.github.com>

* Fixes Trailing Newline in Body_Accessories.dm

* Update actions.dmi

* Nanomap fix

* I will try again and then I will try Affected's Suggestion Oh my God ReeeeeeEeeE

Co-authored-by: NanoMap Generation <action@github.com>
Co-authored-by: Kiyahitayika <69871346+Kiyahitayika@users.noreply.github.com>
Co-authored-by: Marginalorb <6353671+Marginalorb@users.noreply.github.com>
This commit is contained in:
Marginalorb
2020-10-21 00:32:53 -04:00
committed by GitHub
parent b0a324da4b
commit 8859634d3a
6 changed files with 105 additions and 1 deletions
@@ -78,7 +78,7 @@ GLOBAL_LIST_INIT(body_accessory_by_species, list("None" = null))
return TRUE
return FALSE
//Tajaran
/datum/body_accessory/tail/wingler_tail // Jay wingler fluff tail
name = "Striped Tail"
icon_state = "winglertail"
@@ -115,3 +115,10 @@ GLOBAL_LIST_INIT(body_accessory_by_species, list("None" = null))
icon_state = "straightbushy"
animated_icon_state = "straightbushy_a"
allowed_species = list("Vulpkanin")
//Wryn
/datum/body_accessory/tail/wryn
name = "Bee Tail"
icon_state = "wryntail"
allowed_species = list("Wryn")
@@ -49,6 +49,102 @@
//Default styles for created mobs.
default_hair = "Antennae"
var/datum/action/innate/wryn_sting/wryn_sting
/datum/species/wryn/on_species_gain(mob/living/carbon/human/H)
..()
wryn_sting = new
wryn_sting.Grant(H)
/datum/species/wryn/on_species_loss(mob/living/carbon/human/H)
..()
if(wryn_sting)
wryn_sting.Remove(H)
/* Wryn Sting Action Begin */
//Define the Sting Action
/datum/action/innate/wryn_sting
name = "Wryn Sting"
desc = "Readies Wryn Sting for stinging."
button_icon_state = "wryn_sting_off" //Default Button State
check_flags = AB_CHECK_LYING | AB_CHECK_CONSCIOUS | AB_CHECK_STUNNED
var/button_on = FALSE
//What happens when you click the Button?
/datum/action/innate/wryn_sting/Trigger()
if(!..())
return
var/mob/living/carbon/user = owner
if((user.restrained() && user.pulledby) || user.buckled) //Is your Wryn restrained, pulled, or buckled? No stinging!
to_chat(user, "<span class='notice'>You need freedom of movement to sting someone!</span>")
return
if(user.wear_suit) //Is your Wryn wearing a Hardsuit or a Laboat that's blocking their Stinger?
to_chat(user, "<span class='notice'>You must remove your hardsuit, labcoat, or jacket before using your Wryn stinger.</span>")
return
if(user.getStaminaLoss() >= 50) //Does your Wryn have enough Stamina to sting?
to_chat(user, "<span class='notice'>You feel too tired to use your Wryn Stinger at the moment.</span>")
return
else
button_on = TRUE
UpdateButtonIcon()
select_target(user)
//Update the Button Icon
/datum/action/innate/wryn_sting/UpdateButtonIcon()
if(button_on)
button_icon_state = "wryn_sting_on"
name = "Wryn Stinger \[READY\]"
button.name = name
else
button_icon_state = "wryn_sting_off"
name = "Wryn Stinger"
button.name = name
..()
//Select a Target from a List
/datum/action/innate/wryn_sting/proc/select_target(var/mob/living/carbon/human/user)
var/list/names = list()
for(var/mob/living/carbon/human/M in orange(1))
names += M
var/target = input("Select a Target: ", "Sting Target", null) as null|anything in names
if(!target) //No one's around!
to_chat(user, "<span class='warning'>There's no one around to sting so you retract your stinger.</span>")
user.visible_message("<span class='warning'[user] retracts their stinger.</span>")
button_on = FALSE
UpdateButtonIcon()
return
else //Get ready, aim, fire!
user.visible_message("<span class='warning'> [user] prepares to use their Wryn stinger!</span>")
sting_target(user, target)
return
//What does the Wryn Sting do?
/datum/action/innate/wryn_sting/proc/sting_target(mob/living/carbon/human/user, mob/living/carbon/human/target)
button_on = FALSE //For when we Update the Button Icon
if(!(target in orange(1, user))) //Dang, did they get away?
to_chat(user, "<span class='warning'>You are no longer adjacent to [target]. You retract your stinger for now.</span>")
user.visible_message("<span class='warning'[user] retracts their stinger.</span>")
UpdateButtonIcon()
return
else //Nah, that chump is still here! Sting 'em! Sting 'em good!
var/obj/item/organ/external/organ = target.get_organ(pick("l_leg", "r_leg", "l_foot", "r_foot", "groin"))
to_chat(user, "<span class='danger'> You sting [target] in their [organ] with your stinger!</span>")
user.visible_message("<span class='danger'>[user] stings [target] in [organ] with their stinger! </span>")
user.adjustStaminaLoss(20) //You can't sting infinitely, Wryn - take some Stamina loss
var/dam = rand(3, 7)
target.apply_damage(dam, BRUTE, organ)
playsound(user.loc, 'sound/weapons/bladeslice.ogg', 50, 0)
add_attack_logs(user, target, "Stung by Wryn Stinger - [dam] Brute damage to [organ].")
if(target.restrained()) //Apply tiny BURN damage if target is restrained
if(prob(50))
user.apply_damage(2, BURN, target)
to_chat(target, "<span class='danger'>You feel a little burnt! Yowch!</span>")
user.visible_message("<span class='danger'>[user] is looking a little burnt!</span>")
UpdateButtonIcon()
return
/* Wryn Sting Action End */
/datum/species/wryn/handle_death(gibbed, mob/living/carbon/human/H)
for(var/mob/living/carbon/C in GLOB.alive_mob_list)