Author Topic: Weird shooting RESOLVED 2.43.1e  (Read 2704 times)

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Weird shooting RESOLVED 2.43.1e
« on: March 02, 2008, 10:26:41 AM »
The bigger bot in this picture is shooting green info shots at a smaller bot that is releasing yellow poison shots, dispite it doesn't have any poison.
« Last Edit: March 02, 2008, 12:49:20 PM by EricL »
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Weird shooting RESOLVED 2.43.1e
« Reply #1 on: March 02, 2008, 12:48:50 PM »
Found it.  When an info shot is in the last cycle(s) of it's life, it is possible it can have 0 nrg (power).  (An info shot's nrg is a function of the .shootval of the shooter at the time of shooting.  A default is provided iof .shootval is 0 or negative (giving longer range).  Nrg decays independent of the lifespan of the shot, so shots are not destroyed when they hit 0 nrg.  A shot's nrg only has bearing on shot power at impact time, not shot longevity.)  The nrg of an info shot is used to determine whether a poison shot is returned and if so, how much poison is returned in the shot.  

When a bot with 0 poison is hit by an info shot with 0 nrg, the code incorrectly returns a posion shot with 0 poison.

Fixed in 2.43.e.

Bots must have some poison to return poison shots.  Info shots with 0 nrg will get through when bots have 0 poision.    

Going forward, I will likely add a new sysvar so that shot power and shot range can be set independently.  This is not possible today as both factors use .shootval (positive values for power, negative for range).
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Weird shooting RESOLVED 2.43.1e
« Reply #2 on: March 02, 2008, 01:38:30 PM »
My thinking at the time was that it would be a good trade off for a bot to either have longer range or stronger shots.  However, I think stronger shots are way more useful than longer shots, having lived with it for a few years.  After a certain point, it's just too unlikely that long range shots will hit anything useful.  So setting them independently sounds fine.