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

Branch 12 #2718

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
68 changes: 68 additions & 0 deletions ModularTegustation/!extra_abnos/branch12/!tools/compass.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#define STATUS_EFFECT_COMPASS /datum/status_effect/display/compass
/obj/structure/toolabnormality/compass
name = "Predestined Compass"
desc = "A bronze compass with 8 needles."
icon_state = "compass"
icon = 'ModularTegustation/Teguicons/branch12/32x32.dmi'
var/list/active_users = list()

/obj/structure/toolabnormality/compass/attack_hand(mob/living/carbon/human/user)
. = ..()
if(!do_after(user, 6))
return
if(user in active_users)
active_users -= user
user.remove_status_effect(STATUS_EFFECT_COMPASS)
to_chat(user, span_userdanger("You put the compass back. You feel a lot more composed"))
else
active_users += user
user.apply_status_effect(STATUS_EFFECT_COMPASS)
to_chat(user, span_userdanger("You pick up the compass, and feel a like you can't sit still"))

// Status Effect
/datum/status_effect/display/compass
id = "compass"
status_type = STATUS_EFFECT_UNIQUE
duration = -1
alert_type = null
display_name = "compass"

var/timer = 0 //How many seconds of buff do you get
var/debuffed = TRUE //Are you currently debuffed

/datum/status_effect/display/compass/on_apply()
. = ..()
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
H.adjust_attribute_bonus(TEMPERANCE_ATTRIBUTE, -80)


/datum/status_effect/display/compass/tick()
. = ..()
var/mob/living/carbon/human/H = owner
if(timer > 0)
timer--
//At timer 0, take away all the stats you've gotten
if(timer == 0 && !debuffed)
H.adjust_attribute_bonus(TEMPERANCE_ATTRIBUTE, -160)
debuffed = TRUE

for(var/obj/machinery/computer/abnormality/V in range(2, owner))
if(V.meltdown)
//If you're debuffed you get a free 80 Temp. As a treat.
if(debuffed)
H.adjust_attribute_bonus(TEMPERANCE_ATTRIBUTE, 160)

//You get 60 seconds of buff after working on a meltdown console
timer = 60
debuffed = FALSE

/datum/status_effect/display/compass/on_remove()
. = ..()
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
if(!debuffed)
H.adjust_attribute_bonus(TEMPERANCE_ATTRIBUTE, -160)
H.adjust_attribute_bonus(TEMPERANCE_ATTRIBUTE, 80)

#undef STATUS_EFFECT_COMPASS
63 changes: 63 additions & 0 deletions ModularTegustation/!extra_abnos/branch12/!tools/eye.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/obj/structure/toolabnormality/eye
name = "eye for an eye"
desc = "A set of scales on a table. One is rusted iron, and the other is polished gold."
icon = 'ModularTegustation/Teguicons/branch12/32x32.dmi'
icon_state = "eye"
anchored = FALSE
drag_slowdown = 1.5
var/list/users = list()
var/list/double_users = list()

/obj/structure/toolabnormality/eye/Initialize()
. = ..()
addtimer(CALLBACK(src, PROC_REF(reset)), 10 MINUTES)

/obj/structure/toolabnormality/eye/proc/reset()
addtimer(CALLBACK(src, PROC_REF(reset)), 10 MINUTES)
users = list()
double_users = list()

for(var/mob/living/carbon/human/L in GLOB.player_list)
if(L.stat >= HARD_CRIT || L.sanity_lost || z != L.z) // Dead or in hard crit, insane, or on a different Z level.
continue
to_chat(L, span_danger("The scales have been reset."))

/obj/structure/toolabnormality/eye/attack_hand(mob/living/carbon/human/user)
. = ..()
if(!do_after(user, 2))
return

to_chat(user, span_notice("You tip the scales in your favor."))
//check your users, make them mad
if(user in users)
double_users+=user
user.adjustSanityLoss(999)
user.adjustBruteLoss(-user.maxHealth)
return

//check your users, make them dead
if(user in double_users)
user.adjustBruteLoss(999)
return

//okay now let's change HP and SP
users+=user
//store current sanity
var/stored_sanity = user.sanityhealth
var/stored_health = user.health

//heal to full
user.adjustBruteLoss(-user.maxHealth)
user.adjustSanityLoss(-user.maxSanity)

//Invert Sanity
stored_sanity = (stored_sanity-user.maxSanity)*-1

//invert HP
stored_health = (stored_health-user.maxHealth)*-1

//Deal inverted Sanity damage to health
user.adjustBruteLoss(stored_sanity)

//Deal inverted Health damage to sanity
user.adjustSanityLoss(stored_health)
69 changes: 69 additions & 0 deletions ModularTegustation/!extra_abnos/branch12/!tools/midnight.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/obj/structure/toolabnormality/midnight
name = "10 seconds to midnight"
desc = "Broken red glass over a small clock. The plate is scratched but you can barely make out roman numerals."
icon = 'ModularTegustation/Teguicons/branch12/32x32.dmi'
icon_state = "midnight"
var/uses_left = 2


/obj/structure/toolabnormality/midnight/attack_hand(mob/living/carbon/human/user)
. = ..()

if(uses_left <=0)
to_chat(user, span_notice("You shouldn't wind it any more."))
return

if(!do_after(user, 10))
return

/* if(SSlobotomy_corp.qliphoth_state == SSlobotomy_corp.next_ordeal_time) // Gotta pick it when the ordeal is next
to_chat(user, span_notice("Now is not the time."))
return*/

uses_left--
switch(uses_left)
if(2 to INFINITY)
icon_state = "midnight"

if(1)
icon_state = "midnight_2"

if(-INFINITY to 0)
icon_state = "midnight_3"

//Increase time between ordels.
SSlobotomy_corp.next_ordeal_time += 1
to_chat(user, span_notice("You wind the clock, and the sundial ticks closer to midnight."))
LowerCounter()

//Lower reward by 5 if we can't make it harder
for(var/i = 1 to 4)
for(var/datum/ordeal/C in SSlobotomy_corp.all_ordeals[i])
say("[C.name]")
C.reward_percent-=0.05

//You also make ordeals stronger
for(var/datum/ordeal/simplespawn/A in SSlobotomy_corp.all_ordeals[i])
A.spawn_places++
A.spawn_amount++
A.reward_percent+=0.10 //Should be +5%

for(var/datum/ordeal/simplecommander/B in SSlobotomy_corp.all_ordeals[i])
B.boss_amount++
B.grunt_amount++
B.reward_percent+=0.10 //Should be +5%

/obj/structure/toolabnormality/midnight/proc/LowerCounter()
//Decrease 3 random Qliphoth counters
var/list/total_abnormalities

for(var/mob/living/simple_animal/hostile/abnormality/A in GLOB.abnormality_mob_list)
if(A.datum_reference.qliphoth_meter > 0 && A.IsContained() && A.z == z)
total_abnormalities += A

if(!LAZYLEN(total_abnormalities))
return

for(var/i = 1 to 4)
var/mob/living/simple_animal/hostile/abnormality/processing = pick(total_abnormalities)
processing.datum_reference.qliphoth_change(-1)
27 changes: 27 additions & 0 deletions ModularTegustation/!extra_abnos/branch12/!tools/mislocation.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/obj/structure/toolabnormality/mislocation
name = "Mislocation"
desc = "A lampost with a bench under."
icon_state = "mislocation"
icon = 'ModularTegustation/Teguicons/branch12/48x64.dmi'
pixel_x = -13
base_pixel_x = -13
density = FALSE

/obj/structure/toolabnormality/mislocation/Crossed(atom/movable/AM, oldloc, force_stop = 0)
..()
if(!ishuman(AM))
return

var/mob/living/carbon/human/user = AM
ADD_TRAIT(user, TRAIT_NODEATH, "memento_mori")
ADD_TRAIT(user, TRAIT_NOHARDCRIT, "memento_mori")
ADD_TRAIT(user, TRAIT_NOSOFTCRIT, "memento_mori")

/obj/structure/toolabnormality/mislocation/Uncrossed(atom/movable/AM, oldloc, force_stop = 0)
..()
if(!ishuman(AM))
return
var/mob/living/carbon/human/user = AM
REMOVE_TRAIT(user, TRAIT_NODEATH, "memento_mori")
REMOVE_TRAIT(user, TRAIT_NOHARDCRIT, "memento_mori")
REMOVE_TRAIT(user, TRAIT_NOSOFTCRIT, "memento_mori")
161 changes: 161 additions & 0 deletions ModularTegustation/!extra_abnos/branch12/aleph/oldman_pale.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
#define STATUS_EFFECT_INNOCENCE /datum/status_effect/display/innocence
/mob/living/simple_animal/hostile/abnormality/oldman_pale
name = "Old Man Pale"
desc = "A ghost in a suit."
icon = 'ModularTegustation/Teguicons/branch12/32x32.dmi'
icon_state = "oldman_pale"
icon_living = "oldman_pale"
// portrait = "oldman_pale"
melee_damage_lower = 0 //Doesn't attack
melee_damage_upper = 0
rapid_melee = 2
melee_damage_type = WHITE_DAMAGE
stat_attack = HARD_CRIT
faction = list("hostile")
can_breach = FALSE
threat_level = ALEPH_LEVEL
start_qliphoth = 4
work_chances = list(
ABNORMALITY_WORK_INSTINCT = list(0, 0, 0, 20, 30),
ABNORMALITY_WORK_INSIGHT = list(0, 0, 0, 5, 10),
ABNORMALITY_WORK_ATTACHMENT = list(0, 0, 20, 25, 35),
ABNORMALITY_WORK_REPRESSION = list(15, 25, 35, 45, 55),
"Inspire" = 45,
)
work_damage_amount = 5
work_damage_type = WHITE_DAMAGE
ego_list = list(
//datum/ego_datum/weapon/purity,
//datum/ego_datum/armor/purity,
)
// gift_type = /datum/ego_gifts/purity
abnormality_origin = ABNORMALITY_ORIGIN_BRANCH12

var/list/innocent = list()
var/list/pale_list = list()


/mob/living/simple_animal/hostile/abnormality/oldman_pale/SuccessEffect(mob/living/carbon/human/user, work_type, pe)
. = ..()
if(datum_reference.qliphoth_meter ==0 && work_type == "Inspire")
datum_reference.qliphoth_change(4)
for(var/V in pale_list)
qdel(V)
pale_list-=V

datum_reference.qliphoth_change(1)
return

/mob/living/simple_animal/hostile/abnormality/oldman_pale/NeutralEffect(mob/living/carbon/human/user, work_type, pe)
. = ..()
if(prob(40))
datum_reference.qliphoth_change(-1)

if(datum_reference.qliphoth_meter ==0 && work_type == "Inspire")
innocent+=user
user.apply_status_effect(STATUS_EFFECT_INNOCENCE)
return

/mob/living/simple_animal/hostile/abnormality/oldman_pale/FailureEffect(mob/living/carbon/human/user, work_type, pe)
. = ..()
datum_reference.qliphoth_change(-1)

if(datum_reference.qliphoth_meter ==0 && work_type == "Inspire")
innocent+=user
user.apply_status_effect(STATUS_EFFECT_INNOCENCE)
return

/mob/living/simple_animal/hostile/abnormality/oldman_pale/AttemptWork(mob/living/carbon/human/user, work_type)
if(datum_reference.qliphoth_meter !=0 && work_type != "Inspire")
return TRUE

if(datum_reference.qliphoth_meter ==0 && work_type == "Inspire")
return TRUE
return FALSE

/mob/living/simple_animal/hostile/abnormality/oldman_pale/PostWorkEffect(mob/living/carbon/human/user, work_type, pe)
..()
if(user.sanity_lost)
addtimer(CALLBACK(src, PROC_REF(apply_innocence), user), 60 SECONDS)


/mob/living/simple_animal/hostile/abnormality/oldman_pale/ZeroQliphoth()
..()
new /obj/structure/spreading/pale (src)

/mob/living/simple_animal/hostile/abnormality/oldman_pale/death()
for(var/V in pale_list)
qdel(V)
pale_list-=V
..()


/mob/living/simple_animal/hostile/abnormality/oldman_pale/proc/apply_innocence(mob/living/carbon/human/user, work_type, pe)
user.apply_status_effect(STATUS_EFFECT_INNOCENCE)

// Oldman Pale
/obj/structure/spreading/pale
gender = PLURAL
name = "The Pale"
desc = "This is The Pale"
icon = 'icons/effects/atmospherics.dmi'
icon_state = "halon"
anchored = TRUE
density = FALSE
layer = TURF_LAYER
plane = 4
max_integrity = 100000
base_icon_state = "halon"
//expand_cooldown = 20 SECONDS
can_expand = TRUE
bypass_density = TRUE
var/mob/living/simple_animal/hostile/abnormality/oldman_pale/connected_abno

/obj/structure/spreading/pale/Initialize()
. = ..()

if(!connected_abno)
connected_abno = locate(/mob/living/simple_animal/hostile/abnormality/oldman_pale) in GLOB.abnormality_mob_list
if(connected_abno)
connected_abno.pale_list += src
expand()


/obj/structure/spreading/pale/expand()
addtimer(CALLBACK(src, PROC_REF(expand)), 20 SECONDS)
// if(connected_abno.pale_list.len>=150)
// return
..()

/obj/structure/spreading/pale/Crossed(atom/movable/AM)
. = ..()
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
H.apply_damage(18, WHITE_DAMAGE, null, H.run_armor_check(null, WHITE_DAMAGE), spread_damage = TRUE)
H.adjust_blurriness(5)


//innocence status effect
/datum/status_effect/display/innocence
id = "innocence"
status_type = STATUS_EFFECT_UNIQUE
duration = -1
alert_type = null
display_name = "innocence"

var/timer = 0 //How many seconds of buff do you get
var/debuffed = TRUE //Are you currently debuffed

/datum/status_effect/display/innocence/tick()
. = ..()
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
H.apply_damage(2, WHITE_DAMAGE, null, H.run_armor_check(null, WHITE_DAMAGE), spread_damage = TRUE)
if(H.sanity_lost)
new /obj/structure/spreading/pale (get_turf(owner))
var/mob/living/simple_animal/hostile/abnormality/oldman_pale/P = locate(/mob/living/simple_animal/hostile/abnormality/oldman_pale) in GLOB.abnormality_mob_list
P.datum_reference.qliphoth_change(-99)
H.dust()


#undef STATUS_EFFECT_INNOCENCE
Loading