updating package
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
package background;
|
package dnd;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ public class Background {
|
|||||||
proficientStatus[0] = true;
|
proficientStatus[0] = true;
|
||||||
proficientStatus[12] = true;
|
proficientStatus[12] = true;
|
||||||
skillProficiencies = skills[0] + ", " + skills[12];
|
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 noble’s 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 noble�s 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.";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -88,5 +88,9 @@ public class Character {
|
|||||||
return hair;
|
return hair;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
package com.builder;
|
package dnd;
|
||||||
|
|
||||||
public class CharacterStats {
|
public class CharacterStats {
|
||||||
|
|
||||||
private Stats[] stats;
|
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.
|
// 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) {
|
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[]{
|
this.stats = new Stats[]{
|
||||||
|
|
||||||
new Strength(str),
|
new Strength(str),
|
||||||
@@ -23,6 +23,7 @@ public class CharacterStats {
|
|||||||
new Charisma(cha)
|
new Charisma(cha)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
System.out.println("stats[] created with new stats.");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.builder;
|
package dnd;
|
||||||
|
|
||||||
public class Charisma extends Stats {
|
public class Charisma extends Stats {
|
||||||
|
|
||||||
@@ -45,4 +45,11 @@ public class Charisma extends Stats {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void increaseScore() {
|
||||||
|
|
||||||
|
abilityScore++;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.builder;
|
package dnd;
|
||||||
|
|
||||||
public interface ClassTemplate {
|
public interface ClassTemplate {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.builder;
|
package dnd;
|
||||||
|
|
||||||
public class Cleric implements ClassTemplate {
|
public class Cleric implements ClassTemplate {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.builder;
|
package dnd;
|
||||||
|
|
||||||
public class Constitution extends Stats {
|
public class Constitution extends Stats {
|
||||||
|
|
||||||
@@ -45,4 +45,11 @@ public class Constitution extends Stats {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void increaseScore() {
|
||||||
|
|
||||||
|
abilityScore++;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.builder;
|
package dnd;
|
||||||
|
|
||||||
public class Dexterity extends Stats {
|
public class Dexterity extends Stats {
|
||||||
|
|
||||||
@@ -45,4 +45,11 @@ public class Dexterity extends Stats {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void increaseScore() {
|
||||||
|
|
||||||
|
abilityScore++;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.builder;
|
package dnd;
|
||||||
|
|
||||||
public class Fighter implements ClassTemplate {
|
public class Fighter implements ClassTemplate {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.builder;
|
package dnd;
|
||||||
|
|
||||||
public class Intelligence extends Stats{
|
public class Intelligence extends Stats{
|
||||||
|
|
||||||
@@ -45,4 +45,11 @@ public class Intelligence extends Stats{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void increaseScore() {
|
||||||
|
|
||||||
|
abilityScore++;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.builder;
|
package dnd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.builder;
|
package dnd;
|
||||||
|
|
||||||
public abstract class Stats {
|
public abstract class Stats {
|
||||||
|
|
||||||
@@ -53,5 +53,4 @@ public abstract class Stats {
|
|||||||
|
|
||||||
abstract String getDescription();
|
abstract String getDescription();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.builder;
|
package dnd;
|
||||||
|
|
||||||
public class Strength extends Stats {
|
public class Strength extends Stats {
|
||||||
|
|
||||||
@@ -57,4 +57,11 @@ public class Strength extends Stats {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void increaseScore() {
|
||||||
|
|
||||||
|
abilityScore++;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.builder;
|
package dnd;
|
||||||
|
|
||||||
public class Wisdom extends Stats {
|
public class Wisdom extends Stats {
|
||||||
|
|
||||||
@@ -45,4 +45,11 @@ public class Wisdom extends Stats {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void increaseScore() {
|
||||||
|
|
||||||
|
abilityScore++;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.builder;
|
package dnd;
|
||||||
|
|
||||||
public class Wizard implements ClassTemplate {
|
public class Wizard implements ClassTemplate {
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ public class dndTestClient {
|
|||||||
|
|
||||||
CharacterStats stats = new CharacterStats(10, 10, 10, 10, 10, 10);
|
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++) {
|
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);
|
Character characterInfo = new Character("Generic", 50, 4, 6, 150, "brown", "black", chosenRace);
|
||||||
|
|
||||||
System.out.println();
|
System.out.println(characterInfo.toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user