Skip to content

Commit

Permalink
bugfix: Sintouched fixes (#6016)
Browse files Browse the repository at this point in the history
* fixes

* improve

* не то снес

* New to init sin
  • Loading branch information
Antoonij authored Oct 13, 2024
1 parent 15be229 commit d4f6c5b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 25 deletions.
23 changes: 12 additions & 11 deletions code/datums/diseases/ectoplasmic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
/datum/disease/ectoplasmic/stage_act()
if(!..())
return FALSE

var/create_effect = FALSE
var/mob/living/carbon/human/human = affected_mob
var/turf/turf = get_turf(human)

switch(stage)
if(3)
if(prob(10))
Expand Down Expand Up @@ -45,15 +46,15 @@
to_chat(human, span_warning("You suddenly feel [pick("sick and tired", "nauseated", "dizzy", "stabbing pain in your head")]."))
create_effect = TRUE
if(5)
if(prob(70))
if(prob(SYMPTOM_ACTIVATION_PROB * 10))
human.influenceSin()
to_chat(human, span_revenbignotice("You suddenly feel your soul become corrupted."))
else
human.apply_damage(80, STAMINA)
to_chat(human, "You feel very tired, but disease left you.")
create_effect = TRUE
cure()
if(prob(30))
if(human.influenceSin())
create_effect = TRUE
to_chat(human, span_revenbignotice("You suddenly feel your soul become corrupted."))
cure()
if(create_effect && turf)
new /obj/effect/temp_visual/revenant(turf)

create_effect = TRUE
cure()

if(create_effect && isturf(human.loc))
new /obj/effect/temp_visual/revenant(human.loc)
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,6 @@
reveal = 7 SECONDS
aoe_range = 4


/obj/effect/proc_holder/spell/aoe/revenant/blight/create_new_targeting()
var/datum/spell_targeting/aoe/target = new()
target.range = aoe_range
Expand All @@ -530,6 +529,9 @@
if(target.mind in SSticker.mode.sintouched)
return FALSE

if(locate(/datum/disease/ectoplasmic) in target.diseases)
return FALSE

return TRUE

/obj/effect/proc_holder/spell/aoe/revenant/blight/cast(list/targets, mob/living/simple_animal/revenant/user = usr)
Expand Down
5 changes: 2 additions & 3 deletions code/game/gamemodes/miniantags/sintouched/objectives.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
/datum/objective/sintouched/proc/on_apply()
return

/datum/objective/sintouched/New(mob/living/carbon/human/human)
..()
user = human // Currently not to mind
/datum/objective/sintouched/proc/init_sin(mob/living/carbon/human/human)
user = human
on_apply()

/datum/objective/sintouched/Destroy(force)
Expand Down
26 changes: 16 additions & 10 deletions code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1770,33 +1770,39 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
/mob/living/carbon/human/proc/influenceSin()
if(!mind)
return

var/datum/objective/sintouched/sin_objective

switch(rand(1,7))//traditional seven deadly sins... except lust.
if(1) // acedia
add_game_logs("[src] was influenced by the sin of Acedia.", src)
sin_objective = new /datum/objective/sintouched/acedia(src)
sin_objective = new /datum/objective/sintouched/acedia
if(2) // Gluttony
add_game_logs("[src] was influenced by the sin of gluttony.", src)
sin_objective = new /datum/objective/sintouched/gluttony(src)
sin_objective = new /datum/objective/sintouched/gluttony
if(3) // Greed
add_game_logs("[src] was influenced by the sin of greed.", src)
sin_objective = new /datum/objective/sintouched/greed(src)
sin_objective = new /datum/objective/sintouched/greed
if(4) // sloth
add_game_logs("[src] was influenced by the sin of sloth.", src)
sin_objective = new /datum/objective/sintouched/sloth(src)
sin_objective = new /datum/objective/sintouched/sloth
if(5) // Wrath
add_game_logs("[src] was influenced by the sin of wrath.", src)
sin_objective = new /datum/objective/sintouched/wrath(src)
sin_objective = new /datum/objective/sintouched/wrath
if(6) // Envy
add_game_logs("[src] was influenced by the sin of envy.", src)
sin_objective = new /datum/objective/sintouched/envy(src)
sin_objective = new /datum/objective/sintouched/envy
if(7) // Pride
add_game_logs("[src] was influenced by the sin of pride.", src)
sin_objective = new /datum/objective/sintouched/pride(src)
SSticker.mode.sintouched += mind
mind.objectives += sin_objective
sin_objective = new /datum/objective/sintouched/pride

sin_objective.init_sin(src)
LAZYADD(SSticker.mode.sintouched, mind)
LAZYADD(mind.objectives, sin_objective)

var/obj_count = 1
to_chat(src, "<span class='notice'> Your current objectives:")
to_chat(src, span_notice("Your current objectives:"))

for(var/datum/objective/objective in mind.objectives)
to_chat(src, "<B>Objective #[obj_count]</B>: [objective.explanation_text]")
obj_count++
Expand Down

0 comments on commit d4f6c5b

Please sign in to comment.