Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2009 closed enhancement (duplicate)

[PATCH] Spreading building arrows

Reported by: sanderd17 Owned by:
Priority: Should Have Milestone:
Component: Core engine Keywords: patch
Cc: Patch:

Description

With the current buildingAI, the arrows it shoots are mainly concentrated at the beginning of the 2s timer. That's because the current formula shoots random*arrowsLeft arrows. So in the first turn, that's on average half of the available arrows (at least for high arrow counts, for low arrow counts, the Math.floor fixes part of the issue).

So I've changed the formula to spread the arrows in a more natural way. The more arrows a building has, the more obvious this change will be.

This is what I currently get for a fully garrisoned roman army camp: http://pastebin.com/b7HrEy8v

A better formula would spread the arrows. With my formula, I get the following arrow counts: http://pastebin.com/cTTabWzD

You don't even need statistics to see that's a more natural spread.

Attachments (1)

building-arrows.diff (630 bytes ) - added by sanderd17 11 years ago.

Download all attachments as: .zip

Change History (4)

by sanderd17, 11 years ago

Attachment: building-arrows.diff added

comment:1 by sanderd17, 11 years ago

Keywords: patch review added
Summary: Spreading building arrows[PATCH] Spreading building arrows

comment:2 by sanderd17, 11 years ago

Resolution: duplicate
Status: newclosed

Incorporated this patch in a bigger one (see #2010)

comment:3 by leper, 11 years ago

Keywords: review removed
Milestone: Backlog
Note: See TracTickets for help on using tickets.