Make hero polyed into fog cloud emit clouds

Also prevent cloud creation giving a message, if it was a single
cloud on hero and deals no damage.
This commit is contained in:
Pasi Kallinen
2024-04-04 12:15:39 +03:00
parent 7f1bbdfb0e
commit f0fdd3c371
5 changed files with 28 additions and 6 deletions

View File

@@ -1143,6 +1143,13 @@ create_gas_cloud(coordxy x, coordxy y, int cloudsize, int damage)
int newidx = 1; /* initial spot is already taken */
boolean inside_cloud = is_hero_inside_gas_cloud();
/* a single-point cloud on hero and it deals no damage.
probably a natural cause of being polyed. don't message about it */
if (!gc.context.mon_moving && u_at(x, y) && cloudsize == 1
&& (!damage
|| (damage && m_poisongas_ok(&gy.youmonst) == M_POISONGAS_OK)))
inside_cloud = TRUE;
if (cloudsize > MAX_CLOUD_SIZE) {
impossible("create_gas_cloud: cloud too large (%d)!", cloudsize);
cloudsize = MAX_CLOUD_SIZE;