# Replicate in the first round, and then only replicate once in every five # successive rounds to concentrate on hitting other Warriors. ;predecl my $state = 0; my $counter = 5; ;main if ($state == 0) { &JProcRoutines::Replicate; $counter = 5; $state = 1; } else { # Check other warriors my $warriors = JProcRoutines::FindEnemyWarriors; if (keys %$warriors > 0) { my $rand_enemy = (keys %$warriors)[rand(keys %$warriors)]; &JProcRoutines::Hit($rand_enemy); } } $counter--; if ($counter < 1) { if ($state) { $state = 0 } else { $state = 1; } }