Agoston Szepessy
5080f26235
Fix 3184
...
Taken from !684 . This fixes a bug with primary skills that results in
heroes not being able to interact with objects, or skills being
incorrect when moving from mission to mission.
2022-03-14 09:18:57 +02:00
Dmitry Orlov
9e3c4b69c4
Minor fixes
2021-12-22 21:37:56 +02:00
Dmitry Orlov
0427fa45dd
Fix: Terrain description should be shown correctly
2021-11-08 21:01:30 +02:00
Dmitry Orlov
e4c2f0c822
Fix: Skyship Grail should work immediately after capturing without battle
2021-10-31 09:01:49 +02:00
Andrii Danylchenko
e219e1febf
3187 - fix whirlpool crash when exits are blocked
2021-10-23 21:40:52 +03:00
Andrii Danylchenko
98c6215ab6
fix negative tile cost from pathfinding skill
2021-10-06 08:45:06 +03:00
Dmitry Orlov
30b879ae5d
Fixed: duplicated bonusing building. Improved: opposite bonus propagation
2021-09-12 14:30:54 +03:00
Dmitry Orlov
2a39c401b8
Feature: Opposite Side Limiter. Added: Old saves support.
2021-09-04 14:15:38 +03:00
Dmitry Orlov
25d9ea1ddf
Feature: Opposite Side Limiter
2021-09-04 14:15:38 +03:00
Dmitry Orlov
6f0864b47c
Feature: Town Negative Bonuses. Fix: Negative bonus bearers should not be affected
2021-09-04 14:15:37 +03:00
Dmitry Orlov
3cb88b6964
Feature: Magic Well should work in the fan towns
2021-09-04 14:15:37 +03:00
Dmitry Orlov
b1db6e26d1
Fix: nextPrimarySkill crash in case when probability values are incorrect
2021-07-30 12:10:33 +03:00
Andrii Danylchenko
d47564955e
Nullkiller: fix/refactor temporary bonus nodes, fix gather army quest completion
2021-07-26 21:02:50 +03:00
Andrii Danylchenko
3fa7e0976f
Nullkiller: update / fix build, core changes required for Nullkiller AI
2021-07-26 21:02:50 +03:00
Andrii Danylchenko
9c8d776398
Merge branch 'develop' into handlersAbstraction
...
# Conflicts:
# CI/linux/before_install.sh
# CI/mac/before_install.sh
# CI/mxe/before_install.sh
# lib/CModHandler.cpp
# lib/mapObjects/CObjectClassesHandler.cpp
# lib/mapObjects/CObjectClassesHandler.h
# lib/mapObjects/CommonConstructors.cpp
# server/CGameHandler.cpp
# test/CMakeLists.txt
# test/spells/effects/TeleportTest.cpp
2021-07-16 00:32:13 +03:00
Dmitry Orlov
8b08973283
Fix: ID-collisions when processing large mods collections
2021-04-25 15:07:06 +03:00
AlexVinS
483a4689ce
Fixes for code review issues
2021-02-20 04:57:50 +03:00
AlexVinS
a59e12ca5f
tweaks
2021-02-15 15:03:32 +03:00
AlexVinS
ecaa9f5d0b
Entities redesign and a few ERM features
...
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
Dmitry Orlov
854a2e6c39
Feature: Mods system improvement, Part III. Bunusing buildings customization.
2021-01-14 01:02:13 +03:00
Dmitry Orlov
8f331dce31
Feature: Lodestar Grail should work.
2020-12-10 04:05:37 +03:00
Dmitry Orlov
39de2f6435
Fix: Morale bonus should be shown correctly
2020-11-11 22:43:40 +03:00
Dmitry Orlov
d6a4767865
Mod system improvement: Patch 2
2020-10-25 01:04:34 +03:00
Dmitry Orlov
3cb0dfb143
Fix: RMG issues: 1) hota 2) assertions
2020-10-25 01:03:32 +03:00
Dmitry Orlov
643cc00db6
Mod system improvement: Special buildings should work in the modders towns. Part II
2020-10-19 22:38:06 +03:00
Dmitry Orlov
934c4e511d
Special buildings support : Patch 1
2020-10-15 15:03:01 +03:00
Dmitry Orlov
bf07cd0ad9
Mod system improvement Part I : Old saves support & MSVS build fix
2020-10-07 15:12:32 +03:00
Dmitry Orlov
6a7296fbe9
Mod system improvement Part I : Fix redefined content handler assertion
2020-10-07 12:35:12 +03:00
Dmitry Orlov
f4816b0824
Mod system improvement Part I : Special buildings should work in the modders towns
2020-10-07 12:35:11 +03:00
John Bolton
a05ae78e67
Fixed lots of warnings.
...
Disabled the following (for MSVC only) that couldn't (or shouldn't) be fixed.
4003: not enough actual parameters for macro 'identifier'
4250: 'class1' : inherits 'class2::member' via dominance
4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
4275: non dll-interface class 'type1' used as base for dll-interface class 'type2'
2020-10-04 02:20:18 -07:00
John Bolton
6d8f1e4530
Fixed incorrect usage of const std::shared_ptr. Resolves 0003142.
...
Replaced const TBonusListPtr with TConstBonusListPtr where necessary
Replaced const std::shared_ptr<T> with std::shared_ptr<const T> where necessary.
Removed superfluous use of const.
Replaced const std::shared_ptr<T> with const std::shared_ptr<T> & in function parameters and ranged for-loops.
2020-09-30 22:56:28 -07:00
Dmitry Orlov
38fd05f655
Minor fix: apply Monday bonuses to heroes who have slept overnight
2020-09-28 01:32:33 +03:00
Andrii Danylchenko
d782ee39df
hacks to optimize a few bonus requests
2020-07-04 17:52:22 +03:00
Andrii Danylchenko
42cab00c38
Fix quest handling
2020-01-31 00:48:01 +02:00
Alexander Shishkin
49404bfa24
Merge pull request #579 from vcmi/dydzio0614-patch-1
...
Hackfix crash on "victory by town capture"
2019-05-04 10:35:13 +03:00
Ewilhan
91177c412c
Fixed Crypt/Pyramid double visit sound.
...
Removed sound call from CBank to avoid two sounds from being launched at same time. Gave priority to JSON files.
2019-05-02 23:46:18 +01:00
Dydzio
a79f11bed2
Hackfix crash on "victory by town capture"
2019-04-23 20:04:07 +02:00
Michał Kalinowski
ac6b477aa2
Simplify statements
...
-Simplify return statements across the code
2019-03-31 09:43:14 +03:00
Dydzio
5718048752
Fix magic school gold payment
2019-03-11 18:56:05 +01:00
Alexander Shishkin
b00e935e4d
Warnings fixes ( #538 )
...
Warnings fixes
* Suppress `missing-braces` for Clang
* Fixed many C4275 warnings
* Fixed almost all Clang/GCC warnings
* Silence most frequent MSVC warning.
* Fixed some pessimizing-move warnings
* Fixed some unused capture warnings
2019-01-19 13:52:02 +03:00
AlexVinS
da20aa2388
Use the same cost value in Pathfinder and fuzzy evaluations.
2019-01-17 10:54:41 +03:00
AlexVinS
4b5910c2f4
VCAI performance improvements
...
* Node graph initialization optimized.
* Fixed "Unathorized obstacle access".
* Pathfinding tracing disabled with ifdef.
* Misc bonus calculation optimizations.
* Removed timestamp from log lines. Date formatting eats too much CPU.
* Paths for all heroes in Client are now cached
2019-01-17 10:50:56 +03:00
Andrii Danylchenko
035d279ae8
Refactor CGHeroInstance, make spells private
2018-12-23 15:49:26 +03:00
Arseniy Shestakov
708705aa96
CGLighthouse: workaround crash on map initialization. Fix issue 3020
...
Dirty hack here since proper fix would require to break saves
2018-11-01 23:31:23 +03:00
godric3
f9ac46576b
Add description for bonuses from hero specialty
2018-10-29 21:33:13 +01:00
Dydzio
2288e9b8aa
Merge branch 'develop' into AIMapObjectEvaluation
2018-07-30 01:33:49 +02:00
Dydzio
393b25eb7f
Minor tweaks/fixes
2018-07-29 19:31:01 +02:00
Dydzio
b37ba8e046
Initial version of AI object value config
2018-07-28 00:43:56 +02:00
Dydzio
615df6203d
Oprator overload correction...
2018-07-26 16:43:40 +02:00
DJWarmonger
273802c92c
I have no idea what I'm doing
2018-07-26 12:14:29 +02:00
Dydzio
21c1f47a78
Fixes
2018-07-22 19:12:11 +02:00
Dydzio
2c1d91e2ff
Move object ID struct to lib
2018-07-22 18:38:45 +02:00
Karlis Senko
69330de89c
Avoid integer overflow and conversion related UB.
2018-05-01 00:02:07 +03:00
Arseniy Shestakov
ac66fc7f42
Full rework of pre-game interface and networking
...
New features for players:
* Loading for multiplayer. Any save could be used for multiplayer.
* Restart for multiplayer. All clients will restart together.
* Loading from single save.
* Hotseat mixed with network game. Multiple players per client.
* Now connection to server could be cancelled.
* Return to menu on disconnections instead of crashes.
* Restoring of last selected map, save or campaign on next run.
TLDR on important changes in engine code:
* UI: work with server separated from UI
* UI: all explitic blitting replaced with IntObject's
* UI: all new code use smart pointers instead of DISPOSE
* Gameplay always start through lobby controlled by server.
* Threads receiving netpacks now shared for lobby and gameplay.
* Campaigns: heroes for crossover now serialized as JsonNode.
2018-04-04 14:24:26 +07:00
Henning Koehler
6ddcb079a4
Enabled new secondary skills to be created ( #438 )
...
* Universities, Scholars and Witch Huts may offer new skills
* Moved encode/decodeSkill to CSkillHandler
* Refactored CSkill interface and CSkill::LevelInfo image storage
* Legacy game constants renamed to ORIGINAL_XXX_QUANTITY
2018-03-31 12:56:40 +07:00
Henning Koehler
1685641357
Flexible necromancy ( #430 )
...
* made IMPROVED_NECROMANCY bonus configurable
* updated cloak of the undead king
2018-03-17 16:46:16 +08:00
AlexVinS
03cfd2cb78
Do not use StackLocation in netpacks
2018-03-17 13:24:12 +08:00
AlexVinS
8cec07afbd
Replaced CGHeroInstance and CGObjectInstance with ObjectInstanceID in NetPacks
2018-03-17 13:24:12 +08:00
Henning Koehler
6263c4c3eb
renamed CGHeroInstance::updateSkill to updateSkillBonus
2018-03-05 22:13:23 +08:00
Henning Koehler
4c0a67041b
secondary skill bonuses get updated via replacement (issue 2796)
2018-03-05 22:13:23 +08:00
AlexVinS
f126a34a5e
Fixed https://bugs.vcmi.eu/view.php?id=2904
2018-03-04 11:15:24 +03:00
Alexander Shishkin
8b002ad774
Issue2888 ( #421 )
...
Fixed issue 2888
* Merged AFTER_ATTACK & BEFORE_ATTACK cast modes.
* Introduced new caster class for creature ability usage
* Added few tests
2018-03-02 13:22:51 +03:00
ArseniyShestakov
7fd090786c
Merge pull request #379 from henningkoehlernz/hero_specialty_scaling
...
Hero specialty scaling
2018-02-28 15:03:24 +08:00
Henning Koehler
6c443d7094
SPECIAL_SPELL_LEV and SPECIAL_BLESS_DAMAGE no longer scale with hero level
2018-02-21 09:56:20 +13:00
AlexVinS
6d8536b12a
Fixed https://bugs.vcmi.eu/view.php?id=2882
2018-02-20 14:29:06 +03:00
Henning Koehler
9850e7254e
updated serialization version to 781
2018-02-18 23:32:52 +13:00
Henning Koehler
f9a8cb2876
fixed formatting and other small issues
2018-02-18 20:22:23 +13:00
Henning Koehler
00f51e0f98
Updaters replace bonuses during inheritance
2018-02-18 20:22:23 +13:00
Henning Koehler
ad5a9f7205
made HeroSpecial public again
2018-02-18 20:08:34 +13:00
Henning Koehler
6037c19b9a
removed specialtyDeprecated from CGHeroInstance; improved savegame compatibility
2018-02-18 19:47:38 +13:00
Henning Koehler
81c44dac41
minor fixes
2018-02-18 19:47:38 +13:00
Henning Koehler
5d3f6c3b91
removed CHeroInstance::specialty
2018-02-18 17:33:23 +13:00
Henning Koehler
ef7900d0a2
added support for older saves (fails)
2018-02-18 17:33:23 +13:00
Henning Koehler
3e0022be27
added support for new specialty json format; old format is converted to bonuses with updaters
2018-02-18 17:33:23 +13:00
Ivan Romanov
eea50a044c
Hide "this statement may fall through" warnings
2018-02-10 22:27:00 +05:00
AlexVinS
0b70baa95e
Spells configuration version 2 (effect-based)
...
* Indirect spell effects loading
* Json serializer improvements
* spell->canBeCastAt do not allow useless cast for any spell
* Added proxy caster class for spell-created obstacles
* Handle damage from spell-created obstacles inside mechanics
* Experimental GameState integration/regression tests
* Ignore mod settings and load only "vcmi" mod when running tests
* fixed https://bugs.vcmi.eu/view.php?id=2765 (with tests)
* Huge improvements of BattleAI regarding spell casts
* AI can cast almost any combat spell except TELEPORT, SACRIFICE and obstacle placement spells.
* Possible fix for https://bugs.vcmi.eu/view.php?id=1811
* CStack factored out to several classes
* [Battle] Allowed RETURN_AFTER_STRIKE effect on server side to be optional
* [Battle] Allowed BattleAction have multiple destinations
* [Spells] Converted limit|immunity to target condition
* [Spells] Use partial configuration reload for backward compatibility handling
* [Tests] Started tests for CUnitState
* Partial fixes of fire shield effect
* [Battle] Do HP calculations in 64 bits
* [BattleAI] Use threading for spell cast evaluation
* [BattleAI] Made AI be able to evaluate modified turn order (on hypothetical battle state)
* Implemented https://bugs.vcmi.eu/view.php?id=2811
* plug rare freeze when hypnotized unit shots vertically
* Correctly apply ONLY_MELEE_FIGHT / ONLY_DISTANCE_FIGHT for unit damage, attack & defense
* [BattleAI] Try to not waste a cast if battle is actually won already
* Extended JsonSerializeFormat API
* fixed https://bugs.vcmi.eu/view.php?id=2847
* Any unit effect can be now chained (not only damage like Chain Lightning)
** only damage effect for now actually uses "chainFactor"
* Possible quick fix for https://bugs.vcmi.eu/view.php?id=2860
2018-02-08 11:37:21 +03:00
AlexVinS
6033d32b5b
Fixed https://bugs.vcmi.eu/view.php?id=2845
2018-01-09 10:14:56 +03:00
Arseniy Shestakov
c5ca75bc53
CRewardableObject: remove now unused soundID
2018-01-02 09:49:04 +01:00
Arseniy Shestakov
f15cadc87b
Implement configurable object sounds: ambient, visit and removal
...
* If there more than one sound for visit or removal random is played
* At moment only the first ambient sound will be used
2018-01-02 09:49:03 +01:00
Michał Kalinowski
26a222ac62
Change JsonType to enum class ( #393 )
...
Change enum JsonType to enum class JsonType
2017-11-27 00:18:18 +03:00
godric3
5a01aba9c8
fix for banks(crypt, ships) not giving morale penalty ( #384 )
...
* fix for banks(crypt, ships) not giving morale penalty
also texts should be closer to original now
2017-11-15 23:16:44 +03:00
AlexVinS
d93ef36750
Fixed https://bugs.vcmi.eu/view.php?id=2818
2017-11-15 15:54:54 +03:00
Hao Hu
9cc2464cf6
Fixing bugs for external dwelling bonus of Golem Factory ( #382 )
...
* Fixing bugs for external dwelling bonus of Golem Factory.
[Problem]
The occupied Golem Factory on adventure map doesn't give
the player corresponding weekly growth bonus.
[Solution]
1. Add the dwelling (of multiple generators) to a player's dewelling set.
2. Created helper function to calculate external dwelling bonus
points.
[Test]
Manual testing on the map, works fine.
https://bugs.vcmi.eu/view.php?id=2789
2017-10-07 17:42:33 +03:00
godric3
e3f0126e41
Removed unnecessary code, fix #2737
...
bonus value is added to desciption inside Bonus
2017-10-05 16:50:39 +02:00
godric3
7d8adcc083
Add missing artifact name in wagon text, fix #2763
2017-10-05 14:52:51 +02:00
ArseniyShestakov
ca066841f1
Merge pull request #370 from vcmi/issue/2780
...
Issue/2780
2017-09-05 01:21:58 +03:00
AlexVinS
2f7968b803
Fixed wrong animation paths
2017-09-04 18:41:22 +03:00
Henning Koehler
abdca71828
skill names and descriptions are fully managed by CSkillHandler
2017-08-30 22:35:23 +12:00
Henning Koehler
3fe9bc34b8
CGHeroInstance::recreateSecondarySkillsBonuses() restores bonuses for all levels
2017-08-28 23:59:01 +12:00
Henning Koehler
9b3c61616f
made diplomacy join chance bonus-based
2017-08-28 23:33:19 +12:00
Henning Koehler
5091b117e2
fixed serialization for older savegames
2017-08-28 13:56:00 +12:00
Henning Koehler
0153d0fc78
made fire/air/water/earth magic skills bonus-based
2017-08-27 19:37:54 +12:00
Henning Koehler
9bbfb57b93
cleaned up secondary skill bonus merging
2017-08-27 15:35:04 +12:00
Henning Koehler
fc77c40a82
made ballistics bonus-based
2017-08-26 21:16:05 +12:00
Henning Koehler
19e619f61e
wisdom is now bonus-based
2017-08-26 20:49:29 +12:00
Henning Koehler
1fa6cbe514
scouting uses SIGHT_RADIUS bonus
2017-08-26 18:01:39 +12:00
Henning Koehler
e8c32e05d8
turned pathfinding effect into a bonus
2017-08-26 14:59:24 +12:00
Henning Koehler
0357a4fe3b
enabled config of skill descriptions
2017-08-26 10:08:06 +12:00
Henning Koehler
9811fbe02c
updateSkill attempts to update existing bonus instead of adding new
2017-08-26 09:33:08 +12:00
Henning Koehler
a6c3352d7c
moved secondary skill default bonus initialization into CSkillHandler
2017-08-26 09:33:08 +12:00
AlexVinS
0868164147
(int) -> static_cast<int>
2017-08-12 15:43:41 +03:00
AlexVinS
8c0fab1dcf
fixes
2017-08-12 14:36:37 +03:00
AlexVinS
15138c23de
Finished conversion to new logging API
...
* removed logger streams
* (float3|int3)::operator() -> (float3|int3)::toString(), it was too ugly and confusing.
2017-08-11 23:06:27 +03:00
AlexVinS
143ff682bc
Logging cleanup
2017-08-10 21:59:55 +03:00
AlexVinS
85e952f25f
Logging cleanup 3
2017-08-10 20:17:10 +03:00
AlexVinS
61e241308d
Logging cleanup
2017-08-10 19:52:05 +03:00
ArseniyShestakov
cb40c093f8
Avoid boost::optional assignment for Boost 1.64 compatibility ( #360 )
...
Two options here: to use emplace from 1.56 or boost::make_optional.
Unfortunately Ubuntu 14.04 is using 1.54 and I'd rather not to break it.
2017-08-05 16:09:29 +03:00
ArseniyShestakov
9d9c026c85
Code style: serialize everything on own lines for easier debugging ( #357 )
2017-07-31 16:35:42 +03:00
Piotr
f931b19a16
Show correct quantity of guards of dwelling, fixes #2502 ( #356 )
2017-07-26 00:00:29 +03:00
Dydzio
8314e8234f
Fix water wheel gold amount ( #348 )
2017-07-18 15:00:30 +03:00
ArseniyShestakov
b52cfe5283
Code style: use parentheses for creating heap-based objects ( #344 )
2017-07-16 12:58:05 +03:00
ArseniyShestakov
a4c0ad94b1
Code style: remove default value hints in definitions ( #342 )
...
Some are outdated and this is something IDE are useful for.
2017-07-15 14:08:20 +03:00
Dydzio
0cb6515ae8
VCAI tweaks ( #311 )
...
* Add extra priority support for town capture evaluation
* Improve building algorithm
* GatherArmy: check free gold instead of total for when hiring heroes
2017-07-15 01:15:08 +03:00
Dydzio
98140aab6b
Add option to toggle monthly artifact change in black market ( #341 )
...
* Add black market art change as hardcodedFeature
2017-07-15 00:46:18 +03:00
ArseniyShestakov
ea0ceb1805
Merge pull request #323 from vcmi/CStackTweaks
...
CStack tweaks
2017-07-15 00:42:08 +03:00
Arseniy Shestakov
98406d127d
CGMonolith: fix crash on initialization here too
2017-07-14 16:50:29 +03:00
Arseniy Shestakov
ee7862b12f
CGSubterraneanGate: fix crash on initialization
...
There is some reason it's appear in campaign maps.
2017-07-14 15:03:55 +03:00
Arseniy Shestakov
f1e5797834
Code style: move or add licensing information on top of every file
2017-07-14 01:26:03 +03:00
Arseniy Shestakov
dbcd79c48a
Code cleanup: remove double and unneded semicolons
2017-07-12 22:01: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
Piotr Wójcik
7bc9853175
Squashed commit of PR #314 :
...
commit 437c6c6fd4931abe69d3b7fe501b231a74182159
Author: Piotr Wójcik <chocimier@tlen.pl>
Date: Sat Jun 24 18:36:16 2017 +0200
Rename CPlayersVisited to CTeamVisited
commit baf1423cd9b090eaaa0a6962f2bd0f440e2e0747
Author: Piotr Wójcik <chocimier@tlen.pl>
Date: Wed Jun 21 16:41:37 2017 +0200
Share visited status of CPlayersVisited objects across team
2017-06-30 23:51:43 +03:00
AlexVinS
a31c28ec33
Unified war machine mechanics.
...
* it is possible to define new war machines
* added warMachine field to artifact configuration
2017-06-06 19:18:26 +03:00
AlexVinS
9f1451c1a3
[Map format] more correct handling of default hero primary skills
2017-06-06 02:37:07 +03:00
AlexVinS
4b2a118ffa
fixed assertion if hero instance in VCMI map have 0 at one of primary skills
2017-06-06 02:01:24 +03:00
Piotr
9d5d291e6b
Do not show whether Witch Hut is visited by hero, if was not visited by player yet, fixes #2604 ( #304 )
2017-06-01 23:36:46 +03:00
AlexVinS
8a494b7820
fix
2017-05-28 18:42:36 +03:00
AlexVinS
9718ef1543
Fix
2017-05-28 18:40:13 +03:00
AlexVinS
70a092f58c
[Refactoring] use virtual method for object specific actions when new map object is created
...
* --TODO
* fixes CID 1366291, CID 1366297
2017-05-28 16:23:42 +03:00
AlexVinS
a7ed27c73f
Fixed CID 1375705, CID 1375709, CID 1375708
2017-05-28 14:40:35 +03:00
FeniksFire
1f215d2306
Fix http://bugs.vcmi.eu/view.php?id=2677 .
2017-05-28 12:23:03 +02:00
AlexVinS
a85b4cf2a5
* WIP on event condition format
...
* Hero portrait serialization
* Fix town spells serialization
* Added support for float exponential part in Json
* Added support for int64 in Json
* Added basic Hero definitions serialization
* Added rumors serialization
* Advanced player info serialization.
* Added Disposed heroes serialization, (!) not covered with tests yet
* Added Local event serialization
* Added Pandoras box serialization
* Added Seer hut reward serialization
* Added CQuest serialization
* Added API for map object instance names serialization.
* Added random dwelling options serialization
* Advanced town options serialization
* Advanced hero options serialization
* More map format tests
* A lot of fixes, cleanup and refactoring
2017-05-27 00:23:19 +03:00
Piotr Wójcik
e3992de50e
Give hero move points at day of visiting stable, fixes #2598
2017-05-11 20:52:10 +02:00
FeniksFire
3de891b4b4
Moving/dividing classes from BattleState to separate files.
2017-03-17 16:48:44 +01:00
AlexVinS
c86304ac3b
Fixed http://bugs.vcmi.eu/view.php?id=2634
2017-01-26 10:52:19 +03:00
AlexVinS
478890df5f
Fixed CID 1366431, CID 1366430
2016-12-05 02:55:05 +03:00
AlexVinS
c23d3ac83c
Fixed CID 1366432
2016-11-28 03:59:03 +03:00
AlexVinS
3216422307
Fixed a few CWE-457
2016-11-27 22:07:01 +03:00
AlexVinS
c4ab962cc0
Fixed a few CWE-457
2016-11-27 17:48:18 +03:00
AlexVinS
30663f15ea
Fixed CID 1288863
2016-11-26 22:12:52 +03:00
AlexVinS
0a4e5fcdca
Fixed CID 1366337
2016-11-26 20:54:07 +03:00
AlexVinS
86e33a4c45
[Refactoring] Unified SetResources NetPack API.
2016-11-26 15:14:43 +03:00
AlexVinS
fa4e00573f
Fixed CID 1366350
2016-11-25 15:34:38 +03:00
AlexVinS
692d23e580
Fixed CID 1366376
2016-11-25 13:38:26 +03:00
AlexVinS
f538aae95e
Partial fix for http://bugs.vcmi.eu/view.php?id=2590
2016-11-02 14:52:02 +03:00
Vadim Markovtsev
99a3a58cbb
Add commander resurrection info window upon entering town
2016-10-29 21:55:00 +02:00
Vadim Markovtsev
9f967b4d7a
Fix formatting
2016-10-29 17:00:12 +02:00
AlexVinS
f760e22707
Fixed two recursive infinite loops in case of alternate buildings.
...
* introduced in https://github.com/vcmi/vcmi/pull/211
2016-10-15 04:19:47 +03:00
AlexVinS
cf143cd257
Hack-fix crash in CGTownInstance::genBuildingRequirements related to alternate town buildings
...
* this disables features of #211 , but actual problem may be deeper inside logical expressions
2016-10-14 23:46:24 +03:00
AlexVinS
552f28c10b
fix
2016-10-11 21:25:22 +03:00
AlexVinS
ef9bff9006
fixes related to http://bugs.vcmi.eu/view.php?id=2520
2016-10-11 20:04:30 +03:00
AlexVinS
9834db1b7d
simplified CGScholar::onHeroVisit
2016-10-11 20:04:28 +03:00
AlexVinS
4173a5064c
Fixed http://bugs.vcmi.eu/view.php?id=2545
2016-10-11 20:04:27 +03:00
AlexVinS
24585cde87
complete fix for http://bugs.vcmi.eu/view.php?id=2507
2016-10-11 18:19:42 +03:00
AlexVinS
5c3f84138b
fixed random reward generation in CGVisitableOPW
2016-10-11 18:00:54 +03:00
AlexVinS
7db7ece143
Do not send netpack inside netpack handler.
2016-10-09 19:38:13 +03:00
Piotr Wójcik
bb890098df
Fix regression for week-visitable objects
2016-10-09 18:51:41 +03:00
AlexVinS
799b8519e0
Allow cast avdmap spells without spellbook
...
* fixes http://bugs.vcmi.eu/view.php?id=1898
* partial fix for http://bugs.vcmi.eu/view.php?id=482
* fixes http://bugs.vcmi.eu/view.php?id=2155
2016-10-01 17:21:39 +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
ArseniyShestakov
6c63041d1a
Merge pull request #198 from vcmi/SpellsRefactoring8
...
No reason to not merge this now.
2016-09-24 05:29:55 +03:00
Arseniy Shestakov
bb05db90e5
CRewardableObject::onHeroVisit: avoid crash on pickable objects
...
Missed this problem when tested #214
2016-09-23 11:47:07 +03:00
ArseniyShestakov
50b271393c
Merge pull request #214 from Chocimier/iss1975
...
Properly check if corpse was visited
2016-09-23 06:26:10 +03:00
AlexVinS
ea2e336f54
Merge branch 'develop' into SpellsRefactoring8
2016-09-22 16:40:32 +03:00
Piotr Wójcik
97d358b70f
Marking visited for team
...
Also no longer gives reward every player
2016-09-20 22:05:44 +02:00
Dydzio
bd651ec5ef
Improve pandora box secondary skill handling
2016-09-20 12:40:58 +02:00
Dydzio
563a5d53c0
Update secondary skill handling. Fix issue 2307
...
Also making secondary skill icon display behavior same as in H3 during popup message.
2016-09-19 20:05:57 +02:00
Arseniy Shestakov
635c48f889
CGHeroInstance::setType: fix to give proper subID to random heroes
...
Hero class id is used to determine hero object appearance, but after than we use subID to store it's unique id.
This change should fix issues 2127 and 2277 since random heroes not going to override others in heroesPool.
2016-09-18 10:01:09 +03:00
Arseniy Shestakov
f6df107a55
Replace more magic subIDs with readable enums
2016-09-18 00:53:37 +03:00
Dydzio
beae354536
Correcting random amount of gold in gold piles
...
In original H3 allowed amounts of gold in treasure piles are multipliers of 100. Before this fix gold amount can be any value from range 500-1000.
2016-09-17 23:22:13 +02:00
AlexVinS
53fbf88316
Spell cast logging refactored.
2016-09-17 23:04:23 +03:00
AlexVinS
d993710f8e
Merge branch 'develop' into SpellsRefactoring8
2016-09-17 20:29:44 +03:00
Piotr Wójcik
28d859419c
Revert the old code
2016-09-16 22:01:21 +02:00
Piotr Wójcik
29d6fb0f04
Properly check if corpse was visited
...
Fixes two issues:
- corpse without loot couldn't be marked as visited
- taking loot from once visitable objects marked them as visited for all players
2016-09-16 20:59:07 +02:00
ArseniyShestakov
b5fa97b697
Merge pull request #211 from Chocimier/iss2321
...
Tested. Everthing looks fine so merging.
2016-09-14 00:37:17 +03:00
Piotr Wójcik
c5e4eaf9c1
Check if hero knows spell even without wisdom
2016-09-13 22:28:21 +02:00
Arseniy Shestakov
1e60ba6516
Only delete CQuest in CMap destructor and not with IQuestObject
...
Quest information must remain accessible even if map object removed. Fix issue 2472
2016-09-13 01:30:47 +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
33d1895d21
Merge branch 'develop' into SpellsRefactoring8
2016-09-11 18:34:18 +03:00
Arseniy Shestakov
c8faca8f39
Refactoring: only use RNGs explicitly to avoid bug prone code in future
...
Now server-side code should always use CRandomGenerator::getDefault which is serialized in GH.
CGameState::getRandomGenerator should be only used from GS code and CPackForClient-based applyGs.
2016-09-11 00:10:46 +03:00
Piotr Wójcik
40003460ca
Check if building's dependencies are allowed
2016-09-10 19:38:49 +02:00
AlexVinS
62abde6c46
Prepare battle log for spell-cast on server side.
2016-09-10 18:23:55 +03:00
Arseniy Shestakov
ca819b3cda
CGHeroInstance::nextPrimarySkill: don't use GS RNG directly
...
Code used from both GS and CGameHandler.
2016-09-09 23:16:42 +03:00
Arseniy Shestakov
85f49bc968
CGHeroInstance::initArmy: don't use GS RNG. Get RNG through a ref
...
This function used by both server-side and gamestate so it's must use appropriate random source.
2016-09-09 23:16:42 +03:00
Arseniy Shestakov
2ba3b20928
Multiple changes to RNG usage to both client and server
...
Server should never use RNG from CGameState directly.
Instead server get's own RNG that's state is secret for client.
2016-09-09 23:16:42 +03:00
Arseniy Shestakov
02f70464fb
Fix mismatched-tags Clang warnings
...
They're not important at all, but sicne there only few of them left just fix them.
2016-09-08 19:42:59 +03:00
AlexVinS
a109580b91
Use const for ObjectTemplate
2016-09-08 18:06:28 +03:00
AlexVinS
114dac7e81
Added ObjectTemplate copy constructor and assignment operator
2016-09-08 17:02:59 +03:00
Piotr Wójcik
044e2b9e51
Properly calculate building requirements
...
In OH3 you can't build Capitol when Tavern is not builded.
In VCMI up to now you could.
2016-08-30 22:15:24 +02:00
Piotr Wójcik
326be61ecb
Show atrifact's name in message of Warrior's tomb
2016-08-30 20:50:03 +02:00
Piotr Wójcik
52797082aa
Do not show whether Shrine is visited by hero, if was not visited by player yet
2016-08-30 20:48:03 +02:00
AlexVinS
c6d257f328
Fixed CQuest leak
2016-08-30 09:48:10 +03:00
Arseniy Shestakov
94bb5b9901
CGKeys::wasMyColorVisited: fix to not change playerKeyMap on client
2016-08-25 16:47:52 +03:00
Arseniy Shestakov
a90b657b86
Add reset to some static variables on client
2016-08-25 15:52:20 +03:00
Arseniy Shestakov
355f0a74ab
CGSeerHut: add initialization to constructor
2016-08-23 01:19:03 +03:00
Arseniy Shestakov
52e660f087
CQuest: add proper constructor to avoid uninitialized fields
2016-08-22 20:41:37 +03:00
Arseniy Shestakov
206c5699cf
CGHeroInstance::SecondarySkillsInfo: always set rand seed
...
Seed will always be set again on hero initialization, but for save sync it's must be same before that. Related to issue 2459
2016-08-19 23:31:54 +03:00
Arseniy Shestakov
ab06cfd586
More fixes for uninitialized fields
2016-08-18 18:53:28 +03:00
AlexVinS
e26384062f
Fixed memory leak in CObjectClassesHandler
2016-08-17 09:24:01 +03:00
Arseniy Shestakov
b0045fa357
Fix TurnInfo memory leaks
2016-08-16 15:47:21 +03:00
DjWarmonger
2410f0af61
- WeightedRule optimization - part 1
...
- comments, style
2016-08-11 07:49:08 +02:00
DjWarmonger
2bffd4e5c1
Moar optimization!
2016-08-09 13:40:46 +02:00
DjWarmonger
201ed26795
Fixed #1213
2016-06-06 09:30:45 +02:00
Arseniy Shestakov
10dbbead2d
Fix indentation of logging code and around it
...
That wouldn't be as big issue if problem affected few files, but it everywhere in codebase.
Fixed it everywhere since in most files that is the only code with wrong indentation.
2016-03-12 04:46:21 +03:00
DjWarmonger
8f1fba9551
Merge pull request #146 from vcmi/feature/VCMIMapFormat1
...
Ok let's try it.
2016-03-01 07:49:54 +01:00
AlexVinS
5408b6c1ff
Formatting
2016-02-26 18:19:41 +03:00
AlexVinS
8e3e574900
Fix map object appearance serialization
2016-02-26 02:03:14 +03:00
AlexVinS
0de1a37d65
Fix missing template zIndex saving
2016-02-26 01:01:07 +03:00
AlexVinS
2021decb91
Serialize town spells
2016-02-25 22:59:17 +03:00
AlexVinS
d2f04332d0
Load object appearance and pos before addNewObject call, it is required for block-visit calculation.
...
Added a test for tile block-visit.
2016-02-24 00:44:17 +03:00
AlexVinS
17e557be17
Advance Logical identifier condition
2016-02-23 16:36:21 +03:00
AlexVinS
4bcfb8c27d
Draft of new Event conditions
2016-02-22 23:43:57 +03:00
AlexVinS
dc5ad7d7b3
Make string instance names persistent
2016-02-22 19:26:42 +03:00
AlexVinS
ac281f3fec
Tweaks
2016-02-22 04:53:14 +03:00
Arseniy Shestakov
9428f865d3
CGTownInstance: erase all stacks when town is captured by enemy
2016-02-22 03:33:15 +03:00
AlexVinS
64cb0267a3
Do not save "visitableFrom" if object do not have active tiles.
2016-02-22 03:22:10 +03:00
AlexVinS
51bee1000b
Implemented CGWitchHut::serializeJsonOptions
2016-02-22 03:16:33 +03:00
Arseniy Shestakov
d15106bf63
CGTownInstance: implement armies merging on siege. Fix issue 169
...
Merging algorithm is replicate one from original game.
2016-02-22 02:46:31 +03:00
AlexVinS
dd1aabbe23
Use JsonSerializeFormat for map objects
2016-02-22 02:37:19 +03:00
AlexVinS
53b5587c2e
Advance map header serialization
2016-02-21 21:21:22 +03:00
Arseniy Shestakov
07961766ca
CGPandoraBox: don't use giveCreatures object removal feature
...
For pandora box there's own removal function and for CGEvent based on it we sometimes don't want to remove object at all.
2016-02-17 11:28:54 +03:00
AlexVinS
4d9058e412
Whitespace cleanup. (No code changes.)
2016-02-15 13:34:37 +03:00
AlexVinS
67b03b9658
Fixed remaining tempOwner testsю
2016-02-14 12:25:49 +03:00
AlexVinS
fb322b41bc
Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1
2016-02-14 12:14:57 +03:00
AlexVinS
800f32c4cb
Fix few cases of tempOwner initialization.
2016-02-14 12:13:30 +03:00
AlexVinS
709dd833d5
Added hacks for hero identification.
2016-02-14 11:25:01 +03:00
AlexVinS
e0af4a665a
Added hacks fot spell scroll support.
2016-02-13 19:43:05 +03:00
Arseniy Shestakov
d4524c2fbd
CGDwelling: dont set owner for Refugee Camp. Fix issue 2029
2016-02-13 19:26:47 +03:00
AlexVinS
a59f0c23ce
Dedug tweaks
2016-02-13 17:16:00 +03:00
AlexVinS
fb17914ae5
Debug tweaks
2016-02-10 08:59:24 +03:00
AlexVinS
6db94ab74c
Explicit army serialization - too much CArmedInstance descendants
2016-02-09 10:11:59 +03:00
AlexVinS
53dc49e92a
CGShipyard, CGShrine serialization
2016-02-09 09:17:20 +03:00
AlexVinS
401ba48257
CGScholar serialization
2016-02-09 09:02:34 +03:00
AlexVinS
a00dbd3dd1
Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1
...
Conflicts:
lib/CMakeLists.txt
lib/VCMI_lib.cbp
lib/filesystem/CFileInputStream.cpp
lib/filesystem/CZipLoader.cpp
lib/rmg/CRmgTemplateZone.cpp
vcmi.workspace
2016-02-08 10:17:25 +03:00
Arseniy Shestakov
a13aec4fd7
Aplly some fix for merge and explicitly specify type for std::max
2016-02-08 04:09:02 +03:00
DjWarmonger
6f5706352d
Possible fix for #2371
2016-02-06 12:36:56 +01:00
AlexVinS
081a20d047
Fix a crash.
2016-02-05 09:40:20 +03:00
AlexVinS
483276b128
Merge fixes
2016-02-04 12:28:12 +03:00
AlexVinS
6e205a58b4
Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1
...
Conflicts:
lib/VCMI_lib.cbp
lib/filesystem/CZipLoader.cpp
lib/filesystem/CZipLoader.h
lib/mapObjects/CGTownInstance.cpp
2016-02-04 10:27:51 +03:00
AlexVinS
97f19b5176
CGResource serialization
2016-02-04 09:22:14 +03:00
AlexVinS
d8d574ed84
CGSignBottle serialization
2016-02-04 08:50:46 +03:00
AlexVinS
a6c719ee11
CGCreature serialization. Added rewardResources.
2016-02-04 08:44:46 +03:00
AlexVinS
1bc41b3ba3
Merge commit '3c844002626f48007a888d4dd8b0b45ec867fc9a' into feature/VCMIMapFormat1
...
Conflicts:
lib/mapObjects/CGHeroInstance.cpp
2016-02-03 05:04:44 +03:00
AlexVinS
b176734418
CGCreature serialization
2016-02-03 04:18:03 +03:00
Vadim Markovtsev
88bc21952b
Make stables message appear if hero has cavaliers but visited stables before
2016-02-01 09:41:15 +03:00
Vadim Markovtsev
c30a6f2ff3
Fix 1989 cavaliers -> champions in stables
2016-01-31 21:09:11 +03:00
Vadim Markovtsev
3926920103
Rename radious -> radius
...
There is no such English word, "radious"
Some files get new lines in the end - BSD sed bug + best practices
2016-01-31 18:01:58 +03:00
Vadim Markovtsev
e18b21b78e
Fix 2264 learning stone & Learning skill
2016-01-31 10:12:01 +03:00
Vadim Markovtsev
eb4331baf6
Fix 1916 water wheel reward
2016-01-30 19:11:22 +03:00
Vadim Markovtsev
918fbd8530
Refactor hero's mana regain
2016-01-30 13:51:07 +03:00
ArseniyShestakov
94fa25d56d
Merge pull request #179 from vmarkovtsev/issue/2405
...
Fix 2405 quest timeout mechanics
2016-01-29 12:19:31 +03:00
Vadim Markovtsev
30d64e3e3c
Fix 2405 quest timeout mechanics
2016-01-29 09:28:37 +03:00