add minigames

This commit is contained in:
SilicaAndPina 2020-11-05 10:51:20 +13:00
parent 34460e6967
commit 73b4e073ff
9 changed files with 10044 additions and 9485 deletions

View file

@ -65,14 +65,20 @@ namespace HISP.Game
if (tileDepth == 3)
overlayPassable = true;
bool tilePassable = false;
if (terrainPassable || overlayPassable && otileId != 0)
tilePassable = true;
if ((!terrainPassable && overlayPassable) && otileId == 0)
return false;
if (!overlayPassable)
return false;
if (!terrainPassable)
return false;
Logger.DebugPrint("Overlay: " + otileId + " Terrain: " + tileId);
return tilePassable;
return true;
}
public static void OpenMap()

View file

@ -141,7 +141,6 @@ namespace HISP.Game
return NpcInformationButton.Replace("%ID%", npcId.ToString());
}
public static string FormatNpcReply(string replyText, int replyId)
{
return NpcReplyFormat.Replace("%TEXT%", replyText).Replace("%ID%", replyId.ToString());
@ -202,6 +201,8 @@ namespace HISP.Game
{
return GrabItemFormat.Replace("%ICONID%",iconid.ToString()).Replace("%ITEMNAME%", name).Replace("%RANDOMID%", randomid.ToString());
}
public static string FormatTransportMessage(string method, string place, int cost, int id, int x, int y)
{
string xy = "";

View file

@ -167,6 +167,18 @@ namespace HISP.Game
return true;
};
}
public static bool DoesQuestExist(int id)
{
try
{
GetQuestById(id);
return true;
}
catch(KeyNotFoundException)
{
return false;
}
}
public static QuestEntry GetQuestById(int id)
{
foreach(QuestEntry quest in QuestList)