Moves slime core back to head, and organs in a non-encased limb are more likely to take damage from combat now

Are you happy now?
This commit is contained in:
Crazylemon64
2016-02-03 03:59:23 -08:00
parent 170df924f4
commit 3695799c97
4 changed files with 45 additions and 35 deletions
@@ -102,11 +102,11 @@
desc = "A complex, organic knot of jelly and crystalline particles."
icon = 'icons/mob/slimes.dmi'
icon_state = "green slime extract"
parent_organ = "chest"
// parent_organ = "chest" Hello I am from the ministry of rubber forehead aliens how are you
/obj/item/organ/brain/slime/take_damage(var/amount, var/silent = 1)
//Slimes are 50% more vulnerable to brain damage
damage = between(0, src.damage + (0.5*amount), max_damage) //Since they take the damage twice, this is +50%
//Slimes are 150% more vulnerable to brain damage
damage = between(0, src.damage + (1.5*amount), max_damage) //Since they take the damage twice, this is +150%
return ..()
@@ -495,11 +495,14 @@
qdel(O)
var/limb_list = species.has_limbs[chosen_limb]
var/limb_path = limb_list["path"]
var/obj/item/organ/external/limb_path = limb_list["path"]
// Parent check
var/obj/item/organ/external/potential_parent = organs_by_name[initial(limb_path.parent_organ)]
if(!istype(potential_parent) || potential_parent.is_stump())
src << "<span class='danger'>You've lost the organ that you've been growing your new part on!</span>"
return // No rayman for you
var/obj/item/organ/external/new_limb = new limb_path(src)
new_limb.owner = src // This line is probably unneeded but will shut up the compiler
adjustBruteLoss(stored_brute)
adjustFireLoss(stored_burn)
new_limb.take_damage(stored_brute, stored_burn, 0, 0)
update_body()
updatehealth()
UpdateDamageIcon()
+26 -14
View File
@@ -34,6 +34,9 @@
var/list/wounds = list()
var/number_wounds = 0 // cache the number of wounds, which is NOT wounds.len!
var/perma_injury = 0
// 0: Don't fail when at full damage
// 1: Neatly pop off at full damage, stop damage propogation
// 2: Disintegrate at full damage, continue damage propogation
var/fail_at_full_damage = 0
@@ -139,16 +142,6 @@
parent.children = list()
parent.children.Add(src)
/obj/item/organ/external/robotize()
..()
//robot limbs take reduced damage
brute_mod = 0.66
burn_mod = 0.66
// Robot parts also lack bones
// This is so surgery isn't kaput, let's see how this does
encased = null
fail_at_full_damage = 1
/****************************************************
DAMAGE PROCS
****************************************************/
@@ -163,8 +156,16 @@
brute *= brute_mod
burn *= burn_mod
// Threshold needed to have a chance of hurting internal bits with something sharp
var/const/sharp_thresh_int_dmg = 5
// Threshold needed to have a chance of hurting internal bits
var/const/thresh_int_dmg = 10
// Probability of taking internal damage from sufficient force, while otherwise healthy
var/const/dmg_prob = 5
// Probability of taking internal damage when hit while lacking encasing bones
var/const/no_bone_dmg_prob = 30
// High brute damage or sharp objects may damage internal organs
if(internal_organs && (brute_dam >= max_damage || (((sharp && brute >= 5) || brute >= 10) && prob(5))))
if(internal_organs && (brute_dam >= max_damage || (((sharp && brute >= sharp_thresh_int_dmg) || brute >= thresh_int_dmg) && prob(dmg_prob)) || (!encased && prob(no_bone_dmg_prob))))
// Damage an internal organ
if(internal_organs && internal_organs.len)
var/obj/item/organ/I = pick(internal_organs)
@@ -210,8 +211,8 @@
burn = max(0, burn - can_inflict)
//If there are still hurties to dispense
if (burn || brute)
if (status & ORGAN_ROBOT && body_part != UPPER_TORSO && body_part != LOWER_TORSO)
droplimb(1) //Robot limbs just kinda fail at full damage.
if (fail_at_full_damage == 1 && body_part != UPPER_TORSO && body_part != LOWER_TORSO)
droplimb(1) //Clean loss, just drop the limb and be done
else
//List organs we can pass it to
var/list/obj/item/organ/external/possible_points = list()
@@ -225,7 +226,7 @@
//And pass the pain around
var/obj/item/organ/external/target = pick(possible_points)
target.take_damage(brute, burn, sharp, edge, used_weapon, forbidden_limbs + src)
if(fail_at_full_damage && body_part != UPPER_TORSO && body_part != LOWER_TORSO)
if(fail_at_full_damage == 2 && body_part != UPPER_TORSO && body_part != LOWER_TORSO)
var/losstype
if(burn > brute)
losstype = DROPLIMB_BURN
@@ -787,6 +788,17 @@ Note that amputating the affected organ does in fact remove the infection from t
status &= ~ORGAN_BROKEN
return 1
// I put these two next to each other to highlight that both exist. This should likely be resolved.
/obj/item/organ/external/robotize()
..()
//robot limbs take reduced damage
brute_mod = 0.66
burn_mod = 0.66
// Robot parts also lack bones
// This is so surgery isn't kaput, let's see how this does
encased = null
fail_at_full_damage = 1
/obj/item/organ/external/robotize(var/company)
..()
+9 -14
View File
@@ -1,10 +1,6 @@
/obj/item/organ/external/head/slime
vital = 0
max_damage = 50
min_broken_damage = 30
cannot_break = 1
encased = null
fail_at_full_damage = 1
cannot_break = 1
/obj/item/organ/external/chest/slime
encased = null
@@ -15,33 +11,32 @@
/obj/item/organ/external/arm/slime
cannot_break = 1
fail_at_full_damage = 1
fail_at_full_damage = 2
/obj/item/organ/external/arm/right/slime
cannot_break = 1
fail_at_full_damage = 1
fail_at_full_damage = 2
/obj/item/organ/external/leg/slime
cannot_break = 1
fail_at_full_damage = 1
fail_at_full_damage = 2
/obj/item/organ/external/leg/right/slime
cannot_break = 1
fail_at_full_damage = 1
fail_at_full_damage = 2
/obj/item/organ/external/foot/slime
cannot_break = 1
fail_at_full_damage = 1
fail_at_full_damage = 2
/obj/item/organ/external/foot/right/slime
cannot_break = 1
fail_at_full_damage = 1
fail_at_full_damage = 2
/obj/item/organ/external/hand/slime
cannot_break = 1
fail_at_full_damage = 1
fail_at_full_damage = 2
/obj/item/organ/external/hand/right/slime
cannot_break = 1
fail_at_full_damage = 1
fail_at_full_damage = 2