Skip to content

Posts from Walls and roofs help.

No ratings yet — be the first to rate!
User Avatar
13 years ago
Auto-translated
I'm curious about how the damage from a castle is calculated in Heroes II. What parameters affect the attack of towers, and how does the presence of a captain change the course of a castle siege/defense?

Moderated: OFF-TOPIC in the message

Because in the reference guide for the first Heroes game, everything is clearly explained. No offense.
User Avatar
13 years ago
Auto-translated
Thank you. Read the detailed answer in the new article by Qwerty and AlexSpl about storming the Castle.
Coming soon!
In reply to Qwerty
User Avatar
13 years ago
Auto-translated
You're welcome! We'll be waiting.

By the way, I've noticed something interesting about Heroes III compared to Heroes II!

Captains haven't disappeared in Heroes III; they've just become
more expensive (2500 vs. 500) and gained the ability to develop their skills,
travel between towns, and attack castles ;-D
User Avatar
13 years ago
Auto-translated
The captain's main advantage is that he always has full mana before a battle. This is significant when facing 3-4 consecutive battles.
User Avatar
13 years ago
Auto-translated
And another question: how is the garrison sorted during an attack if the hero is in the castle and all slots are occupied? Or is it all explained in the article?
User Avatar
13 years ago
Auto-translated
Yes, the answer to this question will definitely be included in the article.
User Avatar
13 years ago
Auto-translated
«And the Volleys of Tower Artillery»
or
Specific Questions Regarding Castle Storming in Heroes II.

This material consists of two parts: an excellent analytical piece written by the talented researcher of Heroes of Might and Magic, AlexSpl, and optimistic tips from Qwerty.

AlexSpl:
«Siege in Heroes of Might and Magic II

I Defensive Shooting Towers (Ballistas)


Defensive shooting towers can be viewed as units of shooters that cannot be blocked. The attack of the central tower is 2, and the damage is (2-3) * k, where k is the number of buildings in the town. The attack of the left and right towers is 2, and the damage is (2-3) * [k/2].

Note: the castle itself is also considered a building; thus, the value of k can range from 1 (empty castle) to 20 (fully developed castle).

The turn of the defensive shooting towers occurs before the turn of the fastest defending unit. First, the central tower fires, then the left (top), and finally the right (bottom).

The attack of the shooting towers can be increased by:
1) the number of levels of the magic guild built in the town (+1 for each floor);
2) the attack of the defending hero or captain.

Notes:
1) The Mages' Guild is considered a single building regardless of its level;
2) Upgraded warrior dwellings are not buildings in this context;
3) The values of k and [k/2] can be found in the information window for the central tower
.

The damage of a shooting tower can be increased or decreased depending on the difference between its attack and the defense of the attacking unit of the besiegers. For each unit of difference A - D, the damage increases by 10% if the tower's attack is greater than the enemy unit's defense, and decreases by 5% for each unit of difference D - A if the defense is greater than the attack:
Damage = [Base_Damage * (1 + 0.1 * (A - D))], if A >= D;
Damage = [Base_Damage * (1 - 0.05 * (D - A))], if D > A.

Notes:
1) The coefficient 1 + 0.1 * (A - D) is capped at a maximum value of 3, which occurs when A - D = 20;
2) The coefficient 1 - 0.05 * (D - A) is capped at a minimum value of 0.2, which occurs when D - A = 16
.

Thus, depending on the attack/defense ratio, the resulting damage can be up to three times the base or five times less than the base, but not less than 1 HP.

So,

Base_Damage = (2-3) * k (for the central tower),
Base_Damage = (2-3) * [k/2] (for the left and right towers),

A = 2 + Hero_Captain_Attack + Mage_Guild_Level,

Delta = min(A - D, 20), if A >= D,
Delta = max(A - D, -16), if A < D,

Damage = [Base_Damage * (1 + 0.1 * Delta)], if A >= D;
Damage = [Base_Damage * (1 + 0.05 * Delta)], if A < D.

Note: [x] denotes taking the integer part (e.g., [1.99] = 1), meaning the resulting tower damage is an integer and the fractional part is truncated, unlike the damage of regular units where it is rounded; i.e., for regular units Damage = [x + 0.5]

Since a tower is formally a shooting unit with a number of combat entities equal to the number of buildings erected in the town, base damage is generated separately for each combat entity (it can be 2 or 3), so damage from the center of the range [Min_Damage..Max_Damage] is more likely. Damage near the boundaries of this segment is unlikely (the larger the value of k, the higher the probability of damage from the center of the range and lower the probability of damage near its boundaries: the probability distribution curve resembles a bell).

II Defensive Moat
The defensive moat serves as an obstacle for infantry units and is crossed by them in two turns; that is, to cross the moat, a unit must first step into it (this applies to units of both sides). Unlike the third part, while inside the moat, units receive no damage or penalties to their characteristics. A unit receives a +3 attack bonus if it attacks a unit standing in the moat (exception - shooting towers: they do not receive this bonus). For infantry units to enter the castle bypassing the moat, it is necessary either to force an enemy infantry unit to open the gates, use Teleport magic, or wait until they are destroyed by the catapult.

III Penalties for Shooting Units of the Besieging Side

The fortress wall provides protection from shooting attacks to all units of the defending side; that is, shooters of the besieging side receive a penalty when firing at enemy units sheltered behind the fortress wall. Visually, the presence of a penalty is displayed as a cursor in the form of a broken arrow when hovering over an enemy unit. When firing with a penalty, the damage dealt by shooters is halved. There are rules to determine in which cases the penalty is absent (this is quite complex: the penalty may be absent even with same-half-destroyed sections of the fortress wall, i.e., when no section is completely destroyed!).

The 50% damage penalty for shooting units attacking enemy units behind the fortress wall disappears if:

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

What is a line of attack and what does "not blocked by any section of the fortress wall" mean?

First, let us introduce a rectangular coordinate system: the x-axis runs from left to right, and the y-axis runs from top to bottom, as shown in screenshot №1. The grid nodes correspond to the hexes of the siege arena. In screenshot №1, the nodes are marked with red squares.

We define the line of attack as the segment connecting the nodes where the shooter and their victim 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 plays no special role.
We define the neighborhood of a section with coordinates (X, Y) as the set of points (Xi, Yi) for which the following two conditions are met:
1) [Xi] = X;
2) [Yi] = Y.

The specified set is a unit square (flat figure) with two missing sides (in the screenshot, light green squares without eastern and southern sides).

Then, if the line of attack and the neighborhood of a section intersect (meaning they have at least one common point), we say that the section blocks the line of attack.

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

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


Examples in screenshot №1:
1) Shooter (1, 0) fires without penalty at unit (11, 2) only if the second section-shooting tower is destroyed (one hit is sufficient);
2) Shooter (1, 4) fires without penalty at unit (11, 0) only if the first section-wall is destroyed;
3) Shooter (1, 6) fires without penalty at unit (11, 4) only if the gates are destroyed or open;
4) Shooter (2, 2) fires without penalty at unit (10, 8) only if the seventh section-wall and eighth section-shooting tower are destroyed;
5+) Shooter (2, 1) fires without penalty at unit (10, 5) even with intact walls!
Note that in this case, the shooter's line of attack does not intersect any neighborhood of the fortress wall sections; i.e., there are gaps even in strong walls See also screenshot №2.

Notes:
1) The fourth and sixth section-towers cannot be destroyed;
2) If a shooter attacks several targets at once (liches), the penalty for each target is calculated separately.

A bit about machine errors...

Consider two lines of attack in the figure: blue (1) and red (2). Both segments intersect the neighborhood of the sixth section-tower at a single point, but in the first case the penalty is absent, while in the second it is not. 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 machine errors. The slope of the blue line of attack k1 = 2/3 = 0.(6) is a periodic fraction 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 on the x-axis (6) is greater than its projection on the y-axis (4). With a step of 0.1 along the longer projection, the game constructs a "discrete" line of attack. The equation of the line under consideration is y = 2/3 * x, where x takes values 0; 0.1; 0.2; ... Then y(2.9) = 0.66666668653... * 2.9 < 2, and at the point of presumed intersection with the section neighborhood (blue square) y(3) = 0.66666668653... * 3 > 2! (see screenshot №1). Therefore, due to machine errors, the actual "discrete" line of attack does not intersect the neighborhood of the section under consideration.

For those who missed what was written above, or read it but didn't understand everything:
1) If the intersection of the line of attack with the section neighborhood is a single point, then the section DOES NOT block the line of attack if its slope is a periodic fraction (due to machine errors).

In the figure, the line of attack (1) is NOT blocked by the sixth section-tower despite the fact that the line intersects the section, because the slope of this line k1 = 2/3 = 0.(6) is a periodic fraction. 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-periodic fraction).

2) If the intersection of the line of attack and the section neighborhood 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 that will likely never 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 used by the game to determine if a shooter has a penalty when firing through fortress walls. It is possible that a similar algorithm is implemented in the third part.

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 sheltered behind the fortress wall be (Xd, Yd),
Xd > Xa (otherwise there is no question of penalties),
k = (Yd - Ya) / (Xd - Xa) - the slope of the line of attack.
(If k is a periodic fraction, remember the machine error),
then 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 (shooting angle not more than 45 degrees):
1) Condition for intersection of the line of attack with the left side of the section neighborhood:
Yd - Yw - 1 < k * (Xd - Xw) <= Yd - Yw;
2) Condition for intersection of the line of attack with the right side of the section neighborhood:
Yd - Yw - 1 < k * (Xd - Xw - 1) < Yd - Yw.

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

When |k| > 1 (shooting angle more than 45 degrees):
1) Condition for intersection of the line of attack with the top side of the section neighborhood:
Xd - Xw - 1 < 1/k * (Yd - Yw) <= Xd - Xw;
2) Condition for intersection of the line of attack with the bottom side of the section neighborhood:
Xd - Xw - 1 < 1/k * (Yd - Yw - 1) < Xd - Xw.

IV Catapult
The catapult is a siege engine designed to destroy fortress walls and eliminate shooting towers; it occupies the first hex of the eighth horizontal. The catapult cannot be attacked, destroyed, or affected by spells.

The turn of the catapult occurs before the turn of the fastest besieging unit.

The number of consecutive shots a catapult can make in one round is equal to:
0, if the central shooting tower is 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 an advanced or expert level.

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

Sequence of destruction of castle fortifications
1. Fortress walls in random order*;
2. Left and right shooting towers in random order**;
3. Drawbridge (gates);
4. Central shooting tower.

*) Probabilities for the catapult to choose 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 for the catapult to choose a specific tower:
Left: 11/21, right: 10/21.

One catapult shot deals 0, 1 or 2 units of damage to fortress walls, gates, or towers.
We call the durability of a structure the number of damage units it can withstand before complete destruction. Thus, the durability of each fortress wall is 2 units*, and for gates and towers - 1 unit.
*) 3 units if Fortifications are present in a Knight's castle.

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 number of damage units a catapult can deal in one round is 6 units (Ballista artifact + expert Ballistics).
Thus, the record speed for complete destruction of the strongest castle fortifications (Left Tower + Right Tower + Fortifications) is 4 rounds, and without the Ballista artifact - 6 rounds. A non-Knight's castle will fall even faster: in 3 and 4 rounds respectively.

V Drawbridge (Gates)
If Teleport magic is unavailable, the only way for infantry units to get behind fortress walls bypassing the moat is through open or destroyed gates. Only units defending the castle can open the gates. Any unit standing or killed directly in front of the gates will prevent them from opening. This allows one to temporarily lock the castle's defenders behind the fortress walls if it benefits the besieging side. Note: elemental units destroyed in front of the gates are not suitable for this purpose; i.e., the castle defenders can still open the gates.

Furthermore, units killed on any hex of the open bridge (open gates occupy two hexes) will prevent it from closing. Again, elementals are not suitable for this purpose (gates close immediately after the destruction of elementals standing on them).

That is all.»

Qwerty:
«A Spoon is Best at Lunchtime»
or
The Timeliness of a Castle Storm.
In one of my materials from previous years, I already touched upon this topic, but the relevance of the issue does not diminish...
1. Offline tournaments: "Qwerty's paradox." Analysis of a number of offline tournaments led me to the following opinion: there is a whole series of starting saves that are won either in 8 or 10 days, but not by "normal" means in 9 days.
2. Online game. Here, a timely storming of a computer's castle can provide a number of bonuses.
Let us consider this issue more concretely.
In the case of taking a castle on the seventh day, we have the following opportunities unavailable when taking it on the next day:
-) receiving income from the castle;
-) possibility of buying and releasing a hero;
-) possibility of building a structure that, for example, affects creature growth;
-) possibility of (building and) using the market. This technique is always in the arsenal of experienced players in both Heroes II and III. The ability to use an (additional) market on the seventh, often key day of development sometimes opens previously unavailable possibilities.
I believe there is little sense in commenting on these opportunities. Start as a Knight or Barbarian, build 4-5 levels, upgrade a couple of units for free outside, take a titanic castle and place giants there.
Now let's look at the advantages we get by storming a castle on the first day of the week, provided that we move before the defender.
The main advantage here is growth and the fact that we might be able to use what the opponent built on the seventh day.
Growth in computer castles, provided there are no unpurchased troops on the seventh day:
-) magic castles at Impossible level 3-4-5-6-8-18; Barbarian 5-7-8-10-14-28; Knight 5-7-8-10-14-31;
-) magic castles at Expert level 3-5-6-7-10-23; Barbarian 5-6-7-10-13-26; Knight 5-6-7-10-13-29;
-) magic castles at Hard level 3-4-6-7-9-21; Barbarian 4-6-7-8-12-24; Knight 4-6-7-8-12-26.
I remind you that growth in castles under human control, as well as in computer castles at any difficulty level provided there are unpurchased troops on the seventh day, is for magic castles 3-4-5-6-8-18, for Barbarians 4-5-6-7-10-20, and for Knights 4-5-6-7-10-22.
In certain cases, increased growth is an extremely important factor that can seriously affect the game. And capturing a castle where the computer specifically placed dragons or giants for us on the previous turn can become a deciding argument.

«For Our Chance Encounter»
or
Limits of Applicability of Fundamental Laws.
In Heroes II, laws of conservation do not apply. That is, Heroes II remained outside the boundary of applicability of conservation laws. In particular, this concerns specific cases during a castle storm.
Today we will figure out the question - who, strictly speaking, will we meet in the castle during a storm (or who we will be defending with).
1. First, troops that are in the garrison join identical troops of the hero. If the hero has several slots with such troops, the warriors from the garrison join the leftmost (topmost) slot.
2. Thus, if all 5 troop slots of the hero are occupied, only those troops already present with the hero can join from the garrison.
3. If the hero has free slots, then after performing step 1 (merging identical units), troops from the garrison enter the free spots, starting from the leftmost (topmost). That is, the leftmost garrison unit enters the first free spot, and so on; the queue may not even reach the last ones on the right. The procedure is performed once before the battle.
4. In case of a won battle, the hero "meets the morning" with the troops they finished the battle with.
5. In case of a lost battle, troops in the garrison that did not participate in the battle disappear without a trace.
6. The computer makes a decision to attack a castle based on the total strength of the garrison army and the hero, rather than the army actually participating in the battle.
7. It should be remembered that no experience is given for capturing an empty town, but for a battle, 500 units of experience are given among other things. Here it is necessary to understand that the computer perceives the castle as an additional fighter; thus, it evaluates the prospects of a coming battle with a hero in the castle and outside differently, and accordingly makes different decisions about the expediency of an attack.

«Shield and Sword»
or
Some Tactical Techniques for Storming and Defending a Castle.
1. Hit-and-run. A classic technique. The essence - buy a hero, attack the future stormer, deal maximum damage, often with magic, and flee. Several such sorties can be made. As a result, the stormer loses both troops and mana.
2. Mechanical barriers. Buy up heroes and position them so that the storming hero does not have time to reach the castle, spending turns defeating sacrificial heroes.
3. Provocation. Often the most profitable option is for the storming hero to attack the castle (naturally, if we are sure of our victory and the opponent is sure of theirs). The essence is that many troops are intentionally not bought so that the computer deems it necessary to attack.
4. First-level Archery will allow shooting through walls without a penalty.
5. Ballistics not only allows infantry to enter battle faster but also reduces damage from castle towers due to their quicker destruction.
6. One can try to lure the computer's units outside the walls by exposing one's own unit to attack.
7. The Captain's mana is restored after each battle. In the case of several consecutive attacks, this can become a significant factor.
And most importantly. Save before storming. Defend or storm. Replay. Again. Again. Feel the difference?
AlexSpl and Qwerty wish you pleasure from the wonderful game – Heroes of Might and Magic 2!
Attachments 2
2 files attached • Total size: 74.3 KB

Statistics

Welcome our newest member: recijeb