public void TestBuff() { if (JobData.GetData(1) == null) { JobData.Load(); BattleStatusData.Load(); } BattleCharacterInfo Info = new BattleCharacterInfo(); TeamMember teamMember = new TeamMember(); teamMember.Init(1, true, 1); Info.Init(teamMember, 1); Info.SetBuff(1, 1); Assert.AreEqual(27, Info.DEF); }
public void Init(TeamMemberMemo memo) { Data = JobData.GetData(memo.DataId); MaxHP = memo.MaxHP; CurrentHP = memo.CurrentHP; MaxMP = memo.MaxMP; CurrentMP = memo.CurrentMP; _atk = memo.ATK; _def = memo.DEF; _mtk = memo.MTK; _mef = memo.MEF; _agi = memo.AGI; _sen = memo.SEN; MOV = memo.MOV; IsAttend = memo.IsAttend; SkillDic = memo.SkillList; SpellCardDic = memo.SpellCardList; Formation = memo.Formation; Weapon = memo.Weapon; Armor = memo.Armor; FoodBuff = memo.FoodBuff; }
public void Init(int jobId, bool isAttend, int lv = 1) { Data = JobData.GetData(jobId); MaxHP = Mathf.RoundToInt(Data.HP * (1 + ((lv - 1) * 0.1f))); CurrentHP = MaxHP; MaxMP = Data.MP; CurrentMP = MaxMP; _atk = Mathf.RoundToInt(Data.ATK * (1 + ((lv - 1) * 0.1f))); _def = Mathf.RoundToInt(Data.DEF * (1 + ((lv - 1) * 0.1f))); _mtk = Mathf.RoundToInt(Data.MTK * (1 + ((lv - 1) * 0.1f))); _mef = Mathf.RoundToInt(Data.MEF * (1 + ((lv - 1) * 0.1f))); _agi = Mathf.RoundToInt(Data.AGI * (1 + ((lv - 1) * 0.1f))); _sen = Mathf.RoundToInt(Data.SEN * (1 + ((lv - 1) * 0.1f))); MOV = Data.MOV; IsAttend = isAttend; for (int i = 0; i < Data.SkillList.Count; i++) { SkillDic.Add(Data.SkillList[i], 1); } for (int i = 0; i < Data.SpellCardList.Count; i++) { SpellCardDic.Add(Data.SpellCardList[i], 1); } }