MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / FindValidShrine

Function FindValidShrine

Source/objects.cpp:3293–3305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3291}
3292
3293int FindValidShrine()
3294{
3295 for (;;) {
3296 int rv = GenerateRnd(gbIsHellfire ? NumberOfShrineTypes : 26);
3297 if (currlevel < shrinemin[rv] || currlevel > shrinemax[rv] || rv == ShrineThaumaturgic)
3298 continue;
3299 if (gbIsMultiplayer && shrineavail[rv] == ShrineTypeSingle)
3300 continue;
3301 if (!gbIsMultiplayer && shrineavail[rv] == ShrineTypeMulti)
3302 continue;
3303 return rv;
3304 }
3305}
3306
3307void OperateGoatShrine(Player &player, Object &object, _sfx_id sType)
3308{

Callers 2

OperateGoatShrineFunction · 0.85
OperateCauldronFunction · 0.85

Calls 1

GenerateRndFunction · 0.85

Tested by

no test coverage detected