diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm index 7661bb3255..88dace7ff9 100644 --- a/code/game/mecha/combat/combat.dm +++ b/code/game/mecha/combat/combat.dm @@ -7,7 +7,6 @@ maint_access = 0 //add_req_access = 0 //operation_req_access = list(access_hos) - damage_absorption = list("brute"=0.7,"fire"=1,"bullet"=0.7,"laser"=0.85,"energy"=1,"bomb"=0.8) var/am = "d3c2fbcadca903a41161ccc9df9cf948" max_hull_equip = 2 diff --git a/code/game/mecha/combat/durand.dm b/code/game/mecha/combat/durand.dm index 19bd2b9c53..4ea027f154 100644 --- a/code/game/mecha/combat/durand.dm +++ b/code/game/mecha/combat/durand.dm @@ -8,7 +8,6 @@ health = 300 maxhealth = 300 //Don't forget to update the /old variant if you change this number. deflect_chance = 20 - damage_absorption = list("brute"=0.5,"fire"=1.1,"bullet"=0.65,"laser"=0.85,"energy"=0.9,"bomb"=0.8) max_temperature = 30000 infra_luminosity = 8 force = 40 @@ -85,4 +84,4 @@ ..() health = 25 maxhealth = 250 //Just slightly worse. - cell.charge = rand(0, (cell.charge/2)) \ No newline at end of file + cell.charge = rand(0, (cell.charge/2)) diff --git a/code/game/mecha/combat/gorilla.dm b/code/game/mecha/combat/gorilla.dm index 09992b5774..273e728ac8 100644 --- a/code/game/mecha/combat/gorilla.dm +++ b/code/game/mecha/combat/gorilla.dm @@ -11,8 +11,12 @@ maxhealth = 5000 opacity = 0 // Because there's big tall legs to look through. Also it looks fucky if this is set to 1. deflect_chance = 50 +<<<<<<< HEAD damage_absorption = list("brute"=0.1,"fire"=0.7,"bullet"=0.1,"laser"=0.6,"energy"=0.7,"bomb"=0.7) //values show how much damage will pass through, not how much will be absorbed. max_temperature = 35000 +======= + max_temperature = 35000 //Just a bit better than the Durand. +>>>>>>> 4aa23a5874... Merge pull request #14430 from VOREStation/upstream-merge-8905 infra_luminosity = 3 wreckage = /obj/effect/decal/mecha_wreckage/gorilla add_req_access = 0 diff --git a/code/game/mecha/combat/gygax.dm b/code/game/mecha/combat/gygax.dm index b2b5fe613f..1fa6933add 100644 --- a/code/game/mecha/combat/gygax.dm +++ b/code/game/mecha/combat/gygax.dm @@ -8,7 +8,6 @@ health = 250 maxhealth = 250 //Don't forget to update the /old variant if you change this number. deflect_chance = 15 - damage_absorption = list("brute"=0.75,"fire"=1,"bullet"=0.8,"laser"=0.7,"energy"=0.85,"bomb"=1) max_temperature = 25000 infra_luminosity = 6 wreckage = /obj/effect/decal/mecha_wreckage/gygax @@ -55,7 +54,6 @@ health = 400 maxhealth = 400 deflect_chance = 25 - damage_absorption = list("brute"=0.6,"fire"=0.8,"bullet"=0.6,"laser"=0.5,"energy"=0.65,"bomb"=0.8) max_temperature = 45000 overload_coeff = 1 wreckage = /obj/effect/decal/mecha_wreckage/gygax/dark @@ -92,7 +90,6 @@ maxhealth = 150 deflect_chance = 20 step_in = 2 - damage_absorption = list("brute"=0.9,"fire"=1,"bullet"=0.9,"laser"=0.8,"energy"=0.9,"bomb"=1) max_temperature = 20000 overload_coeff = 1 wreckage = /obj/effect/decal/mecha_wreckage/gygax/serenity @@ -148,4 +145,4 @@ ..() health = 25 maxhealth = 250 //Just slightly worse. - cell.charge = rand(0, (cell.charge/2)) \ No newline at end of file + cell.charge = rand(0, (cell.charge/2)) diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm index c218493847..8fc089c495 100644 --- a/code/game/mecha/combat/marauder.dm +++ b/code/game/mecha/combat/marauder.dm @@ -8,7 +8,6 @@ health = 350 maxhealth = 350 //Don't forget to update the /old variant if you change this number. deflect_chance = 25 - damage_absorption = list("brute"=0.5,"fire"=0.7,"bullet"=0.45,"laser"=0.6,"energy"=0.7,"bomb"=0.7) max_temperature = 60000 infra_luminosity = 3 operation_req_access = list(access_cent_specops) diff --git a/code/game/mecha/combat/phazon.dm b/code/game/mecha/combat/phazon.dm index 7142711b86..7aa6d8c41e 100644 --- a/code/game/mecha/combat/phazon.dm +++ b/code/game/mecha/combat/phazon.dm @@ -9,7 +9,6 @@ health = 250 //God this is low //Chompedit, increased it a bit. maxhealth = 250 //Don't forget to update the /old variant if you change this number. //Chompedit, increased health. deflect_chance = 30 - damage_absorption = list("brute"=0.7,"fire"=0.7,"bullet"=0.7,"laser"=0.7,"energy"=0.7,"bomb"=0.7) max_temperature = 25000 infra_luminosity = 3 wreckage = /obj/effect/decal/mecha_wreckage/phazon @@ -39,6 +38,7 @@ cloak_possible = FALSE //Chompedit Cloaking is too much for something like this, and is moderately useless anyway. phasing_possible = TRUE switch_dmg_type_possible = TRUE + var/list/inherent_damage_absorption = list("brute"=0.7,"fire"=0.7,"bullet"=0.7,"laser"=0.7,"energy"=0.7,"bomb"=0.7) /obj/mecha/combat/phazon/equipped/Initialize() . = ..() @@ -93,7 +93,7 @@ health = 350 maxhealth = 350 deflect_chance = 30 - damage_absorption = list("brute"=0.6,"fire"=0.7,"bullet"=0.7,"laser"=0.9,"energy"=0.7,"bomb"=0.5) + inherent_damage_absorption = list("brute"=0.6,"fire"=0.7,"bullet"=0.7,"laser"=0.9,"energy"=0.7,"bomb"=0.5) max_temperature = 10000 infra_luminosity = 3 wreckage = /obj/effect/decal/mecha_wreckage/janus @@ -126,7 +126,7 @@ src.visible_message("The [src.name] absorbs the incoming projectile's force, negating it!") src.log_append_to_last("Armor negated.") return - else if((Proj.damage && !Proj.nodamage) && istype(Proj, /obj/item/projectile/beam) && prob(max(1, (50 - round((Proj.damage / 2) * damage_absorption["laser"])) * (1 - (Proj.armor_penetration / 100))))) // Base 50% chance to deflect a beam,lowered by half the beam's damage scaled to laser absorption, then multiplied by the remaining percent of non-penetrated armor, with a minimum chance of 1%. + else if((Proj.damage && !Proj.nodamage) && istype(Proj, /obj/item/projectile/beam) && prob(max(1, (50 - round((Proj.damage / 2) * inherent_damage_absorption["laser"])) * (1 - (Proj.armor_penetration / 100))))) // Base 50% chance to deflect a beam,lowered by half the beam's damage scaled to laser absorption, then multiplied by the remaining percent of non-penetrated armor, with a minimum chance of 1%. src.occupant_message("The armor reflects the incoming beam, negating it!") src.visible_message("The [src.name] reflects the incoming beam, negating it!") src.log_append_to_last("Armor reflected.") @@ -135,7 +135,7 @@ ..() /obj/mecha/combat/phazon/janus/dynattackby(obj/item/weapon/W as obj, mob/user as mob) - if(prob(max(1, (50 - round((W.force / 2) * damage_absorption["brute"])) * (1 - (W.armor_penetration / 100))))) + if(prob(max(1, (50 - round((W.force / 2) * inherent_damage_absorption["brute"])) * (1 - (W.armor_penetration / 100))))) src.occupant_message("The armor absorbs the incoming attack's force, negating it!") src.visible_message("The [src.name] absorbs the incoming attack's force, negating it!") src.log_append_to_last("Armor absorbed.") diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index b39d46b453..12ef6061ce 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -44,17 +44,6 @@ var/health = 300 //Health is health var/maxhealth = 300 //Maxhealth is maxhealth. var/deflect_chance = 10 //Chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act. - //the values in this list show how much damage will pass through, not how much will be absorbed. - var/list/damage_absorption = list( - "brute"=0.8, - "fire"=1.2, - "bullet"=0.9, - "laser"=1, - "energy"=1, - "bomb"=1, - "bio"=1, - "rad"=1 - ) var/damage_minimum = 10 //Incoming damage lower than this won't actually deal damage. Scrapes shouldn't be a real thing. var/minimum_penetration = 15 //Incoming damage won't be fully applied if you don't have at least 20. Almost all AP clears this. @@ -1043,15 +1032,8 @@ /obj/mecha/proc/get_damage_absorption() var/obj/item/mecha_parts/component/armor/AC = internal_components[MECH_ARMOR] - - if(!istype(AC)) - return - - else - if(AC.get_efficiency() > 0.25) - return AC.damage_absorption - - return + if(istype(AC) && AC.get_efficiency() > 0.25) + return AC.damage_absorption /obj/mecha/proc/absorbDamage(damage,damage_type) return call((proc_res["dynabsorbdamage"]||src), "dynabsorbdamage")(damage,damage_type) diff --git a/code/game/mecha/micro/micro.dm b/code/game/mecha/micro/micro.dm index bea6f6f1dd..2a9d4c3e63 100644 --- a/code/game/mecha/micro/micro.dm +++ b/code/game/mecha/micro/micro.dm @@ -27,7 +27,6 @@ max_micro_weapon_equip = 1 //add_req_access = 0 //operation_req_access = list(access_hos) - damage_absorption = list("brute"=1,"fire"=1,"bullet"=1,"laser"=1,"energy"=1,"bomb"=1) var/am = "d3c2fbcadca903a41161ccc9df9cf948" damage_minimum = 0 //Incoming damage lower than this won't actually deal damage. Scrapes shouldn't be a real thing. minimum_penetration = 0 //Incoming damage won't be fully applied if you don't have at least 20. Almost all AP clears this. diff --git a/code/game/mecha/micro/security.dm b/code/game/mecha/micro/security.dm index d634694510..62be51bb57 100644 --- a/code/game/mecha/micro/security.dm +++ b/code/game/mecha/micro/security.dm @@ -23,7 +23,6 @@ health = 150 step_energy_drain = 4 // less efficient than base micromech, but still a micromech. deflect_chance = 10 - damage_absorption = list("brute"=0.75,"fire"=1,"bullet"=0.8,"laser"=0.7,"energy"=0.85,"bomb"=1) max_temperature = 15000 infra_luminosity = 6 wreckage = /obj/effect/decal/mecha_wreckage/micro/sec/polecat @@ -46,7 +45,6 @@ dir_in = 2 //Facing south. health = 100 deflect_chance = 5 - damage_absorption = list("brute"=1,"fire"=1,"bullet"=0.9,"laser"=0.8,"energy"=0.85,"bomb"=1) max_temperature = 5000 wreckage = /obj/effect/decal/mecha_wreckage/micro/sec/weasel internal_damage_threshold = 20 diff --git a/code/game/mecha/micro/utility.dm b/code/game/mecha/micro/utility.dm index 4bc1e89321..fcf32f1a2f 100644 --- a/code/game/mecha/micro/utility.dm +++ b/code/game/mecha/micro/utility.dm @@ -9,7 +9,6 @@ dir_in = 2 //Facing south. health = 100 deflect_chance = 10 - damage_absorption = list("brute"=0.9,"fire"=1,"bullet"=1,"laser"=1,"energy"=1,"bomb"=1) max_temperature = 15000 infra_luminosity = 6 wreckage = /obj/effect/decal/mecha_wreckage/micro/utility/gopher diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 61b4d90183..8d4ee98fbf 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -59,7 +59,6 @@ max_temperature = 65000 health = 250 lights_power = 8 - damage_absorption = list("fire"=0.5,"bullet"=0.8,"bomb"=0.5) wreckage = /obj/effect/decal/mecha_wreckage/ripley/firefighter max_hull_equip = 2 max_weapon_equip = 0 diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/mecha.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/mecha.dm index eaa796f45c..f07eef358c 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/mecha.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/mecha.dm @@ -17,7 +17,6 @@ organ_names = /decl/mob_organ_names/mecha - // Very close to the base 'damage_absorption' var on the base mecha class. armor = list( "melee" = 20, "bullet" = 10,