public static Dictionary <string, int> GetCharaAbility(SoulLargeData data, int charaLv) { Dictionary <string, int> charaAbility = new Dictionary <string, int>(); float radio = Mathf.Pow(charaLv, 0.7f) + Mathf.Ceil(charaLv / 10) * 0.5f; charaAbility.Add("Atk", (int)Mathf.Ceil(data.abilitys["Atk"] * radio)); charaAbility.Add("Def", (int)Mathf.Ceil(data.abilitys["Def"] * radio)); charaAbility.Add("mAtk", (int)Mathf.Ceil(data.abilitys["mAtk"] * radio)); charaAbility.Add("mDef", (int)Mathf.Ceil(data.abilitys["mDef"] * radio)); charaAbility.Add("Hp", (int)Mathf.Ceil(data.abilitys["Hp"] * radio)); return(charaAbility); }
public static Dictionary <string, int> GetEnemyAbility(SoulLargeData data, int monsterLv) { Dictionary <string, int> monsterAbility = new Dictionary <string, int>(); float calculate = Mathf.Pow(monsterLv, 0.2f + (0.005f * monsterLv)) + (24 * monsterLv / 120); float radio = calculate < 2f?1:calculate; monsterAbility.Add("Atk", (int)Mathf.Ceil(data.abilitys["Atk"] * radio)); monsterAbility.Add("Def", (int)Mathf.Ceil(data.abilitys["Def"] * radio)); monsterAbility.Add("mAtk", (int)Mathf.Ceil(data.abilitys["mAtk"] * radio)); monsterAbility.Add("mDef", (int)Mathf.Ceil(data.abilitys["mDef"] * radio)); monsterAbility.Add("Hp", (int)Mathf.Ceil(data.abilitys["Hp"] * radio)); return(monsterAbility); }
public void SetData(Dictionary <string, object> data) { switch (dataType) { case DataType.Chara: int id; int lv; SoulLargeData charaData = MasterDataManager.GetSoulData(Int32.Parse(data ["id"].ToString())); Dictionary <string, int> ability = ParameterConvert.GetCharaAbility(charaData, Int32.Parse(data ["lv"].ToString())); foreach (KeyValuePair <string, int> kv in ability) { Debug.Log(kv.Key + " , " + kv.Value); } break; case DataType.Skill: break; case DataType.Rule: break; } }