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

Armor reimplementation & formula rework & penetration #6319

Merged
merged 20 commits into from
Apr 2, 2021

Conversation

Lizurt
Copy link
Contributor

@Lizurt Lizurt commented Mar 31, 2021

Purpose

fixes #6288

Highlights
  • Damage to a body part protected by multiple armor is now calculated using the formula: InitialDamage * armor1 * armor2 * ... * ArmorN = damageDealt instead of InitialDamage * (Armor1 + Armor2 + ... + armorN).
  • WearableArmor now protects specific body parts with specific protection options. This makes it possible to make modular armor.
  • WearableArmor's armor bit mask (enums) have been replaced with BodyPart's enum.
  • The armor of the body parts now extends not only to the organs(for example, it is logical that the xenomorph's exoskeleton will be stronger than a pathetic human skin).
  • Bullects can now penetrate armor

It was tested on headless server and seems to work fine.

Notes:

Changelog:

CL: Armor system was reworked

@corp-0
Copy link
Member

corp-0 commented Mar 31, 2021

WearableArmor's armor bit mask (enums) have been replaced with BodyPart's enum.

does this mean armor can only protect one body part at a time? The intention of the bitflags was recreating how they behave in byond where you actually use bitflags to determine what body parts a particular armor piece protects.

@corp-0
Copy link
Member

corp-0 commented Mar 31, 2021

Nevermind just read it is using a list now

@Lizurt
Copy link
Contributor Author

Lizurt commented Mar 31, 2021

Should I edit prefabs or assets here for armor penetration and armor or is it better to do it in a separate PR?

@corp-0
Copy link
Member

corp-0 commented Mar 31, 2021

Uhm, you can do it here but if you can bundle the prefab changes in a commit separated from code changes, I'd love you to all eternity.

@Lizurt Lizurt changed the title [WiP] Armor reimplementation & formula rework & (wip) penetration [WiP] Armor reimplementation & formula rework & penetration Mar 31, 2021
@Lizurt Lizurt marked this pull request as ready for review April 1, 2021 15:52
@Lizurt
Copy link
Contributor Author

Lizurt commented Apr 1, 2021

It looks like that's all. The PR is ready for review

@Lizurt Lizurt changed the title [WiP] Armor reimplementation & formula rework & penetration Armor reimplementation & formula rework & penetration Apr 1, 2021
@PerfectTangent
Copy link
Contributor

PerfectTangent commented Apr 1, 2021

How is negative armor handled? Does it increase damage taken in the same manner that positive armor reduces it?

@Bod9001
Copy link
Member

Bod9001 commented Apr 1, 2021

You mean negative armour, humm yeah multiplies it

@corp-0
Copy link
Member

corp-0 commented Apr 1, 2021

do we ever want to allow negative damage tho? I think healing should be done using its own interface rather than making negative damage.

@corp-0
Copy link
Member

corp-0 commented Apr 1, 2021

nevermind I just read Bod's answer.

@Bod9001 Bod9001 merged commit 4e235aa into unitystation:develop Apr 2, 2021
@Bod9001
Copy link
Member

Bod9001 commented Apr 2, 2021

dam it, forgot to check before merging xD, ClothingArmors isn't used anywhere

@Bod9001
Copy link
Member

Bod9001 commented Apr 2, 2021

it's okay it's used I was just a dumb dumb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
System: Damage Relating to damage system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Armor formula rework and reimplementation B:55
4 participants