Help for this page

Select Code to Download


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