1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

More human-readable messages for simturns contact attempts

This commit is contained in:
Ivan Savenko 2024-01-13 19:40:19 +02:00
parent 4f44276dd3
commit 397da95969

View File

@ -1136,16 +1136,16 @@ bool CGameHandler::moveHero(ObjectInstanceID hid, int3 dst, ui8 teleporting, boo
};
if (guardian && getVisitingHero(guardian) != nullptr)
return complainRet("Cannot move hero, destination monster is busy!");
return complainRet("You cannot move your hero there. Simultaneous turns are active and another player is interacting with this wandering monster!");
if (objectToVisit && getVisitingHero(objectToVisit) != nullptr && getVisitingHero(objectToVisit) != h)
return complainRet("Cannot move hero, destination object is busy!");
return complainRet("You cannot move your hero there. Simultaneous turns are active and another player is interacting with this map object!");
if (objectToVisit &&
objectToVisit->getOwner().isValidPlayer() &&
getPlayerRelations(objectToVisit->getOwner(), h->getOwner()) == PlayerRelations::ENEMIES &&
!turnOrder->isContactAllowed(objectToVisit->getOwner(), h->getOwner()))
return complainRet("Cannot move hero, destination player is busy!");
return complainRet("You cannot move your hero there. This object belongs to another player and simultaneous turns are still active!");
//it's a rock or blocked and not visitable tile
//OR hero is on land and dest is water and (there is not present only one object - boat)