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

61 Commits

Author SHA1 Message Date
Ivan Savenko
dfa2e2a349 Merge beta into develop 2023-04-11 19:37:35 +03:00
Konstantin
fedf7d377c vcmi: remove TFaction
This is a huge change and will break save compatibility
2023-04-10 19:28:16 +03:00
Ivan Savenko
c5225aab70 Fix serialization 2023-04-04 22:22:58 +03:00
Konstantin
a639bd2606 spells: rework isMagical()
Now it is a flag of a spell, and not a target condition.
This fixes resistance to bind effect
2023-03-31 01:01:25 +03:00
Ivan Savenko
383387ef29 Integrated defaultMods into mod system 2023-03-16 17:55:09 +02:00
Konstantin
97fc424e98 vcmi: modernize lib/spells (except adventure one, needs major rework) 2023-02-12 21:23:00 +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
5da407e822 All spell texts are now passed through translator 2023-01-20 15:18:36 +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
bab5922951 Spells can now define color muxer effect (e.g. Bloodlust & Petrify) 2022-12-22 00:25:35 +02: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
Nordsoft91
aaa07e4d2e New terrain support - part 1 (#755)
Initial support of new terrains
2022-09-11 11:31:26 +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
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
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
AlexVinS
10dd7e8a43 Cleanup 2018-02-10 04:03:17 +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
ArseniyShestakov
9d9c026c85 Code style: serialize everything on own lines for easier debugging (#357) 2017-07-31 16:35:42 +03:00
AlexVinS
7374689301 Fixed https://bugs.vcmi.eu/view.php?id=2715 2017-07-16 00:02:55 +03:00
AlexVinS
a65befaa08 Moved town portal logic to mechanics class 2017-07-03 21:43:04 +03:00
FeniksFire
4113bdab01 Moving some files from lib to the battle subdirectory. 2017-06-26 15:26:08 +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
0b3c1c7185 Fixed http://bugs.vcmi.eu/view.php?id=2639 2017-01-26 10:44:30 +03:00
AlexVinS
c5440a1c6c Fixed http://bugs.vcmi.eu/view.php?id=2541 2016-10-02 01:32:28 +03:00
AlexVinS
72461c5c2e Fixed http://bugs.vcmi.eu/view.php?id=2268 2016-09-29 23:14:22 +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
62abde6c46 Prepare battle log for spell-cast on server side. 2016-09-10 18:23:55 +03:00
AlexVinS
18fc94d709 WIP on SpellCastContext 2016-09-06 06:40:23 +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
b09f150e7b Factored out battleCanCastThisSpellHere 2016-08-30 12:20:11 +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
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
37d0dad70a Merge branch 'develop' into feature/VCMIMapFormat1
Conflicts:
	lib/CArtHandler.cpp
2016-01-01 20:28: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
AlexVinS
70d9be8447 Use ISpellCaster in battle callback 2015-09-29 17:26:52 +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
253b850ac3 Partial fix for 1791 2015-09-29 17:26:43 +03:00
AlexVinS
baba3a46e1 Centralize creature spell bonuses handling
* unified heal and damage calculation
* apply SPELL_DAMAGE_REDUCTION, MORE_DAMAGE_FROM_SPELL for Fairy dragon
2015-09-29 17:26:35 +03:00
AlexVinS
46f99db8d7 Hide some spell mechnaics details 2015-09-29 17:26:32 +03:00