Passed
Push — master ( cf2837...1e4591 )
by Paweł
02:43
created

Bandit::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 9
c 0
b 0
f 0
dl 0
loc 13
ccs 0
cts 9
cp 0
rs 9.9666
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AardsGerds\Game\Entity\Human;
6
7
use AardsGerds\Game\Build\Attribute\Health;
8
use AardsGerds\Game\Build\Attribute\Strength;
9
use AardsGerds\Game\Build\Talent\TalentCollection;
10
use AardsGerds\Game\Build\Talent\WeaponMastery\ShortSword\Novice\Slash;
11
use AardsGerds\Game\Build\Talent\WeaponMastery\WeaponMastery;
12
use AardsGerds\Game\Build\Talent\WeaponMastery\WeaponMasteryLevel;
13
use AardsGerds\Game\Inventory\Weapon\ShortSword\RustyShortSword;
14
15
final class Bandit extends Human
16
{
17
    public function __construct()
18
    {
19
        $weapon = new RustyShortSword();
20
21
        parent::__construct(
22
            'Bandit',
23
            new Health(100),
24
            new Strength(20),
25
            new TalentCollection([
26
                WeaponMastery::shortSword(WeaponMasteryLevel::novice()),
27
                new Slash($weapon),
28
            ]),
29
            $weapon,
30
        );
31
    }
32
}
33