updating package

This commit is contained in:
Joshua-Ashton01
2022-10-25 11:41:58 -06:00
parent bcb2a22456
commit b1d6e51ee5
16 changed files with 65 additions and 19 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
package background;
package dnd;
import java.util.Arrays;
@@ -63,7 +63,7 @@ public class Background {
proficientStatus[0] = true;
proficientStatus[12] = true;
skillProficiencies = skills[0] + ", " + skills[12];
feature = "By Popular Demand" + "\nYou can always find a place to perform, usually in an inn or tavern but possibly with a circus, at a theater, or even in a nobles court. At such a place, you receive free lodging and food of a modest or comfortable standard (depending on the quality of the establishment), as long as you perform each night. In addition, your performance makes you something of a local figure. When strangers recognize you in a town where you have performed, they typically take a liking to you.";
feature = "By Popular Demand" + "\nYou can always find a place to perform, usually in an inn or tavern but possibly with a circus, at a theater, or even in a nobles court. At such a place, you receive free lodging and food of a modest or comfortable standard (depending on the quality of the establishment), as long as you perform each night. In addition, your performance makes you something of a local figure. When strangers recognize you in a town where you have performed, they typically take a liking to you.";
}
/**
+4
View File
@@ -88,5 +88,9 @@ public class Character {
return hair;
}
@Override
public String toString() {
return name;
}
}
+3 -2
View File
@@ -1,5 +1,4 @@
package com.builder;
package dnd;
public class CharacterStats {
private Stats[] stats;
@@ -13,6 +12,7 @@ public class CharacterStats {
// TODO: Need to implement constructor, validates all proposed ability scores and creates new objects containing corresponding values.
public CharacterStats(int str, int dex, int con, int intel, int wis, int cha) {
System.out.println("Constructor started in CharacterStats.");
this.stats = new Stats[]{
new Strength(str),
@@ -23,6 +23,7 @@ public class CharacterStats {
new Charisma(cha)
};
System.out.println("stats[] created with new stats.");
}
+8 -1
View File
@@ -1,4 +1,4 @@
package com.builder;
package dnd;
public class Charisma extends Stats {
@@ -45,4 +45,11 @@ public class Charisma extends Stats {
}
@Override
void increaseScore() {
abilityScore++;
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
package com.builder;
package dnd;
public interface ClassTemplate {
+1 -1
View File
@@ -1,4 +1,4 @@
package com.builder;
package dnd;
public class Cleric implements ClassTemplate {
+8 -1
View File
@@ -1,4 +1,4 @@
package com.builder;
package dnd;
public class Constitution extends Stats {
@@ -45,4 +45,11 @@ public class Constitution extends Stats {
}
@Override
void increaseScore() {
abilityScore++;
}
}
+8 -1
View File
@@ -1,4 +1,4 @@
package com.builder;
package dnd;
public class Dexterity extends Stats {
@@ -45,4 +45,11 @@ public class Dexterity extends Stats {
}
@Override
void increaseScore() {
abilityScore++;
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
package com.builder;
package dnd;
public class Fighter implements ClassTemplate {
+8 -1
View File
@@ -1,4 +1,4 @@
package com.builder;
package dnd;
public class Intelligence extends Stats{
@@ -45,4 +45,11 @@ public class Intelligence extends Stats{
}
@Override
void increaseScore() {
abilityScore++;
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
package com.builder;
package dnd;
/**
*
+1 -2
View File
@@ -1,4 +1,4 @@
package com.builder;
package dnd;
public abstract class Stats {
@@ -53,5 +53,4 @@ public abstract class Stats {
abstract String getDescription();
}
+8 -1
View File
@@ -1,4 +1,4 @@
package com.builder;
package dnd;
public class Strength extends Stats {
@@ -57,4 +57,11 @@ public class Strength extends Stats {
}
@Override
void increaseScore() {
abilityScore++;
}
}
+8 -1
View File
@@ -1,4 +1,4 @@
package com.builder;
package dnd;
public class Wisdom extends Stats {
@@ -45,4 +45,11 @@ public class Wisdom extends Stats {
}
@Override
void increaseScore() {
abilityScore++;
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
package com.builder;
package dnd;
public class Wizard implements ClassTemplate {
+2 -2
View File
@@ -9,7 +9,7 @@ public class dndTestClient {
CharacterStats stats = new CharacterStats(10, 10, 10, 10, 10, 10);
Race chosenRace = new Human("Goblin");
Human chosenRace = new Human("Goblin");
for(int i = 0; i < chosenRace.getASI().length; i++) {
@@ -19,7 +19,7 @@ public class dndTestClient {
Character characterInfo = new Character("Generic", 50, 4, 6, 150, "brown", "black", chosenRace);
System.out.println();
System.out.println(characterInfo.toString());
}