- States.ClosestHouse/Unit/Group should have new parameter, type of house, unit etc. Example: Actions.HouseAddDamage(States.ClosestHouse(0, 11, 27, 26), 200); //add damage=200 to closest from point (26, 27) STOREHOUSE
That sounds good, and I have an extension to your idea: Let's make the type a set, so you can specific multiple types that should be accepted
For example, to make a group attack the nearest storehouse, barracks, school or inn (closest house which is one of those types), use:
Actions.GroupOrderAttackHouse(States.ClosestHouse(0, 110, 120, [11, 21, 13, 27]), MyGroup);
I think that would be useful in some situations, and it's not hard to implement.
MapObjectAdd(X,Y,Type)
MapObjectDelete(X,Y)
MapTileChange(X,Y,Type)
MapTileBlock(X,Y)
We want to support dynamic map changing, but we need to be careful because it would be very easy to crash the game if you block a unit or something. We'll probably just make the actions fail (return false) if executing them would cause the game to crash. So they could be used in situations where you know there will not be any units around to be blocked.
MapTileType(X,Y)
MapTileIsWalkable(X,Y)
MapTileIsGoodForCorn(X,Y)
We'll probably add these things when we add the actions for editing the map.
- Event OnMarketTrade, Action MarketTradeStart(player, from, to, count: Integer)
Good idea, we'll add these:
OnMarketTrade(aMarket, aFrom, aTo)
Actions.MarketTradeSet(aMarket, aFrom, aTo, aAmount)
States.MarketValue(aResource)
- more options for AI: defend allies, auto attack range, start position...
Accepted.
EDIT: I want to remove OnUnitWounded, since wounds (hit points) are a hidden gameplay mechanic and there is no other way to interact with them at all. I don't see a time where OnUnitWounded would be useful. Any objections to me removing it?