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

Mefadriel   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 88.24%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 15
c 1
b 0
f 0
dl 0
loc 25
ccs 15
cts 17
cp 0.8824
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRole() 0 3 1
A __construct() 0 17 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