Ticket #991 (closed defect: fixed)

Opened 21 months ago

Last modified 20 months ago

[PATCH] add attackStrengths and armorStrengths functions to ai api for bots

Reported by: infyquest Owned by:
Priority: Should Have Milestone: Alpha 8
Component: UI & Simulation Keywords: patch
Cc:

Description

Adds attackStrengths and armorStrengths functions to ai api for bots. This will help for all the bots in accessing their strengths and enemies strengths.

this removes todo in entity.js for attack and armor

Attachments

0002-add-attack-and-armor-related-functions-to-entity-api.patch (1.3 KB) - added by infyquest 21 months ago.
0002-add-attack-and-armor-related-functions-to-entity-api-try-2.patch (1.3 KB) - added by infyquest 21 months ago.
fix a small typo

Change History

Changed 21 months ago by infyquest

fix a small typo

comment:1 Changed 21 months ago by ben

  • Status changed from new to closed
  • Resolution set to fixed

(In [10393]) Adds armour and attack strengths to AI entity template, based on patch by infyquest. Fixes #991.

comment:2 Changed 21 months ago by historic_bruno

  • Keywords review, removed

comment:3 Changed 20 months ago by quantumstate

  • Status changed from closed to reopened
  • Resolution fixed deleted

In your modified patch you have missed out some important properties. RepeatTime?, PrepareTime? and ProjectileSpeed?. RepeatTime? is essential for accurately calculating the attack strength of a unit, the others would be nice to have for completeness.

comment:4 Changed 20 months ago by ben

  • Status changed from reopened to closed
  • Resolution set to fixed

(In [10407]) Adds attackTimes to AI entity templates. Fixes #991.

comment:5 Changed 20 months ago by quantumstate

  • Status changed from closed to reopened
  • Type changed from enhancement to defect
  • Resolution fixed deleted

There was an error in commit [10407]. It should be:

prepare: +(this._template.Attack[type].PrepareTime?repeat: +(this._template.Attack[type].RepeatTime?
0),
1000)

comment:6 Changed 20 months ago by ben

  • Status changed from reopened to closed
  • Resolution set to fixed

(In [10412]) Fixes error in AI entity. Fixes #991.

Note: See TracTickets for help on using tickets.