Difference between revisions of "Thread:Talk:Energy Drop/Easy Question?/reply (2)"

From Robowiki
Jump to navigation Jump to search
 
Line 1: Line 1:
 
Well that is similar to what I do in Nene. I just check if the power was 0.1 and the last time I detected them firing was 1 turn ago. Since I don't count my own bullets damaging them as 'them firing', this works out very well in a normal rumble.
 
Well that is similar to what I do in Nene. I just check if the power was 0.1 and the last time I detected them firing was 1 turn ago. Since I don't count my own bullets damaging them as 'them firing', this works out very well in a normal rumble.
  
I also remove the last wave if I added one. This is 'safe' because if they fired there isn't going to be an inactivity counter kicking in the turn after they fired. But just to be safe, I only assign the 'lastWave' and 'lastWaveFireTime' variables if the power is equal to 0.1 (or rather within 0.0005 of 0.1).
+
I also remove the last wave if I added one. This is 'safe' because if they fired there isn't going to be an inactivity counter kicking in the turn after they fired. But just to be safe, I only assign the 'lastWave' and 'lastWaveFireTime' variables if the power is equal to 0.1 (or rather within 0.001 of 0.1), specifically for the anti-activity counter.

Latest revision as of 04:15, 13 December 2012

Well that is similar to what I do in Nene. I just check if the power was 0.1 and the last time I detected them firing was 1 turn ago. Since I don't count my own bullets damaging them as 'them firing', this works out very well in a normal rumble.

I also remove the last wave if I added one. This is 'safe' because if they fired there isn't going to be an inactivity counter kicking in the turn after they fired. But just to be safe, I only assign the 'lastWave' and 'lastWaveFireTime' variables if the power is equal to 0.1 (or rather within 0.001 of 0.1), specifically for the anti-activity counter.