Skip to content

Posts from General discussion about Heroes of Might and Magic II.

5.0 (1 rating)
In reply to AlexSpl
User Avatar
16 years ago
Auto-translated
AlexSpl
Siege in Heroes of Might and Magic II

2) The coefficient of 1 - 0.05 * (D - A) is limited from below by the value of 0.2, which is observed when D - A = 16.

To be continued...
0.2 or 0.3?

Орден Фениксахаризматический :) лидер
User Avatar
16 years ago
Auto-translated
2PReDS: I only partially agree with you: units in a trench do NOT receive any penalty to defense against ranged towers, but you are right about the -3 penalty for units in a trench when attacked by other units. From a gameplay perspective, it's more accurate to say that the attacking unit receives a +3 bonus to attack when attacking a unit standing in a trench :)

2Qwerty: 0.2! I know that the FAQ says 0.3 ;)
User Avatar
16 years ago
Auto-translated
III Penalties for Ranged Units on the Attacking Side During a Siege
Continued

The 50% damage penalty for ranged units attacking enemy units behind a fortress wall is removed if:

1) The attacking hero possesses the Golden Bow artifact;
2) The attacking hero has the Archery secondary skill;
3) The attacked enemy unit is not behind a fortress wall, i.e., it is on the fortress wall line or to the left of it;
4) The attacking unit on the attacking side is located within the castle grounds, i.e., on the fortress wall line or to the right of it;
5) The line of attack of the ranged unit is not blocked by any section of the fortress wall.

What is the line of attack, and what does it mean for it not to be blocked by any section of the fortress wall?

First, let's introduce a rectangular coordinate system, with the x-axis running from left to right and the y-axis running from top to bottom, as shown in Screenshot #1. The grid nodes will correspond to the hexes of the siege arena. In Screenshot #1, the nodes are marked with red squares.

Let's call the line of attack the segment connecting the nodes where the ranged unit and its target are located.
Note: In reality, the line of attack is not a segment, but a set of points lying on it, with a step of 0.1 along the larger dimension, but this fact does not play a significant role.
Let's call the neighborhood of a section with coordinates (X, Y) the set of points (Xi, Yi) for which the following two conditions are met:
1) [Xi] = X;
2) [Yi] = Y.

This set is a unit square (a flat figure) with two missing sides (in Screenshot #1, the green squares without the east and south sides).

Therefore, if the line of attack and the neighborhood of a section intersect (i.e., they have at least one point in common), then we will say that the section blocks the line of attack.

In Screenshot #1, the western and northern boundaries of the neighborhoods of the sections are marked in green if the section is a wall, and in blue if the section is a tower. The orange color indicates the boundaries of the neighborhood of the gate (drawbridge). Note that the neighborhood of the far right (bottom) wall consists of only one northern boundary (it is degenerate). The neighborhood of this section extends beyond the siege arena.

Thus, if you have read all this nonsense carefully :), the phrase "the line of attack of the ranged unit is not blocked by any section of the fortress wall" should now be clear to you.

Examples in Screenshot #1:
1) The ranged unit (1, 0) shoots without penalty at the unit (11, 2) only if the second section – the ranged tower – is destroyed (one hit is enough);
2) The ranged unit (1, 4) shoots without penalty at the unit (11, 0) only if the first section – the wall – is destroyed;
3) The ranged unit (1, 6) shoots without penalty at the unit (11, 4) only if the gate is destroyed or open;
4) The ranged unit (2, 2) shoots without penalty at the unit (10, 8) only if the seventh section – the wall – and the eighth section – the ranged tower – are destroyed;
5+) The ranged unit (2, 1) shoots without penalty at the unit (10, 5) even with intact walls!
Note that the line of attack of the ranged unit in this case does not intersect any neighborhood of the fortress wall sections, i.e., even in solid walls, there are gaps :) See also Screenshot #2.

Notes:
1) The fourth and sixth sections – the towers – cannot be destroyed;
2) If the ranged unit attacks multiple targets at once (liches), the penalty for each target is calculated separately.


I will provide the analytical conditions for the absence of a penalty later.
To be continued...
User Avatar
16 years ago
Auto-translated
A bit about floating-point errors...

Let's consider two lines of attack in the figure: blue (1) and red (2). Both segments intersect the vicinity of the sixth tower section at a single point, but in the first case, there is no penalty, while in the second, there is. What's the reason? An incorrect method? No, I am 100% confident in the method, otherwise I wouldn't have published it. It's all about floating-point errors. The slope of the blue line of attack is k1 = 2/3 = 0.(6) — a recurring decimal, which, when placed in a four-byte variable, becomes 0.66666668653... > 2/3. Furthermore, the line of attack is not a continuous segment. To avoid getting bogged down in general reasoning, let's look at segment №1. The length of the projection of this segment onto the abscissa axis (6) is greater than the length of its projection onto the ordinate axis (4). With a step of 0.1 along the length of the larger projection, the game constructs a "discrete" line of attack. The equation of the line in question is y = 2/3 * x, where x takes the values 0; 0.1; 0.2; ... Then y(2.9) = 0.66666668653... * 2.9 < 2, and at the point of the assumed intersection with the vicinity of the section (blue square), y(3) = 0.66666668653... * 3 > 2! (see screenshot №1). Therefore, due to floating-point errors, the actual "discrete" line of attack does not intersect the vicinity of the section under consideration.

For those who missed the above, or read it but didn't fully understand:
1) If the intersection of the line of attack with the vicinity of the section is a single point, then the section DOES NOT block the line of attack if its slope is a recurring decimal (due to floating-point errors).

In the figure, the line of attack (1) is NOT blocked by the sixth tower section despite the fact that the line intersects the section, because the slope of this line k1 = 2/3 = 0.(6) is a recurring decimal. However, the line of attack (2) is blocked by the same section (the slope of this line k2 = 1/2 = 0.5 is a non-recurring decimal).

2) If the intersection of the line of attack and the vicinity of the section is empty (lines 3 and 4) or does not consist of a single point, then the slope plays no role.

I apologize for paying attention to such trifles, which will 100% not be encountered in practice, but I want to present everything as strictly as possible to minimize misunderstandings.

The described method is a graphical interpretation of the algorithm the game uses to determine whether a shooter incurs a penalty when firing through fortress walls. It is possible that a similar algorithm is implemented in the third part.

III Penalties for shooting units of the besieging side
Continuation

Analytical conditions for the absence of a penalty when firing through fortress walls

Let the coordinates of the attacking shooter be (Xa, Ya),
the coordinates of the attacked enemy unit hidden behind a fortress wall be (Xd, Yd),
Xd > Xa (otherwise, there is no need to discuss penalties),
k = (Yd - Ya) / (Xd - Xa) — the slope of the line of attack.
(If k is a recurring decimal, keep the floating-point error in mind),
then the section (Xw, Yw) of the fortress wall blocks the shooter's line of attack if at least one of the following two conditions is met:

When 0 <= |k| <= 1 (firing angle is not more than 45 degrees):
1) Condition for the line of attack to intersect the left side of the section's vicinity:
Yd - Yw - 1 < k * (Xd - Xw) <= Yd - Yw;
2) Condition for the line of attack to intersect the right side of the section's vicinity:
Yd - Yw - 1 < k * (Xd - Xw - 1) < Yd - Yw.

Note: additionally, when k = -1, due to the specific geometry of the section's vicinity, the section blocks the line of attack if
Xd - Xw = Yw - Yd + 1.


When |k| > 1 (firing angle is more than 45 degrees):
1) Condition for the line of attack to intersect the top side of the section's vicinity:
Xd - Xw - 1 < 1/k * (Yd - Yw) <= Xd - Xw;
2) Condition for the line of attack to intersect the bottom side of the section's vicinity:
Xd - Xw - 1 < 1/k * (Yd - Yw - 1) < Xd - Xw.

Next time, I will describe in detail the process of destroying fortress walls with a catapult (probability of a miss, sequence of section destruction, etc.)
To be continued...
User Avatar
16 years ago
Auto-translated
IV Catapult
The Catapult is a siege weapon designed to destroy castle walls and eliminate ranged Towers. It occupies the first hex of the eighth row. The Catapult cannot be attacked, destroyed, or affected by spells.

The Catapult's turn occurs before the turn of the fastest siege unit.

The number of consecutive shots the Catapult can fire in one round is equal to:
0, if the central ranged Tower has been destroyed;
1, if the hero does not possess the Ballistics secondary skill, or possesses it only at the basic level;
2, if the hero possesses the Ballistics secondary skill at the advanced or expert level.

Note: if the hero possesses the Ballista artifact, the number of consecutive shots the Catapult can fire increases by one.

Sequence of Destruction of Castle Fortifications
1. Castle walls in any order*;
2. Left and right ranged Towers in any order**;
3. Drawbridge (gate);
4. Central ranged Tower.

*) Probabilities of the Catapult selecting a specific wall (wall numbering from top to bottom):
4 walls:
1st: 6/21, 2nd: 5/21, 3rd: 5/21, 4th: 5/21;
3 walls:
1st: 1/3, 2nd: 1/3, 3rd: 1/3;
2 walls:
1st: 11/21, 2nd: 10/21.

**) Probabilities of the Catapult selecting a specific Tower:
Left: 11/21, right: 10/21.

One shot from a Catapult deals 0, 1, or 2 damage to castle walls, gates, or Towers.
Let's call the durability of a structure the amount of damage it can withstand before being completely destroyed. Then, the durability of each castle wall is 2 units*, and the durability of gates and Towers is 1 unit.
* 3 units if the Knight's Castle has Fortifications.

Probabilities of Specific Damage

If the hero does not have the Ballistics secondary skill:
0: 25/101 ~ 25%, 1: 51/101 ~ 50%, 2: 25/101 ~ 25% (for a human player);
0: 20/101 ~ 20%, 1: 51/101 ~ 50%, 2: 30/101 ~ 30% (for a computer player).

If the hero has basic or advanced Ballistics:
0: 0, 1: 51/101 ~ 50%, 2: 50/101 ~ 50% (for a human player);
0: 0, 1: 46/101 ~ 45%, 2: 55/101 ~ 55% (for a computer player).

If the hero has expert Ballistics:
0: 0, 1: 0, 2: 100%.

The maximum amount of damage a Catapult can inflict in one round is 6 units (Ballista artifact + expert Ballistics).
Therefore, the record for the fastest complete destruction of the most powerful castle fortifications (Left Tower + Right Tower + Fortifications) is 4 rounds, and without the Ballista artifact, it is 6 rounds. A non-Knight's Castle will fall even faster: in 3 and 4 rounds, respectively.

V Drawbridge (gate)
If there is no Teleport magic, the only way for infantry units to get behind the castle walls, bypassing the moat, is through open or destroyed gates. Only units defending the Castle can open the gates. Any unit standing or dying directly in front of the gate will prevent it from opening. This can temporarily lock the castle defenders behind the walls if it is beneficial to the attacking side. Note: destroyed elemental units in front of the gate are not suitable for this purpose, i.e., the castle defenders will still be able to open the gate.

Furthermore, units that die on any hex of the open drawbridge (open gates occupy two hexes) will prevent it from closing. Again, elementals are not suitable for this purpose either (the gate closes immediately after the destruction of elementals standing on it).

That's all.

P.S. This is interesting :)
1) Fairies killed on the drawbridge do not prevent it from closing due to their small weight;
2) Steel Golems that have stood in the moat for more than 5 rounds rust and become iron.
User Avatar
16 years ago
Auto-translated
I didn't know about fairies, golems, and elementals. (I didn't read the rest.)
User Avatar
16 years ago
Auto-translated
I didn't know about fairies, golems, and elementals.
This is fan-made content. )
I haven't read the rest. :)
And I didn't read the latest issue of the New York Times today. )
In reply to AlexSpl
User Avatar
16 years ago
Auto-translated
AlexSpl
This is a fan-made creation.
I was joking about Rolpogo's golems on April 1st. But this phrase in such an article makes you doubt your knowledge, and it's not April 1st.
Дипломатия - искусство говорить собаке "хорошая собачка" до тех пор пока не найдешь подходящую палку.
In reply to Captain
User Avatar
16 years ago
Auto-translated
Actually, it wasn't Roleplay, but Colorado. And not on April 1st, but in their test for teachers at the school. And the best answer to it was given by Sir... Plavruk :)
7. Is it true that Steel Golems, when standing in water for more than 5 turns, rust and become iron?

Yes, but only on the 21st turn and only when playing as a Wizard.
User Avatar
16 years ago
Auto-translated
Peasant... There's a lot in that word... And the paradox of equal damage, and equality with other creatures, and the inability to cast any magic...
Wait!
Inability? Or are we talking about something else?

Орден Фениксахаризматический :) лидер
User Avatar
16 years ago
Auto-translated
Impossibility? Or are we talking about something else?
What is it about? :)
In reply to Qwerty
User Avatar
16 years ago
Auto-translated
Qwerty
A peasant... There's a lot in that word... And the paradox of equal damage, and equality with other creatures, and the inability to cast certain spells...
Wait!
Inability? Or are we talking about something else?
Regarding equality with other creatures - equality in what, I wonder? :confused:
And about the inability, is this some kind of riddle?
Клан Homo homini

Charity suffereth long, and is kind; charity envieth not; charity vaunteth not itself, is not puffed up,
Doth not behave itself unseemly, seeketh not her own, is not easily provoked, thinketh no evil;
Rejoiceth not in iniquity, but rejoiceth in the truth;
Beareth all things, believeth all things, hopeth all things, endureth all things. Charity never faileth...
In reply to vbn
User Avatar
16 years ago
Auto-translated
vbn

Is it a puzzle about impossibility?
The right word should be used here.
User Avatar
16 years ago
Auto-translated
The paradox of equal damage from a peasant and a dwarf, for example...
And what about magic? There's an opinion that peasants have partial magic immunity. Like, certain magic can't be cast on them. Is that true? Or is it a little different?

Орден Фениксахаризматический :) лидер
In reply to Qwerty
User Avatar
16 years ago
Auto-translated
Ah, I suppose that if you cast debuff spells on them, such as "Curse," the damage dealt by peasants won't change. :) Or, let's say, if you cast the same shield (or Stone Skin) on them, the damage dealt to peasants might not change either...
Клан Homo homini

Charity suffereth long, and is kind; charity envieth not; charity vaunteth not itself, is not puffed up,
Doth not behave itself unseemly, seeketh not her own, is not easily provoked, thinketh no evil;
Rejoiceth not in iniquity, but rejoiceth in the truth;
Beareth all things, believeth all things, hopeth all things, endureth all things. Charity never faileth...

Statistics

Welcome our newest member: recijeb