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

88 Commits

Author SHA1 Message Date
alexvins
53b684180d [refactor]
* use spells configuration (all timed effects for battle spells)
* a few more cleanups
+register erm resource types (useful in future and less noise in log now)
2013-01-16 11:19:04 +00:00
alexvins
c0ce8712c1 add some missing licence headers 2012-12-19 14:54:10 +00:00
DjWarmonger
71cbde7bbc Bonus limiters are now implemented using Decorator design pattern, which allows to chain them. 2012-12-13 10:49:12 +00:00
mateuszb
652ea4036e * artifact bonuses are read from config file now
* removed two commented-out methods
2012-10-03 18:11:19 +00:00
mateuszb
af133ae758 * experimental support for bonus limiter/propagator loading from json (not turned on yet) 2012-09-27 16:48:46 +00:00
mateuszb
59fcc15254 * last revision reverted, mysterious bug 2012-09-24 18:52:30 +00:00
mateuszb
55f1c47c16 * more TPlayerColor/TResource 2012-09-24 17:00:18 +00:00
Michał W. Urbańczyk
62e63d45b1 Work in progress on BattleAI. Related changes:
* battle AIs receive ptr to CBattleCallback (not sure why it was CPlayerBattleCallback, likely mistake)
* reworked some battle callback methods to be more generic and able to handle some hypothetic scenarios
* for testing purposes in duel mode the first AI will be taken fro mconfig and the second will remain stupid ai
* minor changes
2012-09-20 16:55:21 +00:00
Michał W. Urbańczyk
d390113c23 * New files for lib: CBattleCallback.cpp and CBattleCallback.h
* Updated MSVC project files
* Filesystem: My version of .SND archive does not have \0 after WAV extension. Fixed (though hardcoded 3-char extension length).
* New bonus types: BLOCK_MAGIC_ABOVE for blocking casting spells above given level and BLOCK_ALL_MAGIC for blocking all magic.
* Heavy rewrite of battle callbacks. Fixed some minor bugs. Code reusage between lib/client/server (removed proxy calls). Better access control and support for various perspectives.
* Fixed #1031
* Fixed Orb of Inhibition and Recanter's Cloak (they were incorrectly implemented). Fixed #97.
* Fleeing hero won't lose artifacts. Spellbook won't be captured. Fixed #980.
* Fixed crash when attacking stack dies before counterattack (ie. because of Fire Shield)
* Server does some basic checks if action requests during battle are valid
* Minor stuff.
2012-08-26 09:07:48 +00:00
DjWarmonger
d56e7c568a Added full parser for Bonus structure, as described in http://wiki.vcmi.eu/index.php?title=Bonus_Format
Untested.
Limiters / propagators are not yet supported.
2012-08-23 18:46:43 +00:00
DjWarmonger
9e0c9b4f49 Fixed #1042. Tweaks for Commander bonuses. 2012-08-20 16:10:50 +00:00
Ivan Savenko
faaf799d95 - fixed some extra warnings. Mostly harmless.
NOTE: Please check changes in BattleState.cpp and GameHandler.cpp for possible bugs
2012-05-28 19:29:32 +00:00
Michał W. Urbańczyk
d168f3eac2 * Implemented Moat functionality during siege (stops movement and deals dmg)
* Mostly implemented battle spells:
 - Fire Wall
 - Force Field
 - Land Mine
 - Quicksands
2012-05-18 20:50:16 +00:00
DjWarmonger
d491bc1c3a Commanders can level up. It's non-interactive yet.
Printing secondary skills for Commanders.
2012-05-18 14:02:27 +00:00
Ivan Savenko
d479341a5a - gcc compile and warning fixes 2012-04-30 12:13:36 +00:00
DjWarmonger
6d03e0bf23 One more thing. 2012-04-23 05:01:52 +00:00
DjWarmonger
9c9301a495 Various fixes. 2012-04-22 19:56:03 +00:00
DjWarmonger
038d105bcc - first sketch of Commanders
- accumulateBonus should make mechanics simpler
2012-04-04 17:41:55 +00:00
Michał W. Urbańczyk
c80d9b0a51 Possibly "fixed" #915.
Fixed server output (printing ui8 as %d apparently breaks boost.format :/).
2012-03-31 15:10:16 +00:00
Michał W. Urbańczyk
d0e259864e * Replaced boost::shared_ptr with std::shared_ptr.
* Brought shared_ptr and unique_ptr and their factories (make_shared, make_unique) to the global scope. 
* Removed excessive usage of shared_ptr in bonus system interface. 
* Fixed bonus system limiters/caching interactions. That covers #823, #859 and a number of rare edge-cases. 
* Implemented multiple-step limiters applying, fixing hasAnotherBonusLimiter  and allowing transitional dependencies between bonuses. 
* Bonus system should be slightly faster, since we cache limited bonuses. Some rare usages (limiting query against a foreign node) however can't use caching.
2012-03-06 16:59:55 +00:00
DjWarmonger
386ac80cf9 Fixed #855 & 861. Unsigned values were bad idea to prevent overflow. 2012-02-20 16:26:14 +00:00
Michał W. Urbańczyk
4baf4e13ed * fixed #857 and #858
* fixed crash when AI attacked player before his first turn
* fixed various crashes when mass-effect spells affected town turrets in sieges
* some refactoring around spell positiveness
2012-02-16 21:19:07 +00:00
DjWarmonger
1cbd7e94e4 - Extended cap or removed sign for some values that may potentially overflow
- Fixed #851
2012-01-26 16:48:53 +00:00
beegee1
7f04ed990b Major refactoring. First part: BattleInterface
Introduction of pre compiled headers,...
2011-12-13 21:23:17 +00:00
DjWarmonger
1e45674a7c Fixed #832. War machines will now be immune to a number of effects. 2011-10-29 11:12:30 +00:00
Michał W. Urbańczyk
9621cbcaa7 * fixed crash on calculating dmg dealt by stack under Curse
* fixed crash on sea battles (obstacles data got corrupted during conversion)
* fixed crash when StupidAI had a catapult
* minor fixes and refactorings (typename for bonus list under shared ptr)
2011-09-06 13:59:26 +00:00
beegee1
62c43451ef * Updated bonus caching -> faster in particular cases, operations by limiter objects aren't cached 2011-07-16 13:57:25 +00:00
Ivan Savenko
706510f12f - gcc compile fixes 2011-07-13 23:36:37 +00:00
beegee1
55e7959fd9 * Bonus system caching updated, partially rewritten, much more robust, thread-safe
* Adjusted projectile speed, trebuchet canon speed
2011-07-13 18:39:02 +00:00
beegee1
488e54688f * Bonus caching system disabled for the moment now. => #764 2011-07-05 18:29:48 +00:00
Ivan Savenko
a89895452a - (linux) fixed searching/loading of scripting libraries
- (linux) moved AI libraries to /lib/vcmi/AI/lib*, ERM lib to /lib/vcmi/Scripting/*
- gcc compile and warnings fixes
2011-06-28 14:19:16 +00:00
DjWarmonger
9ca5d9048a Fixed total spell immunity granted by 2212.
Improvements for Life Drain.
2011-06-25 15:05:01 +00:00
beegee1
5fdb5aa494 * Improved battle and bonus system performance (significantly faster in debug build, tip: use vs 2008, turn of hex field presentation)
* Implemented caching for the bonus system
2011-06-25 13:53:15 +00:00
DjWarmonger
bdce46ab60 Minor refactorings, fixes & improvements.
Moved CArtifactSet to ArtHandler. ObjectHandler is already too messed.
2011-06-24 17:43:02 +00:00
Frank Zago
ff49b852df Silenced several "warning: suggest parentheses around ‘&&’ within ‘||’": added some parenthesis, optimized a couple statments and fix a bug in another. 2011-05-30 19:20:14 +00:00
DjWarmonger
936005aa1c Correct, yet ugly handling of Magic Resistance. 2011-05-29 18:28:50 +00:00
DjWarmonger
bc114a89f4 Partial support for immunities & receptive ability.
TODO: Immunity to direct damage spells.
2011-05-13 17:51:12 +00:00
DjWarmonger
515ab7e7c1 Support for Acid Breath (both effects are now separate).
Minor fixes.
2011-05-13 09:02:16 +00:00
DjWarmonger
dc0eb37da6 New creature window works in general, covering old functionalities and displaying new info. It's far from finished though. 2011-03-03 18:25:48 +00:00
Michał W. Urbańczyk
c5930893fd Fixed #682. 2011-03-01 10:19:05 +00:00
Michał W. Urbańczyk
03fdd22b1a Version set to 0.83c, to be released as development build.
Code reorganizations in bonus system, allowing defining bonusNode-like classes.
Fixed some issues with artifact handling (proper updating of GUI when moving, minor fixes). 
Restoring battle AI for neutrals after loading game.
2011-02-27 19:58:14 +00:00
Michał W. Urbańczyk
d7b586f1fd Eliminating duplicated bonuses. Smarter getting [no code duplication]. 2011-02-27 11:26:18 +00:00
Michał W. Urbańczyk
1afcaf2817 * CThreadHelper.cpp now belongs to VCMI_lib project
* fixed console on Windows (restored old code)
 * GeniusAI won't get blocked when it has a hero with tactics in battle
 * fixed an issue with switching turns in hot-seat mode when there is Cover of Darkness active
 * suppressed bonus system console output: it goes only to the logfile
 * [win32] setting thread names (debug purposes)
 * minor fixes
2011-02-24 13:57:47 +00:00
Michał W. Urbańczyk
cab8f9e11d AI for neutral creatures and battles and player AIs can be different. StupidAI will handle neutrals by default.
Fixes for issues with deserialization and handling Tactics secondary skill.
2011-02-23 03:57:45 +00:00
Michał W. Urbańczyk
a46ad0b7ef Next set of fixes, mostly for deserialization. 2011-02-22 09:47:25 +00:00
mateuszb
1458cf64c2 * fixed bug 298
* fixed INDEPENDENT_MIN bonus value type
* minor changes
2011-02-21 16:53:23 +00:00
Michał W. Urbańczyk
d36f8087aa minor fix — duration has to be passed as ui16. 2011-02-21 04:24:46 +00:00
Michał W. Urbańczyk
4c9edd3f06 Many fixes around bonus system. Some basic propagation mechanism (not clever but works). 2011-02-21 04:13:00 +00:00
mateuszb
519a4186de * fixed bugs 470 and 523
* minor improvements
2011-02-20 18:32:39 +00:00
DjWarmonger
6db068f506 Fixed stacks speed and general parsing bug. 2011-02-14 21:08:29 +00:00