Darwinbots Forum
Bots and Simulations => Bot Tavern => Topic started by: abyaly on September 12, 2006, 08:18:52 PM
-
Could someone tell me how to determine if a body shot or venom shot will be effective against a shelled bot and how to determine how much shell erodes when a bot is attacked?
-
I'm on my laptop right now so I can't check, but if you look in shots.bas you should see how shell erodes as it's being attacked.
It's going to be dependant on the strength of the body or venom shot. I believe body shot strength increases linearly with body.
-
I've managed to avoid the source code pretty well so far, but it seems like thats the only place the technical info is available
-
If you need any help on figuring it out, just ask
-
If you need any help on figuring it out, just ask
Ok, I see something and I'm not sure if it was meant to behave this way (vers 2.37.6).
The following is part of the code for recieving a body shot:
Shell = rob(n).Shell * ShellEffectiveness
If power < Shell Then
rob(n).Shell = rob(n).Shell - power / ShellEffectiveness
If rob(n).Shell < 0 Then rob(n).Shell = 0
Exit Sub
Else
Dim temp As Long
temp = rob(n).Shell
rob(n).Shell = rob(n).Shell - power / ShellEffectiveness
power = power - temp * ShellEffectiveness
If rob(n).Shell < 0 Then rob(n).Shell = 0
End If
The following is part of the code for recieving a venom shot:
If Shots(t).FromSpecie = rob(n).fname Then 'Robot is imune to venom from his own species
rob(n).venom = rob(n).venom + power 'Robot absorbs venom fired by conspec
rob(n).mem(825) = rob(n).venom
Else
If power < rob(n).Shell * ShellEffectiveness Then
rob(n).Shell = rob(n).Shell - power * ShellEffectiveness
If rob(n).Shell < 0 Then rob(n).Shell = 0
Else
Dim temp As Long
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
End If
This is the behavior for 2.37.6, right?
-
That looks right. Keep in mind that a shots power could potentially be quite large (like several hundred possibly).
-
But that is still the only place where power is being scaled up by shelleffectiveness instead of the shell.
Everywhere else you either have the shell being multiplied or the power being divided. In comparison to body shots, each point of venom power is 20*20=400 times more effective for removing shell. But this effectiveness only shows up when it fails to penetrate the shell.
-
I'll have to look at it when I'm a little more awake and have some more time.
What should happen is that the shot's strength and the shell's strength are modified by constants and then compared to see which is stronger, and so which should take control.