Darwinbots Forum
Code center => Bugs and fixes => Topic started by: Botsareus on March 06, 2013, 01:29:27 PM
-
the following is part of the upkeep function:
'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 If .poison < 0.5 Then .Slime = 0
I think this supposed to be:
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
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.
-
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.
-
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?
-
VenomEffectivenessVsShell maybe? It keeps with the theme of ShellEffectiveness sort of. If you can think of a better name go with that :P