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
f2a237ce6c CPathfinder: move allowed teleport check into lambda
This also fix accidental whirlpool usage as previously I messed up code a bit.
2015-03-11 23:53:35 +03:00
61071c46e1 Fixed monster amounts in Pandora Box. 2015-03-11 19:21:58 +01:00
3cc9705bfe Minor tweak. 2015-03-11 16:54:42 +01:00
01390e0c2c Optimization for random treasures. 2015-03-11 16:19:03 +01:00
17f3f94ca6 CGSubterraneanGate: fix pairing and always assign all gates to channel
Before gates on underground layer didn't had any channel assigned and of course any function that attempt to check -1 channel caused crash.
Also I find out that at point postInit executed It's possible to get mutable gamestate via gameState() callback so we don't need to pass it there.
2015-03-11 17:17:21 +03:00
53af95f0a6 Few spell tweaks 2015-03-10 23:45:09 +03:00
1fd4a6daae Fix merge of SpellsRefactoring5 2015-03-10 23:23:28 +03:00
719fcef34e Merge branch 'develop' of https://github.com/vcmi/vcmi into develop 2015-03-10 19:57:35 +01:00
b5c270082b Added missing files. 2015-03-10 18:32:05 +01:00
2145be281a Merge pull request #86 from ArseniyShestakov/fixQuestSaving
Fix saving of player's quests and bump save format version
2015-03-10 18:01:38 +03:00
ec879046ca Merge pull request #93 from ArseniyShestakov/feature/pathfindingTeleports
Okay let's do this!
2015-03-10 09:04:25 +01:00
f7b5ecf642 Something that compiles. 2015-03-09 20:07:28 +01:00
f32849a73e Attempt to compile refactored spells in MSVS. 2015-03-09 19:24:45 +01:00
1801b5eaf4 CGTeleport: use vstd::erase_if_present in getAll functions 2015-03-09 15:44:48 +03:00
5c6633f8ad CPathfinder::addTeleportWhirlpool: check that obj isn't nullptr 2015-03-09 15:32:09 +03:00
00b0af7306 CGameInfoCallback: now actually drop excludeId argument 2015-03-09 14:20:34 +03:00
861104f493 CGameInfoCallback: refactoring of getTeleportChannelEntraces / getTeleportChannelExits
Move shared filtering code into getVisibleTeleportObjects.
Also remove excludeId as it's not currently used.
2015-03-09 05:10:31 +03:00
930a8b49da CPathfinder: move complicated check into lambda 2015-03-09 04:24:12 +03:00
8f8d237d5d Use isTeleportChannel callback functions to check teleport channel type 2015-03-09 02:13:40 +03:00
0c1a37e5a7 CGameInfoCallback: more functions to check teleport channel types 2015-03-09 02:01:24 +03:00
eff4da1d03 ETeleportChannelType: is now strongly typed enumeration 2015-03-09 01:45:39 +03:00
3b057e0408 CGMonolith: fix switch formatting 2015-03-09 01:27:40 +03:00
606013c535 CGSubterraneanGate::postInit put const back
Originally I removed it when change this code to actually change object.
Though this sorting can work with constant object just fine.
2015-03-08 21:16:30 +03:00
826a64b579 Pack of tiny code improvements for @alexvins request 2015-03-08 20:19:00 +03:00
6d77322d6a CGMonolith: add text dialog when player visit one-way monolith exit 2015-03-08 18:07:06 +03:00
530b63f7c4 CPathfinder: add all new code for pathfinding via teleporters
Each kind of teleporter have own function that determine if it's should or shouldn't be used.
For now Monolith with bidirectional channels and Subterranean Gate are united.
2015-03-08 17:13:26 +03:00
21aaad6972 MoveHero: add transit movement option
Transit is new option for hero movement. If it passed for movement then hero can get get on tile without visiting of object on it.
Currently it's will be only allowed is object under destination is teleport.
2015-03-08 17:04:09 +03:00
25656aa586 Add showTeleportDialog everywhere except actual code for AI and player
Just like TeleportDialog it's based off showBlockingDialog, but as number of package is higher when possible showTeleportDialog will be after other dialogs handling code.
2015-03-08 16:52:50 +03:00
18535db0ef Add TeleportDialog and CTeleportDialogQuery
TeleportDialog is based off BlockingDialog and it's needed for server to ask client what teleport hero should be teleported to.
It's also contain list of possible exits, identifier of currently used channel and also impassable option.
If impassable set to true then client will remember that current teleport channel is lack of exit point.
2015-03-08 16:37:33 +03:00
8d7b6d119f CGameInfoCallback: add functions that gather information about teleport channels
This code belongs to callback because both player and AI shouldn't directly access information about teleport channels.
For example pathfinder code need to check teleport channel type only based on information about objects player already seen.
2015-03-08 16:21:14 +03:00
c9eba40fe6 Updated CGTeleport and new CGMonolith / CGSubterraneanGate / CGWhirlpool
Now CGTeleport is not publicly available handler, but generic class for teleport channels usage.
Teleport channels are stored as part of information about the map.
2015-03-08 16:11:23 +03:00
04a1df29ad Add TeleportChannel / TeleportChannelID / ETeleportChannelType
TeleportChannel is structure that contain two vectors of entrances and exits for certain teleport channel. It's also store passability state independently which almost only useful for Player and AI as they can't know if channel passible or not until enough entrances / exits are visible or server passed them information that certain channel is impassible when they visited entrance.

ETeleportChannelType is determined by checking intersection between entrances and exit vectors or checking their size:
 - IMPASSABLE: one of vectors empty or only one entrance id is same as only one exit id.
 - BIDIRECTIONAL: contents of both vectors is exactly the same.
 - UNIDIRECTIONAL: contents of both vectors do not intersect.
 - MIXED: contents of vectors only partially intersect. Not currently used; added for future modding.
2015-03-08 15:18:53 +03:00
f145c82031 TerrainTile: implement exclusion for topVisitable functions
For pathfinder we usually want to check what object hero staying on.
Hero is always top object so we need option to exclude it.
2015-03-08 15:05:24 +03:00
6ace53d8b9 Functional RMG Seer Huts, still there are some mysterious bugs. 2015-03-01 13:26:54 +01:00
9453250e0f Spawn quest arts in nearby zones. 2015-03-01 10:20:49 +01:00
67ab90616d Seer Huts with exp / gold rewards. 2015-03-01 09:46:09 +01:00
dd887eb929 Fixes for Seer Huts. 2015-03-01 09:07:43 +01:00
4f1d96e5e8 Seer Huts part 2. 2015-02-28 22:37:04 +01:00
607375a9bc Generate Seer Huts with creature rewards 2015-02-28 21:14:45 +01:00
5fda2aac9a formatting 2015-02-26 20:59:18 +03:00
f4c683cd5e Move VievXXX logic to server side (except expert ViewEarth) 2015-02-26 17:15:17 +03:00
b6038240ab Implemented DISGUISE spell. Untested 2015-02-26 08:39:59 +03:00
025a00362b Simplify CBattleInterface::spellCast 2015-02-26 08:39:58 +03:00
b9bdc95a7e Handle monster agressivness for VISIONS spell 2015-02-26 08:39:57 +03:00
b846b717a1 implemented VISIONS spell (partially)
(-) todo: agressivnes
2015-02-26 08:39:56 +03:00
2156204306 Visions spell in case of monsters 2015-02-26 08:39:55 +03:00
36cdb2968b Refactoring 2015-02-26 08:39:54 +03:00
666d7a4f45 Start implementing VISIONS and DISGUISE 2015-02-26 08:39:53 +03:00
f6e83685e7 Initial implementation of VIEW_AIR & VIEW_EARTH 2015-02-26 08:39:52 +03:00
1333f8e410 Split mechanics implementation 2015-02-26 08:39:51 +03:00