Skip to content

Commit

Permalink
Patch №2
Browse files Browse the repository at this point in the history
Добавлено побольше проверок на синтов
Чтение разума доступно только психологу(и то если зарандомит >=2 уровень)
У психолога есть один дополнительные рандом
Люди с МЩ более не регенерируют ману.
  • Loading branch information
Microvolnovka19 committed Dec 16, 2024
1 parent 6acc14b commit 047302a
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 12 deletions.
14 changes: 11 additions & 3 deletions tff_modular/modules/psyonics/code/_quirk.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define MASTER_PSYONIC 2
#define GRANDMASTER_PSYONIC 3
#define PARAMOUNT_PSYONIC 4
#define GREATEST_PSYONIC 5

GLOBAL_LIST_INIT(psyonic_schools, list(
"Redaction",
Expand Down Expand Up @@ -56,25 +57,29 @@ GLOBAL_LIST_INIT(psyonic_schools, list(
secondary_school = client_source?.prefs?.read_preference(/datum/preference/choiced/psyonic_school_secondary)
if(!secondary_school)
secondary_school = pick(GLOB.psyonic_schools)
var/mob/living/carbon/human/whom_to_give = quirk_holder
var/fluff_1 = rand(0,1)
var/fluff_2 = rand(0,1)
var/fluff_3 = rand(0,1)
var/fluff_4 = rand(0,1)
psyonic_level = fluff_1 + fluff_2 + fluff_3 + fluff_4
if(HAS_MIND_TRAIT(whom_to_give, TRAIT_MADNESS_IMMUNE)) // A.K.A. Психолог
psyonic_level += rand(0,1) // _возможное_ доп очко
switch(psyonic_level)
if(LATENT_PSYONIC)
psyonic_level_string = "Pi"
if(OPERANT_PSYONIC)
psyonic_level_string = "Omicron"
if(MASTER_PSYONIC)
psyonic_level_string = "Lambda"
psyonic_level_string = "Kappa"
if(GRANDMASTER_PSYONIC)
psyonic_level_string = "Theta"
psyonic_level_string = "Lambda"
if(PARAMOUNT_PSYONIC)
psyonic_level_string = "Theta"
if(GREATEST_PSYONIC) // Дозволен только особо везучим психологам, у которых все предыдущие пять рандомов вышли на 1
psyonic_level_string = "Epsilon"
max_mana = (psyonic_level + 1) * 20 // Минимальный - 20, максимальный - 100
RegisterSignal(quirk_holder, COMSIG_MOB_GET_STATUS_TAB_ITEMS, PROC_REF(get_status_tab_item))
var/mob/living/carbon/human/whom_to_give = quirk_holder
if(school == secondary_school)
psyonic_level += 1 // Если вторичка совпадает с первой - добавляем один уровень, но не меняем описание
switch(school)
Expand Down Expand Up @@ -122,6 +127,9 @@ GLOBAL_LIST_INIT(psyonic_schools, list(
if(HAS_TRAIT(quirk_holder, TRAIT_NO_PSYONICS)) // Имплант подавления регена
return

if(HAS_TRAIT(quirk_holder, TRAIT_MINDSHIELD)) // Womp womp
return

var/additional_mana = 1
if(quirk_holder.has_status_effect(/datum/status_effect/drugginess)) // Наркота даёт бафф к генерации маны
additional_mana *= 1.5
Expand Down
26 changes: 20 additions & 6 deletions tff_modular/modules/psyonics/code/coersion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// Школа внушения. 7 спеллов
/// Psyonic assay - скан, является ли человек псиоником
/// Psyonic focus - лечение мозга и псих болезней
/// Psyonic mind read - продвинутое чтение разума(Как обычная ген. мутация, но + работа + воспоминания). Имба
/// Psyonic mind read - продвинутое чтение разума(Как обычная ген. мутация, но + работа + воспоминания). Выдаётся только и ТОЛЬКО психологу, если он псионик
/// Psyonic agony - работает как стан дубинка, исчезает после одного удара
/// Psyonic spasm - станит на полсекунды, заставляет выронить всё из рук. Работает дистанционно
/// Psyonic hypnosis - гипнотизирует цель фразой, которую выбрал псионик. ERP IS BAD. DO NOT ERP.
Expand All @@ -25,15 +25,16 @@
var/datum/action/new_action = new /datum/action/cooldown/spell/pointed/psyonic/psyonic_focus(src.mind || src, tier, additional_school)
new_action.Grant(src)
if(tier >= 2)
var/datum/action/new_action = new /datum/action/cooldown/spell/touch/psyonic/psyonic_mind_read(src.mind || src, tier, additional_school)
new_action.Grant(src)
if(HAS_MIND_TRAIT(src, TRAIT_MADNESS_IMMUNE)) // A.K.A. станционный психолог
var/datum/action/new_action = new /datum/action/cooldown/spell/touch/psyonic/psyonic_mind_read(src.mind || src, tier, additional_school)
new_action.Grant(src)
var/datum/action/new_action2 = new /datum/action/cooldown/spell/touch/psyonic/psyonic_hypnosis(src.mind || src, tier, additional_school)
new_action2.Grant(src)
if(tier >= 3)
var/datum/action/new_action = new /datum/action/cooldown/spell/touch/psyonic/psyonic_agony(src.mind || src, tier, additional_school)
new_action.Grant(src)
var/datum/action/new_action2 = new /datum/action/cooldown/spell/pointed/psyonic/psyonic_spasm(src.mind || src, tier, additional_school)
new_action2.Grant(src)
var/datum/action/new_action3 = new /datum/action/cooldown/spell/touch/psyonic/psyonic_hypnosis(src.mind || src, tier, additional_school)
new_action3.Grant(src)
if(tier >= 4) // Способность вызывать слепоту на ~15 секунд втихую на расстоянии это боль.
var/datum/action/new_action = new /datum/action/cooldown/spell/pointed/psyonic/psyonic_blind(src.mind || src, tier, additional_school)
new_action.Grant(src)
Expand Down Expand Up @@ -71,6 +72,10 @@
return FALSE

/datum/action/cooldown/spell/touch/psyonic/psyonic_assay/proc/read_psyonic_level(mob/living/carbon/human/patient)
if(issynthetic(patient) && secondary_school != "Psychokinesis")
to_chat(owner, span_notice("I can see... just numbers. No idea how to work with synths."))
return FALSE

if(patient.ispsyonic())
var/datum/quirk/psyonic/target_quirk = patient.get_quirk(/datum/quirk/psyonic)
owner.visible_message(span_notice("[owner] backs off from [patient]."),
Expand Down Expand Up @@ -183,6 +188,10 @@
you are stopped by a mental blockage. It seems you've been foiled."))
return

if(issynthetic(patient) && secondary_school != "Psychokinesis")
to_chat(owner, span_notice("I dont know how to work with synths. It's just zeros and ones. How am I supposed to get info out of this metal bucket?"))
return

var/text_to_show = ""

var/list/recent_speech = patient.copy_recent_speech(copy_amount = 10)
Expand Down Expand Up @@ -286,6 +295,11 @@
to_chat(human_victim, span_notice("Psionic nearby tries to attack you, but fails."))
to_chat(owner, span_notice("You can't attack them. They have some kind of protection."))
return FALSE
if(issynthetic(human_victim) && secondary_school != "Psychokinesis")
human_victim.visible_message(span_danger("[owner] slaps [human_victim] with his hand. Nothing happens. Wow!"),
span_warning("You slap [human_victim], but nothing happens. You cannot transfer your energy through metal."),
blind_message = span_hear("You hear a slap."))
return FALSE
else
to_chat(human_victim, span_warning("Pain floods your body as soon as [owner] touches you!."))
psyonic_attack(human_victim)
Expand Down Expand Up @@ -390,7 +404,7 @@
drain_mana()
addtimer(CALLBACK(owner, TYPE_PROC_REF(/mob/living, Stun), 60, TRUE, TRUE), 15)
return TRUE
if(HAS_MIND_TRAIT(human_victim, TRAIT_UNCONVERTABLE))
if(HAS_MIND_TRAIT(human_victim, TRAIT_UNCONVERTABLE)) // Не работает на людей с МЩ
to_chat(owner, span_warning("Victims mind is too strong for you to penetrate."))
return FALSE
if(human_victim.can_block_magic(antimagic_flags))
Expand Down
3 changes: 3 additions & 0 deletions tff_modular/modules/psyonics/code/energistics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
return isatom(cast_on)

/datum/action/cooldown/spell/touch/psyonic/psyonic_discharge/cast_on_hand_hit(obj/item/melee/touch_attack/hand, atom/victim, mob/living/carbon/mendicant)
if(HAS_TRAIT(mendicant, TRAIT_MINDSHIELD)) // Womp womp
to_chat(mendicant, span_warning("As soon as you touch [victim], your energy dissipates without a trace. Mindshield implant messes up your concentration."))
return FALSE
if(istype(victim, /obj/item/stock_parts/power_store) || istype(victim, /obj/machinery/power/apc))
owner.visible_message(span_warning("[owner] presses his hands against [victim]."),
span_notice("You press your hands against [victim]."),
Expand Down
15 changes: 12 additions & 3 deletions tff_modular/modules/psyonics/code/redaction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@
/datum/action/cooldown/spell/touch/psyonic/psyonic_mending/cast_on_hand_hit(obj/item/melee/touch_attack/hand, atom/victim, mob/living/carbon/mendicant)
if(ishuman(victim))
var/mob/living/carbon/human/human_victim = victim
if(issynthetic(human_victim) && secondary_school != "Psychokinesis")
to_chat(owner, span_notice("I dont know how to work with synths."))
return FALSE
if(human_victim.can_block_magic(antimagic_flags))
to_chat(human_victim, span_notice("Psionic nearby tries to mend you."))
else
Expand Down Expand Up @@ -159,9 +162,11 @@
active_msg = "You prepare to convert fat tissues..."

/datum/action/cooldown/spell/pointed/psyonic/psyonic_drunkness/is_valid_target(atom/cast_on)
if(!ishuman(cast_on) && !issynthetic(cast_on))
if(!ishuman(cast_on))
return FALSE
if(issynthetic(cast_on) )
to_chat(owner, span_notice("It's a synth. What am I supposed to convert? Oil?"))
return FALSE

return TRUE

/datum/action/cooldown/spell/pointed/psyonic/psyonic_drunkness/cast(mob/living/carbon/human/cast_on)
Expand Down Expand Up @@ -198,7 +203,7 @@
// Лечит токс урон.
/datum/action/cooldown/spell/touch/psyonic/psyonic_cleansing
name = "Psyonic Cleansing"
desc = "Filters patient blood out of toxin and removes accumulated radiation."
desc = "Filters patient blood out of toxins and removes accumulated radiation."
button_icon = 'tff_modular/modules/psyonics/icons/actions.dmi'
button_icon_state = "cleansing"
cooldown_time = 3 SECONDS
Expand All @@ -214,6 +219,9 @@
/datum/action/cooldown/spell/touch/psyonic/psyonic_cleansing/cast_on_hand_hit(obj/item/melee/touch_attack/hand, atom/victim, mob/living/carbon/mendicant)
if(ishuman(victim))
var/mob/living/carbon/human/human_victim = victim
if(issynthetic(human_victim) && secondary_school != "Psychokinesis")
to_chat(owner, span_notice("I dont know how to work with synths. Why would I even try to? They dont have toxins."))
return FALSE
if(human_victim.can_block_magic(antimagic_flags))
to_chat(human_victim, span_notice("Psionic nearby tries to cleanse you."))
else
Expand Down Expand Up @@ -275,6 +283,7 @@
return TRUE
else if(issynthetic(human_victim) && human_victim.stat == DEAD)
to_chat(owner, span_warning("Your psyonic energy does not work very well with synths."))
return FALSE
else
return FALSE
else
Expand Down

0 comments on commit 047302a

Please sign in to comment.