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

Function SpawnBoy

Source/items.cpp:3631–3649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3629}
3630
3631void SpawnBoy(int lvl)
3632{
3633 int itype;
3634
3635 if (boylevel<lvl>> 1 || boyitem._itype == ITYPE_NONE) {
3636 do {
3637 item[0]._iSeed = GetRndSeed();
3638 SetRndSeed(item[0]._iSeed);
3639 itype = RndBoyItem(lvl) - 1;
3640 GetItemAttrs(0, itype, lvl);
3641 GetItemBonus(0, itype, lvl, 2 * lvl, TRUE);
3642 } while (item[0]._iIvalue > 90000);
3643 boyitem = item[0];
3644 boyitem._iCreateInfo = lvl | 0x1000;
3645 boyitem._iIdentified = TRUE;
3646 boyitem._iStatFlag = StoreStatOk(&boyitem);
3647 boylevel = lvl >> 1;
3648 }
3649}
3650
3651BOOL HealerItemOk(int i)
3652{

Callers 1

SetupTownStoresFunction · 0.85

Calls 6

GetRndSeedFunction · 0.85
SetRndSeedFunction · 0.85
RndBoyItemFunction · 0.85
GetItemAttrsFunction · 0.85
GetItemBonusFunction · 0.85
StoreStatOkFunction · 0.85

Tested by

no test coverage detected