MantisBT - VCMI
View Issue Details
0001014VCMIMechanics - Battlespublic2012-06-18 08:572022-04-12 08:58
vmonkey 
beegee 
normalminoralways
closedfixed 
x64Ubuntu12.04
0.89 
 
0001014: Catapult can't shoot on castle gate
I think this issue is related to the one reported before (http://bugs.vcmi.eu/view.php?id=785 [^]). Because it is marked as solved, I create this new issue.
When choosing castle gate as the aim of catapult, then it skips its turn and shows error message. In the original HOMM3 it was possible to shoot at the gate.

Issue persists at least when attacking Conflux.
No tags attached.
related to 0000785closed Tow using catapult on non-wall hex 
child of 0001065closed Dydzio H3-VCMI discrepancies regarding wall/turret sections which can be targeted (and related errors) 
Issue History
2012-06-18 08:57vmonkeyNew Issue
2012-08-19 09:03randomedNote Added: 0002915
2012-08-19 09:12randomedNote Edited: 0002915bug_revision_view_page.php?bugnote_id=2915#r1844
2012-08-20 13:34randomedNote Edited: 0002915bug_revision_view_page.php?bugnote_id=2915#r1846
2012-09-01 11:56randomedNote Added: 0002974
2012-09-01 21:08ZamolxisRelationship addedrelated to 0000785
2012-09-01 23:29ZamolxisNote Added: 0002975
2012-09-01 23:30ZamolxisRelationship addedchild of 0001065
2013-12-08 18:06beegeeNote Added: 0004171
2013-12-08 18:06beegeeStatusnew => resolved
2013-12-08 18:06beegeeResolutionopen => fixed
2013-12-08 18:06beegeeAssigned To => beegee
2022-04-12 08:58PovelitelStatusresolved => closed

Notes
(0002915)
randomed   
2012-08-19 09:03   
(edited on: 2012-08-20 13:34)
I've tested this and it's confirmed for all castles. The error message says that there's no (catapult) curve calculated for hex 95 or 96.

There's another problem, but it is closely related to this one. You can aim with the catapult at the gate's edges (small towers near the game), even though they are supposed to be indestructible.

I've just started looking over the code, but the problem seems to be in one of these functions: isCatapultAttackable, battleGetWallUnderHex, hexToWallPart. Can't pinpoint exactly what it is.

(0002974)
randomed   
2012-09-01 11:56   
Well, for one thing, it seems that in runBattle(), wallHexes are defined like this:
wallHexes = 50, 183, 182, 130, 62, 29, 12, 95
and in hexToWallPart() like this:
wallHexes = 50, 183, 182, 130, 62, 29, 12, 95, 96 plus the indestructable parts.

In the second one, hex 96 is added. Not sure why.
(0002975)
Zamolxis   
2012-09-01 23:29   
I added relation to 0000785.

But there are many more discrepancies. See 0001065. If you check the report, you'll see it seems there are even other files defining wall targets than those two wallHexes you mentioned above. At least that's how it looks like, because:
- hexes 45, 78, 112, 147 can be targeted as well, but they're missing from the files you quote
- if we hit hex 12, the turret is destroyed, but if we hit hex 183, the turret remains in place
So there seem to be multiple lists, some listing possible targets, others defining which/how should take damage, but they are not all in sync.
(0004171)
beegee   
2013-12-08 18:06   
This problem has been fixed in the meantime. I don't know since which version you can shoot on castle gate.