played around with embedded entities
							parent
							
								
									334f734012
								
							
						
					
					
						commit
						994e6e17cb
					
				| @ -0,0 +1,18 @@ | |||||||
|  | App\Entity\Skillz: | ||||||
|  |     type: embeddable | ||||||
|  |     fields: | ||||||
|  |         constitution: # basically the HP | ||||||
|  |             type: integer | ||||||
|  |             nullable: false | ||||||
|  |         ki: # former MP! Some moves will require Ki to be available | ||||||
|  |             type: integer | ||||||
|  |             nullable: false | ||||||
|  |         strength: # damage dealer / block skill? | ||||||
|  |             type: integer | ||||||
|  |             nullable: false | ||||||
|  |         agility: # evade / hit chance skill?? | ||||||
|  |             type: integer | ||||||
|  |             nullable: false | ||||||
|  |         stamina: # if low => one is vulnerable for critical hits or slow attack speed / low damage | ||||||
|  |             type: integer | ||||||
|  |             nullable: false | ||||||
| @ -0,0 +1,72 @@ | |||||||
|  | <?php | ||||||
|  | namespace App\Entity; | ||||||
|  | 
 | ||||||
|  | class Skillz | ||||||
|  | { | ||||||
|  |     private int $constitution = 0; | ||||||
|  |     private int $ki = 0; | ||||||
|  |     private int $strength = 0; | ||||||
|  |     private int $agility = 0; | ||||||
|  |     private int $stamina = 0; | ||||||
|  | 
 | ||||||
|  |     public function getStrength(): ?int | ||||||
|  |     { | ||||||
|  |         return $this->strength; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public function setStrength(int $strength): self | ||||||
|  |     { | ||||||
|  |         $this->strength = $strength; | ||||||
|  | 
 | ||||||
|  |         return $this; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public function getAgility(): ?int | ||||||
|  |     { | ||||||
|  |         return $this->agility; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public function setAgility(int $agility): self | ||||||
|  |     { | ||||||
|  |         $this->agility = $agility; | ||||||
|  | 
 | ||||||
|  |         return $this; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public function getStamina(): ?int | ||||||
|  |     { | ||||||
|  |         return $this->stamina; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public function setStamina(int $stamina): self | ||||||
|  |     { | ||||||
|  |         $this->stamina = $stamina; | ||||||
|  | 
 | ||||||
|  |         return $this; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public function getConstitution(): ?int | ||||||
|  |     { | ||||||
|  |         return $this->constitution; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public function setConstitution(int $constitution): self | ||||||
|  |     { | ||||||
|  |         $this->constitution = $constitution; | ||||||
|  | 
 | ||||||
|  |         return $this; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public function getKi(): ?int | ||||||
|  |     { | ||||||
|  |         return $this->ki; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public function setKi(int $ki): self | ||||||
|  |     { | ||||||
|  |         $this->ki = $ki; | ||||||
|  | 
 | ||||||
|  |         return $this; | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
					Loading…
					
					
				
		Reference in New Issue