Allow specifying an AD type for generic clouds to do damage with, change display color, and change glyph description. Implement confused stinking cloud scroll effect creating one of these generic clouds from a small pool of elemental AD types.
Implemented handling of leaves_cloud zap_data zaps of non AD_DRST adtyp to use generic cloud handling instead of impossibling.
This maintains backwards compatibility with handling for old cloud types, including their cmap display glyphs.
I did a lot of stuff to make this work that should be noted for technical reasons.
Cloud glyph space exists for every AD type, there is now a NUM_AD_TYPES constant defined that needs to continue to represent this
xengulfhurty was reworked to not require a magr. I may have missed a spot or two. I hope not. This is used for generic AD type cloud hurting monsters/players, and the cloud isn't a monster struct, so we just pass no magr.
I like that the vanilla nethack has well defined indicators for a static analyzer for what parameters of functions can be null. I think. we should get that. it would be cool.
zap_glyph_color is used when displaying cloud glyphs to map their AD type to a CLR constant. This should probably be changed long term to have a more generic AD type to CLR constant lookup function that is used to back both of these use cases.
get_description_of_damage_type is used when describing a cloud type glyph. This works for the simple elemental cases, but there are a ton it sounds awkward for. We need better adtyp->noun description of what it does mapping. The words used for those have no consistency in part of speech, plurality, etc.
To make sure a "new" AD type cloud is supportable and can actually see use in game without causing issues, here is what needs to happen:
xengulfhurty for the AD type needs to be implemented and not rely on a magr ptr being present and message sanely for being in a cloud and not in a monster
zap_glyph_color needs to support this AD type
get_description_of_damage_type needs to have a relatively reasonable string for describing the glyph of a cloud of this type as a "%s cloud"
Allow specifying an AD type for generic clouds to do damage with, change display color, and change glyph description. Implement confused stinking cloud scroll effect creating one of these generic clouds from a small pool of elemental AD types. Implemented handling of leaves_cloud zap_data zaps of non AD_DRST adtyp to use generic cloud handling instead of impossibling. This maintains backwards compatibility with handling for old cloud types, including their cmap display glyphs.
I did a lot of stuff to make this work that should be noted for technical reasons.
To make sure a "new" AD type cloud is supportable and can actually see use in game without causing issues, here is what needs to happen: