Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mech material feature, HP, armour rebalance #690

Merged
merged 11 commits into from
Dec 25, 2023
2 changes: 2 additions & 0 deletions code/modules/materials/definitions/materials_organic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
icon_colour = COLOR_WHITE
hardness = MATERIAL_FLEXIBLE
weight = 5
integrity = 50
melting_point = T0C+371 //assuming heat resistant plastic
stack_origin_tech = list(TECH_MATERIAL = 3)
conductive = 0
Expand Down Expand Up @@ -61,6 +62,7 @@
hardness = MATERIAL_SOFT
weight = 1
brute_armor = 1
integrity = 10
conductive = 0
stack_type = null
hidden_from_codex = TRUE
Expand Down
12 changes: 6 additions & 6 deletions code/modules/mechs/components/armour.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
icon_state = "armor_e"
icon_state_broken = "armor_e_broken"
armor = list(
melee = ARMOR_MELEE_RESISTANT ,
bullet = ARMOR_BALLISTIC_SMALL,
laser = ARMOR_LASER_SMALL,
melee = ARMOR_MELEE_RESISTANT,
bullet = ARMOR_BALLISTIC_PISTOL,
laser = ARMOR_LASER_HANDGUNS,
energy = ARMOR_ENERGY_SHIELDED,
bomb = ARMOR_BOMB_MINOR,
bomb = ARMOR_BOMB_PADDED,
bio = ARMOR_BIO_SHIELDED,
rad = ARMOR_RAD_SMALL
rad = ARMOR_RAD_MINOR
)
origin_tech = list(TECH_MATERIAL = 3)

Expand All @@ -64,4 +64,4 @@

/obj/item/robot_parts/robot_component/armour/exosuit/Initialize()
. = ..()
set_extension(src, /datum/extension/armor/mech, armor)
set_extension(src, /datum/extension/armor/mech, armor)
7 changes: 4 additions & 3 deletions code/modules/mechs/components/body.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/obj/item/storage/mech
/obj/item/storage/mech //[INF] Сам багажник меха
w_class = ITEM_SIZE_NO_CONTAINER
max_w_class = ITEM_SIZE_LARGE
storage_slots = 4
Expand All @@ -21,8 +21,9 @@
name = "body"
icon_state = "loader_body"
gender = NEUTER

var/mech_health = 300
//*=======REINFORCES FOR MECH===================
//[INF]ХП корпуса будет зависить от материала, которым обшивают меха. Чем он прочнее (больше Integrity), тем больше мех вытерпливает поджопников до полного разрушения
var/mech_health = 150 //в updatehealth() добавляется хп от укрепления ресурсом.
var/obj/item/cell/cell
var/obj/item/robot_parts/robot_component/diagnosis_unit/diagnostics
var/obj/item/robot_parts/robot_component/armour/exosuit/m_armour
Expand Down
20 changes: 16 additions & 4 deletions code/modules/mechs/mech_damage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
return AR

return def_zone //Careful with effects, mechs shouldn't be stunned

/mob/living/exosuit/hitby(atom/movable/AM, var/datum/thrownthing/TT)
if(LAZYLEN(pilots) && (!hatch_closed || !prob(body.pilot_coverage)))
var/mob/living/pilot = pick(pilots)
Expand All @@ -66,7 +66,7 @@
. += body_armor

/mob/living/exosuit/updatehealth()
maxHealth = body ? body.mech_health : 0
maxHealth = body ? (body.mech_health + material.integrity) : 0 //[INF] Обьяснение логики в code/modules/mechs/components/body
health = maxHealth-(getFireLoss()+getBruteLoss())

/mob/living/exosuit/adjustFireLoss(var/amount, var/obj/item/mech_component/MC = pick(list(arms, legs, body, head)))
Expand Down Expand Up @@ -126,9 +126,21 @@
var/target = zoneToComponent(def_zone)
//Only 3 types of damage concern mechs and vehicles
switch(damagetype)
//==============================================RENFORCE MATERIAL=============================================================
//This code response for mech reiforce - melting(heat), brute and burn defense . Hear writed all material modifiers (Steel - Standart (Brute 7 Burn 7))
if(BRUTE)
//Данная формула использует БРУТ АРМОР материала, которым обшили меха (Его каркас)
var/brute_resist = ((material.brute_armor-7)) // Макс защита - 4 от брута, 8 от бёрна
if(brute_resist > 4)
brute_resist = 4
damage = damage - brute_resist
adjustBruteLoss(damage, target)
if(BURN)
//Данная формула использует БЁРН АРМОР материала, которым обшили меха (Его каркас)
var/burn_resist = ((material.burn_armor-7))
if(burn_resist > 8)
burn_resist = 5
damage = damage - burn_resist
adjustFireLoss(damage, target)
if(IRRADIATE)
for(var/mob/living/pilot in pilots)
Expand All @@ -149,7 +161,7 @@
if(!hatch_closed || (body.pilot_coverage < 100)) //Open, environment is the source
return .
var/list/after_armor = modify_damage_by_armor(null, ., IRRADIATE, DAM_DISPERSED, src, 0, TRUE)
return after_armor[1]
return after_armor[1]

/mob/living/exosuit/getFireLoss()
var/total = 0
Expand Down Expand Up @@ -185,6 +197,6 @@
for(var/thing in pilots)
var/mob/pilot = thing
pilot.emp_act(severity)

/mob/living/exosuit/get_bullet_impact_effect_type(def_zone)
return BULLET_IMPACT_METAL
6 changes: 5 additions & 1 deletion code/modules/mechs/premade/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
name = "combat arms"
exosuit_desc_string = "flexible, advanced manipulators"
icon_state = "combat_arms"
max_damage = 60
melee_damage = 25
action_delay = 10
power_use = 50
Expand All @@ -48,13 +49,15 @@
name = "combat legs"
exosuit_desc_string = "sleek hydraulic legs"
icon_state = "combat_legs"
max_damage = 60
move_delay = 3
turn_delay = 3
power_use = 20

/obj/item/mech_component/sensors/combat
name = "combat sensors"
gender = PLURAL
max_damage = 60
exosuit_desc_string = "high-resolution thermal sensors"
icon_state = "combat_head"
vision_flags = SEE_MOBS
Expand All @@ -67,9 +70,10 @@
software.installed_software = list(MECH_SOFTWARE_WEAPONS)

/obj/item/mech_component/chassis/combat
name = "sealed exosuit chassis"
name = "combat exosuit chassis"
hatch_descriptor = "canopy"
pilot_coverage = 100
max_damage = 100 //[INF]+40 хп
exosuit_desc_string = "an armoured chassis"
icon_state = "combat_body"
power_use = 40
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mechs/premade/heavy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
desc = "Designed to function where any other piece of equipment would have long fallen apart, the Hephaestus Superheavy Lifter series can take a beating and excel at delivering it."
melee_damage = 40
action_delay = 15
max_damage = 90
max_damage = 160
power_use = 60

/obj/item/mech_component/propulsion/heavy
Expand Down Expand Up @@ -65,7 +65,7 @@
pilot_coverage = 100
exosuit_desc_string = "a heavily armoured chassis"
icon_state = "heavy_body"
max_damage = 150
max_damage = 160
mech_health = 500
power_use = 50
has_hardpoints = list(HARDPOINT_BACK)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mechs/premade/light.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
gender = PLURAL
exosuit_desc_string = "advanced sensor array"
icon_state = "light_head"
max_damage = 30
max_damage = 45
vision_flags = SEE_TURFS
see_invisible = SEE_INVISIBLE_NOLIGHTING
power_use = 50
Expand Down
8 changes: 4 additions & 4 deletions code/modules/mechs/premade/powerloader.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@
name = "exosuit arms"
exosuit_desc_string = "heavy-duty industrial lifters"
melee_damage = 25
max_damage = 70
max_damage = 50 //[INF] было 70
power_use = 30
desc = "The Xion Industrial Digital Interaction Manifolds allow you poke untold dangers from the relative safety of your cockpit."

/obj/item/mech_component/propulsion/powerloader
name = "exosuit legs"
exosuit_desc_string = "reinforced hydraulic legs"
desc = "Wide and stable but not particularly fast."
max_damage = 70
max_damage = 50 //[INF] было 70
move_delay = 4
turn_delay = 4
power_use = 10
Expand All @@ -62,7 +62,7 @@
gender = PLURAL
exosuit_desc_string = "simple collision detection sensors"
desc = "A primitive set of sensors designed to work in tandem with most MKI Eyeball platforms."
max_damage = 100
max_damage = 50 //[INF] было 100(чё)
power_use = 0

/obj/item/mech_component/sensors/powerloader/prebuild()
Expand All @@ -76,7 +76,7 @@
pilot_coverage = 40
exosuit_desc_string = "an industrial rollcage"
desc = "A Xion industrial brand roll cage. Technically OSHA compliant. Technically."
max_damage = 100
max_damage = 60 //[INF] Теперь стандартное хп. Карго пузо НЕ должно быть крепче боевой туши
power_use = 0
climb_time = 6

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/living_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
mass = I.w_class/THROWNOBJ_KNOCKBACK_DIVISOR
var/momentum = TT.speed*mass

if(momentum >= THROWNOBJ_KNOCKBACK_SPEED | can_be_buckled)
if(momentum >= THROWNOBJ_KNOCKBACK_SPEED || can_be_buckled)
if(!can_be_buckled)//Not effective vs slimes and mechs
visible_message("<span class='warning'>[O] flyes away from [src]!</span>","<span class='warning'>The projectile was ineffective against you!</span>")
apply_damage(throw_damage*1.4, BRUTE) //[INF] Мехи и слаймы не прибиваются, а просто получают урон. Учтите, он проходит сквозь энергощит меха.
Expand Down
6 changes: 3 additions & 3 deletions infinity/code/modules/mechs/armour.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "tactical combat plating"
desc = "Special combat plating, designed for operating in field of battle."
armor = list(
melee = ARMOR_MELEE_MAJOR + 5, //55
bullet = ARMOR_BALLISTIC_RESISTANT, //65
laser = ARMOR_LASER_MAJOR, //55
melee = ARMOR_MELEE_MAJOR + 5,
bullet = ARMOR_BALLISTIC_RESISTANT,
laser = ARMOR_LASER_MAJOR,
energy = ARMOR_ENERGY_STRONG, //EMP dont work actually
bomb = ARMOR_BOMB_RESISTANT,
bio = ARMOR_BIO_SHIELDED
Expand Down
Loading