CleverRaven/Cataclysm-DDA

JSONify traps, or at least allow EOCs with them

Open

#70.467 geöffnet am 27. Dez. 2023

Auf GitHub ansehen
 (2 Kommentare) (4 Reaktionen) (0 zugewiesene Personen)C++ (3.991 Forks)batch import
<Suggestion / Discussion>EOC: Effects On ConditionFields / Furniture / Terrain / TrapsHelp Wanted[C++]

Repository-Metriken

Stars
 (9.264 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6T 5h) (292 gemergte PRs in 30 T)

Beschreibung

Is your feature request related to a problem? Please describe.

Currently, all traps need a hardcoded C++ function for them to work at all, e.g "action": "bubble". Making new traps is thus quite complicated. Although you can use spells for them, the difficulty remains.

Solution you would like.

It would be cool to have something like the following. This is includes everything and the kitchen sink for every possibility, so not everything may make sense but you get the rough direction.

"action": "trap",
"trap": [
  {
    "damage": 5,
    "damage_type": "stab",
    "chance_to_break_trap": 5.1,
    "targeted_bodyparts": { "legs": 99.9, "head": 0, "torso": 10 },
    "apply_effect": { "effect": "effect", "probability_to_inflict": 9.9, "length": [ 15, 20 ] }, 
    "cast_spell": { "..." },
    "run_eoc": { "..." }
  },
  { "run_eoc": "stepped_in_trap_demo" }
]

Describe alternatives you have considered.

No response

Additional context

No response

Contributor Guide