mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-02 09:53:38 +02:00
Example client: Invest energy/5 into attack, instead of fixed 100
This commit is contained in:
parent
60989d7588
commit
3889fba5d4
1 changed files with 1 additions and 1 deletions
|
@ -170,7 +170,7 @@ sub take_action($$) {
|
|||
|
||||
# Execute actions!
|
||||
if ($attack[dirindex($max)]) {
|
||||
print $socket $state->{tick}." attack_dir $max->[0] $max->[1] 100\r\n";
|
||||
print $socket $state->{tick}." attack_dir $max->[0] $max->[1] ".($state->{energy}/5)."\r\n";
|
||||
} else {
|
||||
print $socket $state->{tick}." move_dir $max->[0] $max->[1]\r\n";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue