Убрано дублирование классов. Helpers уехали из Core. Классы во внешних директориях переехали к остальным.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace DTO;
|
||||
|
||||
class BattleSpell
|
||||
{
|
||||
public string $name;
|
||||
public string $elemental;
|
||||
public int $damage;
|
||||
public string $color;
|
||||
public string $colorCrit;
|
||||
public string $colorMiss;
|
||||
|
||||
public function __construct(string $elemental)
|
||||
{
|
||||
if (!in_array($elemental, ['fire', 'water', 'air', 'earth', 'light', 'dark'])) {
|
||||
$this->elemental = 'raw';
|
||||
}
|
||||
if ($elemental === 'fire') {
|
||||
$this->elemental = $elemental;
|
||||
$this->color = '#a00';
|
||||
$this->colorCrit = '#f00';
|
||||
$this->colorMiss = '#909090';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user