// 初始化战斗数据库 private void initializeBattleObjects() { BattleSkill.InitializeBattleSkills(); BattleStatus.InitializeBattleStatusList(); BattleJob.InitializeBattleJobList(); BattleActor.InitializeBattleActorList(); }
public static void InitializeBattleActorList() { battleActorsList = new List <BattleActor>(); // id name picture pic_index level job BattleActor Lizheng = new BattleActor(0, "李正", "Actor1.png", 0, 1, BattleJob.GetBattleJob(0)); battleActorsList.Add(Lizheng); }
public static void InitializeBattleJobList() { battleJobsList = new List <BattleJob>(); //添加新职业 BattleJob people = new BattleJob(0, "平民"); people.jobSkillsList.Add(0, 0); //0 攻击技能; 0 0级即可使用 battleJobsList.Add(people); }
public BattleActor(int id, string name, string filename, int index, int level, BattleJob battleJob) { this.id = id; this.name = name; SetCharacter(filename, index); this.level = level; this.battleJob = battleJob; // 利用等级和职业获取其他基本数据 8项 maxHp = battleJob.GetMaxHp(level); maxMp = battleJob.GetMaxMp(level); atk = battleJob.GetAtk(level); def = battleJob.GetDef(level); mtk = battleJob.GetMtk(level); mdf = battleJob.GetMdf(level); speed = battleJob.GetSpeed(level); luck = battleJob.GetLuck(level); //初始化技能列表 battleSkills = battleJob.GetUsableSkills(level); //危险 //初始化消耗量 Hp = maxHp; Mp = maxMp; battleStatuses = new List <BattleStatus>(); }