CleverRaven/Cataclysm-DDA
GitHub で見るJSONify traps, or at least allow EOCs with them
Open
#70,467 opened on 2023年12月27日
<Suggestion / Discussion>EOC: Effects On ConditionFields / Furniture / Terrain / TrapsHelp Wanted[C++]
Repository metrics
- Stars
- (9,264 stars)
- PR merge metrics
- (平均マージ 6d 5h) (30d で 292 merged PRs)
説明
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