Carbonkin Content port + Trait whitelisting

Ports over my carbonkin content update that brings carbon kin mostly on the same level as mob kin.
Also ports the whitelist system so people dont have to write out EVERY species name in cases like this.

Whats it add tho?
Rebalances phase shifting:
Phase shifting is a pretty polarizing ability, it now is more forgiving for stealth uses but has a counter in becoming more costly with people and light level.

Stat blocks of all kin have been revisedd based on the flavor messages of the mob variants.

Tasers and other electricity sources now affect kin, this is the only immunity being removed and should help with SEC interaction.

Adds a new attack "syhon strike" this is mostly for the aggressive kins, if using syphon strike on hit it will take the damage you dealt and convert it into energy, this only works against carbons as example punching punpun restores around 4 energy

As a last note all of the Shadekin Adaptopn color traits lock your eye color into the respective color. So if you take Red adaption you will be immediatley identifiable as a red adapted kin since your eyes will in fact always be red.
This commit is contained in:
Sharkmare
2021-03-09 04:24:01 +01:00
parent 2fd3fbbba8
commit 3e859092b3
7 changed files with 142 additions and 14 deletions
@@ -41,7 +41,7 @@
S["traits_cheating"] >> pref.traits_cheating
S["max_traits"] >> pref.max_traits
S["trait_points"] >> pref.starting_trait_points
S["custom_say"] >> pref.custom_say
S["custom_whisper"] >> pref.custom_whisper
S["custom_ask"] >> pref.custom_ask
@@ -58,7 +58,7 @@
S["traits_cheating"] << pref.traits_cheating
S["max_traits"] << pref.max_traits
S["trait_points"] << pref.starting_trait_points
S["custom_say"] << pref.custom_say
S["custom_whisper"] << pref.custom_whisper
S["custom_ask"] << pref.custom_ask
@@ -141,7 +141,7 @@
. += "<a href='?src=\ref[src];custom_base=1'>[pref.custom_base ? pref.custom_base : "Human"]</a><br>"
var/traits_left = pref.max_traits
if(pref.species == SPECIES_CUSTOM)
var/points_left = pref.starting_trait_points
@@ -176,7 +176,7 @@
. += "<a href='?src=\ref[src];blood_color=1'>Set Color</a>"
. += "<a href='?src=\ref[src];blood_reset=1'>R</a><br>"
. += "<br>"
. += "<b>Custom Say: </b>"
. += "<a href='?src=\ref[src];custom_say=1'>Set Say Verb</a><br>"
. += "<b>Custom Whisper: </b>"
@@ -342,7 +342,11 @@
if(pref.species in instance.banned_species)
alert("The trait you've selected cannot be taken by the species you've chosen!","Error")
return TOPIC_REFRESH
//VORSTATION ADDITION CHOMPADDITION START Adding whitelist for traits
if( LAZYLEN(instance.allowed_species) && !(pref.species in instance.allowed_species)) //Adding white list handling -shark
alert("The trait you've selected cannot be taken by the species you've chosen!","Error")
return TOPIC_REFRESH
//VORSTATION ADDITION CHOMPADDITION END
if(trait_choice in pref.pos_traits + pref.neu_traits + pref.neg_traits)
conflict = instance.name
@@ -3,4 +3,12 @@
#define SHIFTED_OR_NOT 3
#define AB_PHASE_SHIFTED 0x1
#define AB_SHADE_REGEN 0x2
#define AB_SHADE_REGEN 0x2
//Porting over the type system of the mobs
#define BLUE_EYES 1
#define RED_EYES 2
#define PURPLE_EYES 3
#define YELLOW_EYES 4
#define GREEN_EYES 5
#define ORANGE_EYES 6
@@ -21,7 +21,7 @@
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws/shadekin, /datum/unarmed_attack/bite/sharp/shadekin)
rarity_value = 15 //INTERDIMENSIONAL FLUFFERS
siemens_coefficient = 0
siemens_coefficient = 1
darksight = 10
slowdown = -0.5
@@ -106,6 +106,9 @@
/datum/power/shadekin/regenerate_other,
/datum/power/shadekin/create_shade)
var/list/shadekin_ability_datums = list()
var/kin_type
var/energy_light = 0.25
var/energy_dark = 0.75
/datum/species/shadekin/New()
..()
@@ -162,18 +165,21 @@
var/brightness = T.get_lumcount() //Brightness in 0.0 to 1.0
darkness = 1-brightness //Invert
var/is_dark = (darkness >= 0.5)
if(H.ability_flags & AB_PHASE_SHIFTED)
dark_gains = 0
else
//Heal (very) slowly in good darkness
if(darkness >= 0.75)
H.adjustFireLoss(-0.05)
H.adjustBruteLoss(-0.05)
H.adjustToxLoss(-0.05)
dark_gains = 0.75
if(is_dark)
H.adjustFireLoss((-0.10)*darkness)
H.adjustBruteLoss((-0.10)*darkness)
H.adjustToxLoss((-0.10)*darkness)
//energy_dark and energy_light are set by the shadekin eye traits.
//These are balanced around their playstyles and 2 planned new aggressive abilities
dark_gains = energy_dark
else
dark_gains = 0.25
dark_gains = energy_light
set_energy(H, get_energy(H) + dark_gains)
@@ -33,6 +33,26 @@
var/ability_cost = 100
//CHOMPADDITION Conditional shifting ased on observers and darkness
var/darkness = 1
var/turf/T = get_turf(src)
if(!T)
to_chat(src,"<span class='warning'>You can't use that here!</span>")
return FALSE
var/brightness = T.get_lumcount() //Brightness in 0.0 to 1.0
darkness = 1-brightness //Invert
var/watcher =-1
for(var/mob/living/carbon/human/watchers in view_or_range(7,get_turf(src),"range" ))
watcher++
ability_cost = CLAMP(ability_cost/(0.01+darkness*2),50, 80)//This allows for 1 watcher in full light
if(watcher>0)
ability_cost = ability_cost + ( 15 * watcher )
if(!(ability_flags & AB_PHASE_SHIFTED))
log_debug("[src] attempted to shift with [watcher] visible Carbons with a cost of [ability_cost] in a darkness level of [darkness]")
//CHOMPADDITION END
var/datum/species/shadekin/SK = species
if(!istype(SK))
to_chat(src, "<span class='warning'>Only a shadekin can use that!</span>")
@@ -48,7 +68,6 @@
shadekin_adjust_energy(-ability_cost)
playsound(src, 'sound/effects/stealthoff.ogg', 75, 1)
var/turf/T = get_turf(src)
if(!T.CanPass(src,T) || loc != T)
to_chat(src,"<span class='warning'>You can't use that here!</span>")
return FALSE
@@ -0,0 +1,89 @@
/datum/trait/kintype
allowed_species = list(SPECIES_SHADEKIN)
var/color = BLUE_EYES
name = "Shadekin Blue Adaptation"
desc = "Makes your shadekin adapted as a Blue eyed kin! This gives you decreased energy regeneration in darkness, decreased regeneration in the light amd unchanged health!"
cost = 0
var_changes = list( "total_health" = 100,
"energy_light" = 0.5,
"energy_dark" = 0.5,
"unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
custom_only = FALSE
/datum/trait/kintype/red
name = "Shadekin Red Adaptation"
color = RED_EYES
desc = "Makes your shadekin adapted as a Red eyed kin! This gives you minimal energy regeneration in darkness, moderate regeneration in the light amd increased health!"
var_changes = list( "total_health" = 200,
"energy_light" = -1,
"energy_dark" = 0.1,
"unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
/datum/trait/kintype/purple
name = "Shadekin Purple Adaptation"
color = PURPLE_EYES
desc = "Makes your shadekin adapted as a Purple eyed kin! This gives you moderate energy regeneration in darkness, minor degeneration in the light amd increased health!"
var_changes = list( "total_health" = 150,
"energy_light" = 1,
"energy_dark" = -0.5,
"unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
/datum/trait/kintype/yellow
name = "Shadekin Yellow Adaptation"
color = YELLOW_EYES
desc = "Makes your shadekin adapted as a Yellow eyed kin! This gives you the highest energy regeneration in darkness, high degeneration in the light amd unchanged health!"
var_changes = list( "total_health" = 100,
"energy_light" = 3,
"energy_dark" = -2,
"unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
/datum/trait/kintype/green
name = "Shadekin Green Adaptation"
color = GREEN_EYES
desc = "Makes your shadekin adapted as a Green eyed kin! This gives you high energy regeneration in darkness, minor regeneration in the light amd unchanged health!"
var_changes = list( "total_health" = 100,
"energy_light" = 2,
"energy_dark" = 0.125,
"unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
/datum/trait/kintype/orange
name = "Shadekin Orange Adaptation"
color = ORANGE_EYES
desc = "Makes your shadekin adapted as a Orange eyed kin! This gives you minor energy regeneration in darkness, modeate degeneration in the light amd increased health!"
var_changes = list( "total_health" = 175,
"energy_light" = 0.25,
"energy_dark" = -0.5,
"unarmed_types" = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick,/datum/unarmed_attack/shadekinharmbap))
/datum/trait/kintype/apply(var/datum/species/shadekin/S,var/mob/living/carbon/human/H)
if(color && istype(S)) //Sanity check to see if they're actually a shadekin, otherwise just don't do anything. They shouldn't be able to spawn with the trait.
S.kin_type = color
switch(color)
if(BLUE_EYES)
H.shapeshifter_set_eye_color("0000FF")
if(RED_EYES)
H.shapeshifter_set_eye_color("FF0000")
if(GREEN_EYES)
H.shapeshifter_set_eye_color("00FF00")
if(PURPLE_EYES)
H.shapeshifter_set_eye_color("FF00FF")
if(YELLOW_EYES)
H.shapeshifter_set_eye_color("FFFF00")
if(ORANGE_EYES)
H.shapeshifter_set_eye_color("FFA500")
/datum/unarmed_attack/shadekinharmbap
attack_name = "syphon strike"
attack_verb = list("hit", "clawed", "slashed", "scratched")
attack_sound = 'sound/weapons/slice.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
shredding = 0
/datum/unarmed_attack/shadekinharmbap/apply_effects(var/mob/living/carbon/human/shadekin/user,var/mob/living/carbon/human/target,var/armour,var/attack_damage,var/zone)
..()
if(user == target) //Prevent self attack to gain energy
return
var/obj/item/organ/internal/brain/shadekin/shade_organ = user.internal_organs_by_name[O_BRAIN]
if(!istype(shade_organ))
return
shade_organ.dark_energy = CLAMP(shade_organ.dark_energy + attack_damage,0,shade_organ.max_dark_energy) //Convert Damage done to Energy Gained
@@ -10,6 +10,7 @@
var/list/excludes // Store a list of paths of traits to exclude, but done automatically if they change the same vars.
var/can_take = ORGANICS|SYNTHETICS // Can freaking synths use those.
var/list/banned_species // A list of species that can't take this trait
var/list/allowed_species // VORESTATION EDIT:chomp port. A list of species that CAN take this trait, use this if only a few species can use it. -shark
var/custom_only = TRUE // Trait only available for custom species
//Proc can be overridden lower to include special changes, make sure to call up though for the vars changes