Author Topic: Shell, Venom, and Body Shots  (Read 1982 times)

Offline abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
Shell, Venom, and Body Shots
« 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?
Lancre operated on the feudal system, which was to say, everyone feuded all
the time and handed on the fight to their descendants.
        -- (Terry Pratchett, Carpe Jugulum)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7718
    • View Profile
Shell, Venom, and Body Shots
« Reply #1 on: September 12, 2006, 11:11:43 PM »
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.

Offline abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
Shell, Venom, and Body Shots
« Reply #2 on: September 13, 2006, 10:39:51 AM »
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  
Lancre operated on the feudal system, which was to say, everyone feuded all
the time and handed on the fight to their descendants.
        -- (Terry Pratchett, Carpe Jugulum)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7718
    • View Profile
Shell, Venom, and Body Shots
« Reply #3 on: September 13, 2006, 02:35:01 PM »
If you need any help on figuring it out, just ask

Offline abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
Shell, Venom, and Body Shots
« Reply #4 on: September 14, 2006, 08:27:12 PM »
Quote from: Numsgil
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?
Lancre operated on the feudal system, which was to say, everyone feuded all
the time and handed on the fight to their descendants.
        -- (Terry Pratchett, Carpe Jugulum)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7718
    • View Profile
Shell, Venom, and Body Shots
« Reply #5 on: September 14, 2006, 11:08:50 PM »
That looks right.  Keep in mind that a shots power could potentially be quite large (like several hundred possibly).

Offline abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
Shell, Venom, and Body Shots
« Reply #6 on: September 15, 2006, 11:21:13 AM »
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.
Lancre operated on the feudal system, which was to say, everyone feuded all
the time and handed on the fight to their descendants.
        -- (Terry Pratchett, Carpe Jugulum)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7718
    • View Profile
Shell, Venom, and Body Shots
« Reply #7 on: September 15, 2006, 04:33:48 PM »
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.