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

Buffs changeling combat ability + removes absorb requirements #11962

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion code/datums/status_effects/buffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@
/datum/status_effect/changeling/mindshield
id = "changelingmindshield"
alert_type = /atom/movable/screen/alert/status_effect/changeling_mindshield
tick_interval = 30
tick_interval = 5 SECONDS
chem_per_tick = 1

/datum/status_effect/changeling/mindshield/tick()
if(..() && owner.on_fire)
Expand Down
4 changes: 1 addition & 3 deletions code/modules/antagonists/changeling/cellular_emporium.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
var/can_readapt = changeling.canrespec
var/genetic_points_remaining = changeling.geneticpoints
var/absorbed_dna_count = changeling.absorbedcount
var/true_absorbs = changeling.trueabsorbs

data["can_readapt"] = can_readapt
data["genetic_points_remaining"] = genetic_points_remaining
Expand All @@ -50,9 +49,8 @@
AL["helptext"] = initial(ability.helptext)
AL["owned"] = changeling.has_sting(ability)
var/req_dna = initial(ability.req_dna)
var/req_absorbs = initial(ability.req_absorbs)
AL["dna_cost"] = dna_cost
AL["can_purchase"] = ((req_absorbs <= true_absorbs) && (req_dna <= absorbed_dna_count) && (dna_cost <= genetic_points_remaining))
AL["can_purchase"] = ((req_dna <= absorbed_dna_count) && (dna_cost <= genetic_points_remaining))

abilities += list(AL)

Expand Down
1 change: 0 additions & 1 deletion code/modules/antagonists/changeling/changeling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
var/list/stored_profiles = list() //list of datum/changelingprofile
var/datum/changelingprofile/first_prof = null
var/absorbedcount = 0
var/trueabsorbs = 0//dna gained using absorb, not dna sting
var/chem_charges = 20
var/chem_storage = 75
var/chem_recharge_rate = 1
Expand Down
4 changes: 0 additions & 4 deletions code/modules/antagonists/changeling/changeling_power.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
var/dna_cost = -1 //cost of the sting in dna points. 0 = auto-purchase (see changeling.dm), -1 = cannot be purchased
var/req_dna = 0 //amount of dna needed to use this ability. Changelings always have atleast 1
var/req_human = 0 //if you need to be human to use this ability
var/req_absorbs = 0 //similar to req_dna, but only gained from absorbing, not DNA sting
///Maximum stat before the ability is blocked. For example, `UNCONSCIOUS` prevents it from being used when in hard crit or dead, while `DEAD` allows the ability to be used on any stat values.
var/req_stat = CONSCIOUS
var/ignores_fakedeath = FALSE // usable with the FAKEDEATH flag
Expand Down Expand Up @@ -66,9 +65,6 @@ the same goes for Remove(). if you override Remove(), call parent or else your p
if(c.absorbedcount < req_dna)
to_chat(user, "<span class='warning'>We require at least [req_dna] sample\s of compatible DNA.</span>")
return 0
if(c.trueabsorbs < req_absorbs)
to_chat(user, "<span class='warning'>We require at least [req_absorbs] sample\s of DNA gained through our Absorb ability.</span>")
return 0
if(req_stat < user.stat)
to_chat(user, "<span class='warning'>We are incapacitated.</span>")
return 0
Expand Down
1 change: 0 additions & 1 deletion code/modules/antagonists/changeling/powers/absorb.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@

if(!changeling.has_dna(target.dna))
changeling.add_new_profile(target)
changeling.trueabsorbs++

if(user.nutrition < NUTRITION_LEVEL_WELL_FED)
user.set_nutrition(min((user.nutrition + target.nutrition), NUTRITION_LEVEL_WELL_FED))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/changeling/powers/adrenaline.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/datum/action/changeling/adrenaline
name = "Adrenaline Sacs"
desc = "We evolve additional sacs of adrenaline throughout our body. Costs 20 chemicals."
helptext = "Removes all stuns instantly and adds a short-term reduction in further stuns. Can be used while unconscious. Continued use poisons the body."
helptext = "Removes all stuns instantly and adds a short-term reduction in further stuns. Can be used while unconscious."
button_icon_state = "adrenaline"
chemical_cost = 20
dna_cost = 2
Expand Down
13 changes: 6 additions & 7 deletions code/modules/antagonists/changeling/powers/mutations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
righthand_file = 'icons/mob/inhands/antag/changeling_righthand.dmi'
item_flags = NEEDS_PERMIT | ABSTRACT | DROPDEL | ISWEAPON
w_class = WEIGHT_CLASS_HUGE
force = 20 //this is an undroppable melee weapon. should not be better than the fireaxe
force = 30
throwforce = 0 //Just to be on the safe side
throw_range = 0
throw_speed = 0
Expand All @@ -161,7 +161,7 @@
attack_verb_continuous = list("attacks", "slashes", "stabs", "slices", "tears", "lacerates", "rips", "dices", "cuts")
attack_verb_simple = list("attack", "slash", "stab", "slice", "tear", "lacerate", "rip", "dice", "cut")
sharpness = IS_SHARP
bleed_force = BLEED_CUT
bleed_force = BLEED_DEEP_WOUND
var/can_drop = FALSE
var/fake = FALSE

Expand Down Expand Up @@ -407,8 +407,8 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/item/gun/magic/tentacle)
item_flags = DROPDEL
clothing_flags = STOPSPRESSUREDAMAGE | HEADINTERNALS //Not THICKMATERIAL because it's organic tissue, so if somebody tries to inject something into it, it still ends up in your blood. (also balance but muh fluff)
allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/oxygen)
armor = list(MELEE = 35, BULLET = 25, LASER = 25, ENERGY = 30, BOMB = 30, BIO = 20, RAD = 20, FIRE = 90, ACID = 90, STAMINA = 10, BLEED = 80)//Bit less armoured than the Syndicate space suit
slowdown = 0.2
armor = list(MELEE = 35, BULLET = 25, LASER = 25, ENERGY = 30, BOMB = 30, BIO = 20, RAD = 20, FIRE = 90, ACID = 90, STAMINA = 10, BLEED = 80)
slowdown = 0.1
var/datum/reagent/salbutamol = /datum/reagent/medicine/salbutamol
actions_types = list()
cell = null
Expand Down Expand Up @@ -453,11 +453,10 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/item/gun/magic/tentacle)
/datum/action/changeling/suit/armor
name = "Chitinous Armor"
desc = "We turn our skin into tough chitin to protect us from damage. Costs 20 chemicals."
helptext = "Upkeep of the armor requires a low expenditure of chemicals. The armor provides decent protection against projectiles and some protection against melee attacks. Cannot be used in lesser form."
helptext = "Upkeep of the armor slows our rate of chemical production. The armor provides decent protection against projectiles and some protection against melee attacks. Cannot be used in lesser form."
button_icon_state = "chitinous_armor"
chemical_cost = 20
dna_cost = 2
req_absorbs = 3
req_human = 1
recharge_slowdown = 0.25

Expand All @@ -478,7 +477,7 @@ CREATION_TEST_IGNORE_SUBTYPES(/obj/item/gun/magic/tentacle)
cold_protection = 0
heat_protection = 0
blocks_shove_knockdown = TRUE
slowdown = 0.2
slowdown = 0

/obj/item/clothing/suit/armor/changeling/Initialize(mapload)
. = ..()
Expand Down
40 changes: 37 additions & 3 deletions code/modules/antagonists/changeling/powers/teratoma.dm
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#define MAX_TERATOMA 2

/datum/action/changeling/teratoma
name = "Birth Teratoma"
desc = "Our form divides, creating an egg that will soon hatch into a living tumor, fixated on causing mayhem"
helptext = "The tumor will not be loyal to us or our cause. Costs two changeling absorptions"
button_icon_state = "spread_infestation"
chemical_cost = 60
dna_cost = 2
req_absorbs = 3
req_human = TRUE

//Reskinned monkey - teratoma, will burst out of the host, with the objective to cause chaos.
/datum/action/changeling/teratoma/sting_action(mob/user)
Expand All @@ -19,7 +21,20 @@
"<span class='hear'>You hear flesh tearing!</span>", COMBAT_MESSAGE_RANGE)
return FALSE //create_teratoma() handles the chemicals anyway so there is no reason to take them again

/datum/action/changeling/teratoma/proc/create_teratoma(mob/user)
/datum/action/changeling/teratoma/proc/create_teratoma(mob/living/carbon/human/user)
if (!istype(user))
return FALSE
if (!user.dna)
to_chat(user, "<span class='warning'>Our current form has insufficient genetic material to create a Teratoma.</span>")
return FALSE
var/terratoma_count = 0
for (var/mob/living/carbon/monkey/tumor/teratoma in GLOB.mob_living_list)
if (teratoma.creator_key != user.key || teratoma.stat == DEAD)
continue
terratoma_count ++
if (terratoma_count >= MAX_TERATOMA)
to_chat(user, "<span class='warning'>You don't have enough energy to birth a teratoma...</span>")
return FALSE
var/datum/antagonist/changeling/c = user.mind.has_antag_datum(/datum/antagonist/changeling)
c.chem_charges -= chemical_cost //I'm taking your chemicals hostage!
var/turf/A = get_turf(user)
Expand All @@ -28,11 +43,30 @@
to_chat(usr, "<span class='warning'>You fail at creating a tumor. Perhaps you should try again later?</span>")
c.chem_charges += chemical_cost //If it fails we want to refund the chemicals
return FALSE
// Rerun preconditions after sleeping
if (!user.dna)
to_chat(user, "<span class='warning'>Our current form has insufficient genetic material to create a Teratoma.</span>")
return FALSE
if (!user.key)
return FALSE
terratoma_count = 0
for (var/mob/living/carbon/monkey/tumor/teratoma in GLOB.mob_living_list)
if (teratoma.creator_key != user.key || teratoma.stat == DEAD)
continue
terratoma_count ++
if (terratoma_count >= MAX_TERATOMA)
to_chat(user, "<span class='warning'>You don't have enough energy to birth a teratoma...</span>")
return FALSE
var/mob/living/carbon/monkey/tumor/T = new /mob/living/carbon/monkey/tumor(A)
// Copies the DNA, so that you can find who caused it while causing some chaos
T.dna.copy_dna(user.dna)
T.creator_key = user.key
var/mob/dead/observer/C = pick(candidates)
T.key = C.key
var/datum/antagonist/teratoma/D = new
T.mind.add_antag_datum(D)
to_chat(T, "<span='notice'>You burst out from [user]'s chest!</span>")
to_chat(T, "<span class='notice'>You burst out from [user]'s chest!</span>")
SEND_SOUND(T, sound('sound/effects/blobattack.ogg'))
return TRUE

#undef MAX_TERATOMA
15 changes: 15 additions & 0 deletions code/modules/mob/living/carbon/monkey/monkey.dm
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,21 @@ CREATION_TEST_IGNORE_SUBTYPES(/mob/living/carbon/monkey)
bodyparts = list(/obj/item/bodypart/chest/monkey/teratoma, /obj/item/bodypart/head/monkey/teratoma, /obj/item/bodypart/l_arm/monkey/teratoma,
/obj/item/bodypart/r_arm/monkey/teratoma, /obj/item/bodypart/r_leg/monkey/teratoma, /obj/item/bodypart/l_leg/monkey/teratoma)
ai_controller = null
var/creator_key = null

/mob/living/carbon/monkey/tumor/death(gibbed)
. = ..()
for (var/mob/living/creator in GLOB.player_list)
if (creator.key != creator_key)
continue
if (creator.stat == DEAD)
return
if (!creator.mind)
return
if (!creator.mind.has_antag_datum(/datum/antagonist/changeling))
return
to_chat(creator, "<span class='warning'>We gain the energy to birth another Teratoma...</span>")
return

/datum/dna/tumor
species = new /datum/species/teratoma
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,7 @@

/datum/reagent/medicine/changelinghaste
name = "Changeling Haste"
description = "Drastically increases movement speed, but deals toxin damage."
description = "Drastically increases movement speed."
color = "#AE151D"
chem_flags = CHEMICAL_RNG_GENERAL | CHEMICAL_RNG_FUN | CHEMICAL_RNG_BOTANY
metabolization_rate = 1
Expand All @@ -1498,11 +1498,6 @@
L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/changelinghaste)
..()

/datum/reagent/medicine/changelinghaste/on_mob_life(mob/living/carbon/M)
M.adjustToxLoss(2, 0)
..()
return TRUE

/datum/reagent/medicine/corazone
// Heart attack code will not do damage if corazone is present
// because it's SPACE MAGIC ASPIRIN
Expand Down
Loading