1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
vcmi/test
Toney Sui dca5d86e7a
Fix bug: LandMine is not exploding to enemies. (#630)
* The reason is,

the mine has attribute hidden=true;
when enemy unit moves, the code in BattleInfo.cpp MoveUnit() (line 817) will update the revealed to true;
then in the CGameHandler.cpp handleDamageFromObstacle() (line 4846) is checking , and the condition battleIsObstacleVisibleForSide() will return true, so the effect will not be triggerred.

Resolution:
1. Remove the "revealed=true" in moveUnit(), and in handleDamageFromObstacle, remove the "const" restrict for obstacle, and then update revealed to true;
2. After the takeDamage function, add a pack "BattleObstaclesChanged" to update the obstacle to be "revealed=true".
2020-02-12 20:12:12 +03:00
..
battle Spells configuration version 2 (effect-based) 2018-02-08 11:37:21 +03:00
game fixed broken test 2019-06-09 20:32:06 +03:00
googletest@4bab34d208 Add googletest as submodule 2017-07-18 16:49:50 +02:00
map Warnings fixes (#538) 2019-01-19 13:52:02 +03:00
mock Fix bug: LandMine is not exploding to enemies. (#630) 2020-02-12 20:12:12 +03:00
rmg Redone RMG template serialization using JSON serializer, added tests 2018-03-10 19:36:19 +03:00
spells Fixed https://bugs.vcmi.eu/view.php?id=3059 2019-06-09 22:46:29 +03:00
testdata Redone RMG template serialization using JSON serializer, added tests 2018-03-10 19:36:19 +03:00
vcai [c::b] Updated projects, fixed build 2018-12-31 00:03:31 +03:00
CMakeLists.txt CMake more transitive 2019-03-28 16:56:51 +03:00
CMemoryBufferTest.cpp Migrating from boost test to google test. 2017-07-18 16:49:05 +02:00
CVcmiTestConfig.cpp CMake: unittest improvements (#447) 2018-04-15 18:02:31 +07:00
CVcmiTestConfig.h CMake: unittest improvements (#447) 2018-04-15 18:02:31 +07:00
JsonComparer.cpp Redone RMG template serialization using JSON serializer, added tests 2018-03-10 19:36:19 +03:00
JsonComparer.h [tests] Moved JsonComparer to own file 2018-03-05 21:26:00 +03:00
main.cpp CMake: unittest improvements (#447) 2018-04-15 18:02:31 +07:00
StdInc.cpp Migrating from boost test to google test. 2017-07-18 16:49:05 +02:00
StdInc.h [C::B] test project update 2017-07-20 15:46:40 +03:00
Test.cbp [C::B] Switched to boost shared linkage 2019-05-30 20:55:40 +03:00
Test.vcxproj Update VS files to 2019, partially fix test project 2019-06-09 17:28:55 +02:00
Test.vcxproj.filters Update VS files to 2019, partially fix test project 2019-06-09 17:28:55 +02:00