AlexVinS
f1a4831813
[Spells] Get rid of SpellTargetingContext.
2017-07-16 01:43:50 +03:00
ArseniyShestakov
ea0ceb1805
Merge pull request #323 from vcmi/CStackTweaks
...
CStack tweaks
2017-07-15 00:42:08 +03:00
Arseniy Shestakov
dbcd79c48a
Code cleanup: remove double and unneded semicolons
2017-07-12 22:01:10 +03:00
AlexVinS
ea3502ed60
Removed CStack::totalHealth()
2017-07-09 20:23:51 +03:00
AlexVinS
44fc0cb57b
Broken CHealth dependency on CStack
2017-07-09 19:49:52 +03:00
AlexVinS
f0713c1d36
Better handling of HYPNOTISED stacks in case of spellcasting
2017-07-09 16:55:10 +03:00
AlexVinS
4f14f22d3a
Unified CStack ammo, casts and counterattacks
...
* it is possible now to add casts and shoots OTF (f.e. with spell bonus)
Centralized stack 'ammo' loading from bonus system.
* introduced small proxy class for local bonus cache
(no need to use global cache if particular selector used on node only in one place)
* handle killing resurrected creatures
* use IBonusBearer::MaxHealth() where possible
* Fixed https://bugs.vcmi.eu/view.php?id=2486
* Possible fix for 0 HP after resurrection.
* Hack-fixed https://bugs.vcmi.eu/view.php?id=2584
* Unified CStack health API
* Use CHealth for CStack count and health points
* increased SERIALIZATION_VERSION
2017-07-08 20:29:59 +03:00
ArseniyShestakov
b670bcb46f
Merge pull request #313 from vcmi/spellCastQuery
...
Spell cast query
2017-07-04 02:43:22 +03:00
FeniksFire
8577445b10
Simple fix: http://bugs.vcmi.eu/view.php?id=2366
2017-07-03 22:41:16 +03:00
AlexVinS
3d1a84875e
Queries refactoring
...
* Moved SUMMON_BOAT special case to mechanics
* Partially moved Town portal logic to mechanics class
* Added generic query reply to CCallback
* Redesigned Queries so that base API do not depends on CGameHandler
* Got rid of CGameHandler::castSpellRequest
* Removed CGameHandler::castSpell
* Added new Query type for town portal dialog (not used yet)
2017-07-03 21:43:04 +03:00
AlexVinS
4f8c7bd4bb
CStack refactoring
...
* removed all occurrences of attackerOwned
* Use BattleSide enum
* more tweaks
2017-07-01 19:17:08 +03:00
FeniksFire
4113bdab01
Moving some files from lib to the battle subdirectory.
2017-06-26 15:26:08 +02:00
FeniksFire
039e3842fc
Aesthetic changes in BattleHex ( #303 )
2017-05-29 10:33:34 +03:00
FeniksFire
3de891b4b4
Moving/dividing classes from BattleState to separate files.
2017-03-17 16:48:44 +01:00
AlexVinS
60bd54c9b3
Changed playerToSide return type to signed
2016-11-28 03:33:39 +03:00
AlexVinS
931656f24a
possible fix for http://bugs.vcmi.eu/view.php?id=2612
2016-11-18 14:27:20 +03:00
AlexVinS
dad0569bc7
Relaxed cast requirements for Quicksand
2016-10-31 15:38:53 +03:00
AlexVinS
cd5c0b3297
Style tweaks.
2016-10-02 15:22:55 +03:00
AlexVinS
f124db9f61
Get rid of Bonus::sourceSpell()
...
* now bonus API looks more or less clean
2016-10-01 14:47:21 +03:00
AlexVinS
f6bfba0ced
Unified Dispell-related bonus selectors
2016-10-01 10:31:59 +03:00
AlexVinS
2f7e10a06f
Use range limit selector when modifying bonus lists and checking for spell bonuses
...
* fixes http://bugs.vcmi.eu/view.php?id=2532
2016-09-30 17:12:28 +03:00
AlexVinS
8aa31f4073
Fixed http://bugs.vcmi.eu/view.php?id=2529
2016-09-30 01:54:40 +03:00
AlexVinS
688dc4c189
tweaks
2016-09-29 19:37:59 +03:00
AlexVinS
d195bfb62d
Possibly fixed http://bugs.vcmi.eu/view.php?id=2291
2016-09-29 18:55:07 +03:00
AlexVinS
fed26e1ac9
Merge remote-tracking branch 'remotes/vmarkovtsev/BonusList-shared_ptr' into develop
...
# Conflicts:
# lib/spells/CDefaultSpellMechanics.cpp
2016-09-29 17:12:05 +03:00
AlexVinS
7ce33bc07a
Dispell fixes
2016-09-29 16:50:33 +03:00
Vadim Markovtsev
2c1dddde33
Fix memory problems with BonusList
...
Bonus * -> std::shared_ptr<Bonus>
This cures the following problems:
1) Memory corruption at exit. Some Bonus-es were deleted twice (mods?).
2) Memory leaks. Some Bonuses were not deleted.
3) Reduce the number of "Orphaned child" messages.
Valgrind reports 0 leaked memory now and no invalid reads/writes.
2016-09-29 15:08:00 +02:00
AlexVinS
e91a6d45e8
Probably fixed http://bugs.vcmi.eu/view.php?id=2523
2016-09-29 10:45:22 +03:00
AlexVinS
a03419e7d9
Fixed http://bugs.vcmi.eu/view.php?id=2269
2016-09-24 11:25:29 +03:00
AlexVinS
7874dffa7d
fixed http://bugs.vcmi.eu/view.php?id=2282
2016-09-24 10:06:24 +03:00
AlexVinS
849e3fc04e
Fixed http://bugs.vcmi.eu/view.php?id=2506
2016-09-24 09:27:58 +03:00
AlexVinS
7618e294c2
More fixes to not place obstacles on wall parts
2016-09-24 04:55:48 +03:00
AlexVinS
cffc4b2ab5
fixed patch obstacle placement inside walls
2016-09-23 20:27:55 +03:00
AlexVinS
bac0b026e5
Do not place obstacles on wall parts
2016-09-23 13:14:12 +03:00
AlexVinS
374e30c972
Added a few safety checks
2016-09-18 16:30:03 +03:00
AlexVinS
73c7b49eb7
Hide effectValue calculation inside BattleSpellCastParameters
2016-09-18 15:27:22 +03:00
AlexVinS
505e53c17d
Merge remote-tracking branch 'remotes/origin/develop' into SpellsRefactoring8
...
# Conflicts:
# client/battle/CBattleInterface.cpp
# lib/spells/BattleSpellMechanics.cpp
2016-09-12 10:13:40 +03:00
AlexVinS
3fa62beb6d
Do not allow to cast Cure if there is nothing to cure.
2016-09-11 13:48:14 +03:00
Arseniy Shestakov
fe6c0cf89b
Use RandomGeneratorUtil::randomShuffle for reproducible gameplay
2016-09-11 00:10:52 +03:00
AlexVinS
5e0a9d7966
hackfix for commander spells
2016-09-10 22:41:50 +03:00
AlexVinS
686cd00c68
Cleanup.
2016-09-06 12:26:01 +03:00
AlexVinS
f1d0bede11
Moved all affected stacks calculations to mechanics
2016-09-06 07:05:55 +03:00
AlexVinS
18fc94d709
WIP on SpellCastContext
2016-09-06 06:40:23 +03:00
AlexVinS
1d840a33a5
Started SpellCastContext rework
2016-09-06 04:11:30 +03:00
AlexVinS
82ac035340
OO design for obstacle spells.
2016-09-05 13:34:48 +03:00
AlexVinS
f3b7fe947c
Reworked spell target existence check.
...
* related to 2269
2016-09-05 11:36:25 +03:00
AlexVinS
eb128a0207
More style tweaks
2016-09-04 05:15:37 +03:00
AlexVinS
c0cf5d6956
Style tweaks
2016-09-04 04:59:30 +03:00
AlexVinS
1e7e7a7006
Fixed http://bugs.vcmi.eu/view.php?id=2419
2016-08-30 12:20:17 +03:00
AlexVinS
5d329b40a4
Factored spell action selection for location target.
2016-08-30 12:20:15 +03:00