-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Infrastructure for Energy Shield type Armor #77520
Merged
Maleclypse
merged 6 commits into
CleverRaven:master
from
John-Candlebury:afs-cool-shields2
Nov 12, 2024
Merged
Infrastructure for Energy Shield type Armor #77520
Maleclypse
merged 6 commits into
CleverRaven:master
from
John-Candlebury:afs-cool-shields2
Nov 12, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
<Documentation>
Design documents, internal info, guides and help.
[JSON]
Changes (can be) made in JSON
[C++]
Changes (can be) made in C++. Previously named `Code`
[Markdown]
Markdown issues and PRs
Melee
Melee weapons, tactics, techniques, reach attack
Items: Armor / Clothing
Armor and clothing
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
labels
Nov 2, 2024
I can't understand how |
github-actions
bot
added
astyled
astyled PR, label is assigned by github actions
json-styled
JSON lint passed, label assigned by github actions
labels
Nov 2, 2024
It doesnt do anything but record the max hp if you want a regen HP eoc for the shield. (which you need to code yourself) |
John-Candlebury
commented
Nov 2, 2024
Writing it here so i won't forget about it, but i have #77515, so whoever pr will be merged last (and i suspect your PR would be merged first) would need to update the code |
John-Candlebury
force-pushed
the
afs-cool-shields2
branch
from
November 9, 2024 14:11
241d623
to
e100653
Compare
github-actions
bot
added
the
BasicBuildPassed
This PR builds correctly, label assigned by github actions
label
Nov 10, 2024
GuardianDll
added a commit
to GuardianDll/Cataclysm-DDA
that referenced
this pull request
Nov 12, 2024
Maleclypse
pushed a commit
that referenced
this pull request
Nov 17, 2024
* get rid of npctalk_var_ prefix for eoc variables * cleanup after #77055 * deprecate more of type and context * migrate item vars, make migration happen only once * doc updates * migrate u/npc/monster variables * fix context var migration * remove `substr( 12 )` in math parser * move migration to a single function where possible * no auto * please clang * Please clang more * fix submap load test * clean up after #77656 * cleanups after #77520
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
astyled
astyled PR, label is assigned by github actions
BasicBuildPassed
This PR builds correctly, label assigned by github actions
[C++]
Changes (can be) made in C++. Previously named `Code`
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
<Documentation>
Design documents, internal info, guides and help.
Items: Armor / Clothing
Armor and clothing
[JSON]
Changes (can be) made in JSON
json-styled
JSON lint passed, label assigned by github actions
[Markdown]
Markdown issues and PRs
Melee
Melee weapons, tactics, techniques, reach attack
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Infrastructure "Add a new Energy Shield type of armor for use in mods."
Purpose of change
I mostly want this for Aftershock energy shields. but it has clear applications for the rest of our magic mods.
Describe the solution
Energy shields work just like normal armor. The only difference is that they dont degrade with attacks, they instead have a health pool, tracked by the dialogue variable
ENERGY_SHIELD_HP
that gets depleted by blocked damage. With the shield instantly breaking down when it reaches zero. Energy shields take 1 hp damage for every point of damage they block.They also have a second variable
ENERGY_SHIELD_MAX_HP
if you want to make the item regen HP using EOCs.You'll need to both define an
energy_shield_max_hp
> 0 and give an item theENERGY_SHIELD
flag if you want it to behave like a shield.Describe alternatives you've considered
Increasing the hardcoded behaviors of the shields but I think the ability to modify their Hp variables with EOCs is enough.
Testing
Spawn and wear a weak energy shield item, which protects only agains ballistic damage. Get hit by a zombie and notice no degradation. Get shot by a MP5 turret, recieve no damage and watch the shield collapse.