# Chase Bullets

Sub-pages:
Implementations

## How it Works

ChaseBullets is a system by which multiple bullets are fired so that they will reach the distance of the enemy robot simultaneously, thereby hopefully increasing the chance to hit, adding to the damage done, or confusing the enemy's movement.

## How can you use it

• confuse advanced enemy movement systems
• Since many robots' movements respond to detecting enemy fire, the assumption is that they will be dodging the high power bullet and the low power bullet will have a higher chance of hitting.
• collect more damage points
• shooting at multiple points near the guessed target position to increase the hit rate
• just for the fun of it

## Concept

One of the basic math behind chase bullets is:

$B_{1} =\text{ first bullet power }$
$B_{2} =\text{ second bullet power }$
$D_{1} =\text{ distance to target when shooting the first bullet }$
$D_{2} =\text{distance to target when shooting the second bullet }$
$C_{1} = \text{the gun cooling rate after shooting the first bullet }$
$S_{1} = \text{ bullet speed for the first bullet}$

If you put all this together in a formula, you can calculate the second bullet power with:

$B_{2} = {20 - ( { D_{2} \over ({D_{1} \over S_{1}}-C_{1}) } ) \over 3}$

where:

$C_{1} = {(1+ {B_{1} \over 5}) \over 0.1}$ with a given default cooling rate of 0.1
double c1 = Rules.getGunHeat(b1)/getGunCoolingRate()

and:

$S_{1} = 20 - 3 * B_{1}$
double s1 = Rules.getBulletSpeed(b1)

## Examples

There are several implementations of chase bullets available on the Implementations sub-page.