MefadrielDialogEvent   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 1
eloc 18
dl 0
loc 23
rs 10
c 3
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 21 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AardsGerds\Game\Event\Story\FirstChapter\MercenaryCamp\MeetMefadriel;
6
7
use AardsGerds\Game\Dialog\NpcDialogOption;
8
use AardsGerds\Game\Dialog\PlayerDialogOption;
9
use AardsGerds\Game\Dialog\PlayerDialogOptionCollection;
10
use AardsGerds\Game\Dialog\QuitDialogOption;
11
use AardsGerds\Game\Entity\Human\Mefadriel;
12
use AardsGerds\Game\Event\Decision\DecisionCollection;
13
use AardsGerds\Game\Event\DialogEvent;
14
15
final class MefadrielDialogEvent extends DialogEvent
16
{
17
    public function __construct(Mefadriel $mefadriel)
18
    {
19
        parent::__construct(
20
            new MefadrielDialogContext(),
21
            new DecisionCollection([]),
22
            $mefadriel,
23
            new NpcDialogOption(
24
                'Hey, you. You are finally awake.',
25
                new PlayerDialogOptionCollection([
26
                    new PlayerDialogOption(
27
                        'Who are you?',
28
                        new NpcDialogOption(
29
                            'My name is Mefadriel. I joined this miserable camp when they marched at south.',
30
                            new PlayerDialogOptionCollection([]),
31
                        ),
32
                    ),
33
                    new QuitDialogOption(
34
                        'Farewell.',
35
                        new NpcDialogOption(
36
                            'See you soon.',
37
                            new PlayerDialogOptionCollection([]),
38
                        ),
39
                    ),
40
                ]),
41
            ),
42
        );
43
    }
44
}
45