Skip to content

Conversation

@GuardianDll
Copy link
Member

@GuardianDll GuardianDll commented Jan 6, 2026

Summary

None

Purpose of change

As part of my another PR (will be pushed in the future) i had to revisit the code for ammo effects, and boy if it's old, so i had to update it, and throw a few additions

Describe the solution

Notable stuff:

  • Moved aoe fields, trail fields and spells to array notation, so now you can define multiple fields/trails/spells to be fired in one effect

  • Removed check_sees and check_sees_radius fields, i blamed them back to the ancient Adds launcher that fires heavily modified mininukes, #4253, and still failed to understand why nukes needed their field radius spawn decreased if player sees it. "i see, therefore nuke_gas spread less"

  • Added aoe_effects to apply effects on all creatures in radius

  • Removed many of ammo_effect::check() since they are now checked on loading, using our new cool bound_readers

  • Moved some stuff in header for padding purposes

  • Switched to use points_in_radius_circ instead of points_in_radius, so that effects will spawn fields in circles, not in rectangles

Before After
image image
  • Separately to it, added a debug view for fields, so i could test stuff more easily
image

Testing

Tested quite extensively as part of that future PR, everything seems to work

Additional context

Liquid attacks probably need to be updated to work with monsters, or at least to be applied to all NPCs, from code it looks it checks the avatar no matter what

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-requesting reviews from non-collaborators: @Standing-Storm

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. Info / User Interface Game - player communication, menus, etc. [JSON] Changes (can be) made in JSON [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. [Markdown] Markdown issues and PRs Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves Mods: Aftershock Anything to do with the Aftershock mod Mods: Xedra Evolved Anything to do with Xedra Evolved Mods: Mind Over Matter json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Jan 6, 2026
@GuardianDll GuardianDll force-pushed the improve_ammo_effect_syntax branch 4 times, most recently from 7e3cec6 to f3ae42a Compare January 6, 2026 14:46
@GuardianDll GuardianDll force-pushed the improve_ammo_effect_syntax branch from f3ae42a to 7c51c0d Compare January 6, 2026 16:32
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 6, 2026
@Maleclypse Maleclypse merged commit 331962b into CleverRaven:master Jan 7, 2026
28 of 39 checks passed
@GuardianDll GuardianDll deleted the improve_ammo_effect_syntax branch January 7, 2026 05:57
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` <Documentation> Design documents, internal info, guides and help. Info / User Interface Game - player communication, menus, etc. Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs Mods: Aftershock Anything to do with the Aftershock mod Mods: Mind Over Matter Mods: Xedra Evolved Anything to do with Xedra Evolved Monsters Monsters both friendly and unfriendly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants