public JsonResult GetActionLogStatEveryDayByFunction(StatReq parame) { parame.currentTime = parame.currentTime.ToString() == "0001/1/1 0:00:00" ? DateTime.Now : parame.currentTime; parame.ps = parame.ps == 0 ? 10 : parame.ps; #region 最近日期 string DateTimeList = string.Empty; if (parame.currentTime.CompareTo(DateTime.Now) > 0) { parame.currentTime = DateTime.Now; } List <DateTime> timeList = new List <DateTime>(); for (int i = 0; i < parame.ps; i++) { timeList.Add(parame.currentTime.AddDays(i - parame.ps + 1)); } #endregion List <StatModel> everyDayFunctionStat = actionLogBll.GetActionLog_StatByFunction(parame); EveryDayStatViewModel everyDayStat = new EveryDayStatViewModel(); everyDayStat.FunctionStat = (from itemTime in timeList join itemstat in everyDayFunctionStat on itemTime.ToShortDateString() equals itemstat.Time.ToShortDateString() into temp from viewItem in temp.DefaultIfEmpty() select new { ShortDate = itemTime, Time = itemTime.ToString("MM-dd"), Count = viewItem == null ? 0 : viewItem.Count }).OrderBy(o => o.ShortDate); everyDayStat.timeList = timeList.Select(t => new { Time = t.ToString("MM-dd") }); return(Json(everyDayStat, JsonRequestBehavior.AllowGet)); }
public List <StatModel> GetActionLog_StatByFunction(StatReq parame) { DbCommand cmd = GetStoredProcCommand("P_ActionLog_StatByFunction"); AddInParameter(cmd, "@ps", DbType.Int32, parame.ps); AddInParameter(cmd, "@Controller", DbType.String, parame._Controller); AddInParameter(cmd, "@Action", DbType.String, parame._Action); AddInParameter(cmd, "@UserId", DbType.Int32, parame.UserId); AddInParameter(cmd, "@currentTime", DbType.Date, parame.currentTime); DataSet ds = ExecuteDataSet(cmd); List <StatModel> statList = new List <StatModel>(); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { foreach (DataRow dr in ds.Tables[0].Rows) { statList.Add(new StatModel() { Count = dr.Table.Columns.Contains("Counts") ? To <Int32>(dr, "Counts") : 0, Time = dr.Table.Columns.Contains("Times") ? To <DateTime>(dr, "Times") : DateTime.Now }); } } return(statList); }
public JsonResult GetSiteAnalyseData(StatReq parame) { List <StatModel> statList = postLogBll.GetSiteAnalyseData(parame); if (statList != null && statList.Count > 0) { var resultList = statList.Select(s => new { s.SiteName, s.Count, s.TipContent }); return(Json(new { data = resultList }, JsonRequestBehavior.AllowGet)); } return(Json(new { data = new List <StatModel>() }, JsonRequestBehavior.AllowGet)); }
public void Adjust(StatReq wep) { if (wep.Str > Str) { Str = wep.Str; } if (wep.Dex > Dex) { Dex = wep.Dex; } if (wep.Mag > Mag) { Mag = wep.Mag; } if (wep.Fai > Fai) { Fai = wep.Fai; } }
public int Eligible(StatReq ch) { int[] comps = new int[] { Str == 0 ? 0 : ch.Str - Str, Dex == 0 ? 0 : ch.Dex - Dex, Mag == 0 ? 0 : ch.Mag - Mag, Fai == 0 ? 0 : ch.Fai - Fai, }; int miss = comps.Where(c => c < 0).Sum(); if (miss < 0) { return(miss); } // Weapons with no requirements, slight penalty if (Str == 0 && Dex == 0 && Mag == 0 && Fai == 0) { return(4); } return(comps.Sum()); }
public virtual List <StatModel> GetLoginStat(StatReq parame) { DbCommand cmd = GetStoredProcCommand("P_Api_GetLoginStat"); AddInParameter(cmd, "@ps", DbType.Int32, parame.ps); AddInParameter(cmd, "@currentTime", DbType.Date, parame.currentTime); DataSet ds = ExecuteDataSet(cmd); List <StatModel> statList = new List <StatModel>(); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { foreach (DataRow dr in ds.Tables[0].Rows) { statList.Add(new StatModel() { Count = dr.Table.Columns.Contains("Counts") ? To <Int32>(dr, "Counts") : 0, Time = dr.Table.Columns.Contains("Times") ? To <DateTime>(dr, "Times") : DateTime.Now }); } } return(statList); }
public virtual List <StatModel> GetSiteAnalyseData(StatReq parame) { DbCommand cmd = GetStoredProcCommand("P_Stat_PushSite"); AddInParameter(cmd, "@startTime", DbType.Date, parame.startTime); AddInParameter(cmd, "@endTime", DbType.Date, parame.endTime); AddInParameter(cmd, "@status", DbType.Int32, parame.status); DataSet ds = ExecuteDataSet(cmd); List <StatModel> statList = new List <StatModel>(); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { foreach (DataRow dr in ds.Tables[0].Rows) { statList.Add(new StatModel() { Count = dr.Table.Columns.Contains("Counts") ? To <Int32>(dr, "Counts") : 0, SiteName = dr.Table.Columns.Contains("SiteName") ? To <string>(dr, "SiteName") : "", TipContent = dr.Table.Columns.Contains("TipContent") ? To <string>(dr, "TipContent") : "" }); } } return(statList); }
public bool CheckStatReqs(EffectType type, RuneType runetype) { bool is_vocal = false; /* * if (!Get.isSpecial(type) && isMaxLevel()) * { * if (is_vocal) Debug.Log("Reached max level " + getMaxLevel() + "\n"); * return false; * }*/ int s = getStatID(type); StatReq[] statreqs = stats[s].stat_reqs; if (statreqs != null && statreqs.Length > 0) { for (int i = 0; i < statreqs.Length; i++) { StatReq statreq = statreqs[i]; if (!Peripheral.Instance.canBuildToy(runetype, statreq.required_toy)) { return(false); } //if (statreq.required_toy != "" && !Central.Instance.HaveActiveToy(statreq.required_toy)) return false; if (statreq.type == EffectType.Null) { return(!(level < statreq.min_level)); } float stat_level = this.getLevel(statreq.type); if (statreq.min_level > 0 && stat_level < statreq.min_level) { if (is_vocal) { Debug.Log("Rune below required level to upgrade " + type + "\n"); } return(false); } if (statreq.min_level < 0 && stat_level > 0) { if (is_vocal) { Debug.Log("Rune below required level to upgrade " + type + "\n"); } return(false); } /* * if (xp < statreq.xp) * { * if (is_vocal) Debug.Log("Below required xp to upgrade " + type + "\n"); * return false; * }*/ } } else { if (is_vocal) { Debug.Log("Invalid statreq\n"); } return(false); } return(true); }
public void Write(Random random, RandomizerOptions options) { // Collect game items // For armor: headEquip/bodyEquip/armEquip/legEquip booleans. weight float // For weapons: weight float. // Requirements: correctStrength/correctAgility/corretMagic/corretFaith float. // Types: displayTypeId (maps to MenuValueTableParam, in FMGs). // enablePyromancy/enablePyromancy/enableMiracle bool? Check attack types other than isBlowAttackType for whether a proper weapon // rightHandEquipable/leftHandEquipable bool (bothHandEquipable)? // arrowSlotEquipable/boltSlotEquipable bool for bows. bool DisableShoot for greatbow // enableGuard for shield // Arrows/Bolts: eh a bit tricky. weaponCategory 13/14 for arrow/bolt, and bool DisableShoot for greatbow // Spells: in Magic table. requirementIntellect, requirementFaith. ezStateBehaviorType - 0 magic, 2 pyro, 1 miracle Dictionary <EquipCategory, List <ItemKey> > items = new Dictionary <EquipCategory, List <ItemKey> >(); Dictionary <ItemKey, float> weights = new Dictionary <ItemKey, float>(); Dictionary <ItemKey, StatReq> requirements = new Dictionary <ItemKey, StatReq>(); HashSet <ItemKey> crossbows = new HashSet <ItemKey>(); PARAM magics = game.Param("Magic"); bool twoHand = options["startingtwohand"]; foreach (ItemKey key in data.Data.Keys) { if (key.Type == ItemType.WEAPON) { PARAM.Row row = game.Item(key); EquipCategory mainCat = EquipCategory.WEAPON; int weaponCategory = (byte)row["weaponCategory"].Value; if (weaponCategories.ContainsKey(weaponCategory)) { mainCat = weaponCategories[weaponCategory]; } if ((byte)row["enableGuard"].Value == 1) { mainCat = EquipCategory.SHIELD; } if (mainCat == EquipCategory.BOW || mainCat == EquipCategory.ARROW || mainCat == EquipCategory.BOLT) { // Disable greatbow for starting - requirements too far off if ((byte)row["DisableShoot"].Value == 1) { continue; } } if (mainCat == EquipCategory.BOW) { if ((byte)row["boltSlotEquipable"].Value == 1) { crossbows.Add(key); } } if (mainCat != EquipCategory.UNSET) { AddMulti(items, mainCat, key); } if ((byte)row["enableMagic"].Value == 1) { AddMulti(items, EquipCategory.CATALYST, key); } if ((byte)row["enableMiracle"].Value == 1) { AddMulti(items, EquipCategory.TALISMAN, key); } if ((byte)row["enablePyromancy"].Value == 1) { AddMulti(items, EquipCategory.FLAME, key); } int str = (byte)row["properStrength"].Value; // Add two hand adjustment for weapons. Note this doesn't work exactly for casting items, but does not affect casting. if (twoHand && (byte)row["Unk14"].Value == 0 && (mainCat == EquipCategory.WEAPON || mainCat == EquipCategory.UNSET)) { str = (int)Math.Ceiling(str / 1.5); } requirements[key] = new StatReq { Str = (sbyte)str, Dex = (sbyte)(byte)row["properAgility"].Value, Mag = (sbyte)(byte)row["properMagic"].Value, Fai = (sbyte)(byte)row["properFaith"].Value, }; weights[key] = (float)row["weight"].Value; } else if (key.Type == ItemType.ARMOR) { PARAM.Row row = game.Item(key); for (int i = 0; i < 4; i++) { if ((byte)row[armorTypes[i]].Value == 1) { AddMulti(items, armorCats[i], key); weights[key] = (float)row["weight"].Value; break; } } } else if (key.Type == ItemType.GOOD) { PARAM.Row magic = magics[key.ID]; // Exclude Spook and Tears of Denial as they can be a key item, useful though they are if (magic != null && key.ID != 1354000 && key.ID != 3520000) { int magicCat = (byte)magic["ezStateBehaviorType"].Value; AddMulti(items, magicTypes[magicCat], key); requirements[key] = new StatReq { Str = 0, Dex = 0, Mag = (sbyte)(byte)magic["requirementIntellect"].Value, Fai = (sbyte)(byte)magic["requirementFaith"].Value, Att = (sbyte)(byte)magic["slotLength"].Value, }; } } } // Generate some armor sets. One downside of this approach is that each piece is represented only once - but it is just one shuffle per category, and tends to result in a similar distribution to normal. List <List <ItemKey> > weightedArmors = new List <List <ItemKey> >(); for (int i = 0; i < 4; i++) { weightedArmors.Add(WeightedShuffle(random, items[armorCats[i]], item => 1 / weights[item])); } List <ArmorSet> armors = new List <ArmorSet>(); int maxArmors = weightedArmors.Select(rank => rank.Count).Min(); for (int num = 0; num < maxArmors; num++) { ArmorSet armor = new ArmorSet(); for (int i = 0; i < 4; i++) { ItemKey item = weightedArmors[i][num]; armor.Ids[i] = item.ID; armor.Weight += weights[item]; } armors.Add(armor); } armors.Sort((a, b) => a.Weight.CompareTo(b.Weight)); PARAM chara = game.Param("CharaInitParam"); // Just for testing ;) bool cheat = false; for (int i = 0; i < 10; i++) { PARAM.Row row = chara[startId + i]; // First, always fudge magic to 10, so that Orbeck quest is possible. if ((sbyte)row["baseMag"].Value < 10) { row["baseMag"].Value = (sbyte)10; } if (cheat) { foreach (string stat in stats) { row[$"base{stat}"].Value = (sbyte)90; } } // Then, see stat diffs for weapons/spells/catalysts, and fudge if necessary CharacterClass chClass = classes[i]; int attStat = (sbyte)row["baseWil"].Value; StatReq chReqs = new StatReq { Str = (sbyte)row["baseStr"].Value, Dex = (sbyte)row["baseDex"].Value, Mag = (sbyte)row["baseMag"].Value, Fai = (sbyte)row["baseFai"].Value, Att = (sbyte)(attStat < 10 ? 0 : attStat < 14 ? 1 : 2), }; StatReq dynamicReqs = chReqs; double fudgeFactor = 1.5; float weaponWeight = 0f; int attSlots = 0; bool crossbowSelected = false; Console.WriteLine($"Randomizing starting equipment for {chClass.Name}"); foreach (KeyValuePair <string, EquipCategory> entry in baseStart.Concat(chClass.Start)) { EquipCategory cat = entry.Value; // TODO: If a catalyst etc also doubles as a weapon, maybe skip its slot. // This crossbow/bow logic relies on iteration order - try to make the order fixed... if ((cat == EquipCategory.ARROW && crossbowSelected) || (cat == EquipCategory.BOLT && !crossbowSelected)) { continue; } Dictionary <ItemKey, int> statDiffs = items[entry.Value].ToDictionary(item => item, item => requirements[item].Eligible(dynamicReqs)); List <ItemKey> candidates = items[entry.Value]; if (cat == EquipCategory.SHIELD || chClass.Name == "Deprived") { candidates = candidates.Where(item => statDiffs[item] >= 0).ToList(); } if (cat == EquipCategory.SORCERY || cat == EquipCategory.MIRACLE || cat == EquipCategory.PYROMANCY) { // Fit within attunement slots. Alternatively could increase attunement, but that unbalances things potentially. // Unfortunately means that pyromancer can't start with Chaos Bed Vestiges. Maybe for the best. if (attSlots == chReqs.Att) { row[entry.Key].Value = -1; continue; } candidates = candidates.Where(item => attSlots + requirements[item].Att <= chReqs.Att).ToList(); } // Select weapon and adjust stats if necessary List <ItemKey> weightKeys = WeightedShuffle(random, candidates, item => { int diff = statDiffs[item]; if (diff >= 4) { return((float)Math.Pow(2, -4 * (Math.Min(diff, 20) / 20.0))); } if (diff >= 0) { return(2); } return((float)Math.Pow(fudgeFactor, diff)); }); ItemKey selected = weightKeys[0]; items[entry.Value].Remove(selected); if (statDiffs[selected] < 0) { dynamicReqs.Adjust(requirements[selected]); fudgeFactor *= -statDiffs[selected]; } row[entry.Key].Value = selected.ID; if (weights.ContainsKey(selected)) { weaponWeight += weights[selected]; } attSlots = requirements[selected].Att; Console.WriteLine($" {entry.Key} is now {game.Name(selected)}, meets requirements by {statDiffs[selected]}"); } int statChange = dynamicReqs.Eligible(chReqs); if (statChange < 0) { row["baseStr"].Value = dynamicReqs.Str; row["baseDex"].Value = dynamicReqs.Dex; row["baseMag"].Value = dynamicReqs.Mag; row["baseFai"].Value = dynamicReqs.Fai; row["soulLvl"].Value = (short)((short)row["soulLvl"].Value - statChange); } // Armor time float totalWeight = 40 + (sbyte)row["baseDurability"].Value; List <ArmorSet> availableSets = armors.TakeWhile(armor => armor.Weight + weaponWeight < totalWeight * 0.69f).ToList(); if (availableSets.Count == 0) { availableSets = new List <ArmorSet> { armors[0] } } ; ArmorSet selectedArmor = Choice(random, availableSets); armors.Remove(selectedArmor); Console.WriteLine($" Armor: {string.Join(", ", selectedArmor.Ids.Select(id => game.Name(new ItemKey(ItemType.ARMOR, id))))}"); Console.WriteLine($" Weight: weapons {weaponWeight:0.##} + armor {selectedArmor.Weight:0.##} / {totalWeight:0.##} = {100*(weaponWeight+selectedArmor.Weight)/totalWeight:0.##}%"); for (int j = 0; j < 4; j++) { if ((int)row[armorSlots[j]].Value != -1) { row[armorSlots[j]].Value = selectedArmor.Ids[j]; } } if (cheat) { PARAM reinforce = game.Param("ReinforceParamWeapon"); HashSet <int> reinforceLevels = new HashSet <int>(reinforce.Rows.Select(r => (int)r.ID)); foreach (string wep in weaponSlots) { int id = (int)row[wep].Value; if (id != -1) { id = id - (id % 100); PARAM.Row item = game.Item(new ItemKey(ItemType.WEAPON, id)); int reinforceId = (short)item["reinforceTypeId"].Value; while (reinforceLevels.Contains(reinforceId + 5)) { reinforceId += 5; id += 5; } row[wep].Value = id; } } } } // Now, have fun with NPCs Dictionary <string, ArmorSet> npcArmors = new Dictionary <string, ArmorSet>(); Func <ItemType, PARAM.Cell, float> cellWeight = (type, cell) => { int id = (int)cell.Value; if (id == -1) { return(0); } ItemKey key = new ItemKey(type, id); if (!weights.ContainsKey(key)) { return(0); } return(weights[key]); }; foreach (PARAM.Row row in chara.Rows.Where(r => r.ID > startId + 10)) { string name = game.CharacterName((int)row.ID); if (name == "?CHARACTER?") { continue; } ArmorSet selectedArmor; if (!npcArmors.ContainsKey(name)) { float weaponWeight = weaponSlots.Select(slot => cellWeight(ItemType.WEAPON, row[slot])).Sum(); float armorWeight = armorSlots.Select(slot => cellWeight(ItemType.ARMOR, row[slot])).Sum(); float weightLimit = weaponWeight + armorWeight; float totalWeight = 40 + (sbyte)row["baseDurability"].Value; int armorLimit = armors.FindIndex(armor => armor.Weight + weaponWeight > weightLimit); if (armorLimit == -1) { armorLimit = armors.Count - 1; } armorLimit = Math.Min(20, armorLimit); selectedArmor = npcArmors[name] = armors[random.Next(armorLimit)]; armors.Remove(selectedArmor); Console.WriteLine($"Armor for {name}: {100 * weightLimit / totalWeight:0.##}% -> {100 * (selectedArmor.Weight + weaponWeight) / totalWeight:0.##}%: {string.Join(", ", selectedArmor.Ids.Select(id => game.Name(new ItemKey(ItemType.ARMOR, id))))}"); } selectedArmor = npcArmors[name]; for (int j = 0; j < 4; j++) { if ((int)row[armorSlots[j]].Value != -1) { row[armorSlots[j]].Value = selectedArmor.Ids[j]; } } } } }
public static void assignStatBits(ref StatBit[] stats, Rune rune) { StatReq[] rt = new StatReq[1]; bool is_hero = (rune.toy_type == ToyType.Hero); bool is_active = true; RuneType rune_type = rune.runetype; int i = 0; switch (rune_type) { case RuneType.Sensible: if (is_hero) { stats = new StatBit[9]; } else { stats = new StatBit[7]; } rt[0] = new StatReq(EffectType.ReloadTime, 0); stats[i++] = new StatBit(rune, RuneType.Sensible, EffectType.ReloadTime, is_active, rt, 0, 0, is_hero); StatReq[] r = new StatReq[1]; r[0] = new StatReq(EffectType.Range, 0); stats[i++] = new StatBit(rune, RuneType.Sensible, EffectType.Range, is_active, r, 0, 0, is_hero); StatReq[] f = new StatReq[1]; f[0] = new StatReq(EffectType.Force, 0); stats[i++] = new StatBit(rune, RuneType.Sensible, EffectType.Force, is_active, f, 0, 0, is_hero); is_active = false; // LASER + DIFFUSE /// LASER BRANCH StatReq[] l = new StatReq[1]; l[0] = new StatReq(EffectType.Diffuse, -1); stats[i++] = new StatBit(rune, RuneType.Sensible, EffectType.Laser, is_active, l, 0, 0, is_hero); StatReq[] l2 = new StatReq[1]; l2[0] = new StatReq(EffectType.Laser, 1); stats[i++] = new StatBit(rune, RuneType.Sensible, EffectType.Sparkles, is_active, l2, 0, 0, is_hero); //vexing Diffuse StatReq[] no_laser = new StatReq[1]; no_laser[0] = new StatReq(EffectType.Laser, -1); stats[i++] = new StatBit(rune, RuneType.Sensible, EffectType.Diffuse, is_active, no_laser, 0, 0, is_hero); StatReq[] have_diffuse = new StatReq[1]; have_diffuse[0] = new StatReq(EffectType.Diffuse, 1); stats[i++] = new StatBit(rune, RuneType.Sensible, EffectType.Transform, is_active, have_diffuse, 0, 0, is_hero); /// HERO STUFF if (is_hero) { StatReq[] aa = new StatReq[1]; aa[0] = new StatReq(EffectType.Force, 0); stats[i++] = new StatBit(rune, RuneType.Sensible, EffectType.AirAttack, is_active, aa, StaticStat.getInitRechargeTime(EffectType.AirAttack), 0, is_hero); stats[i++] = new StatBit(rune, RuneType.Sensible, EffectType.Meteor, is_active, aa, StaticStat.getInitRechargeTime(EffectType.Meteor), 0, is_hero); } rune.stats = stats; return; case RuneType.Airy: if (is_hero) { stats = new StatBit[11]; } else { stats = new StatBit[8]; } StatReq[] art = new StatReq[1]; art[0] = new StatReq(EffectType.ReloadTime, 0); stats[0] = new StatBit(rune, RuneType.Airy, EffectType.ReloadTime, is_active, art, 0, 0, is_hero); StatReq[] ar = new StatReq[1]; ar[0] = new StatReq(EffectType.Range, 0); stats[1] = new StatBit(rune, RuneType.Airy, EffectType.Range, is_active, ar, 0, 0, is_hero); StatReq[] def = new StatReq[1]; def[0] = new StatReq(EffectType.Speed, 0); stats[2] = new StatBit(rune, RuneType.Airy, EffectType.Speed, is_active, def, 0, 0, is_hero); StatReq[] af = new StatReq[1]; af[0] = new StatReq(EffectType.Force, 0); //paired with speed, updateded when speed is upgraded stats[3] = new StatBit(rune, RuneType.Airy, EffectType.Force, is_active, af, 0, 0, is_hero); //UPGRADES is_active = false; StatReq[] m = new StatReq[1]; m[0] = new StatReq(EffectType.Weaken, -1); stats[4] = new StatBit(rune, RuneType.Airy, EffectType.Calamity, is_active, m, 0, 0, is_hero); StatReq[] sm = new StatReq[1]; sm[0] = new StatReq(EffectType.Calamity, 1); stats[5] = new StatBit(rune, RuneType.Airy, EffectType.Swarm, is_active, sm, 0, 0, is_hero); StatReq[] w = new StatReq[1]; w[0] = new StatReq(EffectType.Calamity, -1); stats[6] = new StatBit(rune, RuneType.Airy, EffectType.Weaken, is_active, w, 0, 0, is_hero); StatReq[] ww = new StatReq[1]; ww[0] = new StatReq(EffectType.Weaken, 1); stats[7] = new StatBit(rune, RuneType.Airy, EffectType.Foil, is_active, ww, 0, 0, is_hero); if (is_hero) { stats[8] = new StatBit(rune, RuneType.Airy, EffectType.Frost, is_active, def, StaticStat.getInitRechargeTime(EffectType.Frost), 0, is_hero); //same requirements anyway stats[9] = new StatBit(rune, RuneType.Airy, EffectType.EMP, is_active, def, StaticStat.getInitRechargeTime(EffectType.EMP), 0, is_hero); stats[10] = new StatBit(rune, RuneType.Airy, EffectType.Plague, is_active, def, StaticStat.getInitRechargeTime(EffectType.Plague), 0, is_hero); } rune.stats = stats; return; case RuneType.Vexing: if (is_hero) { stats = new StatBit[10]; } else { stats = new StatBit[8]; } StatReq[] vrt = new StatReq[1]; vrt[0] = new StatReq(EffectType.ReloadTime, 0); stats[i++] = new StatBit(rune, RuneType.Vexing, EffectType.ReloadTime, is_active, vrt, 0, 0, is_hero); StatReq[] vr = new StatReq[1]; vr[0] = new StatReq(EffectType.Range, 0); stats[i++] = new StatBit(rune, RuneType.Vexing, EffectType.Range, is_active, vr, 0, 0, is_hero); StatReq[] fr = new StatReq[1]; fr[0] = new StatReq(EffectType.VexingForce, 0); stats[i++] = new StatBit(rune, RuneType.Vexing, EffectType.VexingForce, is_active, fr, 0, 0, is_hero); //UPGRADES is_active = false; // RAPID FIRE + FOCUS // FOCUS StatReq[] no_rapidfire = new StatReq[1]; no_rapidfire[0] = new StatReq(EffectType.RapidFire, -1); stats[i++] = new StatBit(rune, RuneType.Vexing, EffectType.Focus, is_active, no_rapidfire, 0, 0, is_hero); StatReq[] have_focus = new StatReq[1]; have_focus[0] = new StatReq(EffectType.Focus, 1); stats[i++] = new StatBit(rune, RuneType.Vexing, EffectType.Fear, is_active, have_focus, 0, 0, is_hero); stats[i++] = new StatBit(rune, RuneType.Vexing, EffectType.Critical, is_active, have_focus, 0, 0, is_hero); // RAPID FIRE StatReq[] rapid_fire = new StatReq[1]; rapid_fire[0] = new StatReq(EffectType.Focus, -1); stats[i++] = new StatBit(rune, RuneType.Vexing, EffectType.RapidFire, is_active, rapid_fire, 0, 0, is_hero); StatReq[] DOT = new StatReq[1]; DOT[0] = new StatReq(EffectType.RapidFire, 1); stats[i++] = new StatBit(rune, RuneType.Vexing, EffectType.DOT, is_active, DOT, 0, 0, is_hero); //vexing Focus if (rune.toy_type == ToyType.Hero) { StatReq[] t = new StatReq[1]; t[0] = new StatReq(EffectType.Teleport, 0); stats[i++] = new StatBit(rune, RuneType.Vexing, EffectType.Teleport, is_active, t, StaticStat.getInitRechargeTime(EffectType.Teleport), 0, is_hero); StatReq[] b = new StatReq[1]; b[0] = new StatReq(EffectType.Bees, 0); stats[i++] = new StatBit(rune, RuneType.Vexing, EffectType.Bees, is_active, b, StaticStat.getInitRechargeTime(EffectType.Bees), 0, is_hero); } rune.stats = stats; return; case RuneType.Slow: stats = new StatBit[3]; StatReq[] slrt = new StatReq[1]; slrt[0] = new StatReq(EffectType.ReloadTime, 0); stats[0] = new StatBit(rune, RuneType.Slow, EffectType.ReloadTime, is_active, slrt, 0, 0, is_hero); StatReq[] slr = new StatReq[1]; slr[0] = new StatReq(EffectType.Range, 0); stats[1] = new StatBit(rune, RuneType.Slow, EffectType.Range, is_active, slr, 0, 0, is_hero); StatReq[] slf = new StatReq[1]; slf[0] = new StatReq(EffectType.Force, 0); stats[2] = new StatBit(rune, RuneType.Slow, EffectType.Force, is_active, slf, 0, 0, is_hero); rune.stats = stats; return; case RuneType.Fast: stats = new StatBit[3]; StatReq[] frt = new StatReq[1]; frt[0] = new StatReq(EffectType.ReloadTime, 0); stats[0] = new StatBit(rune, RuneType.Fast, EffectType.ReloadTime, is_active, frt, 0, 0, is_hero); StatReq[] far = new StatReq[1]; far[0] = new StatReq(EffectType.Range, 0); stats[1] = new StatBit(rune, RuneType.Fast, EffectType.Range, is_active, far, 0, 0, is_hero); StatReq[] f2 = new StatReq[1]; f2[0] = new StatReq(EffectType.Force, 0); stats[2] = new StatBit(rune, RuneType.Fast, EffectType.Force, is_active, f2, 0, 0, is_hero); rune.stats = stats; return; case RuneType.Time: stats = new StatBit[3]; StatReq[] rt2 = new StatReq[1]; rt2[0] = new StatReq(EffectType.ReloadTime, 0); stats[0] = new StatBit(rune, RuneType.Time, EffectType.ReloadTime, is_active, rt2, 0, 0, is_hero); StatReq[] r2 = new StatReq[1]; r2[0] = new StatReq(EffectType.Range, 0); stats[1] = new StatBit(rune, RuneType.Time, EffectType.Range, is_active, r2, 0, 0, is_hero); StatReq[] f3 = new StatReq[1]; f3[0] = new StatReq(EffectType.Speed, 0); stats[2] = new StatBit(rune, RuneType.Time, EffectType.Speed, is_active, f3, 0, 0, is_hero); stats[2].effect_sub_type = EffectSubType.Ultra; rune.stats = stats; return; case RuneType.Modulator: stats = new StatBit[0]; rune.stats = stats; return; case RuneType.Castle: //Castle = + health, + wish % , construction efficiency stats = new StatBit[2]; is_active = false; StatReq[] ph = new StatReq[1]; ph[0] = new StatReq(EffectType.Renew, 0); stats[0] = new StatBit(rune, RuneType.Castle, EffectType.Renew, is_active, ph, 0, 0, is_hero); StatReq[] ce = new StatReq[1]; ce[0] = new StatReq(EffectType.Architect, 0); stats[1] = new StatBit(rune, RuneType.Castle, EffectType.Architect, is_active, ce, 0, 0, is_hero); rune.stats = stats; return; case RuneType.SensibleCity: //Sensible city = summon sensible temporary towers, base ammo stats = new StatBit[3]; StatReq[] tr = new StatReq[1]; tr[0] = new StatReq(EffectType.TowerRange, 0); stats[0] = new StatBit(rune, RuneType.SensibleCity, EffectType.TowerRange, is_active, tr, 0, 0, is_hero); StatReq[] tf = new StatReq[1]; tf[0] = new StatReq(EffectType.TowerForce, 0); stats[1] = new StatBit(rune, RuneType.SensibleCity, EffectType.TowerForce, is_active, tf, 0, 0, is_hero); StatReq[] scr = new StatReq[1]; scr[0] = new StatReq(EffectType.Range, 0); stats[2] = new StatBit(rune, RuneType.SensibleCity, EffectType.Range, is_active, scr, 0, 0, is_hero); rune.stats = stats; return; default: return; } }
public virtual List <StatModel> GetSiteAnalyseData(StatReq parame) { return(postLogDal.GetSiteAnalyseData(parame)); }
public virtual List <StatModel> GetPostStat(StatReq parame) { return(postLogDal.GetPostStat(parame)); }
public virtual List <StatModel> GetHouseAddStat(StatReq parame) { return(houseDal.GetHouseAddStat(parame)); }
public virtual List <StatModel> GetLoginStat(StatReq parame) { return(userDal.GetLoginStat(parame)); }
public List <StatModel> GetActionLog_StatByFunction(StatReq parame) { return(actionLogDal.GetActionLog_StatByFunction(parame)); }