If ships of at least 2 players meet at the same location in space (or in orbit of a planet), the code checks if the parties involved are at war with each other. If that is the case it next checks if either side has given a specific order to attack the other player. If so, the player with the attack order given is considered the aggressor, and the ships will start shooting at the ships of the player ordered to attack.
The other player is considered the defender, his ships will fire back at the aggressor in self-defense.
Please note: If neither side has given the attack order, no battle will occur, even if they are at war with each other.
The situation is a bit different in the orbit of a planet. First off, the planetary defense facilities will always shoot at hostile ships in orbit of a planet. However, this is not considered a hostile act, instead this is considered self-defense. The same counts for any ships of the planet owner, whose planet is under attack - these ships are always considered the defender, even if they have the attack order given.
So no matter what orders are given, a planet will always be automatically defended (either by planetary defense or by friendly ships in orbit), and they will never be considered the aggressor.
On the other hand, a ship that has moved into orbit of a hostile planet is always considered the aggressor, regardless if it had the attack order given or not.
There are two reasons why we distinguish between the aggressor and the defender:
A player only loses reputation if he was the one who declared war AND if he is the aggressor in a battle. A player loses/gains reputation only once for the very first fought battle. Any sub-sequent battles have no more effect on reputation.
An ally will always automatically help defend an ally, but only if the ally was not the aggressor!
Therefore we need to determine who is the aggressor and who is just acting in self-defense.
One of the most important reasons to form an alliance between two players, is because allies will automatically help defend each other, even if they don’t have the attack order given and/or they do not even happen to be at war with the aggressor against your ally.
Consider the following situation: Player A and player B are allied with each other. Player A has a fleet moving to some distant place in the galaxy, player B has set a ship to escort the fleet of player A. Now Player C comes along. Player C is at war with Player A, but he is neutral to player B. Player C orders his ships to attack the fleet of player A, hence player C is the aggressor, and player A is merely defending. In this case player B will automatically join the battle and help defend his ally against player C. Both player A and B are not the aggressors, and because of that will not lose any reputation - no matter what.
Note that if player B had been in a “peaceful stance” with player C (that is a ceasefire, peace or alliance agreement), player B would not have participated in the battle at all, because of the mutual peaceful agreement between the two players.
Now consider the same situation, except this time player A gives his fleet the order to attack the ships of player C. This time player A is the aggressor, and even though A and B are allied, player B will not join in that battle.
In other words, allies will only help defend each other, if their ally was not the aggressor.
However, there is one more case that needs to be considered. Let’s take an example similar to the above. Player A and player B are allied with each other. Player C is at war both with player A and player B. Player B’s ship is set to follow player A’s fleet. Player A decides to attack a ship of player C, hence Player A is the aggressor. Usually player B would not join in the battle, but since player B and player C happen to be at war too, player B will automatically take part in the battle also.
In other words, allies will automatically help in an attack, if the attacked player is their common enemy.
Please note that in this case both player A and player B are considered the aggressor, even though player B did not have the attack order given. So if you set your ships to follow/escort an ally, you need to be aware that you may very well lose reputation during such situations. However, in most cases this is exactly what you want - you and your ally both want to attack your common enemy together. Naturally you will both lose or gain reputation together.
manual\combat-preconditions.txt · Last modified: 2012/02/26 22:17 by nongolf
0.314 planets were colonized to make this page.
Powered by DocuWiki, Theme by SHRIKEE