1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00
Commit Graph

48 Commits

Author SHA1 Message Date
5df8d1cbd0 Update low level battle stacks accessor for ghost selection support. 2016-02-28 05:10:20 +03:00
c5cfc8467f Battles: change naming from drawbridge to gate for everything
This way code is shorter and cleaner while in future we may support towns with gate only.
2016-02-13 17:40:31 +03:00
57328bdc83 Battles: implement basic drawbridge mechanics
Movement to blocking hex 94 not yet properly handled as stack movement code need to be rewritten first.
Also gate destruction not immidiately affect drawbridge state.
2016-01-29 22:43:35 +03:00
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
70d9be8447 Use ISpellCaster in battle callback 2015-09-29 17:26:52 +03:00
a4d4851d80 Fix typo: casted->cast 2015-09-29 17:26:48 +03:00
6010bbe7ba More correct usage of battleGetFightingHero
* this should fix "FIXME: battleGetFightingHero wrong argument!"
2015-09-29 17:26:38 +03:00
Fay
1cb54689cf Prevents first aid tents from melee attacking;
Moves attack possibility checks to battle callback (for consistency with shooting checks);
2015-04-09 21:49:11 +02:00
b0df8172f9 Move battleIsImmune to CSpell 2014-11-29 04:25:51 +03:00
fa9c1e8637 remove healedHP calculation from battlestate 2014-11-25 19:43:34 +03:00
a06dae1f96 Move getAffectedCreatures to CSpell. + more drafts 2014-11-13 04:53:25 +03:00
d7800b834e get rid of CBattleInfoCallback::calculateSpellDmg 2014-11-12 09:52:11 +03:00
e4b726151d get rid of CBattleInfoCallback::battleStackIsImmune 2014-11-12 09:20:20 +03:00
ddf98a5920 +SpecialRisingSpellMechanics::isImmuneByStack 2014-11-12 08:34:43 +03:00
639b915391 Move calculateSpellBonus to CSpell 2014-11-12 08:02:27 +03:00
6f65d2484b Extract battleStackIsImmune from battleIsImmune
This fix possible problems with rising spells as now immunty is handled on stack level not on hex level
* battleIsImmune in now protected - only used in canCastThisSpellHere
2014-05-19 13:44:38 +04:00
0e93ec28c5 Add new general method for battle stack access 2014-05-18 17:02:59 +04:00
9c0df68cb8 Fixing spelling mistakes. Patch from josch, fixes #1759 2014-03-23 12:59:03 +00:00
69eee05ccc - Partially fixed mantis #1065 (Gate with hex 95 can't be attacked)
- Fixed 'catapult tried to attack non-catapultable hex!' problem, now catapult attacks attackable wall parts only
- Fixed problem that the server performed applying damage on a wall part twice
- Added methods for checking what wall parts are attackable and if a wall part is potentially attackable
- Added functionality to trace net packages
- Added functionality to trace std::vectors
- Added tracing for CatapultAttack(CPack)
- Updated various toString methods to use {} instead of []
- Refactoring
2013-12-08 17:54:13 +00:00
ee6cdbeffe went through the rest of cppcheck warnings, mostly harmless 2013-11-07 12:48:41 +00:00
5c6d12400f Fixed AI detection of battle end (solves some freezes). 2013-09-29 20:54:29 +00:00
4f29b526ca The battle callback method battleGetAllStacks will by default omit the arrow turrets. Fixes #1453, #1455 and related. 2013-09-27 19:42:17 +00:00
8beee29482 - corrected "isToReverse" check, partially fixes 1397
- ballistics fix
- minor
2013-08-06 15:25:51 +00:00
c81a31c74a - catapult attacks should be identical to H3
- catapult may miss and attack another part of wall instead (this is how it works in H3)
- minor fixes
2013-08-06 11:20:28 +00:00
5f310aa20f Fixed all issues with Resurrection: #123, #1358 2013-07-27 19:01:31 +00:00
d8a27d8f3c Refactored player-specific data into single struct BattleState. 2013-07-21 22:01:29 +00:00
2b45e13c5c c++03 -> c++11 switch:
- use std versions of function, bind and ref
- OVERRIDE -> override
- NULL -> nullptr
- use std versions of random distributions

NOTE: this may be last revision that supports gcc-4.5
2013-06-26 11:18:27 +00:00
06dbdd234f Further changes for duel mode. It is possible to pass names of AIs to be used by command line. Moved things in battle AI. 2013-06-21 20:59:32 +00:00
c9e95f76df - Fixed Phoenix fire immunity. Again.
- Cheat code with grant all artifacts, including the ones added by mods
- Some clean-up of Berserk effect, however it doesn't work at the moment.
2013-05-25 07:06:00 +00:00
8be801a6dc - CMappedFileLoader class to remap WoG files to h3 names
- WoG should be optional, all remapped files are listed in WoG/config/wogFileOverrides.json
- fixed several cases of incorrect positioning of creatures in battles
- some missing sounds for battle effects
- negative luck support, disabled by default
- a bit hackish detection of WoG presence, VCMI should work on SoD-only installs
2013-05-04 13:14:23 +00:00
32c87f532f - Added missing abilities for devil & ghost dragon
- Stack affected by Berserk should not try to attack itself

Neither of these can be actually seen in game duo to more general engine bugs :/
2013-04-27 06:39:59 +00:00
dbec99ffc7 * PlayerColor and TeamID refactoring 2013-03-03 17:06:03 +00:00
9e00090c42 * refactoring, a few intriguing problems remain 2013-02-13 23:55:42 +00:00
9c1a117c1c * refactoring 2013-02-12 22:24:48 +00:00
d540723739 * refactoring 2013-02-11 14:42:09 +00:00
86dc9386d6 * refactoring, including a generic solution for IDs 2013-02-10 23:24:57 +00:00
d03dbf64a6 * refactoring 2013-02-09 12:56:35 +00:00
8769f67c5d * JsonReader can convert to enums
* refactoring
2013-02-03 21:05:44 +00:00
a96f03e947 Crashes realted to illegal access to enemy hero data should be fixed, including #1178. 2013-01-20 20:29:35 +00:00
c0ce8712c1 add some missing licence headers 2012-12-19 14:54:10 +00:00
52242692f1 Fixed #1130.
Moved isToReverse() function to battleCallback so that creature rotation will be handled by core mechanics and not only GUI.
2012-11-29 15:02:55 +00:00
95b866c131 * Further work on Battle AI. Now it is able to cast a number of offensive spells. Battle callback exposes more spell-casting info.
* Took down the one Boost.Assign usage offending VC11. I'm getting impatient I guess...
2012-09-23 23:10:56 +00:00
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
830d94064e Fixed #1056, #1057 and #1058.
Should also fix #152.
2012-08-28 12:28:13 +00:00
7ce9e95525 - death stare works identically to H3
- gcc warnings fix
2012-08-27 10:47:02 +00:00
7c09f73402 * INFINITE_DIST is now enum, it should cause least trouble that way. Uh, it's so hard to fight magic values these days.
* Fixed crashes in battles after loading game
* Fixed crash in battle AI, when stack is blocked and stands next to an enemy
* Fixes problem when server's moveStack is called with dest==position
* Above should cover #1053.
2012-08-26 19:13:57 +00:00
d5f29d134f - create temporary when INFINITE_DIST passed by reference. Should work with MSVC as well :) 2012-08-26 13:16:57 +00:00
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