Difference between revisions of "Thread:Talk:RoboJogger/Version 0.9.2 Bugs/reply (8)"

From Robowiki
Jump to navigation Jump to search
(Reply to Version 0.9.2 Bugs)
 
Line 3: Line 3:
 
Of course if the enemy damages itself by hitting the wall or your robot. Then your score will not be 100, since you did not do 100 damage, even if you kill it. This also happens if you don't win the turn. If your robot disables itself from firing, then only the damage you did that round gets counted.
 
Of course if the enemy damages itself by hitting the wall or your robot. Then your score will not be 100, since you did not do 100 damage, even if you kill it. This also happens if you don't win the turn. If your robot disables itself from firing, then only the damage you did that round gets counted.
  
All I know is it works.
+
As for damage. Well you do more damage then power you put into a bullet. The algorithm is this. So you can get 100% without hitting every shot. You do 16 damage for every 3 power bullet you fire. For every 1 power bullet you fire (say after you shot and missed 33 times), is 4.
 +
 
 +
<syntaxhighlight>
 +
double damage = 4 * bulletPower;
 +
 
 +
if (bulletPower > 1) {
 +
damage += 2 * (bulletPower - 1);
 +
}
 +
</syntaxhighlight>

Revision as of 20:28, 24 December 2012

Well, an enemy who doesn't fire has no chance at regaining any energy. So you can only at the absolute most do 100 damage to them in a single round.

Of course if the enemy damages itself by hitting the wall or your robot. Then your score will not be 100, since you did not do 100 damage, even if you kill it. This also happens if you don't win the turn. If your robot disables itself from firing, then only the damage you did that round gets counted.

As for damage. Well you do more damage then power you put into a bullet. The algorithm is this. So you can get 100% without hitting every shot. You do 16 damage for every 3 power bullet you fire. For every 1 power bullet you fire (say after you shot and missed 33 times), is 4.

double damage = 4 * bulletPower;

if (bulletPower > 1) {
	damage += 2 * (bulletPower - 1);
}