public MenkoBattleData(uint id, bool isPlayer, bool isRepresent) { this.isRepresent = isRepresent; this.isPlayer = isPlayer; baseData = AssetManager.Load(AssetPath.GetMonsterDataPath(id)).Asset as MenkoData; skillData = AssetManager.Load(AssetPath.GetSkillDataPath(baseData.Character.SkillID)).Asset as SkillData; status = new BattleStatus(baseData.Status, skillData); }
/// <summary> /// ダメージ加算 /// </summary> public void Damage(BattleStatus opStatus, float posMagnif, Vector3 pos) { const int LV = 100; // 今のところ固定 float elementMag = MenkoElementUtils.GetMagnification(opStatus.Element, this.Element); float attackBase = (LV * 0.4f + 2) * opStatus.Attack * elementMag; float difensed = attackBase / (this.Difense * 0.75f); int damage = Mathf.CeilToInt(difensed * posMagnif); Percent += damage; DamageToaster.Instance.ShowDamage(damage, pos); }
public void Damage(BattleStatus status, float posMagnif) { data.Status.Damage(status, posMagnif, transform.position); components.AddForce(Vector3.up * 0.01f * data.Status.Percent, ForceMode.Impulse); components.AddTorque(Vector3.right * 0.1f * data.Status.Percent, ForceMode.Impulse); }