WoD Chargen in Command Prompt via Java
-
I'm bored and practicing the things that I know for Java before my final for next week. I got bored writing the methods on the practice final so started making a Mortal CG in java (it goes to command prompt, because I'm not fancy yet). I haven't finished but here's what I've gotten to so far:
//********************************************** // This is a program to walk someone through a // mortal chargen for world of darkness // It is stored at MortalCG.java //********************************************** import java.util.Scanner; import java.util.Random; public class MortalCG { public static void main(String[] args) { // this block initalizes all of the variables needed for the character sheet. int inte = 1, wits = 1, reso = 1, stre = 1, dext = 1, stam = 1, pres = 1, comp = 1, mani = 1; int acad, compu, craf, inve, medi, occu, poli, scie; int athl, braw, driv, fire, larc, stea, surv, weap; int anim, empa, expr, inti, pers, soci, subt, stree; String name, concept, vice, virtue; Scanner s = new Scanner(System.in); Random r = new Random(); // now we begin asking things about the character concept. Starting with name. System.out.println("Please enter your character's name."); name = s.nextLine(); // now we're setting their concept. System.out.println("\nPlease enter your character's concept."); concept = s.nextLine(); // now we'll be setting their virtue, it has to be one of the listed virtues. So we're using a while loop to keep them there // until they give us the right virtue. virtue = "Toad"; vice = "Toad"; while ( ! ( (virtue.compareTo("Ambitious") == 0) || (virtue.compareTo("Courageous") == 0) || (virtue.compareTo("Generous") == 0) || (virtue.compareTo("Honest") == 0) || (virtue.compareTo("Hopeful") == 0) || (virtue.compareTo("Humble") == 0) || (virtue.compareTo("Just") == 0) || (virtue.compareTo("Loving") == 0) || (virtue.compareTo("Loyal") == 0) || (virtue.compareTo("Patient") == 0) || (virtue.compareTo("Peaceful") == 0) || (virtue.compareTo("Righteous") == 0) || (virtue.compareTo("Trustworthy") == 0) || (virtue.compareTo("Persistent") == 0) || (virtue.compareTo("Passionate") == 0) || (virtue.compareTo("Thoughtful") == 0) ) ) { System.out.println("\nPlease enter your virtue. Choose from this list:\nAmbitious\t Courageous\t Generous " + "\nHonest\t\t Hopeful\t Humble\t \nJust\t\t Loving\t\t Loyal\t \nPatient\t\t Peaceful\t Righteous " + "\nTrustworthy\t Persistent\t Passionate\t\nThoughtful"); virtue = s.next(); } while ( ! ( (vice.compareTo("Ambitious") == 0) || (vice.compareTo("Arrogant") == 0) || (vice.compareTo("Corrupt") == 0) || (vice.compareTo("Cowardly") == 0) || (vice.compareTo("Cruel") == 0) || (vice.compareTo("Deceitful") == 0) || (vice.compareTo("Greedy") == 0) || (vice.compareTo("Hasty") == 0) || (vice.compareTo("Hateful") == 0) || (vice.compareTo("Pessimistic") == 0) || (vice.compareTo("Treacherous") == 0) || (vice.compareTo("Untrustworthy") == 0) || (vice.compareTo("Violent") == 0) || (vice.compareTo("Hedonist") == 0) || (vice.compareTo("Curious") == 0) || (vice.compareTo("Lazy") == 0) || (vice.compareTo("Codependant") == 0) || (vice.compareTo("Naive") == 0) ) ) { System.out.println("\nPlease enter your vice. Choose from this list:\nAmbitious\t Arrogant\t Corrupt " + "\nCowardly\t\t Cruel\t Deceitful\t \nGreedy\t\t Hasty\t\t \t \nHateful\t\t Pessimistic\t Treacherous " + "\nUntrustworthy\t Violent\t Hedonist\t\nCurious\t\tLazy\t\tCodependant\nNaive"); vice = s.next(); } for ( int line = 0; line < 78; line++) System.out.print("="); System.out.println("\nName: " + name + "\t\tConcept: " + concept + "\nVirtue: " + virtue + " Vice: " + vice + "\n"); for (int dash = 0; dash < 33; dash++) System.out.print("-"); System.out.print(" ATTRIBUTES: "); for ( int dash = 0; dash < 33; dash++) System.out.print("-"); System.out.println("\nIntelligence:\t\tStrength:\t\tPresence:\nWits:\t\tDexterity:\t\tManipulation:\nResolve:\t\tStamina:\t\tComposure:"); for ( int line = 0; line < 78; line++) System.out.print("="); System.out.println(); } // end main } // end program
OUTPUT:
Please enter your character's name. Cobalt A. Saurus Please enter your character's concept. A Pretty Princess Dinosaurus. Please enter your virtue. Choose from this list: Ambitious Courageous Generous Honest Hopeful Humble Just Loving Loyal Patient Peaceful Righteous Trustworthy Persistent Passionate Thoughtful Trusting Please enter your virtue. Choose from this list: Ambitious Courageous Generous Honest Hopeful Humble Just Loving Loyal Patient Peaceful Righteous Trustworthy Persistent Passionate Thoughtful Thoughtful Please enter your vice. Choose from this list: Ambitious Arrogant Corrupt Cowardly Cruel Deceitful Greedy Hasty Hateful Pessimistic Treacherous Untrustworthy Violent Hedonist Curious Lazy Codependant Naive Hateful ============================================================================== Name: Cobalt A. Saurus Concept: A Pretty Princess Dinosaurus. Virtue: Thoughtful Vice: Hateful --------------------------------- ATTRIBUTES: --------------------------------- Intelligence: Strength: Presence: Wits: Dexterity: Manipulation: Resolve: Stamina: Composure: ============================================================================== Press any key to continue . . .