MCPcopy Create free account
hub / github.com/NetHack/NetHack / msummon_environ

Function msummon_environ

src/mondata.c:1448–1495  ·  view source on GitHub ↗

similar to on_fire(); creature is summoned in a cloud of */

Source from the content-addressed store, hash-verified

1446
1447/* similar to on_fire(); creature is summoned in a cloud of <something> */
1448const char *
1449msummon_environ(struct permonst *mptr, const char **cloud)
1450{
1451 const char *what;
1452 int mndx = ((mptr->mlet == S_ANGEL) ? PM_ANGEL
1453 : (mptr->mlet == S_LIGHT) ? PM_YELLOW_LIGHT
1454 : monsndx(mptr));
1455
1456 *cloud = "cloud"; /* default is "cloud of <something>" */
1457 switch (mndx) {
1458 case PM_WATER_DEMON:
1459 case PM_AIR_ELEMENTAL:
1460 case PM_WATER_ELEMENTAL:
1461 case PM_FOG_CLOUD:
1462 case PM_ICE_VORTEX:
1463 case PM_FREEZING_SPHERE:
1464 what = "vapor";
1465 break;
1466 case PM_STEAM_VORTEX:
1467 what = "steam";
1468 break;
1469 case PM_ENERGY_VORTEX:
1470 case PM_SHOCKING_SPHERE:
1471 *cloud = "shower"; /* "shower of sparks" instead of "cloud of..." */
1472 what = "sparks";
1473 break;
1474 case PM_EARTH_ELEMENTAL:
1475 case PM_DUST_VORTEX:
1476 what = "dust";
1477 break;
1478 case PM_FIRE_ELEMENTAL:
1479 case PM_FIRE_VORTEX:
1480 case PM_FLAMING_SPHERE:
1481 /*case PM_SALAMANDER:*/
1482 *cloud = "ball"; /* "ball of flame" instead of "cloud of..." */
1483 what = "flame";
1484 break;
1485 case PM_ANGEL: /* actually any 'A'-class */
1486 case PM_YELLOW_LIGHT: /* any 'y'-class */
1487 *cloud = "flash"; /* "flash of light" instead of "cloud of..." */
1488 what = "light";
1489 break;
1490 default:
1491 what = "smoke";
1492 break;
1493 }
1494 return what;
1495}
1496
1497/*
1498 * Returns:

Callers 1

msummonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected