Skip to content

Shot cfg format#4732

Open
PieterVdc wants to merge 5 commits intodkfans:masterfrom
PieterVdc:shot_cfg_format
Open

Shot cfg format#4732
PieterVdc wants to merge 5 commits intodkfans:masterfrom
PieterVdc:shot_cfg_format

Conversation

@PieterVdc
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 5, 2026 17:03
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the “shot” configuration format/parsing to use the generic named-field parser and consolidates several per-shot boolean settings into ShotModelFlags, alongside updating magic.cfg to use named (string) logic identifiers.

Changes:

  • Migrates shot parsing from the bespoke parse_magic_shot_blocks() implementation to parse_named_field_blocks() using a new magic_shot_named_fields_set.
  • Moves no_air_damage, wind_immune, fixed_damage, and hidden_projectile into ShotConfigStats::model_flags (new ShMF_* bits) and updates gameplay code to read from flags.
  • Updates config/fxdata/magic.cfg to use named values (e.g., Default, Beam, Lightning) for FireLogic/UpdateLogic.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/thing_traps.c Switches fixed-damage behavior check to ShMF_FixedDamage.
src/thing_shots.c Uses new ShMF_* flags for air-damage, wind immunity, and hidden projectile; adds a direct include for shot flag definitions.
src/thing_creature.c Switches fixed-damage behavior check to ShMF_FixedDamage.
src/config_magic.h Adds new ShMF_* bits; removes legacy per-shot boolean fields; updates hit-effect model type.
src/config_magic.c Replaces legacy shot parser with named-field parsing; introduces named commands for properties/withstand/logics.
config/fxdata/magic.cfg Updates shot logic fields from numeric IDs to named strings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/thing_shots.c Outdated
Comment thread src/config_magic.c
Comment thread src/config_magic.c
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants