Opened 11 years ago

Last modified 7 months ago

#2010 new enhancement

[PATCH] Improved BuildingAI + implemented different Attack tags for BuildingAI — at Version 2

Reported by: sanderd17 Owned by:
Priority: Should Have Milestone: Backlog
Component: Simulation Keywords: patch
Cc: Patch:

Description (last modified by sanderd17)

I tried to improve the buildingAI in the following ways:

  • Better arrow spread over time(see #2009)
  • Reduce the number of loops. With the old code, it would even try to shoot if no units were in the range, just to find on the end of the loop that it can't. This won't happen anymore as the timer is only started when a unit comes in the range.
  • Implement the RepeatTime and PrepareTime Attack tags as a building also has to prepare when starting to attack
  • Implement an "ArcherClasses" tag, where you can choose for which classes extra arrows will be rewarded
  • Implement the RestrictedClasses tag, and restricted buildings from attacking other buildings (just as a test, if you think it's no good idea, those changes can be reverted)
  • Implement forced attack. When an attack is forced by UnitAI (and the target can be reached), all arrows will have the same target.

I also added the BuildingAI to the quinquireme ships, but with ballistas as the only members for which extra arrows (or rocks) are counted. To compensate, I also reduced the attack values of the ship, but that would need further balancing.

Change History (2)

comment:1 by sanderd17, 11 years ago

Summary: Improved BuildingAI + implemented different Attack tags for BuildingAI[PATCH] Improved BuildingAI + implemented different Attack tags for BuildingAI

comment:2 by sanderd17, 11 years ago

Description: modified (diff)

I'm wondering if there should also be an implementation for PreferredTargets.

Note: See TracTickets for help on using tickets.