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

Function CanTargetMonster

SourceX/controls/plrctrls.cpp:177–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177bool CanTargetMonster(int mi)
178{
179 const auto &monst = monster[mi];
180
181 if (monst._mFlags & (MFLAG_HIDDEN | MFLAG_GOLEM))
182 return false;
183 if (monst._mhitpoints >> 6 <= 0) // dead
184 return false;
185
186 const int mx = monst._mx;
187 const int my = monst._my;
188 if (!(dFlags[mx][my] & BFLAG_LIT)) // not visable
189 return false;
190 if (dMonster[mx][my] == 0)
191 return false;
192
193 return true;
194}
195
196void FindRangedTarget()
197{

Callers 2

FindRangedTargetFunction · 0.85
FindMeleeTargetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected