I'm using the old conditional style for readability.
This is LF6 'safe' virus, modified. Plug it before any other DNA.
'This first gene must be always at top of the DNA.
'This is the self replicating virus. It activates only when it isn't the first gene
'that's it, when it has infected. But, if it detects it has infected back the bot,
'(if *55 is equal to *.myeye, see third gene), it will delete itself.
'Otherwise, it will delete genes above and below it.
cond
*.thisgene 1 >
*.vtimer 0 =
start
*.thisgene .mkvirus store
100 .vshoot store
*.thisgene 1 add .delgene store
*.thisgene 1 sub .delgene 1 rnd mult store
*.thisgene .delgene *55 *.myeye 1 floor sub sgn abs 1 sub abs mult store
stop
'This is the launcher gene. You need it to shoot the above dormant virus.
'A small value for .vshoot avoids abusing the energy.
'Good energy management requires shutting down the gene when energy
'is low.
cond
*.vtimer 0 =
*.nrg 2000 >
start
10 .vshoot store
1 .mkvirus store
stop
'This allows the virus to recognize the parent bot.
cond
start
*.myeye 55 store
stop