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

122 Commits

Author SHA1 Message Date
Arseniy Shestakov
9fd1cff090 Refactoring: always use std prefix for shared_ptr, unique_ptr and make_shared
Long time ago it's was used without prefix to make future switch from boost to std version easier.
I discusses this with Ivan and decide to drop these using from Global.h now.

This change wouldn't break anything because there was already code with prefix for each of three cases.
2015-12-29 05:43:33 +03:00
Ivan Savenko
f02e553b70 Fixed another uninitialized field possiblity causing issues with StupidAI 2015-12-04 00:11:44 +02:00
Ivan Savenko
c3ce4b25df Removed all #include's of CMap.h from headers.
To all - please, avoid #include's in headers as much as possible
This kills incremental build compile times
2015-12-02 21:05:10 +02:00
AlexVinS
70d9be8447 Use ISpellCaster in battle callback 2015-09-29 17:26:52 +03:00
AlexVinS
a4d4851d80 Fix typo: casted->cast 2015-09-29 17:26:48 +03:00
AlexVinS
d9cbe487c7 remove useless function CSpell::getTargetInfo 2015-09-29 17:26:47 +03:00
AlexVinS
72587a8299 Removed hardcoded check for ANIMATE_DEAD absolute imminity - there is json configuration for that 2015-09-29 17:26:46 +03:00
AlexVinS
6010bbe7ba More correct usage of battleGetFightingHero
* this should fix "FIXME: battleGetFightingHero wrong argument!"
2015-09-29 17:26:38 +03:00
Fay
1cb54689cf Prevents first aid tents from melee attacking;
Moves attack possibility checks to battle callback (for consistency with shooting checks);
2015-04-09 21:49:11 +02:00
AlexVinS
e42ca15a0d Fix BERSERK effect 2015-04-03 05:20:17 +03:00
AlexVinS
10668974d6 Move SACRIFICE target existence check to mechanics 2015-04-03 00:35:29 +03:00
AlexVinS
0cce1ef2f1 Move ANOTHER_ELEMENTAL_SUMMONED problem check to SummonMechanics class 2015-04-03 00:02:15 +03:00
AlexVinS
9600446cf9 +smart target, +hit animation 2015-03-18 17:48:32 +03:00
AlexVinS
a1ea551a85 Block summon of elemtals only by ally summoned elementals 2015-03-18 16:48:21 +03:00
AlexVinS
c81d4203d7 Do not try to cast EARTHQUAKE with no fort 2015-03-18 16:39:07 +03:00
AlexVinS
685deddac1 Start spell-relatet files reorganisation
* moved existing files to separate directory
-> todo: split mechanics
2015-02-26 08:39:48 +03:00
AlexVinS
64dccfec80 Rewrite Beneficial spell selection 2014-12-02 00:24:36 +03:00
AlexVinS
b0df8172f9 Move battleIsImmune to CSpell 2014-11-29 04:25:51 +03:00
AlexVinS
e8aeb0bf8e Merge branch 'develop' into SpellsRefactoring4 2014-11-28 22:44:33 +03:00
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
AlexVinS
f7ff61ce4f Merge remote-tracking branch 'remotes/origin/develop' into SpellsRefactoring4 2014-11-24 12:41:17 +03:00
KroArtem
e73c60740c corrected text in vcmibuilder, corrected errors and warnings from cppcheck 2014-11-16 20:48:29 +03:00
AlexVinS
a06dae1f96 Move getAffectedCreatures to CSpell. + more drafts 2014-11-13 04:53:25 +03:00
AlexVinS
d7800b834e get rid of CBattleInfoCallback::calculateSpellDmg 2014-11-12 09:52:11 +03:00
AlexVinS
e4b726151d get rid of CBattleInfoCallback::battleStackIsImmune 2014-11-12 09:20:20 +03:00
AlexVinS
ddf98a5920 +SpecialRisingSpellMechanics::isImmuneByStack 2014-11-12 08:34:43 +03:00
AlexVinS
639b915391 Move calculateSpellBonus to CSpell 2014-11-12 08:02:27 +03:00
AlexVinS
059698217c Use CLONE and DISPEL_HELPFUL_SPELLS Mechanics classes in immunity caculation 2014-11-12 07:41:12 +03:00
AlexVinS
a49da360d2 Use ESpellCastProblem inside SpellHandler 2014-11-12 06:17:03 +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