mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
Nullkiller: initial decomposition
This commit is contained in:
committed by
Andrii Danylchenko
parent
223a52b3d1
commit
8f8c5ca255
@@ -26,24 +26,24 @@ bool BuildBoat::operator==(const BuildBoat & other) const
|
||||
{
|
||||
return shipyard->o->id == other.shipyard->o->id;
|
||||
}
|
||||
|
||||
TSubgoal BuildBoat::decomposeSingle() const
|
||||
{
|
||||
if(cb->getPlayerRelations(ai->playerID, shipyard->o->tempOwner) == PlayerRelations::ENEMIES)
|
||||
{
|
||||
return sptr(CaptureObjectsBehavior(shipyard->o));
|
||||
}
|
||||
|
||||
if(shipyard->shipyardStatus() != IShipyard::GOOD)
|
||||
{
|
||||
throw cannotFulfillGoalException("Shipyard is busy.");
|
||||
}
|
||||
|
||||
TResources boatCost;
|
||||
shipyard->getBoatCost(boatCost);
|
||||
|
||||
return iAmElementar();
|
||||
}
|
||||
//
|
||||
//TSubgoal BuildBoat::decomposeSingle() const
|
||||
//{
|
||||
// if(cb->getPlayerRelations(ai->playerID, shipyard->o->tempOwner) == PlayerRelations::ENEMIES)
|
||||
// {
|
||||
// return sptr(CaptureObjectsBehavior(shipyard->o));
|
||||
// }
|
||||
//
|
||||
// if(shipyard->shipyardStatus() != IShipyard::GOOD)
|
||||
// {
|
||||
// throw cannotFulfillGoalException("Shipyard is busy.");
|
||||
// }
|
||||
//
|
||||
// TResources boatCost;
|
||||
// shipyard->getBoatCost(boatCost);
|
||||
//
|
||||
// return iAmElementar();
|
||||
//}
|
||||
|
||||
void BuildBoat::accept(VCAI * ai)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user