Author Topic: Numsgil, is this supposed to be on purpuse? (waird slime code)  (Read 2815 times)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
the following is part of the upkeep function:

Code: [Select]
   
    'degrade slime
    .Slime = .Slime * 0.98
    If .Slime < 0.5 Then .Slime = 0 ' To keep things sane for integer rounding, etc.
    .mem(821) = CInt(.Slime)
   
    'degrade poison
    .poison = .poison * 0.98
    If .poison < 0.5 Then .Slime = 0
    .mem(827) = CInt(.poison)

It clearly says
Code: [Select]
If .poison < 0.5 Then .Slime = 0
I think this supposed to be:

Code: [Select]
If .poison < 0.5 Then .poison = 0
should I fix it? I know it has been broken for a while...



Now wonder I was thinking that slime some how effects poison.



Here is another one:

This is a part of the venom function in response to an attack

Code: [Select]
    power = power * 20 'Botsareus 3/6/2013 max power for venum is capped at 100 so I multiply to get an average
    If power < rob(n).shell * ShellEffectiveness Then
      rob(n).shell = rob(n).shell - power / ShellEffectiveness
      rob(n).mem(823) = rob(n).shell
      GoTo getout 'Botsareus 3/6/2013 Exit sub if enough shell
    Else
      temp = power
      power = power - rob(n).shell * ShellEffectiveness
      rob(n).shell = rob(n).shell - temp / ShellEffectiveness
      If rob(n).shell < 0 Then rob(n).shell = 0
      rob(n).mem(823) = rob(n).shell
    End If
    power = power / 20 'Botsareus 3/6/2013 after shell conversion devide

explanation:

robot was still getting hit with venom even though shell was maxed out, also shell was not being destroyed fast enough by a venom attack.
« Last Edit: March 06, 2013, 06:59:14 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Numsgil, is this supposed to be on purpuse? (waird slime code)
« Reply #1 on: March 07, 2013, 11:39:00 PM »
The slime/poison one is a bug, yeah.  A bad one, too.  I don't think slime has been working at all for bots that don't make poison.

...

For the venom vs. shell, are you just arbitrarily * 20?  It's better to expose the constants like that.  Look at how ShellEffectiveness is used and mirror that.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Numsgil, is this supposed to be on purpuse? (waird slime code)
« Reply #2 on: March 08, 2013, 02:10:56 PM »
I probably edited that post 7 times before I settled at 20.  :P

I was looking at values from 5 to 33 actually.

If you want me to pop it as a constant, I can do that. What should be the name for the constant?


Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Numsgil, is this supposed to be on purpuse? (waird slime code)
« Reply #3 on: March 09, 2013, 12:05:31 AM »
VenomEffectivenessVsShell maybe?  It keeps with the theme of ShellEffectiveness sort of.  If you can think of a better name go with that :P