Bandit::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 11
c 0
b 0
f 0
dl 0
loc 14
ccs 0
cts 12
cp 0
rs 9.9
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\Etherum;
8
use AardsGerds\Game\Build\Attribute\Health;
9
use AardsGerds\Game\Build\Attribute\Initiative;
10
use AardsGerds\Game\Build\Attribute\Strength;
11
use AardsGerds\Game\Build\Talent\TalentCollection;
12
use AardsGerds\Game\Build\Talent\WeaponMastery\ShortSword\Novice\Slash;
13
use AardsGerds\Game\Build\Talent\WeaponMastery\WeaponMastery;
14
use AardsGerds\Game\Build\Talent\WeaponMastery\WeaponMasteryLevel;
15
use AardsGerds\Game\Entity\Entity;
16
use AardsGerds\Game\Inventory\Inventory;
17
use AardsGerds\Game\Inventory\Weapon\ShortSword\RustyShortSword;
18
19
final class Bandit extends Entity
20
{
21
    public function __construct()
22
    {
23
        parent::__construct(
24
            'Bandit',
25
            new Health(100),
26
            new Etherum(1),
27
            new Strength(20),
28
            new Initiative(10),
29
            new TalentCollection([
30
                WeaponMastery::shortSword(WeaponMasteryLevel::novice()),
31
                new Slash(),
32
            ]),
33
            new Inventory([]),
34
            new RustyShortSword(),
35
        );
36
    }
37
}
38