Skip to content

Commit

Permalink
Unathi (and Ash Walkers) can ignite stuff now, removes tail lash. (Pa…
Browse files Browse the repository at this point in the history
…radiseSS13#21981)

* stuff

* works!

* bye bye tailwhip

* renames the ability

* accidental enter

* snowball's reviews

* tweak

* less tight timing
you can now ignite on 3u instead of 4

* no longer works with covered mouth

* ash walkers

* most of jimkils reviews + unathi also have c/d now

* early returns, uses less fuel, comments

* hal's reviews

* redundant comment

* hal's suggestion

* sounds & tweaks

* an unnecessary check
apparently

* so that check WAS needed

* henri reviews, tweaked loc of sounds, timer tweaks

* henri review

* Update code/modules/mob/living/carbon/human/species/unathi.dm

Co-authored-by: Henri215 <[email protected]>

---------

Co-authored-by: Henri215 <[email protected]>
  • Loading branch information
Sadhorizon and Henri215 committed Sep 13, 2023
1 parent efe6dc8 commit 0e371e1
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 37 deletions.
7 changes: 7 additions & 0 deletions code/game/objects/items/weapons/cigs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ LIGHTERS ARE IN LIGHTERS.DM
if(L.lit)
light("<span class='notice'>After some fiddling, [user] manages to light [user.p_their()] [name] with [L].</span>")

else if(istype(I, /obj/item/match/unathi))
var/obj/item/match/unathi/U = I
if(U.lit)
playsound(user.loc, 'sound/effects/unathiignite.ogg', 40, FALSE)
light("<span class='rose'>[user] spits fire at [user.p_their()] [name], igniting it.</span>")
U.matchburnout()

else if(istype(I, /obj/item/match))
var/obj/item/match/M = I
if(M.lit)
Expand Down
39 changes: 38 additions & 1 deletion code/game/objects/items/weapons/lighters.dm
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,19 @@
if(M == user)
cig.attackby(src, user)
else
cig.light("<span class='notice'>[user] holds [src] out for [M], and lights [cig].</span>")
if(istype(src, /obj/item/match/unathi))
if(prob(50))
cig.light("<span class='rose'>[user] spits fire at [M], lighting [cig] and nearly burning [user.p_their()] face!</span>")
matchburnout()
else
cig.light("<span class='rose'>[user] spits fire at [M], burning [user.p_their()] face and lighting [cig] in the process.</span>")
var/obj/item/organ/external/head/affecting = M.get_organ("head")
affecting.receive_damage(0, 5)
M.UpdateDamageIcon()
playsound(user.loc, 'sound/effects/unathiignite.ogg', 40, FALSE)

else
cig.light("<span class='notice'>[user] holds [src] out for [M], and lights [cig].</span>")
playsound(src, 'sound/items/lighter/light.ogg', 25, TRUE)
else
..()
Expand All @@ -300,3 +312,28 @@
/obj/item/match/firebrand/New()
..()
matchignite()

/obj/item/match/unathi
name = "small blaze"
desc = "A little flame of your own, currently located dangerously in your mouth."
icon_state = "match_unathi"
attack_verb = null
force = 0
flags = DROPDEL | ABSTRACT
origin_tech = null
lit = TRUE
w_class = WEIGHT_CLASS_BULKY //to prevent it going to pockets

/obj/item/match/unathi/Initialize(mapload)
. = ..()
START_PROCESSING(SSobj, src)

/obj/item/match/unathi/matchburnout()
if(!lit)
return
lit = FALSE //to avoid a qdel loop
qdel(src)

/obj/item/match/unathi/Destroy()
. = ..()
STOP_PROCESSING(SSobj, src)
83 changes: 47 additions & 36 deletions code/modules/mob/living/carbon/human/species/unathi.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,49 +57,46 @@
"is twisting their own neck!",
"is holding their breath!")


/datum/species/unathi/on_species_gain(mob/living/carbon/human/H)
..()
var/datum/action/innate/tail_lash/lash = new()
lash.Grant(H)
var/datum/action/innate/ignite/fire = new()
fire.Grant(H)

/datum/species/unathi/on_species_loss(mob/living/carbon/human/H)
..()
for(var/datum/action/innate/tail_lash/lash in H.actions)
lash.Remove(H)

/datum/action/innate/tail_lash
name = "Tail lash"
icon_icon = 'icons/effects/effects.dmi'
button_icon_state = "tail"
check_flags = AB_CHECK_LYING | AB_CHECK_CONSCIOUS | AB_CHECK_STUNNED

/datum/action/innate/tail_lash/Activate()
for(var/datum/action/innate/ignite/fire in H.actions)
fire.Remove(H)

/datum/action/innate/ignite
name = "Ignite"
desc = "A fire forms in your mouth, fierce enough to... light a cigarette. Requires you to drink welding fuel beforehand."
icon_icon = 'icons/obj/cigarettes.dmi'
button_icon_state = "match_unathi"
var/cooldown = 0
var/cooldown_duration = 20 SECONDS
var/welding_fuel_used = 3 //one sip, with less strict timing
check_flags = AB_CHECK_HANDS_BLOCKED

/datum/action/innate/ignite/Activate()
var/mob/living/carbon/human/user = owner
if((user.restrained() && user.pulledby) || user.buckled)
to_chat(user, "<span class='warning'>You need freedom of movement to tail lash!</span>")
if(world.time <= cooldown)
to_chat(user, "<span class='warning'>Your throat hurts too much to do it right now. Wait [round((cooldown - world.time) / 10)] seconds and try again.</span>")
return
if(user.getStaminaLoss() >= 50)
to_chat(user, "<span class='warning'>Rest before tail lashing again!</span>")
return
for(var/mob/living/carbon/human/C in orange(1))
var/obj/item/organ/external/E = C.get_organ(pick("l_leg", "r_leg", "l_foot", "r_foot", "groin"))
if(E)
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("<span class='danger'>[user] smacks [C] in [E] with their tail! </span>", "<span class='danger'>You hit [C] in [E] with your tail!</span>")
user.adjustStaminaLoss(15)
C.apply_damage(5, BRUTE, E)
user.spin(20, 1)
playsound(user.loc, 'sound/weapons/slash.ogg', 50, 0)
add_attack_logs(user, C, "tail whipped")
if(user.restrained())
if(prob(50))
user.Weaken(10 SECONDS)
user.visible_message("<span class='danger'>[user] loses [user.p_their()] balance!</span>", "<span class='danger'>You lose your balance!</span>")
return
if(user.getStaminaLoss() >= 60) //Bit higher as you don't need to start, just would need to keep going with the tail lash.
to_chat(user, "<span class='warning'>You run out of momentum!</span>")
return
if(!welding_fuel_used || user.reagents.has_reagent("fuel", welding_fuel_used))
if((user.head?.flags_cover & HEADCOVERSMOUTH) || (user.wear_mask?.flags_cover & MASKCOVERSMOUTH) && !user.wear_mask?.up)
to_chat(user, "<span class='warning'>Your mouth is covered.</span>")
return
var/obj/item/match/unathi/fire = new(user.loc, src)
if(user.put_in_hands(fire))
to_chat(user, "<span class='notice'>You ignite a small flame in your mouth.</span>")
user.reagents.remove_reagent("fuel", 50) //slightly high, but I'd rather avoid it being TOO spammable.
cooldown = world.time + cooldown_duration
else
qdel(fire)
to_chat(user, "<span class='warning'>You don't have any free hands.</span>")
else
to_chat(user, "<span class='warning'>You need to drink welding fuel first.</span>")


/datum/species/unathi/handle_death(gibbed, mob/living/carbon/human/H)
H.stop_tail_wagging()
Expand Down Expand Up @@ -128,3 +125,17 @@
"appendix" = /obj/item/organ/internal/appendix,
"eyes" = /obj/item/organ/internal/eyes/unathi
)

/datum/species/unathi/ashwalker/on_species_gain(mob/living/carbon/human/H)
var/datum/action/innate/ignite/ash_walker/fire = new()
fire.Grant(H)

/datum/species/unathi/ashwalker/on_species_loss(mob/living/carbon/human/H)
..()
for(var/datum/action/innate/ignite/ash_walker/fire in H.actions)
fire.Remove(H)

/datum/action/innate/ignite/ash_walker
desc = "You form a fire in your mouth, fierce enough to... light a cigarette."
cooldown_duration = 3 MINUTES
welding_fuel_used = 0 // Ash walkers dont need welding fuel to use ignite
Binary file modified icons/obj/cigarettes.dmi
Binary file not shown.
Binary file added sound/effects/unathiignite.ogg
Binary file not shown.

0 comments on commit 0e371e1

Please sign in to comment.