Compare commits
No commits in common. "57007d0bb4f64694be268873e2e99da261766c0b" and "43763a3dbc6c083f0bf879a4472821f787043a6c" have entirely different histories.
57007d0bb4
...
43763a3dbc
4 changed files with 93 additions and 31 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -1,8 +0,0 @@
|
||||||
# ---> Composer
|
|
||||||
composer.phar
|
|
||||||
/vendor/
|
|
||||||
|
|
||||||
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
|
|
||||||
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
|
|
||||||
# composer.lock
|
|
||||||
|
|
21
LICENSE
21
LICENSE
|
@ -1,21 +0,0 @@
|
||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) <year> <copyright holders>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is furnished
|
|
||||||
to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice (including the next
|
|
||||||
paragraph) shall be included in all copies or substantial portions of the
|
|
||||||
Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
||||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
|
||||||
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
|
||||||
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
@ -1,2 +1 @@
|
||||||
# DnD-Assistant
|
DndAssistant
|
||||||
|
|
||||||
|
|
92
src/DnDAssistant/main.php
Normal file
92
src/DnDAssistant/main.php
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
class Entity{
|
||||||
|
private $name;
|
||||||
|
private $armour_class;
|
||||||
|
private $fullhp;
|
||||||
|
private $hp;
|
||||||
|
private $str;
|
||||||
|
private $dex;
|
||||||
|
private $con;
|
||||||
|
private $int;
|
||||||
|
private $wis;
|
||||||
|
private $chr;
|
||||||
|
private $align;
|
||||||
|
|
||||||
|
public function setName(String $name){
|
||||||
|
$this->name = $name;
|
||||||
|
}
|
||||||
|
public function getName(){
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
public function setAC(int $ac){
|
||||||
|
$this->armour_class = $ac;
|
||||||
|
}
|
||||||
|
public function getAC(){
|
||||||
|
return $this->armour_class;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCurrentHP(){
|
||||||
|
return $this->hp;
|
||||||
|
}
|
||||||
|
public function getMaxHP(){
|
||||||
|
return $this->hp;
|
||||||
|
}
|
||||||
|
public function restoreToFullHP(){
|
||||||
|
$this->hp = $this->fullhp;
|
||||||
|
}
|
||||||
|
public function heal(int $amount){
|
||||||
|
$this->hp += $amount;
|
||||||
|
}
|
||||||
|
public function damage(int $amount){
|
||||||
|
$this->hp -= $amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setAligment(String $align){
|
||||||
|
$this->align = $align;
|
||||||
|
}
|
||||||
|
public function getAligment(){
|
||||||
|
return $this->align;
|
||||||
|
}
|
||||||
|
public function setStrength(String $str){
|
||||||
|
$this->str = $str;
|
||||||
|
}
|
||||||
|
public function getStrength(){
|
||||||
|
return $this->str;
|
||||||
|
}
|
||||||
|
public function setDexterity(String $dex){
|
||||||
|
$this->dex = $dex;
|
||||||
|
}
|
||||||
|
public function getDexterity(){
|
||||||
|
return $this->dex;
|
||||||
|
}
|
||||||
|
public function setConstitution(String $dex){
|
||||||
|
$this->dex = $dex;
|
||||||
|
}
|
||||||
|
public function getConstitution(){
|
||||||
|
return $this->dex;
|
||||||
|
}
|
||||||
|
public function setIntelligence(String $int){
|
||||||
|
$this->int = $int;
|
||||||
|
}
|
||||||
|
public function getIntelligence(){
|
||||||
|
return $this->int;
|
||||||
|
}
|
||||||
|
public function setWisdom(String $wis){
|
||||||
|
$this->wis = $wis;
|
||||||
|
}
|
||||||
|
public function getWisdom(){
|
||||||
|
return $this->wis;
|
||||||
|
}
|
||||||
|
public function setCharisma,(String $chr){
|
||||||
|
$this->chr = $chr;
|
||||||
|
}
|
||||||
|
public function getCharisma,(){
|
||||||
|
return $this->chr;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class Enemy extends Entity{
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue