Warring Factions
D O C U M E N T A T I O N

Directory: (1085 articles)
Click here to show all articles
- 1 A B C D E F G H I J K L M N O P Q R S T U V W Z 
Latest ChangesFlagged For Review
Random Entry:

Battle Logic
Link to this Article



Battle Logic is the script that runs all of the combat for Warring Factions.

Understanding Battle Logic

Each round all the ships are randomly ordered as well as given a "target value" based on their hull type and armaments. This represents their attractiveness as a target for the enemy.

The Battle Logic proceeds to go through the randomly ordered list, allowing each ship to pick its best target depending on the type(s) of weapons it has. It then fires at the target, and is done for the round.

If a ship with gun batteries is fired upon, it will fire back with one of its gun batteries with a speed of 10,000 m/s.

Chance To Hit

The chance of ship hitting its target is represented by the formula:

( 4 * sqrt(attacking_guns) + 5 ) * (target_mass)^0.1 * (attacker_speed / (target_speed+1))^0.3

The value is represented in percent. The bonus from attacking_guns is capped at 100; any guns above 100 do not affect chance to hit.

Common Misconceptions

All ships fire during a battle tick, not just 1000 for each side.

Battle Mechanics

To understand how damage is done, see Armor Penetration
To understand the different abilities of the three weapon types, see Gun Battery, Cannon, and Single Barrel Gun


Last Modified By: Cappy on 05-23-2008
   

Terms of Service | Report a Bug on this page | Contact Us | Server Status | All Warring Faction Games
All Content on WF Space Strategy is ©2004 Thomas Auge and may not be reproduced without explicit permission.

Warring Factions - A browser based space strategy game
Starlog
Starmap
Rally Points
Known Universe
Map Plotter
Settings
Empire Info
Known Empires
Faction Hall
Command Center
Science
Blueprints
Ship Designs
Blueprint Market
Forgotten Knowledge
Send Message
Send Money
Forum
Radio
Chat

Highscores
Manual
Rules
Links
About
NOT LOGGED IN! 0 cr / Score: 0      
Username:
Password:




>> Create an account

Thanks to NASA for their outstanding public image collection.
Thanks to Twinhelix Designs for the fantastic DHTML / JavaScript Menu.
Execution time without compression:
0.00664 seconds.