Skip to content

Commit

Permalink
balance: Genetic Superiority (ss220-space#3859)
Browse files Browse the repository at this point in the history
  • Loading branch information
ROdenFL authored Dec 5, 2023
1 parent 71b723a commit bfa6e0b
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 7 deletions.
8 changes: 4 additions & 4 deletions code/datums/uplink_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,11 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
cost = 50
job = list("Chief Medical Officer", "Psychiatrist")

/datum/uplink_item/jobspecific/genekit
name = "Genetic Superiority Bundle"
desc = "A set of injectors containing extremely powerful mutations brought to you by recently established Syndicate research station. This set is designed for teamwork"
/datum/uplink_item/jobspecific/dna_upgrader
name = "Genetic Superiority Injector"
desc = "Experemental DNA injector whick will give you one advanced gene modification and increase your gene stability."
reference = "GS"
item = /obj/item/storage/box/syndie_kit/genes
item = /obj/item/dna_upgrader
cost = 75
job = list("Chief Medical Officer", "Geneticist")
surplus = 0
Expand Down
91 changes: 91 additions & 0 deletions code/game/objects/items/weapons/dna_upgrader.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#define VAULT_TOXIN "Toxin Adaptation"
#define VAULT_NOBREATH "Lung Enhancement"
#define VAULT_FIREPROOF "Thermal Regulation"
#define VAULT_STUNTIME "Neural Repathing"
#define VAULT_ARMOUR "Hardened Skin"
#define VAULT_SPEED "Leg Muscle Stimulus"
#define VAULT_QUICK "Arm Muscle Stimulus"

/obj/item/dna_upgrader
name = "dna upgrader"
desc = "test"
icon = 'icons/obj/hypo.dmi'
icon_state = "dnaupgrader"
var/used = FALSE

/obj/item/dna_upgrader/attack_self(mob/user)
if(!used)
ui_interact(user)
else
to_chat(user, span_notice("Looks like it is already used."))

/obj/item/dna_upgrader/ui_interact(mob/user, ui_key, datum/tgui/ui, force_open, datum/tgui/master_ui, datum/ui_state/state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)

if(!ui)
ui = new(user, src, ui_key, "DNAModifyer", name, 400, 150, master_ui, state)
ui.open()

/obj/item/dna_upgrader/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)

if(..())
return

switch(action)
if("gene")
var/mob/living/carbon/human/H = ui.user
var/datum/species/S = H.dna.species
if(NO_DNA in S.species_traits)
to_chat(H, "<span class='warning'>Error, no DNA detected.</span>")
return
var/modification = params["modification"]
switch(modification)
if(VAULT_TOXIN)
to_chat(H, "<span class='notice'>You feel resistant to airborne toxins.</span>")
var/obj/item/organ/internal/lungs/L = H.get_int_organ(/obj/item/organ/internal/lungs)
if(L)
L.tox_breath_dam_min = 0
L.tox_breath_dam_max = 0
S.species_traits |= VIRUSIMMUNE
if(VAULT_NOBREATH)
to_chat(H, "<span class='notice'>Your lungs feel great.</span>")
S.species_traits |= NO_BREATHE
if(VAULT_FIREPROOF)
to_chat(H, "<span class='notice'>You feel fireproof.</span>")
S.burn_mod *= 0.5
S.species_traits |= RESISTHOT
if(VAULT_STUNTIME)
to_chat(H, "<span class='notice'>Nothing can keep you down for long.</span>")
S.stun_mod *= 0.5
S.stamina_mod *= 0.5
H.stam_regen_start_modifier *= 0.5
if(VAULT_ARMOUR)
to_chat(H, "<span class='notice'>You feel tough.</span>")
S.brute_mod *= 0.7
S.burn_mod *= 0.7
S.tox_mod *= 0.7
S.oxy_mod *= 0.7
S.clone_mod *= 0.7
S.brain_mod *= 0.7
S.stamina_mod *= 0.7
S.species_traits |= PIERCEIMMUNE
if(VAULT_SPEED)
to_chat(H, "<span class='notice'>You feel very fast and agile.</span>")
S.speed_mod = -1
if(VAULT_QUICK)
to_chat(H, "<span class='notice'>Your arms move as fast as lightning.</span>")
H.next_move_modifier = 0.5
ui.close()
H.gene_stability += 25
to_chat(H, span_notice("You feel like your body rebasing."))
used = TRUE
icon_state = "[icon_state]0"
return TRUE

#undef VAULT_TOXIN
#undef VAULT_NOBREATH
#undef VAULT_FIREPROOF
#undef VAULT_STUNTIME
#undef VAULT_ARMOUR
#undef VAULT_SPEED
#undef VAULT_QUICK
Binary file modified icons/obj/hypo.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions paradise.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,7 @@
#include "code\game\objects\items\weapons\extinguisher.dm"
#include "code\game\objects\items\weapons\flamethrower.dm"
#include "code\game\objects\items\weapons\garrote.dm"
#include "code\game\objects\items\weapons\dna_upgrader.dm"
#include "code\game\objects\items\weapons\gift_wrappaper.dm"
#include "code\game\objects\items\weapons\handcuffs.dm"
#include "code\game\objects\items\weapons\highlander_swords.dm"
Expand Down
43 changes: 43 additions & 0 deletions tgui/packages/tgui/interfaces/DNAModifyer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { useBackend } from '../backend';
import { Box, Button, Grid, LabeledList, ProgressBar, Section } from '../components';
import { Window } from '../layouts';

export const DNAModifyer = (props, context) => {
const { act } = useBackend(context);
return (
<Window>
<Window.Content>
<Section title="Personal Gene Therapy">
<Button
onClick={() => act("gene", { modification: "Toxin Adaptation" })}>
Toxin Adaptation
</Button>
<Button
onClick={() => act("gene", { modification: "Lung Enhancement" })}>
Lung Enhancement
</Button>
<Button
onClick={() => act("gene", { modification: "Thermal Regulation" })}>
Thermal Regulation
</Button>
<Button
onClick={() => act("gene", { modification: "Neural Repathing" })}>
Neural Repathing
</Button>
<Button
onClick={() => act("gene", { modification: "Hardened Skin" })}>
Hardened Skin
</Button>
<Button
onClick={() => act("gene", { modification: "Leg Muscle Stimulus" })}>
Leg Muscle Stimulus
</Button>
<Button
onClick={() => act("gene", { modification: "Arm Muscle Stimulus" })}>
Arm Muscle Stimulus
</Button>
</Section>
</Window.Content>
</Window>
);
};
Loading

0 comments on commit bfa6e0b

Please sign in to comment.