Advertisement
cgorrillaha

Untitled

Dec 7th, 2020
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 4.02 KB | None | 0 0
  1. /**
  2.  * @author cgorrill
  3.  * @date 12/4/2020
  4.  *
  5.  * */
  6. public class Character {
  7.     /*
  8.     * strength
  9.     * constitution or health
  10.     * dexterity agility
  11.     * intel
  12.     * wisdom
  13.     * charisma or personality
  14.     * health points
  15.     * defense points
  16.     * attack rating
  17.     * base damage
  18.     * experience point
  19.     * level
  20.     * Name - first name last name    *
  21.     *
  22.     * */
  23.     private String name;
  24.     private int level;
  25.     /*player stats*/
  26.     private int str, con, dex, intel, wis, charisma;
  27.     /*Health points*/
  28.     private int hp;
  29.     /*attack rating defines chance to hit a target*/
  30.     private int attackRating;
  31.     /*baseDmg defines the amount of damage dealt on a successful hit
  32.     with bare hand and no damage modifiers.
  33.     */
  34.     private int baseDmg;
  35.     /*defense defines how hard it is to hit the character*/
  36.     private int defense;
  37.     private int exp;//experience points
  38.  
  39.     public Character(){
  40.         name="";
  41.         str=0;
  42.         dex=0;
  43.         charisma=0;
  44.         wis=0;
  45.         intel=0;
  46.         con=0;
  47.         exp=0;
  48.         level=0;
  49.         hp=0;
  50.         attackRating=0;
  51.         baseDmg=0;
  52.         defense=0;
  53.     }
  54.  
  55.     public Character(String name, int str, int dex, int cha,
  56.                      int wis, int intel, int con, int exp, int lv, int hp,
  57.                      int att, int def, int bDmg){
  58.         this.name=name;
  59.         this.str=str;
  60.         this.dex=dex;
  61.         charisma=cha;
  62.         this.wis=wis;
  63.         this.intel=intel;
  64.         this.con=con;
  65.         this.exp=exp;
  66.         level=lv;
  67.         this.hp=hp;
  68.         attackRating=att;
  69.         baseDmg=bDmg;
  70.         defense=def;
  71.     }
  72.  
  73.  
  74.     public String getName() {
  75.         return name;
  76.     }
  77.  
  78.     public void setName(String name) {
  79.         this.name = name;
  80.     }
  81.  
  82.     public int getLevel() {
  83.         return level;
  84.     }
  85.  
  86.     public void setLevel(int level) {
  87.         this.level = level;
  88.     }
  89.  
  90.     public int getStr() {
  91.         return str;
  92.     }
  93.  
  94.     public void setStr(int str) {
  95.         this.str = str;
  96.     }
  97.  
  98.     public int getCon() {
  99.         return con;
  100.     }
  101.  
  102.     public void setCon(int con) {
  103.         this.con = con;
  104.     }
  105.  
  106.     public int getDex() {
  107.         return dex;
  108.     }
  109.  
  110.     public void setDex(int dex) {
  111.         this.dex = dex;
  112.     }
  113.  
  114.     public int getIntel() {
  115.         return intel;
  116.     }
  117.  
  118.     public void setIntel(int intel) {
  119.         this.intel = intel;
  120.     }
  121.  
  122.     public int getWis() {
  123.         return wis;
  124.     }
  125.  
  126.     public void setWis(int wis) {
  127.         this.wis = wis;
  128.     }
  129.  
  130.     public int getCharisma() {
  131.         return charisma;
  132.     }
  133.  
  134.     public void setCharisma(int charisma) {
  135.         this.charisma = charisma;
  136.     }
  137.  
  138.     public int getHp() {
  139.         return hp;
  140.     }
  141.  
  142.     public void setHp(int hp) {
  143.         this.hp = hp;
  144.     }
  145.  
  146.     public int getAttackRating() {
  147.         return attackRating;
  148.     }
  149.  
  150.     public void setAttackRating(int attackRating) {
  151.         this.attackRating = attackRating;
  152.     }
  153.  
  154.     public int getBaseDmg() {
  155.         return baseDmg;
  156.     }
  157.  
  158.     public void setBaseDmg(int baseDmg) {
  159.         this.baseDmg = baseDmg;
  160.     }
  161.  
  162.     public int getDefense() {
  163.         return defense;
  164.     }
  165.  
  166.     public void setDefense(int defense) {
  167.         this.defense = defense;
  168.     }
  169.  
  170.     public int getExp() {
  171.         return exp;
  172.     }
  173.  
  174.     public void setExp(int exp) {
  175.         this.exp = exp;
  176.     }
  177.  
  178.     @Override
  179.     public String toString() {
  180.         return "Character{" +
  181.                 "name='" + name + '\'' +
  182.                 ", level=" + level +
  183.                 ", str=" + str +
  184.                 ", con=" + con +
  185.                 ", dex=" + dex +
  186.                 ", intel=" + intel +
  187.                 ", wis=" + wis +
  188.                 ", charisma=" + charisma +
  189.                 ", hp=" + hp +
  190.                 ", attackRating=" + attackRating +
  191.                 ", baseDmg=" + baseDmg +
  192.                 ", defense=" + defense +
  193.                 ", exp=" + exp +
  194.                 '}';
  195.     }
  196. }
  197.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement