WIP: перед введенимем класса Fighter.php
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
namespace Battle\Priem;
|
||||
|
||||
class Priem extends AbstractPriem
|
||||
{
|
||||
|
||||
/*
|
||||
|
||||
id, name, image,
|
||||
damage_type_value: static, +value,
|
||||
damage_time: now, next_turn, x_turns,
|
||||
target: self, static_friend, static_enemy, random_friend, random_enemy, random_friend_group, random_enemy_group, all_friend, all_enemy, all,
|
||||
damage_type: physical (колка, рубка, резка, дробка), magical (water, air, earth, fire,)
|
||||
|
||||
physical: {
|
||||
type: [static, +value,]
|
||||
time: [now, next_turn, x_turns,]
|
||||
target: [static_enemy,]
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
protected int $power;
|
||||
private array $targets;
|
||||
|
||||
/**
|
||||
* @param int $caster
|
||||
* @param array $friendTeam
|
||||
* @param array $enemyTeam
|
||||
* @param int $targetType
|
||||
* @param int $power
|
||||
* @param int $powerType static, +value,
|
||||
* @param string $name
|
||||
* @param int $activeTurns количество ходов которое будет применяться приём. 0 - выполнить в текущий ход.
|
||||
* @param string $icon
|
||||
*/
|
||||
public function __construct(
|
||||
int $caster,
|
||||
array $friendTeam,
|
||||
array $enemyTeam,
|
||||
int $targetType,
|
||||
int $power,
|
||||
int $powerType,
|
||||
string $name,
|
||||
int $activeTurns = 1,
|
||||
string $icon = '',
|
||||
) {
|
||||
parent::__construct($caster, $friendTeam, $enemyTeam, $targetType, $name, $icon);
|
||||
$this->power = $power;
|
||||
$this->targets = $this->getTarget();
|
||||
|
||||
}
|
||||
|
||||
public function getIcon(): string
|
||||
{
|
||||
return $this->icon;
|
||||
}
|
||||
|
||||
public function getTargetType(): int
|
||||
{
|
||||
return $this->targetType;
|
||||
}
|
||||
|
||||
public function getTarget(): array
|
||||
{
|
||||
return $this->targets;
|
||||
}
|
||||
|
||||
public function getPower(): int
|
||||
{
|
||||
return $this->power;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//$pr = new Priem(45,[1,2,3],[4,5,6],5,44,'Kaboom!', 'kaboom.gif');
|
||||
//$pr->
|
||||
Reference in New Issue
Block a user