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

Function mkportal

src/mkmaze.c:1463–1479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1461}
1462
1463void
1464mkportal(coordxy x, coordxy y, xint16 todnum, xint16 todlevel)
1465{
1466 /* a portal "trap" must be matched by a
1467 portal in the destination dungeon/dlevel */
1468 struct trap *ttmp = maketrap(x, y, MAGIC_PORTAL);
1469
1470 if (!ttmp) {
1471 impossible("portal on top of portal?");
1472 return;
1473 }
1474 debugpline4("mkportal: at <%d,%d>, to %s, level %d", x, y,
1475 svd.dungeons[todnum].dname, todlevel);
1476 ttmp->dst.dnum = todnum;
1477 ttmp->dst.dlevel = todlevel;
1478 return;
1479}
1480
1481/* augment the Plane of Fire; called from goto_level() when arriving and
1482 moveloop_core() when on the level */

Callers 2

place_branchFunction · 0.85
put_lregion_hereFunction · 0.85

Calls 2

maketrapFunction · 0.85
impossibleFunction · 0.70

Tested by

no test coverage detected