package jiadianxitong;
// 定义角色的基本信息类
public class BasicInformation {
// 私有成员变量,封装角色的属性
private String role; // 角色名称
private int age; // 角色年龄
private Race race; // 角色种族
private Career career; // 角色职业
private int grade; // 角色等级
private EducationLevel education; // 角色学历
private int power; // 角色力量
private int agile; // 角色敏捷
private int constitution; // 角色体质
private int intelligence; // 角色智力
private int perception; // 角色感知
private int charm; // 角色魅力
private String talent; // 角色天赋
private Skill skill; // 角色技能
private Equipment equip; // 角色装备
// 构造函数,用于初始化角色的基本信息
public BasicInformation(String role, int age, Race race, Career career, int grade, EducationLevel education,
int power, int agile, int constitution, int intelligence, int perception, int charm, String talent,
Skill skill, Equipment equip) {
this.role = role;
this.age = age;
this.race = race;
this.career = career;
this.grade = grade;
this.education = education;
this.power = power;
this.agile = agile;
this.constitution = constitution;
this.intelligence = intelligence;
this.perception = perception;
this.charm = charm;
this.talent = talent;
this.skill = skill;
this.equip = equip;
}
public String displayBasicInformation() {
return "\t姓名:" + role + "\n" +
"\t年龄:" + age + "岁\n" +
"\t种族:" + race + "\n" +
"\t职业:" + career + "\n" +
"\t职业等级:" + grade + "级\n" +
"\t学历:" + education + "\n" +
"\t力量:" + power + "\n" +
"\t敏捷:" + agile + "\n" +
"\t体质:" + constitution + "\n" +
"\t智力:" + intelligence + "\n" +
"\t感知:" + perception + "\n" +
"\t魅力:" + charm + "\n" +
"\t天赋:" + talent + "\n" +
"\t技能:" + skill.toString() + "\n" +
"\t装备:" + equip.toString();
}
}