public void Attack() { if (m_data.hp == 0) { return; } SelectArts(); // 技のレートをクリーチャーに教える string matchRate = csvHolder.CSVDatas[m_lastArts][(int)AttackRecipeManeger_Script.Data_Column.ATK_RATE]; int rate = int.Parse(matchRate); int damage = (int)(((m_data.level / 5 + 2) * this.m_data.atk) * (rate / 100.0f)) - this.m_target.GetData().def; float weak = WeakChecker_Script.WeakCheck(this.m_data.elem, this.m_target.GetData().elem); VFXCreater_Script.CreateEffect(csvHolder.CSVDatas[m_lastArts][(int)AttackRecipeManeger_Script.Data_Column.ATK_NAME], this.transform); damage = (int)(damage * weak); if (damage <= 0) { damage = 1; } this.m_target.Damage(damage); if (weak == 1.5f) { DamageUI_Script.CreateWeakUI(m_targetPos.transform, new Vector3(-0.25f, 2.8f, -3f)); } this.m_timer = 0.0f; this.m_atkFlag = false; if (m_anim) { m_anim.SetTrigger("Attack"); } }
public void Attack() { if (m_data.hp == 0) { return; } int damage = (int)(((m_data.level / 5 + 2) * this.m_data.atk) * (this.m_rate / 100.0f)) - this.m_target.GetData().def; float weak = WeakChecker_Script.WeakCheck(this.m_data.elem, this.m_target.GetData().elem); VFXCreater_Script.CreateEffect(m_abiltyName, this.transform); damage = (int)(damage * weak); if (damage <= 0) { damage = 1; } this.m_target.Damage(damage); if (weak == 1.5f) { DamageUI_Script.CreateWeakUI(m_targetPos.transform, new Vector3(1.5f, 3.0f, -3f)); } this.m_rate = 0; this.m_atkFlag = false; m_anim.SetTrigger("Attack"); }