- or download this
_hp => $arg{hp} || rand (10) + 2
- or download this
sub damage {
my ($self, $hits) = @_;
- or download this
$self->{_hp} - $hits;
- or download this
use strict;
use warnings;
...
$joe->damage($henry->attack ());
$henry->damage($joe->attack ());
- or download this
Henry attacks for 1.....
1 damage
Joe attacks for 1.....
1 damage