Use Rune Bomb or Cathedral Map to open Hive or Crypt
This commit is contained in:
parent
eb3012cc0d
commit
ab13fba13f
4 changed files with 70 additions and 29 deletions
|
|
@ -30,6 +30,7 @@
|
|||
#include "options.h"
|
||||
#include "player.h"
|
||||
#include "stores.h"
|
||||
#include "town.h"
|
||||
#include "utils/language.h"
|
||||
#include "utils/math.h"
|
||||
#include "utils/stdcompat/algorithm.hpp"
|
||||
|
|
@ -4421,6 +4422,30 @@ void UseItem(int p, item_misc_id mid, spell_id spl)
|
|||
}
|
||||
}
|
||||
|
||||
bool UseItemOpensHive(const Item &item, Point position)
|
||||
{
|
||||
if (item.IDidx != IDI_RUNEBOMB)
|
||||
return false;
|
||||
for (auto dir : PathDirs) {
|
||||
Point adjacentPosition = position + dir;
|
||||
if (OpensHive(adjacentPosition))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool UseItemOpensCrypt(const Item &item, Point position)
|
||||
{
|
||||
if (item.IDidx != IDI_MAPOFDOOM)
|
||||
return false;
|
||||
for (auto dir : PathDirs) {
|
||||
Point adjacentPosition = position + dir;
|
||||
if (OpensGrave(adjacentPosition))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void SpawnSmith(int lvl)
|
||||
{
|
||||
constexpr int PinnedItemCount = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue