45 lines
1.1 KiB
PHP
45 lines
1.1 KiB
PHP
|
<?php
|
|||
|
|
|||
|
namespace Magic\Elemental;
|
|||
|
|
|||
|
use battleClass;
|
|||
|
use Insallah\Math;
|
|||
|
|
|||
|
class Fire
|
|||
|
{
|
|||
|
private $btl;
|
|||
|
private $color = '#a00';
|
|||
|
private $colorCrit = '#f00';
|
|||
|
private $colorMiss = '#909090';
|
|||
|
public function __construct(battleClass $btl)
|
|||
|
{
|
|||
|
$this->btl = $btl;
|
|||
|
}
|
|||
|
|
|||
|
/** <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 34(8), 67(9), 68 (10), 69(11)
|
|||
|
* @param $level
|
|||
|
* @param $fireTargetMultiplier
|
|||
|
* @return array
|
|||
|
*/
|
|||
|
public function Flash($level, $fireTargetMultiplier = 0)
|
|||
|
{
|
|||
|
$baseDamage = [
|
|||
|
8 => [40, 40],
|
|||
|
9 => [45, 45],
|
|||
|
10 => [50, 50],
|
|||
|
11 => [60, 60],
|
|||
|
];
|
|||
|
if (!is_numeric($fireTargetMultiplier)) {
|
|||
|
$fireTargetMultiplier = 0;
|
|||
|
}
|
|||
|
$rawDamage = mt_rand($baseDamage[$level][0], $baseDamage[$level][1]);
|
|||
|
$rawDamage = Math::addPercent($rawDamage, $fireTargetMultiplier);
|
|||
|
return [
|
|||
|
'name' => "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [$level]",
|
|||
|
'damage' => $rawDamage,
|
|||
|
'color' => $this->color,
|
|||
|
'colorCrit' => $this->colorCrit,
|
|||
|
'colorMiss' => $this->colorMiss,
|
|||
|
];
|
|||
|
}
|
|||
|
}
|