A Fighter/Mage is one of the stronger multi-classes at the

A Fighter/Mage is one of the stronger multi-classes at the end of Baldur’s Gate 2, the seminal role-playing video game (cRPG) developed by BioWare. For character creation of a Fighter/Mage, the highest dice rolls should be allocated to strength (STR), intelligence (INT), dexterity (DEX), and constitution (CON) – in that order – and the lower statistics should go into wisdom (WIS) and charisma (CHA). Fill in code at the three (3) places marked YOUR CODE HERE. Upload your program.

 

import java.util.ArrayList;

import java.util.Collections;

import java.util.List;

import java.util.Random;

public class Main {

public static class dndCharacter {

private String name;

private int STR;

private int INT;

private int DEX;

private int CON;

private int WIS;

private int CHA;

public dndCharacter(String myName) {

name = myName;

List statList = new ArrayList();

// get 6 random stats

for (int i = 0; i < 6; i++) {

statList.add(characterStat());

}

// order statList low to high

Collections.sort(statList);

// access elements with statList.get(index) for index f

rom 0 to 5

// assign the character statistics high to low STR INT

DEX CON WIS CHA

// with values from the ordered statList

// YOUR CODE HERE

}

public String about() {

String aboutMe = “”;

aboutMe += “Hi! My name is ” + name+”\n”;

aboutMe += “I am a Fighter/Mage”+”\n”;

if (STR + INT + DEX + CON + WIS + CHA > 6 * 9) {

aboutMe += “I am rather good at questing\n”;

aboutMe += “Strength: ” + STR+”\n”;

aboutMe += “Intelligence: ” + INT+”\n”;

aboutMe += “Dexterity: ” + DEX+”\n”;

aboutMe += “Constitution: ” + CON+”\n”;

aboutMe += “Wisdom: ” + WIS+”\n”;

aboutMe += “Charisma: ” + CHA+”\n”;

} else {

aboutMe += “But enough about me…”;

}

// create the correct return statement

// YOUR CODE HERE

}

static int characterStat() {

Random random = new Random();

int d1 = random.nextInt(5) + 1;

int d2 = random.nextInt(5) + 1;

int d3 = random.nextInt(5) + 1;

int d4 = random.nextInt(5) + 1;

int diceSum = d1 + d2 + d3 + d4;

int min = Math.min(d1, d2);

min = Math.min(min, d3);

min = Math.min(min, d4);

diceSum -= min;

return diceSum;

}

}

public static void main(String[] args) {

// YOUR CODE HERE

// modify myName to initialize dndCharacter

Main.dndCharacter FighterMage = new dndCharacter(“”);

System.out.println(FighterMage.about());

}

}

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Note: Kindly respond to this discussion 250 words, 2 references,

Note: Kindly respond to this discussion           250 words, 2 references, and APA format           Thank you. Regulatory bodies, therefore, keep an eye on individuals and corporate healthcare practitioners and institutions, and tell the government about developments in the industry, enforce more significant safety standards and work to improve healthcare quality while

Six Sigma projects are powerful tools for achieving breakthrough improvements.

Six Sigma projects are powerful tools for achieving breakthrough improvements. Improvement projects utilize the Define, Measure, Analyze, Improve, and Control (DMAIC) methodology while design or re-design projects use the DMADV methodology. Such projects can be undertaken for large or small initiatives, but because they require a fair bit of work

CU Quality Assurance and Risk Management Discussion Nursing Assignment Help

For this discussion use you’re Measuring Health Care: Using Quality Data for Operational, Financial, and Clinical Improvement by Yosef D. Dlugaczand the Internet to read and review the following: -Read Chapter 3, “Using Data to Improve Organizational Process,” pages 41–64. This reading helps cement the thoughts behind gathering quality data

QUESTIONS Pick one topic from this week’s MEDíA Write your

Premium Paper Help is a professional writing service that provides original papers. Our products include academic papers of varying complexity and other personalized services, along with research materials for assistance purposes only. All the materials from our website should be used with proper references.

Success rate of voluntary immigrants vs. involuntary immigrants.

Success rate of voluntary immigrants vs. involuntary immigrants. One group will argue that the groupthat they represent is more more successful han the other group, but their assertion must be based on APAformatted scholarly sources. No yellow journalism accepted. *Note: 1st you must define success.   Page body of the

County Rankings Nursing Assignment Help

Expert Solution Preview Introduction: As a medical professor, my role is to create educational assignments and evaluate the performance of medical college students. I design lectures, conduct examinations, and provide feedback to enhance students’ understanding and skills. Through these assessments, I aim to gauge their comprehension of medical concepts and

1-2 PARAGRAPHS APA FORMAT REFERENCES Consider the role of HR

Premium Paper Help is a professional writing service that provides original papers. Our products include academic papers of varying complexity and other personalized services, along with research materials for assistance purposes only. All the materials from our website should be used with proper references.

FUTURE TRENDS ACTIVITY Chapter 12: Personality Disorders Other Personality Disorders

FUTURE TRENDS ACTIVITY Chapter 12: Personality DisordersOther Personality Disorders Under Study The DSM-V includes 10 personality disorders, and several others are under study (e.g., passive-aggressive, depressive). One such disorder resembles depression and is termed “depressive personality disorder.”  You may review these criteria and differentiate depression as a personality trait vs.

Discuss the pros and cons of capital punishment. Explain ethical

  Discuss the pros and cons of capital punishment. Explain ethical and social justice issues related to capital punishment. Explain whether you support the use of capital punishment and why or why not. In your explanation, include how ethical and social justice issues informed your argument. Your speech should be

Egypt, Ancient and Modern – Premium Paper Help

Premium Paper Help is a professional writing service that provides original papers. Our products include academic papers of varying complexity and other personalized services, along with research materials for assistance purposes only. All the materials from our website should be used with proper references.

Directions Think about a special occasion speech that you would

  Directions Think about a special occasion speech that you would like to present on a topic of your choice. The speech can be for any context and any length, but the purpose must be to commemorate an occasion. See the list of example occasions for inspiration. Download and answer

Blood administration – Premium Paper Help

Premium Paper Help is a professional writing service that provides original papers. Our products include academic papers of varying complexity and other personalized services, along with research materials for assistance purposes only. All the materials from our website should be used with proper references.

Read excerpt from the following chapter from Carah: This chapter

Read excerpt from the following chapter from Carah: This chapter adds more detail to our examination of how meaning is made. It specifically helps us understand the theory of semiotics and the method of analysis. It returns to the definition of hegemony, power, ideology and discourse examined in the introductory

You are the Program Manager, and you are trying to decide on the best course of action to decrease incidence and prevalence of the disease chosen in Week 1(Sickle Cell Anemia). You must decide from th Nursing Assignment Help

You are the Program Manager, and you are trying to decide on the best course of action to decrease incidence and prevalence of the disease chosen in Week 1(Sickle Cell Anemia). You must decide from the data which population is most at-risk and decide on the most appropriate intervention to

Modern African History paper!

Description IMPORTANT! PROMPT: In the 15th century, European explorers and merchants began exploring the coastline ofAfrica, searching for goods that could be traded globally at intense profits. They succeeded andAfrica was harnessed to these European countries and their global economic interests forcenturies to follow. Yet it would be a mistake

Freedom and social justice – Premium Paper Help

Premium Paper Help is a professional writing service that provides original papers. Our products include academic papers of varying complexity and other personalized services, along with research materials for assistance purposes only. All the materials from our website should be used with proper references.

Unless the question prompt specifies a more informal style, you

   Unless the question prompt specifies a more informal style, you should choose a style that is comparable to the one that was used in the application. When it comes to displaying your personality, be sure that it is acceptable for the circumstance. Boxes, headers, and shading are all examples