Bots and Simulations > Bot Tavern
Shell, Venom, and Body Shots
abyaly:
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?
Numsgil:
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.
abyaly:
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
Numsgil:
If you need any help on figuring it out, just ask
abyaly:
--- Quote from: Numsgil ---If you need any help on figuring it out, just ask
--- End quote ---
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?
Navigation
[0] Message Index
[#] Next page
Go to full version