mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
More human-readable messages for simturns contact attempts
This commit is contained in:
@@ -1136,16 +1136,16 @@ bool CGameHandler::moveHero(ObjectInstanceID hid, int3 dst, ui8 teleporting, boo
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (guardian && getVisitingHero(guardian) != nullptr)
|
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)
|
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 &&
|
if (objectToVisit &&
|
||||||
objectToVisit->getOwner().isValidPlayer() &&
|
objectToVisit->getOwner().isValidPlayer() &&
|
||||||
getPlayerRelations(objectToVisit->getOwner(), h->getOwner()) == PlayerRelations::ENEMIES &&
|
getPlayerRelations(objectToVisit->getOwner(), h->getOwner()) == PlayerRelations::ENEMIES &&
|
||||||
!turnOrder->isContactAllowed(objectToVisit->getOwner(), h->getOwner()))
|
!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
|
//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)
|
//OR hero is on land and dest is water and (there is not present only one object - boat)
|
||||||
|
Reference in New Issue
Block a user