LOGIN
User Name
Password
Remember me


Register...Forgot password?
Main menu
Leagues
Gonzaga
Blue Max
Cartagena
Wooden Ships...
King Me!
VampiRing
Forum Message
Previous messagePost on the new forumNext message

Country:US
Membership23years 208days ago.
Last Login2h 50' ago.
Last Move2h 48' ago.
Electro is currently Offline!Send a mail to Electro


Message header
Area/Game:Wooden Ships & Iron Men
Topic:Other
Subject:Re: Gun repair algorithm
Posted by: Electro - 190days 1h ago.
Message text
CbtEn wrote:
What is the algorithm for gun repairs when there are damaged guns on both sides of the ship or both stern and bow of a ship? How does the computer decide which guns to repair first?


Priority: Most Damaged First

The repairGuns() function scans all damaged gun sections and picks the one with the greatest damage (original count minus current count). Damage is checked in this fixed order:

1. port bow guns
2. starboard bow
3. port stern
4. starboard stern

Tiebreaker: When two sections have equal damage, a die roll (50/50) decides whether the later section displaces the current leader.

Carronades are a Fallback
Only if no regular guns need repair does the function run the same algorithm over the four carronade sections. Regular guns always take priority over carronades.


Back to the messages list
Messages thread
Posting elapsed timePosted bySubject

190days 8h CbtEn [WS&IM][OT] Gun repair algorithm
190days 1h Electro Re: [WS&IM][OT] Gun repair algorithm
Next thread
Posting elapsed timePosted bySubject

183days 2h markrendl [BM][BUG] Shot down by Observer - in a single seater
182days 5h Electro Re: [BM][BUG] Shot down by Observer - in a single seater
Previous thread
Posting elapsed timePosted bySubject

193days 4h Electro [SYS] Site Modernization
193days 2h markrendl Re: [SYS] Site Modernization
 193days 1h Electro Re: [SYS] Site Modernization
  193days 1h markrendl Re: [SYS] Site Modernization
   193days Electro Re: [SYS] Site Modernization
    192days 21h markrendl Re: [SYS] Site Modernization
     192days 16h markrendl Re: [SYS] Site Modernization
      192days 8h Electro Re: [SYS] Site Modernization
       191days 12h markrendl Re: [SYS] Site Modernization
Page generated in: 21.09375 milliseconds.