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

Function induced_align

src/dungeon.c:1998–2014  ·  view source on GitHub ↗

return an alignment mask */

Source from the content-addressed store, hash-verified

1996
1997/* return an alignment mask */
1998unsigned int
1999induced_align(int pct)
2000{
2001 s_level *lev = Is_special(&u.uz);
2002 aligntyp al;
2003
2004 if (lev && lev->flags.align)
2005 if (rn2(100) < pct)
2006 return lev->flags.align;
2007
2008 if (svd.dungeons[u.uz.dnum].flags.align)
2009 if (rn2(100) < pct)
2010 return svd.dungeons[u.uz.dnum].flags.align;
2011
2012 al = rn2(3) - 1;
2013 return Align2amask(al);
2014}
2015
2016boolean
2017Invocation_lev(d_level *lev)

Callers 2

mktempleFunction · 0.85
sp_amask_to_amaskFunction · 0.85

Calls 2

Is_specialFunction · 0.85
rn2Function · 0.85

Tested by

no test coverage detected