Code center > Bugs and fixes
Numsgil, is this supposed to be on purpuse? (waird slime code)
(1/1)
Botsareus:
the following is part of the upkeep function:
--- Code: ---
'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)
--- End code ---
It clearly says
--- Code: ---If .poison < 0.5 Then .Slime = 0
--- End code ---
I think this supposed to be:
--- Code: ---If .poison < 0.5 Then .poison = 0
--- End code ---
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: --- 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
--- End code ---
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.
Numsgil:
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.
Botsareus:
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?
Numsgil:
VenomEffectivenessVsShell maybe? It keeps with the theme of ShellEffectiveness sort of. If you can think of a better name go with that :P
Navigation
[0] Message Index
Go to full version