Fixed capturing holy artefact under the shrine.

Thanks to Sahar.
This commit is contained in:
MobiusDevelopment
2019-11-07 23:34:43 +00:00
parent 7ba832c6a7
commit 6e1df8a43a
103 changed files with 391 additions and 208 deletions

View File

@ -358,7 +358,7 @@ public class GeoEngine
*/
public boolean canSeeTarget(WorldObject origin, WorldObject target)
{
if (target.isDoor() || (target.isCreature() && ((Creature) target).isFlying()))
if (target.isDoor() || target.isArtefact() || (target.isCreature() && ((Creature) target).isFlying()))
{
return true;
}

View File

@ -292,6 +292,15 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
return false;
}
/**
* Verify if object is instance of ArtefactInstance.
* @return {@code true} if object is instance of ArtefactInstance, {@code false} otherwise
*/
public boolean isArtefact()
{
return false;
}
/**
* Verify if object is instance of MonsterInstance.
* @return {@code true} if object is instance of MonsterInstance, {@code false} otherwise

View File

@ -54,9 +54,12 @@ public class ArtefactInstance extends Npc
getCastle().registerArtefact(this);
}
/**
* Return False.
*/
@Override
public boolean isArtefact()
{
return true;
}
@Override
public boolean isAutoAttackable(Creature attacker)
{