Skip to content

Set ADD_ITEM_EQEFFECT defaults to target 1 and timing 2 - #371

Open
4Luke4 wants to merge 1 commit into
WeiDUorg:develfrom
4Luke4:agent/add-item-eqeffect-defaults
Open

Set ADD_ITEM_EQEFFECT defaults to target 1 and timing 2#371
4Luke4 wants to merge 1 commit into
WeiDUorg:develfrom
4Luke4:agent/add-item-eqeffect-defaults

Conversation

@4Luke4

@4Luke4 4Luke4 commented Jul 27, 2026

Copy link
Copy Markdown

Summary

  • change the built-in ADD_ITEM_EQEFFECT function defaults from target = 0 and timing = 0 to target = 1 and timing = 2
  • document the function-specific defaults in doc/base.tex
  • clarify the general macro/function defaults documentation so that function-specific exceptions are documented with the corresponding function
  • add a release-note entry for version 251

Rationale

ADD_ITEM_EQEFFECT adds an equipping effect to an item. When callers omit the target and timing parameters, the built-in patch-function wrapper should supply the appropriate equipping-effect defaults:

  • target = 1 (Self)
  • timing = 2 (Instant/While equipped)

The change is intentionally limited to DEFINE_PATCH_FUNCTION ~ADD_ITEM_EQEFFECT~.

The shared ADD_ITEM_EQEFFECT macro remains unchanged because it is also used by ADD_SPELL_CFEFFECT. Consequently, ADD_SPELL_CFEFFECT retains its existing target = 0 and timing = 0 defaults, and the shared macro's field-writing and cleanup behavior is unaffected.

Validation

  • verified that ADD_ITEM_EQEFFECT defaults to target = 1 and timing = 2
  • verified that ADD_SPELL_CFEFFECT remains at target = 0 and timing = 0
  • verified that the shared ADD_ITEM_EQEFFECT macro's field writes and cleanup values remain unchanged
  • verified all corresponding documentation references
  • verified the version 251 release-note entry
  • ran git diff --check
  • successfully built WeiDU on Ubuntu 22.04 with OCaml 4.14.2, ocaml-option-default-unsafe-string, and Elkhound 1.0.3

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.

1 participant