1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00
Commit Graph

3037 Commits

Author SHA1 Message Date
d3c8ca7c1c Pathfinding: implement duration checking for fly and water walking
Now pathfinder take into account different bonuses for different tuns. So if you only have FLYING_MOVEMENT bonus from Fly spell for one turn then pathfinder will only let you use air layer within one turn only.

That work for cost calculations too. Let's say you have two bonuses:
 - FLYING_MOVEMENT with 20% penalty for next 2 turns
 - FLYING_MOVEMENT with 40% penalty for 5 turns
Now pathfinder using correct penalty for each turn so movements in air layer going to be more expensive on 3-5 turns.
2015-11-09 19:57:26 +03:00
5106738160 Merge branch 'develop' into feature/pathfinderLayers 2015-11-09 19:20:13 +03:00
96897acc46 CWillLastDays: add condition for permanent durations
Accidentally missed them in pull request
2015-11-09 19:05:22 +03:00
7f0b0bd1b5 Bonus system: use updateBonuses in battleTurnPasseed 2015-11-09 15:48:07 +03:00
ee1c5e452f Bonus system: add CWillLastDays selector 2015-11-09 15:01:58 +03:00
5bfbd8526b Bonus system: fix N_DAYS bonus duration 2015-11-09 14:18:36 +03:00
45e4cf354e Revert "Pathfinding: do path calculation in separate thread"
This reverts commit f376b27999.
2015-11-09 09:35:56 +03:00
f376b27999 Pathfinding: do path calculation in separate thread 2015-11-08 19:19:48 +03:00
9cf35d1bfd CPathfinder: support for Castle Gate
No support for client / server implemented yet.
2015-11-08 10:06:24 +03:00
be37e1cd8b CPathfinder: add const to appropriate methods 2015-11-08 08:39:00 +03:00
f590b364c5 Pathfinder: shorten EPathfindingLayer to ELayer 2015-11-08 08:27:51 +03:00
4af9c7c29d CPathfinder: add one turn boundary for flying and water walking
Now when oneTurnSpecialLayersLimit is enabled hero won't be able to stop on blocked or water tiles between turns.
It's default H3 mechanics so it's enabled by default.
2015-11-08 07:44:00 +03:00
2fb73c55e1 CPathfinder: use node action in isMovementAfterDestPossible checks 2015-11-08 04:41:06 +03:00
4973a1ec90 CGPathNode: get rid of land member as it's now obsolete
CTerrainRect::showPath behaviour changed so it's will only add cross path graphics on embark/disembark and path ending.
We want continuous paths for flying and water walking even when land<-> water transition occur.
2015-11-08 04:01:58 +03:00
160fa38254 Client: change cursor using node action information of pathfinder 2015-11-08 03:10:48 +03:00
ba1062ed3c Formating2
Change ani to anim
2015-11-07 23:30:01 +01:00
82048cbf2d Pathfinder: implement new feature - node action
No action going to simplify isMovementAfterDestPossible and should be as well useful for cost calculations.
It's can be also used by client interface to show appropriate cursors and path.
2015-11-08 00:26:41 +03:00
bd8eec7fb8 CGPathNode: move resetting code into separate function 2015-11-07 22:16:45 +03:00
d8a612f5d6 CPathsInfo: use boost::multi_array for storing graph of nodes 2015-11-07 22:02:57 +03:00
3f2cdf3137 CPathfinder: implement priority queue and node locking 2015-11-07 21:11:07 +03:00
7eebcb9d60 Artifacts: replace few more ints by ArtifactID 2015-11-07 11:46:58 +03:00
e645b46aed Revert "Merge pull request #124 from vcmi/issue/1372"
This reverts commit da01af319b, reversing
changes made to 8b6b4e2e0b.
2015-11-07 11:35:02 +03:00
bd12989ad6 Artifacts: use ArtifactID instead of ints 2015-11-06 21:54:51 +03:00
148355908d CPathfinder: get rid of FoW variable and bunch of small fixes 2015-11-05 15:04:56 +03:00
9fe442537b Pass on EPathfindingLayer and small fixes for code around it 2015-11-05 12:46:44 +03:00
5f3e9deda7 CPathfinder: deny transit over whirlpools when hero not protected 2015-11-05 11:34:01 +03:00
a1290f548b CPathfinder: only allow water walking over accessible tiles 2015-11-05 11:25:41 +03:00
3de94a8b99 CPathfinder: don't allow future movement after guarded tile
There is two exceptions:
 - Hero start movement from guarded tile.
 - Hero that embarking into boat that standing on guarded tile.
In other cases future movement is impossible.
2015-11-05 10:22:38 +03:00
dd525da153 Formatting 2015-11-04 23:37:53 +01:00
f4dea88e3b CPathfinder: get rid of hero object usage when it's not needed 2015-11-04 15:38:15 +03:00
1bc335323d CPathfinder: add lightweightFlyingMode option suggested by @alexvins 2015-11-04 15:05:22 +03:00
330c1666fc CPathfinder: move isLayerTransitionPossible and remove outdated comment 2015-11-04 12:29:51 +03:00
934c682733 CPathfinder: always add air and water layer nodes to queue
It's should be possible to go into air layer from visitable object (but opposite isn't allowed).
And when walking on water player can't really interact with any object at all so future movement always possible.
2015-11-04 11:53:52 +03:00
595deda270 CPathfinder: rename functions to better represent what they doing 2015-11-04 11:47:43 +03:00
da01af319b Merge pull request #124 from vcmi/issue/1372
Issue/1372
2015-11-04 10:39:40 +03:00
75a76c0bf0 FixDefenceAni 2015-11-04 00:19:40 +01:00
8b6b4e2e0b Fix header case for Linux to Windows cross compilation using MingGW 2015-11-03 14:40:36 +03:00
dfd70849e9 CPathfinder: restore selective tile initialization to initializeGraph
This way we can avoid layer checks when calculating paths by ignoring unitialized tiles entirely.
Also at this point pathfinder and movement actually works for everything except flying.
2015-11-03 03:25:12 +03:00
f6b9015324 Use constant for summoned creature slot 2015-11-03 02:18:34 +03:00
c85c7f4b61 CPathfinder: always initialize all nodes within initializeGraph 2015-11-03 01:29:43 +03:00
349f16a359 Version bump. 2015-11-02 17:28:54 +01:00
400152caee CPathfinder: draft implementation of layers logic; not yet works 2015-11-02 16:03:03 +03:00
9c1c7d0caf Pathfinding: move getNode into CPathsInfo 2015-11-02 14:04:26 +03:00
4b64bec711 EPathfindingLayer: copy other code from ETerrainType for debugging 2015-11-02 13:25:01 +03:00
2b6e1498d2 Pathfinding: change argument order for getPath and AUTO layer as default
This still need investigation, but likely most of external code shouldn't be aware of layers in order to work properly because only LAND and SAIL can be targeted and single tile can't have both of these layers.
2015-11-02 11:14:32 +03:00
b8253206c7 Pathfinding: make related code aware that layers exist 2015-11-02 11:06:06 +03:00
118039a368 Pathfinding: add copy-pasted EPathfindingLayer 2015-11-02 11:05:26 +03:00
1bcfa986e4 Apply fixes to pathfinder 2015-11-01 01:52:43 +03:00
d46364c4c3 Merge branch 'develop' into issue/2306
Need to reapply changes to pathfiner

Conflicts:
	AI/VCAI/VCAI.cpp
	lib/CGameState.cpp
	lib/CGameStateFwd.h
2015-11-01 01:49:57 +03:00
34cc9c78f7 [c::b] update projects 2015-11-01 00:01:41 +03:00