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
Fixes Wryn's tail and adds the ability to sting #14507
Fixes Wryn's tail and adds the ability to sting #14507
Conversation
Wryn Sting code, Wryn Sting Button Icon Sprites Co-Authored-By: Marginalorb <6353671+Marginalorb@users.noreply.github.com>
Co-Authored-By: Marginalorb <6353671+Marginalorb@users.noreply.github.com>
// Wryn Sting - Wryn Sting | ||
/datum/species/proc/wryn_sting(mob/living/H, mob/living/M) | ||
return | ||
|
||
// Wryn Sting - Select Target | ||
/datum/species/proc/select_target(mob/living/carbon/human/H) | ||
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.
It would probably be best if these were defined on Wryn instead of all species. I realize your proc calls in the wyrn action won't work if you simply make this change. You'll have to do something like store a reference to the wyrn species datum on the action, and then call it using that.
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.
I was trying to do this, but I wasn't sure how.
Would it be something like
/datum/species/wryn/proc/wryn_sting
and
/datum/species/wryn/proc/select_target
or something else?
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.
Done!
// Species specific vars | ||
var/button_on = FALSE | ||
|
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.
Ditto, it would probably be best if this were defined on Wryn instead of all species.
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.
One hundred percent agree! I struggled with doing that, though @__@. I'll ping you in Discord.
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.
Thank you!
check_flags = AB_CHECK_LYING | AB_CHECK_CONSCIOUS | AB_CHECK_STUNNED | ||
|
||
//What happens when you click the Button? | ||
/datum/action/innate/wryn_sting/Trigger() |
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.
Styling suggestion for this proc, use an early return format. Example:
/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?
user.dna.species.button_on = TRUE
UpdateButtonIcon()
user.dna.species.select_target(user)
else
to_chat(user, "<span class='notice'>You feel too tired to use your Wryn Stinger at the moment.</span>")
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.
Buh. That makes it look so much nicer!!
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.
Did this and a little more.
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
user.dna.species.button_on = TRUE
UpdateButtonIcon()
user.dna.species.select_target(user)
user.visible_message("<span class='warning'[user] retracts their stinger.</span>") | ||
user.dna.species.button_on = FALSE | ||
wryn_sting.UpdateButtonIcon() | ||
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.
Unnecessary return.
return |
else //Get ready, aim, fire! | ||
user.visible_message("<span class='warning'> [user] prepares to use their Wryn stinger!</span>") | ||
wryn_sting(user, target) | ||
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.
return |
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>") | ||
wryn_sting.UpdateButtonIcon() | ||
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.
return |
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>") | ||
wryn_sting.UpdateButtonIcon() | ||
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.
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.
Wait, did I just add these back in?
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>
Realized we never posted footage of the stinger in action: |
Could probably do a bit more damage with the stamina cost tbh, it seems punching is just as good. But balancing before everything else is ready is a bit silly. This is absolutely fine as a placeholder, once more work is done we can tweak all the numbers. |
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.
@MarginalOrb
Please deconflict
What Does This PR Do
This fixes an issue that Wryn have had for quite some time, and also gives them the ability to sting.
Stinging is a fluff ability that only does a few brute damage and costs somewhere in the ballpark of 20 stamina damage to the user as to prevent people from just spamming it on someone until they die a death of a thousand paper cuts.
A HUGE thank you to Kiyahitayika for figuring out how to, and coding, the ability for Wryn to sting.
Why It's Good For The Game
This paves the way to potentially adding Wryn as a player species rather than letting them collect dust as a broken relic of the past.
Images of changes
Changelog
🆑
add: Adds the ability to sting to wryn, and a button to the HUD to do so
fix: Fixes broken tail code, allowing for wryn to have their bee tails again.
/:cl: