Author Topic: Callidus (F1)(Shen)-05.04.05  (Read 2940 times)

Offline Shen

  • Bot Destroyer
  • ***
  • Posts: 111
    • View Profile
Callidus (F1)(Shen)-05.04.05
« on: April 05, 2005, 07:23:10 AM »
Code: [Select]
' Callidus by Shen
' Venom dissolves shells
' Uses strong shots with .shootval
' Basic antivirus gene

def Turn 50
def RefSet 51
def VenomTimer 52
def MyTie 53
def Tied 54


' -->> Initialise <--
' *******************

' Gene 1
' - Tie to Parent -
cond
    *.robage 0 =
start
  *.myeye .refeye store
  .tie inc
  .mkshell .vloc store
  999 rnd 1 add .MyTie store
stop

' Gene 2
' - Break Birth Tie -
cond
    *.robage 1 =
start
  .deltie inc
  .Turn inc
stop


' -->> Navigation <<--
' ********************

' Gene 3
' - Left Eye -
cond
    *.eye2 0 >
    *.refeye *.myeye !=
    *.eye5 0 =
start
  *.aim 105 add .setaim store
stop

' Gene 4
' - Right Eye -
cond
    *.eye8 *.eye2 >
    *.refeye *.myeye !=
    *.eye5 0 =
start
  *.aim -105 add .setaim store
stop

' Gene 5
' - Move -
cond
    *.refeye *.myeye !=
    *.eye5 0 =
    *.eye5 0 =
start
  *.maxvel *.vel sub 0 floor .up store
stop

' Gene 6
' - Approach Enemies -
cond
    *.refeye *.myeye !=
    *.eye5 0 >
    *.eye5 40 <
start
  *.refvelup *.maxvel *.vel sub add 0 floor .up store
  *.refveldx .dx store
  *.refxpos *.refypos angle .setaim store
stop

' Gene 7
' - Avoid Friends -
cond
    *.refeye *.myeye =
    *.robage 0 !=
start
  *.aim 200 add .setaim store
stop


' -->> Shots <<--
' ***************

' Gene 7
' - Alga -
cond
    *.eye5 40 >=
    *.refeye 0 =
start
  *.refvelup 0 floor .up store
  *.refveldx .dx store
  *.refxpos *.refypos angle .setaim store
  -1 .shoot store
  10 .shootval store
stop

' Gene 8
' - Bots -
cond
    *.eye5 40 >=
    *.refeye *.myeye !=
    *.refeye 0 !=
    *.VenomTimer 4 <
start
  *.refvelup 0 floor .up store
  *.refveldx .dx store
  *.refxpos *.refypos angle .setaim store
  -6 .shoot store
  30 .shootval store
  .VenomTimer inc
stop

' Gene 9
' - Venom Shot -
cond
    *.eye5 40 >=
    *.refeye *.myeye !=
    *.refeye 0 !=
    *.VenomTimer 4 =
start
  *.refvelup 0 floor .up store
  *.refveldx .dx store
  *.refxpos *.refypos angle .setaim store
  -3 .shoot store
  *.venom .shootval store
  -100 .venval store
  0 .VenomTimer store
stop


' --->> Tie <<---
' ***************

' Gene 10
' - Reset Tie -
cond
    *.Tied 1 >
    *.numties 0 =
start
  0 .Tied store
stop

' Gene 11
' - Drain -
cond
    *.Tied 0 >
start
  *.MyTie .tienum store
  -1 .tieloc store
  -1000 .tieval store
  .Tied inc
stop

' Gene 12
' - Tie -
cond
    *.eye5 40 >=
    *.Tied 2 <
    *.refeye 0 =
start
  *.MyTie .tie store
  1 .Tied store
stop


' -->> Stuff <<--
' ***************

' Gene 13
' - Refeye Timer -
cond
    *.refeye *.myeye =
start
  .RefSet inc
stop

' Gene 14
' - Reset Refeye -
cond
    *.RefSet 25 >
    *.eye5 0 =
start
  0 .refeye store
  0 .RefSet store
stop

' Gene 15
' - Store Body -
cond
    *.body 500 <
    *.nrg 1000 >
    *.robage 50 >
start
  100 .strbody store
stop

' Gene 16
' - Feed Body -
cond
    *.body 250 >
    *.robage 50 < and
    *.body 1000 > or
    *.nrg 500 < or
start
  100 .fdbody store
stop

' Gene 17
' - Shell -
cond
    *.shell 200 <
start
  200 *.shell sub 0 floor 200 ceil .mkshell store
stop

' Gene 18
' - Venom -
cond
    *.venom 10 <
start
  10 *.venom sub 0 floor 10 ceil .strvenom store
stop

' Gene 19
' - Delete Tie -
cond
    *.numties 0 >
    *.tiepres *.MyTie !=
start
  *.tiepres .deltie store
stop

' Gene 20
' - Waste -
cond
    *.waste 100 >
    *.eye5 40 <
start
  1 .backshot store
  -4 .shoot store
  *.waste .shootval store
stop


' -->> Reproduction <<--
' **********************

' Gene 21
' - Repro Turn -
cond
    *.Turn 1 =
start
  *.aim 628 add .setaim store
  .Turn dec
stop

' Gene 22
' - Reproduce -
cond
    *.nrg 2000 >
    *.body 250 >
    *.eye5 50 <
start
  *.aim 628 add .setaim store
  50 .repro store
  .Turn inc
stop


' Gene 23
' - Anti Virus -
' **************
cond
    *.genes 24 >
    *.robage 0 !=
start
  0 .mkvirus store
  0 .vshoot store
  0 .repro store
stop

end
« Last Edit: May 07, 2014, 12:33:39 PM by Botsareus »