MCPcopy Create free account
hub / github.com/diasurgical/devilution / WitchItemOk

Function WitchItemOk

Source/items.cpp:3485–3510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3483}
3484
3485BOOL WitchItemOk(int i)
3486{
3487 BOOL rv;
3488
3489 rv = FALSE;
3490 if (AllItemsList[i].itype == ITYPE_MISC)
3491 rv = TRUE;
3492 if (AllItemsList[i].itype == ITYPE_STAFF)
3493 rv = TRUE;
3494 if (AllItemsList[i].iMiscId == IMISC_MANA)
3495 rv = FALSE;
3496 if (AllItemsList[i].iMiscId == IMISC_FULLMANA)
3497 rv = FALSE;
3498 if (AllItemsList[i].iSpell == SPL_TOWN)
3499 rv = FALSE;
3500 if (AllItemsList[i].iMiscId == IMISC_FULLHEAL)
3501 rv = FALSE;
3502 if (AllItemsList[i].iMiscId == IMISC_HEAL)
3503 rv = FALSE;
3504 if (AllItemsList[i].iSpell == SPL_RESURRECT && gbMaxPlayers == 1)
3505 rv = FALSE;
3506 if (AllItemsList[i].iSpell == SPL_HEALOTHER && gbMaxPlayers == 1)
3507 rv = FALSE;
3508
3509 return rv;
3510}
3511
3512int RndWitchItem(int lvl)
3513{

Callers 1

RndWitchItemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected