/** * Check to see if you can call the monster */ bool can_call_monster(int y, int x, struct monster *mon) { int oy, ox; /* Skip dead monsters */ if (!mon->race) return (false); /* Only consider callable monsters */ if (!summon_specific_okay(mon->race)) return (false); /* Extract monster location */ oy = mon->fy; ox = mon->fx; /* Make sure the summoned monster is not in LOS of the summoner */ if (los(cave, y, x, oy, ox)) return (false); return (true); }
/** * Check to see if you can call the monster */ bool can_call_monster(int y, int x, monster_type *m_ptr) { int oy, ox; /* Skip dead monsters */ if (!m_ptr->race) return (FALSE); /* Only consider callable monsters */ if (!summon_specific_okay(m_ptr->race)) return (FALSE); /* Extract monster location */ oy = m_ptr->fy; ox = m_ptr->fx; /* Make sure the summoned monster is not in LOS of the summoner */ if (los(cave, y, x, oy, ox)) return (FALSE); return (TRUE); }