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

1173 Commits

Author SHA1 Message Date
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
Dydzio
2f15ca9406 Do not build pseudo-buildings explicitly with events 2019-06-04 22:29:07 +02:00
Dydzio
e1b72ead6e Update CGameHandler.cpp
Fix hero recruit serverside check
2019-06-01 20:29:49 +03:00
Dydzio
f49bd3f18b
Do not display warning if player already lost 2019-05-28 22:34:55 +02:00
Ewilhan
ec4797d856 Fix Neutral Creatures Weekly Growth
Made it so neutral creatures could not be picked as "Flavour of the Week".
It is checking neutral creatures hometown to do so.

Fixes #3046.
2019-05-06 14:12:14 +01:00
Dydzio
e1857df4bb Fix defense battle action logic (#563)
* Fix defense battle action logic
2019-03-25 02:16:47 +03:00
Alexander Shishkin
549d8c97df
Merge pull request #557 from dydzio0614/CrystalDragonAbility
Fix crystal dragon ability to match H3
2019-03-21 17:02:20 +03:00
Dydzio
53f4ba6464 Fix crystal dragon ability to match H3 2019-03-17 19:48:47 +01:00
Dydzio
36cb9f11c4 Hardcoded feature: no random week/month effects 2019-03-17 18:27:05 +01: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
da20aa2388 Use the same cost value in Pathfinder and fuzzy evaluations. 2019-01-17 10:54:41 +03:00
Andrii Danylchenko
035d279ae8 Refactor CGHeroInstance, make spells private 2018-12-23 15:49:26 +03:00
Andrii Danylchenko
6ac987794c AI: first rule extracted for pathfinder 2018-09-23 15:26:53 +03:00
Konstantin Vukolov
96215233bc macOS: fix packet deserialization (#479) 2018-08-14 01:03:45 +03:00
Alexander Shishkin
84be667363
Merge pull request #463 from dydzio0614/skel_transformer_fix
Fix bone/ghost dragon handling in skeleton transformer
2018-07-19 00:03:32 +03:00
Dydzio
301b70ddd8 Fix bone/ghost dragon handling in skeleton transformer 2018-07-18 20:21:19 +02:00
Dydzio
d5d2c65c4b Fix counterattack wrong mechanics 2018-07-18 15:52:33 +02:00
Arseniy Shestakov
74e5c5bf05 CGameHandler: rename CPackForClient argument and add network logging 2018-04-04 14:24:32 +07:00
Arseniy Shestakov
ac66fc7f42 Full rework of pre-game interface and networking
New features for players:
* Loading for multiplayer. Any save could be used for multiplayer.
* Restart for multiplayer. All clients will restart together.
* Loading from single save.
* Hotseat mixed with network game. Multiple players per client.
* Now connection to server could be cancelled.
* Return to menu on disconnections instead of crashes.
* Restoring of last selected map, save or campaign on next run.

TLDR on important changes in engine code:
* UI: work with server separated from UI
* UI: all explitic blitting replaced with IntObject's
* UI: all new code use smart pointers instead of DISPOSE
* Gameplay always start through lobby controlled by server.
* Threads receiving netpacks now shared for lobby and gameplay.
* Campaigns: heroes for crossover now serialized as JsonNode.
2018-04-04 14:24:26 +07:00
AlexVinS
03cfd2cb78 Do not use StackLocation in netpacks 2018-03-17 13:24:12 +08: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
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
Dydzio
fb9ee9ddf7 Visual fix - destroy shooters together with tower 2018-03-02 15:36:44 +01:00
Dydzio
e68a2e7ef5 Fix arrow tower destruction mechanics 2018-03-02 15:23:07 +01:00
Dydzio
b55d506e22 Grant advanced catapult proficiency with CATAPULT_EXTRA_SHOTS 2018-03-02 13:46:14 +01: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
Arseniy Shestakov
8bbe747e8e Cleanup undef for min / max. NOMINMAX is already in Global.h 2018-02-11 05:42:49 +03:00
Ivan Romanov
eea50a044c Hide "this statement may fall through" warnings 2018-02-10 22:27:00 +05:00
AlexVinS
35b01eb379 Fixed https://bugs.vcmi.eu/view.php?id=2466 2018-02-10 08:37:15 +03:00
AlexVinS
c94daf6faa Fixed https://bugs.vcmi.eu/view.php?id=2864 2018-02-10 07:31:02 +03:00
AlexVinS
b194f8f13b Fixed https://bugs.vcmi.eu/view.php?id=2865 2018-02-10 00:02: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
Arseniy Shestakov
7c77249d37 Refactoring: get rid of macro in server-side request validation code 2018-01-28 08:03:48 +03:00
Arseniy Shestakov
da117e9255 Code style: remove void from constructors without arguments 2018-01-13 11:51:47 +03:00
DjWarmonger
c2a0b13332
Merge pull request #371 from dydzio0614/NewAbilities
Tested and approved. Congrats!
2017-12-29 14:19:05 +01:00
Dydzio
da6d01b0c7 Ability rename + bugfix + changelog extend 2017-11-13 01:59:41 +01:00
Alexander Shishkin
fd4ecbd40b
Merge pull request #385 from Chocimier/altar
Fixed "Altar of Sacrifice only sacrifices creatures one kind at a time"
* https://bugs.vcmi.eu/view.php?id=2607
2017-10-28 14:04:34 +03:00
Piotr Wójcik
7171fa7ad4 Formatting 2017-10-28 11:04:55 +02:00
AlexVinS
c39cd5f951 Town building build mode fixes
* CGameHandler::buildStructure was using wrong requirements for buildings in auto mode.
* Build mode loading was wrong in case of omitted value
* Show town hall slot for not built building only if it have normal build mode
2017-10-28 03:27:39 +03:00
Piotr Wójcik
58b427345f Constify 2017-10-18 21:39:04 +02:00
Piotr Wójcik
f9ed952869 Properly calculate experience on altar 2017-10-14 22:10:59 +02:00
Piotr Wójcik
f145b4be91 Correctly sacrifice many stacks or many atrifacts, fixes #2607 2017-10-14 21:30:56 +02:00
Dydzio
14c07afd3c Merge branch 'develop' into NewAbilities 2017-09-09 21:04:40 +02:00
Dydzio
3eef689005 Add TERMINATOR ability support, small fixes 2017-09-09 21:01:12 +02:00
Dydzio
d2e9848443 Fix RANGED_RETALIATION bug 2017-09-04 23:35:48 +02:00
Dydzio
4cab76900f Add SYNERGY_TARGET and [wip]-SHOOTS_ALL_ADJACENT 2017-09-04 23:32:24 +02:00
Henning Koehler
31ca4db8bd fixed manual control for arrow towers 2017-09-05 00:30:43 +12:00