Passed
Push — master ( a3b7e3...18ad97 )
by Paweł
02:55
created

Mefadriel::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 14
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 17
ccs 14
cts 14
cp 1
rs 9.8333
cc 1
nc 1
nop 1
crap 1
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\SecretKnowledge\Ascension;
12
use AardsGerds\Game\Build\Talent\SecretKnowledge\EighthAscension\ProtectionOfTheGods;
13
use AardsGerds\Game\Build\Talent\SecretKnowledge\SecretKnowledge;
14
use AardsGerds\Game\Build\Talent\TalentCollection;
15
use AardsGerds\Game\Build\Talent\WeaponMastery\WeaponMastery;
16
use AardsGerds\Game\Build\Talent\WeaponMastery\WeaponMasteryLevel;
17
use AardsGerds\Game\Entity\Entity;
18
use AardsGerds\Game\Inventory\Inventory;
19
use AardsGerds\Game\Inventory\Weapon\GreatSword\Protector;
20
use AardsGerds\Game\Location\Town\Visitor;
21
use AardsGerds\Game\Location\Town\VisitorRole;
22
23
final class Mefadriel extends Entity implements Visitor
24
{
25 1
    public function __construct(
26
        private VisitorRole $visitorRole,
27
    ) {
28 1
        parent::__construct(
29 1
            'Mefadriel',
30 1
            new Health(10000),
31 1
            new Etherum(200),
32 1
            new Strength(200),
33 1
            new Initiative(100),
34 1
            new TalentCollection([
35 1
                WeaponMastery::greatSword(WeaponMasteryLevel::masterOfThirdTier()),
36 1
                new SecretKnowledge(Ascension::eighthAscension()),
37 1
                new ProtectionOfTheGods(),
38
            ]),
39 1
            new Inventory([]),
40 1
            new Protector(new Etherum(200)),
41 1
            true,
42
        );
43 1
    }
44
45
    public function getRole(): VisitorRole
46
    {
47
        return $this->visitorRole;
48
    }
49
}
50