Skip to content
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

Обновленная медицинская система: Шанс провалов #461

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4c5d2d9
Первая инициализация
msw7007 Jul 25, 2024
48e3eab
Небольшая переработка баланса
msw7007 Jul 25, 2024
274b427
Merge branch 'master' into MedP_surgery_fail
msw7007 Jul 25, 2024
e94c611
Лишний нолик, упс
msw7007 Jul 25, 2024
1882b19
Merge branch 'master' into MedP_surgery_fail
msw7007 Jul 26, 2024
edd6af9
Отработка по ревью
msw7007 Jul 27, 2024
734bf33
Merge branch 'master' into MedP_surgery_fail
msw7007 Jul 27, 2024
ca70037
Обновлене механики расчетов
msw7007 Jul 27, 2024
2c14b4a
Отработка по ревью
msw7007 Jul 29, 2024
55941f9
Merge branch 'master' into MedP_surgery_fail
msw7007 Sep 20, 2024
c449434
Чистка от лишнего, объединение с медпаком Свотина
msw7007 Sep 20, 2024
b091d40
Ну конечно, а про dme забыл
msw7007 Sep 20, 2024
76f79c2
Обновление по предложению
msw7007 Sep 21, 2024
a38b366
добавление трейта стазиса как защиты от провала (пациенту все еще буд…
msw7007 Nov 15, 2024
0d756fd
Упс...
msw7007 Nov 15, 2024
7f4f337
Добавление обезбола стазису
msw7007 Nov 15, 2024
88bf0b5
Добавление комментария
msw7007 Nov 15, 2024
151e236
Merge branch 'master' into MedP_surgery_fail
msw7007 Nov 15, 2024
c24ad71
Merge branch 'MedP_surgery_fail' of https://github.com/msw7007/Bandas…
msw7007 Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/modules/surgery/surgery_step.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
var/modded_time = time * speed_mod


fail_prob = min(max(0, modded_time - (time * SURGERY_SLOWDOWN_CAP_MULTIPLIER)),99)//if modded_time > time * modifier, then fail_prob = modded_time - time*modifier. starts at 0, caps at 99
fail_prob = get_failure_probability(user,target,tool,modded_time,)//if modded_time > time * modifier, then fail_prob = modded_time - time*modifier. starts at 0, caps at 99
modded_time = min(modded_time, time * SURGERY_SLOWDOWN_CAP_MULTIPLIER)//also if that, then cap modded_time at time*modifier

if(iscyborg(user))//any immunities to surgery slowdown should go in this check.
Expand Down
4 changes: 4 additions & 0 deletions modular_bandastation/medical/_medicalPlus.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/datum/modpack/medicalPlus
msw7007 marked this conversation as resolved.
Show resolved Hide resolved
name = "Medical Plus"
desc = "Глобальное расширение медицинской системы"
author = "KageIIte"
3 changes: 3 additions & 0 deletions modular_bandastation/medical/_medicalPlus.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "_medicalPlus.dm"

#include "code/surgery/surgery_fail_chance.dm"
14 changes: 14 additions & 0 deletions modular_bandastation/medical/code/surgery/surgery_fail_chance.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/datum/surgery_step/proc/get_failure_probability(mob/living/user, mob/living/target, obj/item/tool, var/modded_time)
var/success_prob = implements[implement_type]
msw7007 marked this conversation as resolved.
Show resolved Hide resolved
var/turf/user_turf = user.loc
msw7007 marked this conversation as resolved.
Show resolved Hide resolved
if(tool)
success_prob += (1/tool.toolspeed) * 10
msw7007 marked this conversation as resolved.
Show resolved Hide resolved
var/light_amount = user_turf.get_lumcount()
if (light_amount >= 0.6)
success_prob += clamp(light_amount, 0.6, 1) * 20
msw7007 marked this conversation as resolved.
Show resolved Hide resolved
if ((!(target.stat == UNCONSCIOUS || target.IsSleeping()) && target.stat != DEAD) && !HAS_TRAIT(target, TRAIT_ANALGESIA))
success_prob -= 80
var/fail_prob = 100 - success_prob
fail_prob *= modded_time / time

return fail_prob
1 change: 1 addition & 0 deletions modular_bandastation/modular_bandastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "examine_panel/_examine_panel.dme"
#include "gunhud/_gunhud.dme"
#include "keybinding/_keybinding.dme"
#include "medical/_medicalPlus.dme"
#include "loadout/_loadout.dme"
#include "mapping/_mapping.dme"
#include "pixel_shift/_pixel_shift.dme"
Expand Down
Loading