1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00
Commit Graph

95 Commits

Author SHA1 Message Date
AlexVinS
499a281dfe Disallow rising spells for genie 2014-11-28 21:08:34 +03:00
AlexVinS
e583f4e44d Fix #1928
* disallow geneie to cast teleport
2014-11-28 20:39:23 +03:00
KroArtem
e73c60740c corrected text in vcmibuilder, corrected errors and warnings from cppcheck 2014-11-16 20:48:29 +03:00
beegee1
d918621d66 - fixed casting sacrifice spell (was broken and now fixed partially) 2014-08-05 19:12:56 +02:00
Ivan Savenko
32240da34e Reduced number of #include's in headers. May break compilation on Win
since some net packs now need DLL_LINKAGE
2014-06-25 17:11:07 +03:00
AlexVinS
6f65d2484b Extract battleStackIsImmune from battleIsImmune
This fix possible problems with rising spells as now immunty is handled on stack level not on hex level
* battleIsImmune in now protected - only used in canCastThisSpellHere
2014-05-19 13:44:38 +04:00
AlexVinS
7cf64a0628 Made onlyAlive flag a part of TargetInfo 2014-05-18 17:03:01 +04:00
AlexVinS
6bf4140145 Just remove hardcoded targetting for DEATH_RIPPLE & DESTROY_UNDED.
It will now affect all creatures (massive, non smart). Immunities are handled separately.
2014-05-18 17:03:01 +04:00
AlexVinS
d9368ca5ba Use new battleGetStacksIf method 2014-05-18 17:02:59 +04:00
AlexVinS
0e93ec28c5 Add new general method for battle stack access 2014-05-18 17:02:59 +04:00
AlexVinS
5be005ee36 Try to fix #1763 and a small refactoring 2014-05-17 11:24:26 +04:00
beegee1
1d57b75bc5 - random number generation refactoring
- fixed mantis #1743
2014-04-10 19:22:32 +02:00
Ivan Savenko
771c1ce255 - some effords to get rid of bottlenecks in AI code
- fixes, probably partially #1577
- enabled code for reading map object templates from json, still not
used
- disabled PCH for launcher due to speed issues.
2014-03-23 16:36:16 +00:00
Ivan Savenko
9c0df68cb8 Fixing spelling mistakes. Patch from josch, fixes #1759 2014-03-23 12:59:03 +00:00
beegee1
fe1b16a7ec Some preparation towards mantis #1743:
- refactored CRandomGenerator (added util methods, improved method names)
- usages of std::minstd_ran are replaced by CRandomGenerator (not in entire code base, C rand() usages are still not replaced)
- refactored getArtSync method of CArtHandler -> now named pickRandomArtifact
- fixed some compiler warnings
- updated source code URL in VCMI spec
2014-03-17 19:51:07 +00:00
alexvins
8cc586ab7f hotfix 2014-03-17 14:06:32 +00:00
alexvins
9cac0af7be [Spells] More spell related refactoring
+ smart target modifier
- CREATURE_EXPERT_MASSIVE target type
* save format changed

spell format changes already documented in http://wiki.vcmi.eu/index.php?title=Spell_Format
2014-03-17 13:11:10 +00:00
alexvins
065b8366fb [Spells] Added basic support for icons and sounds
* few changes in spell format
* save format changed
2014-03-10 16:00:58 +00:00
alexvins
4203d69525 Part 2 of new spell configuration
1) spell handler refactored to support modding in general way
2) imunnity icons moved to WoG as they depends on wog`s graphics
3) introduced new class template for handlers (todo: use this in other handlers)
4) save format changed
5) introduced "absolute immunity" - unaffected by "the Orb" etc. (todo: use it in config)
6) new format documented on wiki, added json schema.

* more split of registertypes - fixes 32 mingw build
2014-03-07 13:21:09 +00:00
beegee1
69eee05ccc - Partially fixed mantis #1065 (Gate with hex 95 can't be attacked)
- Fixed 'catapult tried to attack non-catapultable hex!' problem, now catapult attacks attackable wall parts only
- Fixed problem that the server performed applying damage on a wall part twice
- Added methods for checking what wall parts are attackable and if a wall part is potentially attackable
- Added functionality to trace net packages
- Added functionality to trace std::vectors
- Added tracing for CatapultAttack(CPack)
- Updated various toString methods to use {} instead of []
- Refactoring
2013-12-08 17:54:13 +00:00
Ivan Savenko
ee6cdbeffe went through the rest of cppcheck warnings, mostly harmless 2013-11-07 12:48:41 +00:00
Ivan Savenko
71d6b0fea9 - Fixed some warnings from cppcheck
- Minor improvements to JSON validation
- Cleanup in SDL_Extensions.cpp
- Implemented new propery for creature format: idle animation duration
- Disabled idle animation of some of conflux creatures (was clearly
broken)
2013-11-06 13:42:58 +00:00
Ivan Savenko
0e3eae3095 patch from KroArtem 2013-11-03 12:51:25 +00:00
Ivan Savenko
d09294e40a compile fix, fixes blit order of heroes in siege 2013-09-30 08:45:26 +00:00
Michał W. Urbańczyk
dca1f709a9 And another one. I'm sloppy today :( 2013-09-29 21:31:14 +00:00
Michał W. Urbańczyk
5c6d12400f Fixed AI detection of battle end (solves some freezes). 2013-09-29 20:54:29 +00:00
Michał W. Urbańczyk
4f29b526ca The battle callback method battleGetAllStacks will by default omit the arrow turrets. Fixes #1453, #1455 and related. 2013-09-27 19:42:17 +00:00
Ivan Savenko
5654fef901 - ZipArchive namespace for operations with zip archives, located in CZipLoader.h/cpp.
- new fields in mod format, for use with mod manager (check config/shemas/mod.json for details)
- removed some 0.92 compatibility from mods loading
- several compile fixes
2013-08-19 11:50:53 +00:00
Ivan Savenko
8beee29482 - corrected "isToReverse" check, partially fixes 1397
- ballistics fix
- minor
2013-08-06 15:25:51 +00:00
Ivan Savenko
c81a31c74a - catapult attacks should be identical to H3
- catapult may miss and attack another part of wall instead (this is how it works in H3)
- minor fixes
2013-08-06 11:20:28 +00:00
DjWarmonger
e2de926aec Fixed #1330. 2013-08-02 08:33:56 +00:00
DjWarmonger
0c45fb95d4 Fixed crash when aiming with Archangels. 2013-07-31 17:47:31 +00:00
DjWarmonger
aa6626bc35 Fixed #1329. 2013-07-28 10:32:01 +00:00
DjWarmonger
5f310aa20f Fixed all issues with Resurrection: #123, #1358 2013-07-27 19:01:31 +00:00
DjWarmonger
b36be10e30 2013-07-25 11:53:36 +00:00
Ivan Savenko
a719e03b30 - fixed #1375
- damage done by turrets is properly increased by built buldings
2013-07-22 16:23:23 +00:00
Michał W. Urbańczyk
d8a27d8f3c Refactored player-specific data into single struct BattleState. 2013-07-21 22:01:29 +00:00
Michał W. Urbańczyk
1e11904d8a Fixed Remove Obstacle. TODO: limit its working on spell-created obstacles depending on spell school level. 2013-07-21 10:25:12 +00:00
Ivan Savenko
a148c39e0a more battles animations:
- UI will be correctly greyed-out during opponent turn
- fixed remaining issues with blit order
- a bit better handling of catapult attack
- fixes #1362
2013-07-21 10:10:38 +00:00
DjWarmonger
b0f82957ab Fixed #1336 2013-07-17 11:01:36 +00:00
Michał W. Urbańczyk
4576719abe Visual Studio 2013 Preview compile fixes:
* 0 is not convertible to std::function, nullptr should be used
* std::ref(rand) is not convertible to function<int()>, used lambdas (why we dont just pass "rand" ? )
* CFunctionList needs to be constructible from nullptr
* move constructor for CMapInfo (Visual cannot generate them :( )
* #ifdefed some stuff that is not needed anymore since cmath is updated with C99 stuff
* using std::make_unique instead of our vstd implementation

CSelector: 
* introduced a class in place of typedef
* Having an overloaded && || operators over sth that is convertible to bool… Wasn't a good idea after all. Purged the operators, replaced  with And/Or methods (chaining-style).
* constructor that is present only when constructing from class or function (SFINAE). std::function has an implicit converting constructor from T causing ambiguities (even if the overload would cause compile error in the body)
2013-07-02 12:08:30 +00:00
Ivan Savenko
f82122d9be second part of c++11 update. gcc 4.5 and VS 2010 are no longer supported
- BOOST_FOREACH -> for
- replaced several boost classes with std (e.g. unordered)
- removed gcc-4.5 workarounds
- ran clang c++11 migration tool to detect some cases:
- - pointer initialized with "0" to nullptr
- - replace for with iterators with range-based for
- - use auto in some situations (type name specified twice, avoid long iterators type names)
2013-06-29 13:05:48 +00:00
Ivan Savenko
2b45e13c5c c++03 -> c++11 switch:
- use std versions of function, bind and ref
- OVERRIDE -> override
- NULL -> nullptr
- use std versions of random distributions

NOTE: this may be last revision that supports gcc-4.5
2013-06-26 11:18:27 +00:00
Michał W. Urbańczyk
04d11519ef Quick Combat system setting works… if user doesn't click in the meantime. 2013-06-23 11:25:48 +00:00
Michał W. Urbańczyk
06dbdd234f Further changes for duel mode. It is possible to pass names of AIs to be used by command line. Moved things in battle AI. 2013-06-21 20:59:32 +00:00
Michał W. Urbańczyk
6a88604937 * fixed crash related to cammander's SPELL_AFTER_ATTACK spell id not initialized properly (text id was resolved on copy of bonus)
* fixed duels, added no-GUI mode for automatic AI testing
* minor things
2013-06-17 15:45:55 +00:00
DjWarmonger
c9e95f76df - Fixed Phoenix fire immunity. Again.
- Cheat code with grant all artifacts, including the ones added by mods
- Some clean-up of Berserk effect, however it doesn't work at the moment.
2013-05-25 07:06:00 +00:00
Ivan Savenko
8be801a6dc - CMappedFileLoader class to remap WoG files to h3 names
- WoG should be optional, all remapped files are listed in WoG/config/wogFileOverrides.json
- fixed several cases of incorrect positioning of creatures in battles
- some missing sounds for battle effects
- negative luck support, disabled by default
- a bit hackish detection of WoG presence, VCMI should work on SoD-only installs
2013-05-04 13:14:23 +00:00
DjWarmonger
32c87f532f - Added missing abilities for devil & ghost dragon
- Stack affected by Berserk should not try to attack itself

Neither of these can be actually seen in game duo to more general engine bugs :/
2013-04-27 06:39:59 +00:00
beegee1
c7c2686379 - Integrated the logging API into the client and the lib - Remove some more comments and switched to /// style - Fixed recursive locks - Added Global.h to CMakeLists(now visible in qt-creator) - Removed usage of shared_mutex - Added unique_ptr to CLogger targets 2013-04-09 14:31:36 +00:00