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

Function WitchBookLevel

Source/items.cpp:3551–3567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3549}
3550
3551void WitchBookLevel(int ii)
3552{
3553 int slvl;
3554
3555 if (witchitem[ii]._iMiscId == IMISC_BOOK) {
3556 witchitem[ii]._iMinMag = spelldata[witchitem[ii]._iSpell].sMinInt;
3557 slvl = plr[myplr]._pSplLvl[witchitem[ii]._iSpell];
3558 while (slvl) {
3559 witchitem[ii]._iMinMag += 20 * witchitem[ii]._iMinMag / 100;
3560 slvl--;
3561 if (witchitem[ii]._iMinMag + 20 * witchitem[ii]._iMinMag / 100 > 255) {
3562 witchitem[ii]._iMinMag = 255;
3563 slvl = 0;
3564 }
3565 }
3566 }
3567}
3568
3569void SpawnWitch(int lvl)
3570{

Callers 2

CalcPlrBookValsFunction · 0.85
SpawnWitchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected