[Ready] Adds 5 new negative/minor negative mutations, mutation conflict system (#42524)

* adds 5 new (minor) negative mutations
also adds a mutation conflict system

* removes debug comments and to_chat(world)s

* addresses reviews

* further review addressing, new message
and a message given to the subject when a mutation fails to manifest because of conflicts

* cooldown on acid flesh message
This commit is contained in:
PKPenguin321
2019-02-07 20:08:29 -08:00
committed by moo
parent 4c717af711
commit cefe4a6a51
7 changed files with 223 additions and 57 deletions

View File

@@ -12,6 +12,7 @@
#define MUTATE /datum/mutation/human/bad_dna
#define COUGH /datum/mutation/human/cough
#define DWARFISM /datum/mutation/human/dwarfism
#define GIGANTISM /datum/mutation/human/gigantism
#define CLOWNMUT /datum/mutation/human/clumsy
#define TOURETTES /datum/mutation/human/tourettes
#define DEAFMUT /datum/mutation/human/deaf
@@ -38,11 +39,14 @@
#define INSULATED /datum/mutation/human/insulated
#define SHOCKTOUCH /datum/mutation/human/shock
#define OLFACTION /datum/mutation/human/olfaction
#define ACIDFLESH /datum/mutation/human/acidflesh
#define BADBLINK /datum/mutation/human/badblink
#define SPASTIC /datum/mutation/human/spastic
#define EXTRASTUN /datum/mutation/human/extrastun
#define YELLING /datum/mutation/human/yelling
#define GELADIKINESIS /datum/mutation/human/geladikinesis
#define CRYOKINESIS /datum/mutation/human/cryokinesis
#define UI_CHANGED "ui changed"
#define UE_CHANGED "ue changed"

View File

@@ -87,6 +87,8 @@
#define STATUS_EFFECT_GONBOLAPACIFY /datum/status_effect/gonbolaPacify //Gives the user gondola traits while the gonbola is attached to them.
#define STATUS_EFFECT_SPASMS /datum/status_effect/spasms //causes random muscle spasms
/////////////
// NEUTRAL //
/////////////

View File

@@ -157,56 +157,12 @@
gain_text = "<span class='warning'>Your muscles feel oddly faint.</span>"
lose_text = "<span class='notice'>You feel in control of your muscles again.</span>"
/datum/brain_trauma/mild/muscle_spasms/on_life()
if(prob(7))
switch(rand(1,5))
if(1)
if((owner.mobility_flags & MOBILITY_MOVE) && !isspaceturf(owner.loc))
to_chat(owner, "<span class='warning'>Your leg spasms!</span>")
step(owner, pick(GLOB.cardinals))
if(2)
if(owner.incapacitated())
return
var/obj/item/I = owner.get_active_held_item()
if(I)
to_chat(owner, "<span class='warning'>Your fingers spasm!</span>")
owner.log_message("used [I] due to a Muscle Spasm", LOG_ATTACK)
I.attack_self(owner)
if(3)
var/prev_intent = owner.a_intent
owner.a_intent = INTENT_HARM
/datum/brain_trauma/mild/muscle_spasms/on_gain()
owner.apply_status_effect(STATUS_EFFECT_SPASMS)
..()
var/range = 1
if(istype(owner.get_active_held_item(), /obj/item/gun)) //get targets to shoot at
range = 7
var/list/mob/living/targets = list()
for(var/mob/M in oview(owner, range))
if(isliving(M))
targets += M
if(LAZYLEN(targets))
to_chat(owner, "<span class='warning'>Your arm spasms!</span>")
owner.log_message(" attacked someone due to a Muscle Spasm", LOG_ATTACK) //the following attack will log itself
owner.ClickOn(pick(targets))
owner.a_intent = prev_intent
if(4)
var/prev_intent = owner.a_intent
owner.a_intent = INTENT_HARM
to_chat(owner, "<span class='warning'>Your arm spasms!</span>")
owner.log_message("attacked [owner.p_them()]self to a Muscle Spasm", LOG_ATTACK)
owner.ClickOn(owner)
owner.a_intent = prev_intent
if(5)
if(owner.incapacitated())
return
var/obj/item/I = owner.get_active_held_item()
var/list/turf/targets = list()
for(var/turf/T in oview(owner, 3))
targets += T
if(LAZYLEN(targets) && I)
to_chat(owner, "<span class='warning'>Your arm spasms!</span>")
owner.log_message("threw [I] due to a Muscle Spasm", LOG_ATTACK)
owner.throw_item(pick(targets))
/datum/brain_trauma/mild/muscle_spasms/on_lose()
owner.remove_status_effect(STATUS_EFFECT_SPASMS)
..()
/datum/brain_trauma/mild/nervous_cough

View File

@@ -27,6 +27,7 @@
var/alias //'Mutation #49', decided every round to get some form of distinction between undiscovered mutations
var/scrambled = FALSE //Wheter we can read it if it's active. To avoid cheesing with mutagen
var/class //Decides player accesibility, sorta
var/list/conflicts //any mutations that might conflict. put mutation typepath defines in here. make sure to enter it both ways (so that A conflicts with B, and B with A)
//MUT_NORMAL - A mutation that can be activated and deactived by completing a sequence
//MUT_EXTRA - A mutation that is in the mutations tab, and can be given and taken away through though the DNA console. Has a 0 before it's name in the mutation section of the dna console
//MUT_OTHER Cannot be interacted with by players through normal means. I.E. wizards mutate
@@ -47,6 +48,14 @@
return TRUE
if(limb_req && !H.get_bodypart(limb_req))
return TRUE
for(var/M in H.dna.mutations)//check for conflicting powers
var/datum/mutation/human/mewtayshun = M
if(LAZYLEN(mewtayshun.conflicts))
for(var/cons in mewtayshun.conflicts)
var/datum/mutation/human/conflicter = cons
if(conflicter == type)
to_chat(H, "<span class='warning'>You feel your genes resisting something.</span>")
return TRUE
owner = H
dna = H.dna
dna.mutations += src

View File

@@ -66,6 +66,7 @@
quality = POSITIVE
difficulty = 16
instability = 5
conflicts = list(GIGANTISM)
locked = TRUE // Default intert species for now, so locked from regular pool.
/datum/mutation/human/dwarfism/on_acquiring(mob/living/carbon/human/owner)
@@ -230,6 +231,104 @@
return
owner.physiology.burn_mod *= 2
/datum/mutation/human/badblink
name = "Spatial Instability"
desc = "The victim of the mutation has a very weak link to spatial reality, and may be displaced. Often causes extreme nausea."
quality = NEGATIVE
text_gain_indication = "<span class='warning'>The space around you twists sickeningly.</span>"
text_lose_indication = "<span class'notice'>The space around you settles back to normal.</span>"
difficulty = 18//high so it's hard to unlock and abuse
instability = 10
var/warpchance = 0
/datum/mutation/human/badblink/on_life()
if(prob(warpchance))
var/warpmessage = pick(
"<span class='warning'>With a sickening 720 degree twist of their back, [owner] vanishes into thin air.</span>",
"<span class='warning'>[owner] does some sort of strange backflip into another dimension. It looks pretty painful.</span>",
"<span class='warning'>[owner] does a jump to the left, a step to the right, and warps out of reality.</span>",
"<span class='warning'>[owner]'s torso starts folding inside out until it vanishes from reality, taking [owner] with it.</span>",
"<span class='warning'>One moment, you see [owner]. The next, [owner] is gone.</span>")
owner.visible_message(warpmessage, "<span class='userdanger'>You feel a wave of nausea as you fall through reality!</span>")
var/warpdistance = rand(10,15)
do_teleport(owner, get_turf(owner), warpdistance, channel = TELEPORT_CHANNEL_FREE)
owner.adjust_disgust((warpchance * warpdistance))
warpchance = 0
owner.visible_message("<span class='danger'>[owner] appears out of nowhere!</span>")
else
warpchance += 0.25
/datum/mutation/human/acidflesh
name = "Acidic Flesh"
desc = "Subject has acidic chemicals building up underneath their skin. This is often lethal."
quality = NEGATIVE
text_gain_indication = "<span class='userdanger'>A horrible burning sensation envelops you as your flesh turns to acid!</span>"
text_lose_indication = "<span class'notice'>A feeling of relief covers you as your flesh goes back to normal.</span>"
difficulty = 18//high so it's hard to unlock and use on others
var/msgcooldown = 0
/datum/mutation/human/acidflesh/on_life()
if(prob(25))
if(world.time > msgcooldown)
to_chat(owner, "<span class='danger'>Your acid flesh bubbles...</span>")
msgcooldown = world.time + 200
if(prob(15))
owner.acid_act(rand(30,50), 10)
owner.visible_message("<span class='warning'>[owner]'s skin bubbles and pops.</span>", "<span class='userdanger'>Your bubbling flesh pops! It burns!</span>")
playsound(owner,'sound/weapons/sear.ogg', 50, 1)
/datum/mutation/human/gigantism
name = "Gigantism"//negative version of dwarfism
desc = "The cells within the subject spread out to cover more area, making them appear larger."
quality = MINOR_NEGATIVE
difficulty = 12
conflicts = list(DWARFISM)
/datum/mutation/human/gigantism/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
owner.resize = 1.25
owner.update_transform()
owner.visible_message("<span class='danger'>[owner] suddenly grows!</span>", "<span class='notice'>Everything around you seems to shrink..</span>")
/datum/mutation/human/gigantism/on_losing(mob/living/carbon/human/owner)
if(..())
return
owner.resize = 0.8
owner.update_transform()
owner.visible_message("<span class='danger'>[owner] suddenly shrinks!</span>", "<span class='notice'>Everything around you seems to grow..</span>")
/datum/mutation/human/spastic
name = "Spastic"
desc = "Subject suffers from muscle spasms."
quality = NEGATIVE
text_gain_indication = "<span class='warning'>You flinch.</span>"
text_lose_indication = "<span class'notice'>Your flinching subsides.</span>"
difficulty = 16
/datum/mutation/human/spastic/on_acquiring()
if(..())
return
owner.apply_status_effect(STATUS_EFFECT_SPASMS)
/datum/mutation/human/spastic/on_losing()
if(..())
return
owner.remove_status_effect(STATUS_EFFECT_SPASMS)
/datum/mutation/human/extrastun
name = "Two Left Feet"
desc = "A mutation that replaces the right foot with another left foot. It makes standing up after getting knocked down very difficult."
quality = NEGATIVE
text_gain_indication = "<span class='warning'>Your right foot feels... left.</span>"
text_lose_indication = "<span class'notice'>Your right foot feels alright.</span>"
difficulty = 16
var/stun_cooldown = 0
/datum/mutation/human/extrastun/on_life()
if(world.time > stun_cooldown)
if(owner.AmountKnockdown() || owner.AmountStun())
owner.SetKnockdown(owner.AmountKnockdown()*2)
owner.SetStun(owner.AmountStun()*2)
owner.visible_message("<span class='danger'>[owner] tries to stand up, but trips!</span>", "<span class='userdanger'>You trip over your own feet!</span>")
stun_cooldown = world.time + 300

View File

@@ -118,7 +118,7 @@
/datum/status_effect/pacify/on_creation(mob/living/new_owner, set_duration)
if(isnum(set_duration))
duration = set_duration
. = ..()
. = ..()
/datum/status_effect/pacify/on_apply()
owner.add_trait(TRAIT_PACIFISM, "status_effect")
@@ -126,7 +126,7 @@
/datum/status_effect/pacify/on_remove()
owner.remove_trait(TRAIT_PACIFISM, "status_effect")
//OTHER DEBUFFS
/datum/status_effect/pacify
id = "pacify"
@@ -134,11 +134,11 @@
tick_interval = 1
duration = 100
alert_type = null
/datum/status_effect/pacify/on_creation(mob/living/new_owner, set_duration)
if(isnum(set_duration))
duration = set_duration
. = ..()
. = ..()
/datum/status_effect/pacify/on_apply()
owner.add_trait(TRAIT_PACIFISM, "status_effect")
@@ -600,7 +600,7 @@
examine_text = "<span class='warning'>SUBJECTPRONOUN seems slow and unfocused.</span>"
var/stun = TRUE
alert_type = /obj/screen/alert/status_effect/trance
/obj/screen/alert/status_effect/trance
name = "Trance"
desc = "Everything feels so distant, and you can feel your thoughts forming loops inside your head..."
@@ -645,3 +645,59 @@
addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, raw_message), 10)
addtimer(CALLBACK(C, /mob/living.proc/Stun, 60, TRUE, TRUE), 15) //Take some time to think about it
qdel(src)
/datum/status_effect/spasms
id = "spasms"
status_type = STATUS_EFFECT_MULTIPLE
alert_type = null
/datum/status_effect/spasms/tick()
if(prob(15))
switch(rand(1,5))
if(1)
if(owner.mobility_flags & MOBILITY_MOVE)
to_chat(owner, "<span class='warning'>Your leg spasms!</span>")
step(owner, pick(GLOB.cardinals))
if(2)
if(owner.incapacitated())
return
var/obj/item/I = owner.get_active_held_item()
if(I)
to_chat(owner, "<span class='warning'>Your fingers spasm!</span>")
owner.log_message("used [I] due to a Muscle Spasm", LOG_ATTACK)
I.attack_self(owner)
if(3)
var/prev_intent = owner.a_intent
owner.a_intent = INTENT_HARM
var/range = 1
if(istype(owner.get_active_held_item(), /obj/item/gun)) //get targets to shoot at
range = 7
var/list/mob/living/targets = list()
for(var/mob/M in oview(owner, range))
if(isliving(M))
targets += M
if(LAZYLEN(targets))
to_chat(owner, "<span class='warning'>Your arm spasms!</span>")
owner.log_message(" attacked someone due to a Muscle Spasm", LOG_ATTACK) //the following attack will log itself
owner.ClickOn(pick(targets))
owner.a_intent = prev_intent
if(4)
var/prev_intent = owner.a_intent
owner.a_intent = INTENT_HARM
to_chat(owner, "<span class='warning'>Your arm spasms!</span>")
owner.log_message("attacked [owner.p_them()]self to a Muscle Spasm", LOG_ATTACK)
owner.ClickOn(owner)
owner.a_intent = prev_intent
if(5)
if(owner.incapacitated())
return
var/obj/item/I = owner.get_active_held_item()
var/list/turf/targets = list()
for(var/turf/T in oview(owner, 3))
targets += T
if(LAZYLEN(targets) && I)
to_chat(owner, "<span class='warning'>Your arm spasms!</span>")
owner.log_message("threw [I] due to a Muscle Spasm", LOG_ATTACK)
owner.throw_item(pick(targets))

View File

@@ -98,7 +98,7 @@
name = "\improper DNA injector (Anti-X-ray)"
desc = "It will make you see harder."
remove_mutations = list(XRAY)
/////////////////////////////////////
/obj/item/dnainjector/antiglasses
name = "\improper DNA injector (Anti-Glasses)"
@@ -328,10 +328,50 @@
name = "\improper DNA injector (Anti-Shock Touch)"
remove_mutations = list(SHOCKTOUCH)
/obj/item/dnainjector/spacialinstability
name = "\improper DNA injector (Spacial Instability)"
add_mutations = list(BADBLINK)
/obj/item/dnainjector/antispacialinstability
name = "\improper DNA injector (Anti-Spacial Instability)"
remove_mutations = list(BADBLINK)
/obj/item/dnainjector/acidflesh
name = "\improper DNA injector (Acid Flesh)"
add_mutations = list(ACIDFLESH)
/obj/item/dnainjector/antiacidflesh
name = "\improper DNA injector (Acid Flesh)"
remove_mutations = list(ACIDFLESH)
/obj/item/dnainjector/gigantism
name = "\improper DNA injector (Gigantism)"
add_mutations = list(GIGANTISM)
/obj/item/dnainjector/antigigantism
name = "\improper DNA injector (Anti-Gigantism)"
remove_mutations = list(GIGANTISM)
/obj/item/dnainjector/spastic
name = "\improper DNA injector (Spastic)"
add_mutations = list(SPASTIC)
/obj/item/dnainjector/antispastic
name = "\improper DNA injector (Anti-Spastic)"
remove_mutations = list(SPASTIC)
/obj/item/dnainjector/twoleftfeet
name = "\improper DNA injector (Two Left Feet)"
add_mutations = list(EXTRASTUN)
/obj/item/dnainjector/antitwoleftfeet
name = "\improper DNA injector (Anti-Two Left Feet)"
remove_mutations = list(EXTRASTUN)
/obj/item/dnainjector/geladikinesis
name = "\improper DNA injector (Geladikinesis)"
add_mutations = list(GELADIKINESIS)
/obj/item/dnainjector/antigeladikinesis
name = "\improper DNA injector (Anti-Geladikinesis)"
remove_mutations = list(GELADIKINESIS)