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

Function M_StartHeal

Source/monster.cpp:1832–1847  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1830}
1831
1832void M_StartHeal(int i)
1833{
1834 MonsterStruct *Monst;
1835
1836 if ((DWORD)i >= MAXMONSTERS)
1837 app_fatal("M_StartHeal: Invalid monster %d", i);
1838 if (monster[i].MType == NULL)
1839 app_fatal("M_StartHeal: Monster %d \"%s\" MType NULL", i, monster[i].mName);
1840
1841 Monst = &monster[i];
1842 Monst->_mAnimData = Monst->MType->Anims[MA_SPECIAL].Data[Monst->_mdir];
1843 Monst->_mAnimFrame = Monst->MType->Anims[MA_SPECIAL].Frames;
1844 Monst->_mFlags |= MFLAG_LOCK_ANIMATION;
1845 Monst->_mmode = MM_HEAL;
1846 Monst->_mVar1 = Monst->_mmaxhp / (16 * (random_(97, 5) + 4));
1847}
1848
1849void M_ChangeLightOffset(int monst)
1850{

Callers 1

MAI_GargFunction · 0.85

Calls 2

app_fatalFunction · 0.85
random_Function · 0.85

Tested by

no test coverage detected