Ivan Savenko
11e4d84749
Implemented View Earth / View Air spells
2023-03-05 17:48:02 +02:00
Ivan Savenko
4501036a04
Basic version of hero movement on map. Removed old code.
2023-03-05 17:48:02 +02:00
Ivan Savenko
623cae7d47
All translatable strings now have language identifier
2023-03-05 17:30:38 +02:00
Konstantin
bdd976cc1e
vcmi: modernize spell effects v2
2023-02-12 21:23:00 +03:00
Konstantin
97fc424e98
vcmi: modernize lib/spells (except adventure one, needs major rework)
2023-02-12 21:23:00 +03:00
Konstantin
e82cc56ddb
vcmi: modernize lib/spells/effects
2023-02-08 15:38:26 +03:00
Andrey Filipenkov
0bbf70f30a
show resurrect message in the battle log
2023-01-25 18:13:06 +03:00
Ivan Savenko
47c1803c42
Finalization of refactoring:
...
- Entity interface now has getNameTranslated & getNameTextID methods
- Entity interface no longer has getName method
- removed (most) usages of normalizeIndentifier workaround method
- all moddable objects have identifier in form of mod:name
- all moddable object register strings in form of mod.type.name
2023-01-20 15:18:36 +02:00
Ivan Savenko
fa6f7513e8
All heroes-related strings are passed through translator
2023-01-20 15:18:36 +02:00
Ivan Savenko
5da407e822
All spell texts are now passed through translator
2023-01-20 15:18:36 +02:00
Ivan Savenko
4a09dc0757
Fixed Adela's Bless specialty
2023-01-20 15:18:10 +02:00
Ivan Savenko
d0c292e2fd
Fix order of map indexes
2023-01-20 15:15:57 +02:00
Ivan Savenko
ccc6ebee0d
Cleared up gate blocking, Force Field can now block gates
2023-01-13 15:44:42 +02:00
Ivan Savenko
526de47ca4
Removed 0.98 compatibility
2023-01-13 13:00:07 +02:00
Ivan Savenko
500cf7f15d
EWallPart & EWallState are now enum class
2023-01-13 00:35:58 +02:00
Ivan Savenko
1fece0ce18
Merge pull request #1229 from IvanSavenko/battle_improvements
...
Battle: Fixing bugs & Implementation of missing features
2023-01-09 22:07:13 +02:00
Ivan Savenko
481f756b51
Fixes #1304 - correct battle log message on spellcast without kills
2023-01-07 19:52:57 +02:00
Ivan Savenko
6b2490903d
Fix casting of massive spells by creatures
2023-01-04 21:26:13 +02:00
Ivan Savenko
e1a244beb0
Fix crash on firewall cast attempt
2023-01-04 17:38:55 +02:00
Ivan Savenko
85d7b470d4
Access to quests texts is now processed via translator
2023-01-01 14:56:45 +02:00
Ivan Savenko
5d80457eda
Merge with vcmi/develop branch
2022-12-30 00:52:23 +02:00
Ivan Savenko
b8b1e07621
Fix serialization
2022-12-30 00:36:10 +02:00
Ivan Savenko
063b8732ff
Save compatibility with main branch
2022-12-25 18:07:08 +02:00
Ivan Savenko
325c29da0d
Merge remote-tracking branch 'vcmi/develop' into battle_improvements
2022-12-23 14:51:34 +02:00
Ivan Savenko
eb20a4b208
Merge remote-tracking branch 'vcmi/develop' into warnings_fix
2022-12-23 14:40:45 +02:00
Ivan Savenko
f073c676f9
Merge 1.1 release into develop
2022-12-23 14:17:18 +02:00
Ivan Savenko
9248e06ae0
Demon summon is now a spell. DEMON_SUMMONING bonus has been removed
2022-12-22 23:11:55 +02:00
Ivan Savenko
bab5922951
Spells can now define color muxer effect (e.g. Bloodlust & Petrify)
2022-12-22 00:25:35 +02:00
Ivan Savenko
23cb47b457
Fixed several scenarios with incorrect scope for requesting identifiers
2022-12-21 23:02:19 +04:00
Ivan Savenko
53f6b7bd32
Fix Ice Ring target selection
2022-12-18 20:23:19 +02:00
Ivan Savenko
52fc5b3c39
Exploded mines now send ACTIVATE flag to client to play effect
2022-12-17 19:37:00 +02:00
Ivan Savenko
deffba01b9
All battle effects are now fully client sided
2022-12-17 17:35:15 +02:00
Ivan Savenko
e791323502
Implemented placement sound for obstacles
2022-12-13 21:31:49 +02:00
Ivan Savenko
60a00b450e
Multiple fixes & improvements to animation ordering
2022-12-13 21:31:49 +02:00
Ivan Savenko
b3deea24e0
Earthquake spell: do not target already destroyed sections
2022-12-13 21:31:49 +02:00
Ivan Savenko
ac839ad26a
Changes to rest of the code according to review:
...
- renamed status bar method clearMatching -> clearIfMatching
- renamed class ColorShifterAddMul -> ColorShifterMultiplyAndAdd
- fixed missing return from function
- fixed potential access to deleted object
2022-12-11 23:43:43 +02:00
Ivan Savenko
25bceda4ea
Added convertToVisitablePos/convertFromVisitablePos to CGHeroInstance
...
This method replaces old convertPosition, but with more clear names and
without hardcoded magic constants.
2022-12-09 14:42:47 +02:00
Ivan Savenko
facf77b3ae
vstd::unique -> std::unique
2022-12-07 23:36:20 +02:00
Ivan Savenko
2855606a88
Enabled & fixed -Woverloaded-virtual warning from gcc/cland
...
- fixed almost all instances of overloaded-virtual warning
- cleared up inheritance & method overrides in code affected by warning
2022-12-07 21:50:45 +02:00
Ivan Savenko
d8742dac3f
Show correct error message on attempting to cast Remove Obstacle on
...
fields with no removable obstacles
2022-12-02 00:27:48 +02:00
Ivan Savenko
495e0b3657
Merge remote-tracking branch 'vcmi/develop' into battleint_refactor
2022-12-01 23:58:01 +02:00
Ivan Savenko
5094fab4d9
Refactoring of spell animations, multiple fixes for spell visuals
2022-12-01 22:06:42 +02:00
Ivan Savenko
861a6849f9
Added possibility to define per-town tower icon for battle queue in siege
2022-11-29 14:47:51 +02:00
nordsoft
750f160276
Fix advmap spell mechanics
2022-10-20 22:34:27 +04:00
Andrii Danylchenko
878aabd4d6
Merge pull request #981 from kambala-decapitator/fix-analyzer-warnings
...
Fix Clang Analyzer warnings
2022-09-29 19:23:24 +03:00
Andrey Filipenkov
802147c5b7
add some asserts that shouldn't fire
2022-09-26 14:06:55 +03:00
Andrey Filipenkov
ff635edc0b
wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
...
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
Andrey Filipenkov
7e6ed0583c
disable all scripting code when configuring without scripting modules
2022-09-21 19:31:42 +03:00
DjWarmonger
7ba271edf1
Rotation rebase2 ( #912 )
...
* Instead of [x][y][z] coordinates, map will be stored as [z][x][y].
* Nullkiller AI can get it too.
* Use boost::multi_array instead of nested vectors
* In MapHandler too
* Rotate foreach algorithms, too
* VCAI gets rotated, too
2022-09-18 17:39:10 +03:00
DjWarmonger
3d2dc2335b
Switch ObjectTemplate to shared_ptr<const> ( #870 )
2022-09-11 16:13:53 +03:00
Andrii Danylchenko
4b4cc3cf4b
battlefields in VLC and custom bonuses for terrain patches
2022-09-11 11:31:27 +03:00
Nordsoft91
c4035134e5
New battlegrounds ( #758 )
2022-09-11 11:31:26 +03:00
Nordsoft91
aaa07e4d2e
New terrain support - part 1 ( #755 )
...
Initial support of new terrains
2022-09-11 11:31:26 +03:00
nordsoft
92dc902748
Fix for #3228 and #3042
2022-08-24 14:58:56 +03:00
Konstantin
c6b198ce14
Warning fix (I moved C++17 and CI to another branch) ( #739 )
...
* clang warning fixes
* use CMake 3.10 due to MXE CI does not have 3.13 yet
Co-authored-by: Konstantin <rilian@niisi.ras.ru>
2022-05-19 15:14:50 +03:00
AlexVinS
483a4689ce
Fixes for code review issues
2021-02-20 04:57:50 +03:00
Alexander Shishkin
784f6b973b
Apply suggestions from code review
...
Co-authored-by: Andrii Danylchenko <danilchenko.andrij@gmail.com>
2021-02-20 02:31:00 +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
MikeLodz
fe9412f845
hero specialty fixes continuation: changes requested during code review
2021-02-13 16:02:42 +01:00
MikeLodz
38efbb345e
Fixes mantis tickets 2899 and 2984 (bugged hero spell specialties)
...
- stoneskin/haste/prayer/weakness: didnt work because there were 2 bonus objects in buffer and they were filtered out as a possible duplicate (BattleInfo::addOrUpdateUnitBonus). it was fixed by making them a single bonus.
- disrupting-ray and weakness: had opposite effect, because of missing negation
- added a new specialty types: SPECIAL_ADD_VALUE_ENCHANT and SPECIAL_FIXED_VALUE_ENCHANT. this is to make possible specialties like Aenin (fixed specialty value added to spell value) and Melody (fixed value for spell regardless of anything). These specialties can be used in mods with any heroes.
- slayer spell effect calculations was fixed to include hero Coronius-style specialty.
- finally fixed description for Labetha Conflux hero, this is a OH3 bug described here https://heroes.thelazy.net/index.php/Labetha
Changes were tested and work as intended.
commit was made in cooperation with modder Misiokles
2021-02-08 23:58:12 +01:00
Dmitry Orlov
39de2f6435
Fix: Morale bonus should be shown correctly
2020-11-11 22:43:40 +03:00
Dmitry Orlov
195fb8ff41
Mod system improvement Part I : Fix content losing after deserialization
2020-10-10 00:31:23 +03:00
John Bolton
c61bae4060
Fixed RETURN_IF_BATTLE(). Undid disabled warnings. Fixed indentation.
2020-10-05 16:28:28 -07: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
toneyisnow
0f3dabab9a
Initialize the change:
...
1. Make color shifter for CAnimation, and use that in the clone effect.
2. Update the original position of the cloned object.
2020-01-25 01:21:26 -08:00
AlexVinS
e7bced112c
Fixed https://bugs.vcmi.eu/view.php?id=3059
2019-06-09 22:46:29 +03:00
Michał Kalinowski
97a8380d07
Simplification fixes
...
Return statement fixes
2019-03-31 09:43:14 +03:00
Michał Kalinowski
ac6b477aa2
Simplify statements
...
-Simplify return statements across the code
2019-03-31 09:43:14 +03:00
Dydzio
df11e851ef
Acid breath should have absolute dispel immunity
2019-03-25 02:19:07 +03:00
AlexVinS
1855af9ed3
Fixed error handling in TownPortalMechanics::applyAdventureEffects
2019-02-23 20:51:03 +03:00
Mikko
ae7821462d
Update ISpellMechanics.cpp
2019-01-24 15:09:01 +00: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
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
Michał Janiszewski
0ff2e1180d
Throw std::runtime_exception instead of a pointer to new one
...
cf. https://isocpp.org/wiki/faq/exceptions#what-to-throw
2018-10-31 07:27:54 +01:00
Michał Janiszewski
7be9aa4868
Prevent shadowing of function arguments by local vars
2018-10-29 16:56:14 +01:00
ArseniyShestakov
1a6f456ac0
Merge pull request #402 from vcmi/feature/multiplayer
...
Refactoring of all pre-gameplay UI and networking code.
This will break some things, but I'll be able to fix them without constant rebasing.
2018-04-05 23:29:27 +07:00
Arseniy Shestakov
74e5c5bf05
CGameHandler: rename CPackForClient argument and add network logging
2018-04-04 14:24:32 +07:00
AlexVinS
1fb25c46d3
cleanup
2018-04-03 21:46:12 +03: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
AlexVinS
8cec07afbd
Replaced CGHeroInstance and CGObjectInstance with ObjectInstanceID in NetPacks
2018-03-17 13:24:12 +08:00
Henning Koehler
7f76648a7c
Extend Bonus.addInfo to integer vector ( #427 )
...
* changed Bonus::additionalInfo to integer vector
* fixed deserialization for old savegames
* removed newline from JsonNode::toJson()
* updated bonus schema; SPELL_AFTER_ATTACK and SPELL_BEFORE_ATTACK use new addInfo format
* removed unnecessary init in Bonus constructor
2018-03-12 08:20:18 +03:00
AlexVinS
7d27d144a5
Possible fix for https://bugs.vcmi.eu/view.php?id=2913
2018-03-10 19:35:20 +03:00
ArseniyShestakov
079cd470c2
Merge pull request #425 from vcmi/CatapultRework
...
Catapult rework
2018-03-06 01:16:53 +08:00
Dydzio
07cf59592b
Updated catapult spell effect to match new code
2018-03-05 12:55:44 +01:00
AlexVinS
f126a34a5e
Fixed https://bugs.vcmi.eu/view.php?id=2904
2018-03-04 11:15:24 +03:00
AlexVinS
5ea1888a14
Summon effect fixes.
2018-03-03 20:37:49 +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
2b49df2cab
[Spells] Do not use Unit State in heal effect
2018-02-20 13:19:01 +03:00
AlexVinS
2add0e443e
[Spells] Added "summonByHealth" option to Summon effect
...
* with summonByHealth on, effect power (levelPower * SP) treated as HP
* default behavior (effect power = amount) not changed
* tests included
2018-02-20 08:08:34 +03:00
AlexVinS
c94daf6faa
Fixed https://bugs.vcmi.eu/view.php?id=2864
2018-02-10 07:31:02 +03:00
AlexVinS
10dd7e8a43
Cleanup
2018-02-10 04:03:17 +03:00
AlexVinS
8220053864
Cleanup
2018-02-09 20:52:56 +03: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
DjWarmonger
c2a0b13332
Merge pull request #371 from dydzio0614/NewAbilities
...
Tested and approved. Congrats!
2017-12-29 14:19:05 +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
AlexVinS
270e1b75ce
Support for creature 2-hex attack, alternate death and cast animation types
...
* margin option .json animation
* Use ranged attack animation for spell cast if there is no cast animation, display cast animation only on active casting.
2017-09-12 19:51:54 +03:00
Dydzio
14c07afd3c
Merge branch 'develop' into NewAbilities
2017-09-09 21:04:40 +02:00
Dydzio
7cbd9acd67
Add BLOCK_MAGIC_BELOW bonus
2017-09-06 00:03:32 +02:00
Henning Koehler
03b7da93e2
use logMod for all mod-related logging
2017-08-31 09:23:19 +12:00
FeniksFire
f331386b6f
Dimension door movement points fix
...
When hero with one move point make dimension doors then he can have on
graphics full move points. Caused by substraction that make unsigned
variable < 0.
2017-08-18 21:35:48 +02: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
3de0fa37f8
Possible fix for https://bugs.vcmi.eu/view.php?id=2759
2017-08-01 17:00:26 +03:00
ArseniyShestakov
9d9c026c85
Code style: serialize everything on own lines for easier debugging ( #357 )
2017-07-31 16:35:42 +03:00
Piotr
069f295165
Do not summon boat from another boat, fixes #2294 ( #353 )
2017-07-22 23:47:29 +03:00
AlexVinS
21c0c95049
tweak
2017-07-16 01:53:13 +03:00
AlexVinS
f1a4831813
[Spells] Get rid of SpellTargetingContext.
2017-07-16 01:43:50 +03:00
AlexVinS
7374689301
Fixed https://bugs.vcmi.eu/view.php?id=2715
2017-07-16 00:02:55 +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
ArseniyShestakov
ea0ceb1805
Merge pull request #323 from vcmi/CStackTweaks
...
CStack tweaks
2017-07-15 00:42:08 +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
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
AlexVinS
dbaf3cb023
Cleanup & formatting
2017-07-04 01:32:40 +03:00
FeniksFire
8577445b10
Simple fix: http://bugs.vcmi.eu/view.php?id=2366
2017-07-03 22:41:16 +03:00
AlexVinS
a65befaa08
Moved town portal logic to mechanics class
2017-07-03 21:43:04 +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
221386a39d
Refactoring.
...
Dividing CBattleCallback into smaller files with classes.
2017-06-24 15:51:07 +02:00
AlexVinS
0f5202689e
Cumulative spell effects
...
* Added experimental support for cumulative effects for ENCHANTED bonus
* Updated and fixed SPECIAL_PECULIAR_ENCHANT processing
* Initial implementation of cumulative spell effects.
* Scheme for new spell feature - cumulative bonus.
2017-06-13 21:50:50 +03:00
AlexVinS
195e979a18
get rid of CBattleInfoCallback::battleCanCastThisSpell
2017-06-05 23:46:55 +03:00
AlexVinS
6c308956f9
get rid of CBattleInfoCallback::battleCanCastThisSpellHere
2017-06-05 23:25:48 +03:00
AlexVinS
1d1519db5c
ENCHANTER_CASTING trigger tweak
2017-06-05 21:41:27 +03:00
AlexVinS
66cfc2fef9
CSpell::canBeCast tweaks
2017-06-05 21:30:25 +03:00
FeniksFire
039e3842fc
Aesthetic changes in BattleHex ( #303 )
2017-05-29 10:33:34 +03: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
AlexVinS
3c893a6bec
Few spell-related tweaks
2017-03-18 14:08:02 +03:00
FeniksFire
3de891b4b4
Moving/dividing classes from BattleState to separate files.
2017-03-17 16:48:44 +01:00
AlexVinS
0b3c1c7185
Fixed http://bugs.vcmi.eu/view.php?id=2639
2017-01-26 10:44:30 +03:00
AlexVinS
60bd54c9b3
Changed playerToSide return type to signed
2016-11-28 03:33:39 +03:00
AlexVinS
609c6f81bd
Fixed a few CWE-457
2016-11-27 22:37:41 +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
bc2f0ba6f1
fixed spell school ordering http://bugs.vcmi.eu/view.php?id=91
2016-10-17 03:33:29 +03:00
AlexVinS
5fa9d64d78
Do not allow cast if it affects only "wrong" targets
2016-10-02 16:46:04 +03:00
AlexVinS
cd5c0b3297
Style tweaks.
2016-10-02 15:22:55 +03:00
AlexVinS
c5440a1c6c
Fixed http://bugs.vcmi.eu/view.php?id=2541
2016-10-02 01:32:28 +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
c2a6c268c0
Cleanup terrain overlay bonuses, fixed CURSED_GROUND
2016-10-01 14:10:09 +03:00
AlexVinS
f6bfba0ced
Unified Dispell-related bonus selectors
2016-10-01 10:31:59 +03:00
AlexVinS
96c17505ae
get rid of IBonusBearer::getSpellBonuses & Selector::anyRange
2016-10-01 09:07:18 +03:00
AlexVinS
902117d812
Get rid of IBonusBearer::getBonusesCount it had only one usage
2016-10-01 06:51:12 +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
72461c5c2e
Fixed http://bugs.vcmi.eu/view.php?id=2268
2016-09-29 23:14:22 +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
30aa379a9d
Fixed http://bugs.vcmi.eu/view.php?id=2521
...
* show icons at visitable position
* do not duplicate visible objects icons
2016-09-28 07:58:15 +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
1fd87ecc4a
Simplified offensive spell damage calculation
2016-09-18 14:54:17 +03:00
AlexVinS
53fbf88316
Spell cast logging refactored.
2016-09-17 23:04:23 +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
4a9978c642
Disabled massive spells fore creatures as they are not fully supported yet.
...
* (WoG) commanders now cast spells properly.
2016-09-10 21:07:36 +03:00
AlexVinS
62abde6c46
Prepare battle log for spell-cast on server side.
2016-09-10 18:23:55 +03:00
AlexVinS
f8767a6380
cleanup
2016-09-10 09:37:18 +03:00
AlexVinS
f39e619304
More tweaks
2016-09-06 13:51:53 +03:00
AlexVinS
1ce4675df6
Tweaks
2016-09-06 13:33:11 +03:00
AlexVinS
838717dfc1
Magic mirror unified again with normal cast.
2016-09-06 13:05:33 +03:00
AlexVinS
686cd00c68
Cleanup.
2016-09-06 12:26:01 +03:00
AlexVinS
cc4362211c
Extracted MagicMirror handling
2016-09-06 11:03:36 +03:00
AlexVinS
f3d9e718bf
Handle AcidBreathDamage immunity in standard way.
2016-09-06 10:52:54 +03:00
AlexVinS
0241c6e843
Improved spell range calculation.
...
* should now support smart custom range AOE spells
2016-09-06 08:56:31 +03:00
AlexVinS
1e32c71e47
Make sure that there is no unwanted stack affect by spells.
2016-09-06 08:20:17 +03:00
AlexVinS
39c2c6cde7
Ensure no immunity to AcidBreathDamage
2016-09-06 07:16:32 +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
9ee954edcc
WIP on SpellCastContext
2016-09-06 05:11:32 +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
a23144b361
Extracted adventure spell mechanics to distinct class hierarchy.
2016-09-04 08:19:28 +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
AlexVinS
d1579ea620
Simplify spell action selection for creature target.
2016-08-30 12:20:13 +03:00
AlexVinS
b09f150e7b
Factored out battleCanCastThisSpellHere
2016-08-30 12:20:11 +03:00
AlexVinS
0d5eaa1183
Proper fix for http://bugs.vcmi.eu/view.php?id=2422
2016-08-30 12:20:09 +03:00
AlexVinS
b634482bb0
Fix http://bugs.vcmi.eu/view.php?id=2422
2016-08-30 12:20:07 +03:00
AlexVinS
22d885af22
Fixed http://bugs.vcmi.eu/view.php?id=2302
2016-08-30 12:20:05 +03:00
AlexVinS
be67faad90
Drafts
2016-08-30 12:20:03 +03:00
AlexVinS
f053754653
Advance REMOVE_OBSTACLE mechanics
2016-08-30 12:20:01 +03:00
AlexVinS
40e6e0c143
Move REMOVE_OBSTACLE-related code from callback to where it should be.
2016-08-30 12:19:59 +03:00
AlexVinS
750c114648
Drafts
2016-08-30 12:19:57 +03:00
AlexVinS
d4a35c6839
Simplify getAffectedStacks arguments. casterColor not needed anymore.
2016-08-30 12:14:08 +03:00
AlexVinS
f6715ad787
Use ISpellCaster in CSpell::canBeCast.
...
* -2 todo notes
2016-08-30 12:12:46 +03:00
AlexVinS
ef05a56e49
cleanup
2016-08-30 05:13:45 +03:00
Alexander Shishkin
5e5ce0bb09
Merge pull request #203 from vcmi/logFormat
...
boost::format support for CLogger
2016-08-29 17:32:44 +04:00
Arseniy Shestakov
452e28d183
Remove some useless includes found by cppclean
...
This of course was tested and shouldn't break anything
2016-08-26 04:42:16 +03:00
AlexVinS
74a82c4c9d
Moved boost:format log proxy to CLoggerBase
2016-08-13 16:57:18 +03:00
AlexVinS
599f4cfb55
extracted base logger class to vstd
2016-08-13 16:57:16 +03:00
AlexVinS
d6178d0bb5
Implemented boost::format based log proxy.
2016-08-13 16:57:13 +03:00
ArseniyShestakov
7886e8986e
Merge pull request #197 from vcmi/issue/2304_2418
...
Issues/2304/2418/2293
2016-03-01 15:20:59 +03:00
AlexVinS
3873e5047e
Attempt to fix 2293
2016-03-01 13:24:46 +03:00
AlexVinS
277211e569
Fix summoning block by clones.
2016-03-01 04:16:51 +03:00
AlexVinS
5df8d1cbd0
Update low level battle stacks accessor for ghost selection support.
2016-02-28 05:10:20 +03:00
AlexVinS
47b619a543
Centralize GHOST state handling
2016-02-28 01:35:23 +03:00
AlexVinS
d2a5e64542
Remove clone of killed or removed creature. Treat summoned creature as clone when killed.
2016-02-27 18:39:37 +03:00
AlexVinS
53b5587c2e
Advance map header serialization
2016-02-21 21:21:22 +03:00
AlexVinS
150fcc9422
Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1
2016-02-15 13:39:00 +03:00
AlexVinS
4d9058e412
Whitespace cleanup. (No code changes.)
2016-02-15 13:34:37 +03:00
AlexVinS
7106c5d1af
Fix loading of spell identifier
2016-02-13 19:41:28 +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
Vadim Markovtsev
bdd87be10d
Try to fix http://bugs.vcmi.eu/view.php?id=2362
2016-02-02 11:46:33 +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
AlexVinS
37d0dad70a
Merge branch 'develop' into feature/VCMIMapFormat1
...
Conflicts:
lib/CArtHandler.cpp
2016-01-01 20:28:52 +03:00
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
ArseniyShestakov
48be566050
Dimension Door: fix movement points cost for expert level
2015-12-21 18:46:52 +03:00
ArseniyShestakov
e872b400b7
Comments save format backward compatability code as Ivan suggested
...
Also we should always handle RumorState::TYPE_NONE in getTavernRumor properly anyway.
2015-12-06 02:51:54 +03:00
AlexVinS
6f203fb7e2
Save string identifiers for all game objects
2015-12-05 12:36:39 +03:00
Ivan Savenko
faa7cbff18
Fixed gcc/clang warnings
2015-12-04 01:17:43 +02:00
Ivan Savenko
7b5a7f43ad
Removed includes of CGameState from headers
2015-12-02 21:39:53 +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
eeb100d6a4
More comments about dispell special cases.
2015-10-13 07:11:49 +03:00
AlexVinS
02c15085be
Remove (aready disabled in prev. commit) active stack change in sacrifice mechanics
...
* stack removing is evil, but changing active stack by spells is more evil ...
2015-10-06 03:59:05 +03:00
AlexVinS
f99bf099ca
Made player interface tolerant to active stack removal.
2015-10-06 03:46:35 +03:00
AlexVinS
4e60b4cf53
Fixed 0002280
2015-10-06 01:26:50 +03:00
AlexVinS
6cf220b882
Partial fix for 2272, there are more active stack sacrifice problems.
2015-10-05 20:33:05 +03:00
AlexVinS
b07d272c2a
Added new BattleSpellCastParameters support to SACRIFICE spell.
2015-10-01 02:36:00 +03:00
AlexVinS
939a9180e2
Added new BattleSpellCastParameters support to TELEPORT spell.
2015-09-30 22:38:50 +03:00
AlexVinS
57e5b768e8
Allow multiple destinations in BattleSpellCastParameters
2015-09-30 00:31:50 +03:00
AlexVinS
70d9be8447
Use ISpellCaster in battle callback
2015-09-29 17:26:52 +03:00
AlexVinS
75c2566410
"const" tweak
2015-09-29 17:26:51 +03:00
AlexVinS
36e154d9b9
Use ISpellCaster in getAffectedStacks
2015-09-29 17:26:50 +03:00
AlexVinS
947f6089d5
Use ISpellCaster in isImmuneByStack
2015-09-29 17:26:49 +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
5f41ec912f
fix sphereOfPermanence
2015-09-29 17:26:45 +03:00
AlexVinS
3d7435c520
Introduced absolute specific spell immunity.
2015-09-29 17:26:44 +03:00