Skip to content

Commit

Permalink
balance: borers punish host action buff(#6228)
Browse files Browse the repository at this point in the history
* Баф агонии

* правки

* правки

* Update code/modules/antagonists/borer/borer_action.dm

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

* правки

* Update code/modules/antagonists/borer/borer_action.dm

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

* Apply suggestions from code review

* доработка

* Доработка X2

* доработка x3

* dsfsddf

* suggestions patch

---------

Co-authored-by: Antoonij <[email protected]>
Co-authored-by: BeebBeebBoob <[email protected]>
  • Loading branch information
3 people authored Dec 30, 2024
1 parent e9e73be commit c13f132
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 38 deletions.
56 changes: 25 additions & 31 deletions code/game/gamemodes/miniantags/borer/borer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
add_say_logs(src, message)
if(stat == DEAD)
return say_dead(message)

var/mob/living/simple_animal/borer/B = loc
to_chat(src, "Вы тихо шепчете, \"[message]\"")
to_chat(B.host, span_alien("<i>Пленённый разум [src] шепчет, \"[message]\"</i>"))
Expand All @@ -39,20 +39,16 @@

return B.host.say_understands(other, speaking)


/mob/living/captive_brain/resist()
var/mob/living/simple_animal/borer/B = loc

if(host_resisting)
to_chat(src, span_notice("Вы уже пытаетесь вернуть своё тело!"))
return
to_chat(src, span_userdanger("Вы [host_resisting ? "перестаёте" : "начинаете"] сопротивляться контролю паразита."))
to_chat(B.host, span_userdanger("Вы чувствуете, как пленённый разум [src] [host_resisting ? "перестаёт" : "начинает"] сопротивляться."))

host_resisting = TRUE
to_chat(src, span_userdanger("Вы начинаете упорно сопротивляться контролю паразита (это займёт примерно минуту)."))
to_chat(B.host, span_userdanger("Вы чувствуете, как пленённый разум [src] начинает сопротивляться."))
var/delay = (rand(350,450) + B.host.getBrainLoss())

if(!do_after(src, delay, B.host, ALL))
if(!do_after(src, rand(350, 450) + B.host.getBrainLoss(), B.host, ALL, max_interact_count = 1))
host_resisting = FALSE
return

return_control(B)
Expand Down Expand Up @@ -116,7 +112,7 @@

var/truename // Name used for brainworm-speak.
var/controlling // Used in human death check.

var/mob/living/carbon/human/host // Human host for the brain worm.
var/mob/living/captive_brain/host_brain // Used for swapping control of the body back and forth.

Expand Down Expand Up @@ -157,7 +153,7 @@

if(!.)
return .

detach()

/mob/living/simple_animal/borer/ComponentInitialize()
Expand Down Expand Up @@ -255,7 +251,7 @@
to_chat(src, span_notice("Теперь вы будете говорить в сознание носителя."))
talk_inside_host = FALSE
return

to_chat(src, span_notice("Теперь вы сможете говорить, находясь внутри носителя."))
talk_inside_host = TRUE
return
Expand Down Expand Up @@ -380,7 +376,7 @@
for(var/datum/reagent/reagent as anything in subtypesof(/datum/reagent))
if(!LAZYIN(GLOB.borer_reagents, reagent.id) || !reagent.name)
continue

content += "<tr><td><a class='chem-select' href='byond://?_src_=[UID()];src=[UID()];borer_use_chem=[reagent]'>[reagent.name] ([initial(reagent.chemuse)])</a><p>[reagent.chemdesc ? initial(reagent.chemdesc) : initial(reagent.description)]</p></td></tr>"

content += "</table>"
Expand Down Expand Up @@ -435,19 +431,19 @@
if(docile)
to_chat(src, "<font color='blue'>Вы слишком обессилели для этого.</font>")
return

var/list/content = list()

for(var/datum/borer_focus/focus as anything in subtypesof(/datum/borer_focus))
if(locate(focus) in antag_datum.learned_focuses)
continue

LAZYADD(content, focus.bodypartname)

if(!LAZYLEN(content))
to_chat(src, span_notice("Вы приобрели все доступные фокусы."))
return

var/tgui_menu = tgui_input_list(src, "Choose focus", "Focus Menu", content)
if(!tgui_menu)
return
Expand All @@ -471,7 +467,7 @@
to_chat(src, span_notice("Вы прячетесь."))
hiding = TRUE
return

layer = MOB_LAYER
to_chat(src, span_notice("Вы перестали прятаться."))
hiding = FALSE
Expand Down Expand Up @@ -639,23 +635,17 @@

controlling = TRUE

RemoveInfestActions()
GrantControlActions()

talk_to_borer_action.Remove(host)
host.med_hud_set_status()

if(src && !src.key)
src.key = "@[borer_key]"
return

/mob/living/carbon/proc/punish_host()
var/mob/living/simple_animal/borer/borer = has_brain_worms()

if(borer?.host_brain)
to_chat(src, span_danger("Вы посылаете карающий всплеск психической агонии в мозг своего носителя."))
to_chat(borer.host_brain, span_danger("<FONT size=3>Ужасная, жгучая агония пронзает вас насквозь, вырывая беззвучный крик из глубин вашего запертого разума!</FONT>"))
return

return

//Brain slug proc for voluntary removal of control.
/mob/living/carbon/proc/release_control()

Expand All @@ -664,8 +654,8 @@
if(borer?.host_brain)
to_chat(src, span_danger("Вы убираете свои хоботки, освобождая [borer.host_brain]."))
borer.detach()
return
return

log_runtime(EXCEPTION("Missing borer or missing host brain upon borer release."), src)
return

Expand Down Expand Up @@ -748,6 +738,8 @@
sneaking = FALSE

RemoveControlActions()
GrantInfestActions()

talk_to_borer_action.Grant(host)
host.med_hud_set_status()

Expand Down Expand Up @@ -822,20 +814,22 @@
mind?.RemoveSpell(/obj/effect/proc_holder/spell/borer_dominate)

/mob/living/simple_animal/borer/proc/GrantInfestActions()
mind?.AddSpell(new /obj/effect/proc_holder/spell/borer_force_say)
talk_to_host_action.Grant(src)
leave_body_action.Grant(src)
take_control_action.Grant(src)
make_chems_action.Grant(src)
mind?.AddSpell(new /obj/effect/proc_holder/spell/borer_force_say)
focus_menu_action.Grant(src)
torment_action.Grant(src)

/mob/living/simple_animal/borer/proc/RemoveInfestActions()
mind?.RemoveSpell(/obj/effect/proc_holder/spell/borer_force_say)
talk_to_host_action.Remove(src)
take_control_action.Remove(src)
leave_body_action.Remove(src)
make_chems_action.Remove(src)
mind?.RemoveSpell(/obj/effect/proc_holder/spell/borer_force_say)
focus_menu_action.Remove(src)
torment_action.Remove(src)

/mob/living/simple_animal/borer/proc/GrantControlActions()
talk_to_brain_action.Grant(host)
Expand Down
24 changes: 21 additions & 3 deletions code/modules/antagonists/borer/borer_action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,27 @@
button_icon_state = "blind"

/datum/action/innate/borer/torment/Activate()
var/mob/living/simple_animal/borer/borer = owner.has_brain_worms()
borer.host = owner
borer.host.punish_host()
var/mob/living/simple_animal/borer/borer = isborer(owner) ? owner : owner.has_brain_worms()
var/mob/living/carbon/host = borer.host

var/cost = 70 - (borer.antag_datum.borer_rank.rank_ability_amplifier * 10)

if(borer.chemicals < cost)
to_chat(owner, "Вам требуется [cost] химикатов для вызова психической агонии!")
return

borer.chemicals -= cost

to_chat(owner, span_danger("Вы посылаете карающий всплеск психической агонии в мозг своего носителя."))
var/target = borer.host_brain ? borer.host_brain : host
to_chat(target, span_danger("<FONT size=3>Ужасная, жгучая агония пронзает вас насквозь, \
вырывая беззвучный крик из глубин вашего разума!</FONT>"))

if(borer.host_brain?.host_resisting)
borer.host_brain.resist()
return

host.adjustStaminaLoss(100)

/datum/action/innate/borer/sneak_mode
name = "Sneak mode"
Expand Down
13 changes: 9 additions & 4 deletions code/modules/antagonists/borer/borer_rank.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
var/datum/antagonist/borer/parent
var/mob/living/simple_animal/borer/owner
var/next_rank_type

var/rank_ability_amplifier

/datum/borer_rank/Destroy(force)
parent = null
owner = null
Expand All @@ -24,21 +25,25 @@

/datum/borer_rank/young
rankname = "Young"
required_reproductions = REPRODUCTIONS_TO_MATURE
required_reproductions = REPRODUCTIONS_TO_MATURE
next_rank_type = BORER_RANK_MATURE
rank_ability_amplifier = 0

/datum/borer_rank/mature
rankname = "Mature"
required_reproductions = REPRODUCTIONS_TO_ADULT
required_reproductions = REPRODUCTIONS_TO_ADULT
next_rank_type = BORER_RANK_ADULT
rank_ability_amplifier = 1

/datum/borer_rank/adult
rankname = "Adult"
required_reproductions = REPRODUCTIONS_TO_ELDER
next_rank_type = BORER_RANK_ELDER
rank_ability_amplifier = 2

/datum/borer_rank/elder
rankname = "Elder"
rank_ability_amplifier = 3

/datum/borer_rank/young/on_apply()
owner.update_transform(0.5) // other ranks should be gained and processed only with antag datum
Expand Down Expand Up @@ -71,7 +76,7 @@

/datum/borer_rank/elder/tick(seconds_between_ticks)
parent.user.adjustHealth(-0.3)

if(parent.host?.stat != DEAD)
parent.host?.heal_overall_damage(0.4, 0.4)
parent.user.chemicals += 0.3

0 comments on commit c13f132

Please sign in to comment.