From 68022d927c88ab0c8a3795bfc98b47e37e5c41e9 Mon Sep 17 00:00:00 2001 From: Spookerton Date: Sat, 4 Feb 2023 20:32:35 +0000 Subject: [PATCH] Removes unused mecha damage absorbtion list. --- code/game/mecha/combat/combat.dm | 1 - code/game/mecha/combat/durand.dm | 3 +-- code/game/mecha/combat/gorilla.dm | 1 - code/game/mecha/combat/gygax.dm | 5 +---- code/game/mecha/combat/marauder.dm | 1 - code/game/mecha/combat/phazon.dm | 13 +++++++---- code/game/mecha/mecha.dm | 22 ++----------------- code/game/mecha/working/ripley.dm | 1 - .../subtypes/mechanical/mecha/mecha.dm | 1 - 9 files changed, 13 insertions(+), 35 deletions(-) diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm index 7661bb32557..88dace7ff97 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 19bd2b9c53e..4ea027f154d 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 cb9b00ecf26..e306455de45 100644 --- a/code/game/mecha/combat/gorilla.dm +++ b/code/game/mecha/combat/gorilla.dm @@ -11,7 +11,6 @@ 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 - damage_absorption = list("brute"=0.1,"fire"=0.8,"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 //Just a bit better than the Durand. infra_luminosity = 3 wreckage = /obj/effect/decal/mecha_wreckage/gorilla diff --git a/code/game/mecha/combat/gygax.dm b/code/game/mecha/combat/gygax.dm index b2b5fe613f7..1fa6933add7 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 c2184938478..8fc089c4955 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 8ec100ad1ea..f0da7245c92 100644 --- a/code/game/mecha/combat/phazon.dm +++ b/code/game/mecha/combat/phazon.dm @@ -9,7 +9,6 @@ health = 200 //God this is low maxhealth = 200 //Don't forget to update the /old variant if you change this number. 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 @@ -38,6 +37,7 @@ cloak_possible = TRUE 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() . = ..() @@ -92,7 +92,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 @@ -125,7 +125,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.") @@ -133,8 +133,13 @@ ..() +<<<<<<< HEAD /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))))) +======= +/obj/mecha/combat/phazon/janus/dynattackby(obj/item/W as obj, mob/user as mob) + if(prob(max(1, (50 - round((W.force / 2) * inherent_damage_absorption["brute"])) * (1 - (W.armor_penetration / 100))))) +>>>>>>> d29c9fe35a8... Merge pull request #8905 from MistakeNot4892/mechabad 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.") @@ -162,4 +167,4 @@ ..() health = 25 maxhealth = 150 //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/mecha.dm b/code/game/mecha/mecha.dm index 63d23047496..f5821b18d19 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/working/ripley.dm b/code/game/mecha/working/ripley.dm index 61b4d90183d..8d4ee98fbf9 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 eaa796f45cf..f07eef358cd 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,