You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
105 lines
1.9 KiB
105 lines
1.9 KiB
10 months ago
|
<?php
|
||
|
namespace App\Entity;
|
||
|
|
||
|
use Doctrine\ORM\Mapping\Column;
|
||
|
use Doctrine\ORM\Mapping\Entity;
|
||
|
use Doctrine\ORM\Mapping\JoinColumn;
|
||
|
use Doctrine\ORM\Mapping\OneToOne;
|
||
|
|
||
|
#[Entity]
|
||
|
class Technique extends Thing
|
||
|
{
|
||
|
|
||
|
/**
|
||
|
* For now we calculate costs for mastering a technique.
|
||
|
*/
|
||
|
#[Column]
|
||
|
public int $costs;
|
||
|
|
||
|
/**
|
||
|
* Forumula to calculate the damage based on the stats.
|
||
|
*/
|
||
|
#[Column]
|
||
|
public string $damage;
|
||
|
|
||
|
/**
|
||
|
* Forumula to calculate the damage based on the stats.
|
||
|
*/
|
||
|
#[Column]
|
||
|
public string $energy;
|
||
|
|
||
|
/**
|
||
|
* Forumula to calculate the damage based on the stats.
|
||
|
*/
|
||
|
#[Column]
|
||
|
public string $accuracy;
|
||
|
|
||
|
/**
|
||
|
* Technique that is required to be learned before this Technique.
|
||
|
*/
|
||
|
#[OneToOne()]
|
||
|
#[JoinColumn(onDelete: 'SET NULL', nullable: true)]
|
||
|
public ?Technique $prerequisite;
|
||
|
|
||
|
public function getCosts(): ?int
|
||
|
{
|
||
|
return $this->costs;
|
||
|
}
|
||
|
|
||
|
public function setCosts(int $costs): static
|
||
|
{
|
||
|
$this->costs = $costs;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
public function getDamage(): ?string
|
||
|
{
|
||
|
return $this->damage;
|
||
|
}
|
||
|
|
||
|
public function setDamage(string $damage): static
|
||
|
{
|
||
|
$this->damage = $damage;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
public function getEnergy(): ?string
|
||
|
{
|
||
|
return $this->energy;
|
||
|
}
|
||
|
|
||
|
public function setEnergy(string $energy): static
|
||
|
{
|
||
|
$this->energy = $energy;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
public function getAccuracy(): ?string
|
||
|
{
|
||
|
return $this->accuracy;
|
||
|
}
|
||
|
|
||
|
public function setAccuracy(string $accuracy): static
|
||
|
{
|
||
|
$this->accuracy = $accuracy;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
public function getPrerequisite(): ?self
|
||
|
{
|
||
|
return $this->prerequisite;
|
||
|
}
|
||
|
|
||
|
public function setPrerequisite(?self $prerequisite): static
|
||
|
{
|
||
|
$this->prerequisite = $prerequisite;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
}
|
||
|
|