internal async void Add(DateTime date) { //Random rnd = new Random(); //var day = rnd.Next(1, 28); //var month = rnd.Next(1, 12); //var year = rnd.Next(2010, 2016); //Random rnd = new Random(); var day = date.Day; var month = date.Month; var year = date.Year; var frost = await _frostRepository.Get(predicate : x => x.Month == month && x.Day == day); if (frost == null) { frost = new Frost { Month = month, Day = day, Date = string.Format("{0}{1}", day.ToString("00"), DateHelper.MonthAbbreviation(month)), Count = 1 }; await _frostRepository.Insert(frost); } else { frost.Count = frost.Count + 1; await _frostRepository.Update(frost); } await _frostDateRepository.Insert(new FrostDate { Date = new DateTime(year, month, day) }); }
public static void Affect(int cell, Fire fire) { var ch = Actor.FindChar(cell); if (ch != null) { Buff.Prolong <Frost>(ch, Frost.duration(ch) * pdsharp.utils.Random.Float(1.0f, 1.5f)); } if (fire != null) { fire.Clear(cell); } var heap = Dungeon.Level.heaps[cell]; if (heap != null) { heap.Freeze(); } if (Dungeon.Visible[cell]) { CellEmitter.Get(cell).Start(SnowParticle.Factory, 0.2f, 6); } }
private void OnEnable() { this.MyCamera = base.gameObject.GetComponent <Camera>(); this.frostEffect = base.GetComponent <Frost>(); this.ScionStuff = base.GetComponent <ScionPostProcess>(); this.bleedEffect = base.GetComponent <BleedBehavior>(); this.aa_FXAA = base.GetComponent <FXAA>(); this.aa_SMAA = base.GetComponent <SMAA>(); this.amplifyMotion = base.GetComponent <AmplifyMotionEffect>(); this.sessao = base.GetComponent <SESSAO>(); this.hbao = base.GetComponent <HBAO>(); this.waterViz = base.gameObject.GetComponent <WaterViz>(); this.waterBlur = base.gameObject.GetComponent <WaterBlurEffect>(); this.waterBlurCeto = base.gameObject.GetComponent <UnderWaterPostEffect>(); this.farShadowCascade = base.gameObject.GetComponent <FarShadowCascade>(); if (Sunshine.Instance) { this.SunshineOccluders = Sunshine.Instance.Occluders; } this.reflexionMode_complex = LayerMask.GetMask(new string[] { "Camera", "Ignore Raycast" }); this.reflexionMode_simple = LayerMask.GetMask(new string[] { "Camera" }); this.reflexionMode_off = 0; }
public EditFrostViewModel(INavigation navigation, string frostId) { this.Navigation = navigation; Title = "Update Frost"; _frost = _realmInstance.Find <Frost>(frostId); }
private void HandleItemSelected(Frost frost) { if (frost == null) { return; } Navigation.PushAsync(new EditFrostPage(frost.FrostId)); }
private void FixedUpdate() { if (horizontalAxis == "HorizontalP1") { int dir = (int)Input.GetAxisRaw(horizontalAxis); Debug.Log(dir); if (dir == -1) { if (hasSchild && !isFrozen) { hasSchild = false; pu.hideSchild(); schildIsActive = true; gameObject.transform.localScale += new Vector3(0, 0.45f, 0); schild = Instantiate(schildPrefab, gameObject.transform.position, Quaternion.identity); schild.transform.parent = gameObject.transform; Invoke("endShield", 4.0f); } } if (dir == 1) { if (hasLaser && !isFrozen) { hasLaser = false; pu.hideLaser(); Frost frost = Instantiate(frostBallPrefab, gameObject.transform.position, Quaternion.identity); frost.shoot(dir); } } } else if (horizontalAxis == "HorizontalP2") { int dir = (int)Input.GetAxisRaw(horizontalAxis); if (dir == 1) { if (hasSchild && !isFrozen) { hasSchild = false; pu.hideSchild(); schildIsActive = true; gameObject.transform.localScale += new Vector3(0, 0.45f, 0); schild = Instantiate(schildPrefab, gameObject.transform.position, Quaternion.identity); schild.transform.parent = gameObject.transform; Invoke("endShield", 4.0f); } } if (dir == -1) { if (hasLaser && !isFrozen) { hasLaser = false; pu.hideLaser(); Frost frost = Instantiate(frostBallPrefab, gameObject.transform.position, Quaternion.identity); frost.shoot(dir); } } } }
public async void TestGetAllWorksReturnsListOfWorks() { Frost frost = new Frost(APIKey, GetConfiguration(), Logging); var list = await frost.GetAllWorks(); Assert.True(list.Count > 0); Assert.IsType(new WorkAttributes().GetType(), list[0]); }
public void AddBuff(Entity entity, string buffName) { if (buffName == "Frozen") { Frost frost = new Frost(); frost.Enter(entity); entity.buffComponent.buffs.Add(frost); } }
public static void Generate(WeakAura wa) { var frost = new Frost(); var builder = new SpecBuilder(ClassSpec.Frost); wa.AddSpell(frost.BreathOfSindragosa, ClassSpec.Frost, -25, 300); builder.AddOverflow( // todo: move to core when replaced with Night Fae covenant? frost.DeathAndDecay.Buff(), frost.DarkCommand, frost.RaiseAlly, frost.RaiseDead, frost.SacrificialPact, frost.HornOfWinter, frost.BlindingSleet.DeBuff(), frost.DeathPact.Buff(), frost.Permafrost.Passive().Buff() // havoc.Torment, ).AddRightBar( frost.Anti_MagicShell.Buff(), frost.Anti_MagicZone.Buff(), frost.IceboundFortitude.Buff(), frost.Lichborne ).AddCoreRotation( frost.Rime.Passive().Buff().UseIcon(frost.HowlingBlast), frost.KillingMachine.Passive().Buff().UseIcon(frost.Obliterate), frost.HypothermicPresence.Buff(), frost.GlacialAdvance // todo: frost.Frostscythe. ).AddCoreCooldowns( frost.PillarOfFrost.Buff(), frost.EmpowerRuneWeapon.Buff(), frost.FrostwyrmsFury.DeBuff(), frost.RemorselessWinter.Buff() ).AddBottomBar( frost.DeathGrip, frost.DeathsAdvance.Buff(), frost.WraithWalk.Buff(), frost.MindFreeze.DeBuff(), frost.Asphyxiate.DeBuff() ).AddTopBar( // todo: add FrostFever? frost.ControlUndead.Passive().Buff(), frost.DarkSuccor.Buff().Passive().UseIcon(frost.DeathStrike), frost.ColdHeart.Buff().Passive().Stacks(20).UseIcon(frost.ChainsOfIce), frost.IcyTalons.Buff().Passive().BigStacks(), frost.InexorableAssault.Buff().Passive().BigStacks().UseIcon(frost.Obliterate), frost.FrozenPulse.Buff().Passive(), frost.GatheringStorm.Buff().Passive() ).AddAlerts( frost.PillarOfFrost.Passive().Buff(), frost.PathOfFrost.Passive().Buff() ).Build(wa); }
public Cake(Shape shape, Batter batter, Frost frost = null) { this.shape = shape; this.batter = batter; this.frost = frost; this.pickSet.Add(typeof(Shape).ToString(), shape.pickId); this.pickSet.Add(typeof(Batter).ToString(), batter.pickId); this.pickSet.Add(typeof(Frost).ToString(), frost != null ? frost.pickId : -1); this.Render(); }
public async void TestGetWork() { Frost frost = new Frost(APIKey, GetConfiguration(), Logging); string workId = "7a7077892b0b46c4da7d27612759de62ff8ab00fba93ad4a943bc03bd876a2a2"; var work = await frost.GetWork(workId); Assert.Equal("God", work.Author); }
public override int Proc(Armor armor, Character attacker, Character defender, int damage) { var level = Math.Max(0, armor.level); if (!Level.Adjacent(attacker.pos, defender.pos) || pdsharp.utils.Random.Int(level + 6) < 5) { return(damage); } Buff.Prolong <Frost>(attacker, Frost.duration(attacker) * pdsharp.utils.Random.Float(1f, 1.5f)); CellEmitter.Get(attacker.pos).Start(SnowParticle.Factory, 0.2f, 6); Buff.Affect <Burning>(defender).Reignite(defender); defender.Sprite.Emitter().Burst(FlameParticle.Factory, 5); return(damage); }
static void Main(string[] args) { AppDomain currentDomain = AppDomain.CurrentDomain; currentDomain.UnhandledException += new UnhandledExceptionEventHandler(Application_UnhandledException); try { Frost test = new Frost(); test.StartUXInterface(); test.StopUXInterface(); } catch (Exception e) { Console.WriteLine(e.Message); } }
public async void TestCreateWorkReturnsValidWorkID() { Frost frost = new Frost(APIKey, GetConfiguration(), Logging); var work = new WorkAttributes( "Test Work", DateTime.Now, DateTime.Now, "Alec Chan", "test, test", "This is a test from C#" ); string workId = await frost.CreateWork(work); Assert.False(string.IsNullOrEmpty(workId)); Assert.DoesNotContain(workId, " "); var newWork = await frost.GetWork(workId); Assert.IsType(new WorkAttributes().GetType(), newWork); Assert.Equal("Alec Chan", newWork.Author); }
public override Dictionary <string, string> GetCharacterDisplayCalculationValues() { float critRating = BasicStats.CritRating; float hitRating = BasicStats.HitRating; Dictionary <string, string> dictValues = new Dictionary <string, string>(); dictValues.Add("Health", BasicStats.Health.ToString("N0")); dictValues.Add("Strength", BasicStats.Strength.ToString("N0")); dictValues.Add("Agility", string.Format("{0:0}*Provides {1:P} crit chance", BasicStats.Agility, StatConversion.GetCritFromAgility(BasicStats.Agility, CharacterClass.DeathKnight))); dictValues.Add("Attack Power", BasicStats.AttackPower.ToString("N0")); dictValues.Add("Crit Rating", string.Format("{0:0}*Provides {1:P} crit chance", critRating, StatConversion.GetCritFromRating(critRating, CharacterClass.DeathKnight))); dictValues.Add("Hit Rating", string.Format("{0:0}*Negates {1:P} melee miss / {2:P} spell miss", hitRating, StatConversion.GetPhysicalHitFromRating(hitRating, CharacterClass.DeathKnight), StatConversion.GetSpellHitFromRating(hitRating, CharacterClass.DeathKnight))); dictValues.Add("Expertise", string.Format("{0:0.00} / {1:0.00}*Negates {2:P} / {3:P} dodge chance", MHExpertise, OHExpertise, StatConversion.GetDodgeParryReducFromExpertise(MHExpertise), StatConversion.GetDodgeParryReducFromExpertise(OHExpertise))); dictValues.Add("Haste Rating", string.Format("{0:0}*Increases attack speed by {1:P}", BasicStats.HasteRating, StatConversion.GetHasteFromRating(BasicStats.HasteRating, CharacterClass.DeathKnight))); dictValues.Add("Armor", BasicStats.Armor.ToString("N0")); dictValues.Add("Resilience", BasicStats.Resilience.ToString("F0")); dictValues.Add("Mastery", string.Format("{0:N0}*Rating: {1:N0}", BasicStats.Mastery, BasicStats.MasteryRating)); dictValues.Add("Weapon Damage", MHWeaponDamage.ToString("N2") + " / " + OHWeaponDamage.ToString("N2")); dictValues.Add("Attack Speed", MHAttackSpeed.ToString("N2") + " / " + OHAttackSpeed.ToString("N2")); dictValues.Add("Crit Chance", string.Format("{0:P}", BasicStats.PhysicalCrit)); dictValues.Add("Avoided Attacks", string.Format("{0:P}*{1:P} Dodged, {2:P} Missed", AvoidedAttacks, DodgedAttacks, MissedAttacks)); dictValues.Add("Enemy Mitigation", string.Format("{0:P}*{1:0} effective enemy armor", EnemyMitigation, EffectiveArmor)); dictValues.Add("White HitChance", string.Format("{0:P}*Include Glance & Crit Chance", WhiteHitChance)); dictValues.Add("Yellow HitChance", string.Format("{0:P}", YellowHitChance)); foreach (int i in EnumHelper.GetValues(typeof(DKability))) { dictValues.Add(Enum.GetName(typeof(DKability), i), string.Format("{0:N2}*{1:P}", dpsSub[i], (dpsSub[i] / DPSPoints))); } dictValues.Add("Total DPS", DPSPoints.ToString("N2")); dictValues.Add("Rotation Duration", RotationTime.ToString() + " secs"); dictValues.Add("Blood", Blood.ToString()); dictValues.Add("Frost", Frost.ToString()); dictValues.Add("Unholy", Unholy.ToString()); dictValues.Add("Death", Death.ToString()); dictValues.Add("Runic Power", Death.ToString()); dictValues.Add("RE Runes", FreeRERunes.ToString("N2")); dictValues.Add("Rune Cooldown", m_RuneCD.ToString("N2")); PopulateSingleUseValues(dictValues, "BB", DKability.BloodBoil); PopulateSingleUseValues(dictValues, "BP", DKability.BloodPlague); PopulateSingleUseValues(dictValues, "BS", DKability.BloodStrike); PopulateSingleUseValues(dictValues, "DC", DKability.DeathCoil); PopulateSingleUseValues(dictValues, "DnD", DKability.DeathNDecay); PopulateSingleUseValues(dictValues, "DS", DKability.DeathStrike); PopulateSingleUseValues(dictValues, "Fest", DKability.FesteringStrike); PopulateSingleUseValues(dictValues, "FF", DKability.FrostFever); PopulateSingleUseValues(dictValues, "FS", DKability.FrostStrike); PopulateSingleUseValues(dictValues, "HS", DKability.HeartStrike); PopulateSingleUseValues(dictValues, "HB", DKability.HowlingBlast); PopulateSingleUseValues(dictValues, "IT", DKability.IcyTouch); PopulateSingleUseValues(dictValues, "NS", DKability.NecroticStrike); PopulateSingleUseValues(dictValues, "OB", DKability.Obliterate); PopulateSingleUseValues(dictValues, "PS", DKability.PlagueStrike); PopulateSingleUseValues(dictValues, "RS", DKability.RuneStrike); PopulateSingleUseValues(dictValues, "SS", DKability.ScourgeStrike); return(dictValues); }
private void Start() { frost = new Frost(2); OnReceivedCake(new Cake(new Shape(2), new Batter(2))); }
public override Dictionary <string, string> GetCharacterDisplayCalculationValues() { Dictionary <string, string> dict = new Dictionary <string, string>(); dict["Miss"] = Miss.ToString("P2") + "*" + SEStats.Miss.ToString("P2") + " after special effects"; dict["Dodge"] = Dodge.ToString("P2") + " : " + BasicStats.DodgeRating.ToString("F0") + "*" + SEStats.DodgeRating.ToString("F0") + " Rating - " + SEStats.Dodge.ToString("P2") + " after special effects"; dict["Parry"] = Parry.ToString("P2") + " : " + BasicStats.ParryRating.ToString("F0") + "*" + SEStats.ParryRating.ToString("F0") + " Rating - " + SEStats.Parry.ToString("P2") + " after special effects"; dict["Armor Damage Reduction"] = ArmorDamageReduction.ToString("P2"); dict["Magic Damage Reduction"] = MagicDamageReduction.ToString("P2") + string.Format("*Arcane: {0:0}\r\n", BasicStats.ArcaneResistance) + string.Format("Fire: {0:0}\r\n", BasicStats.FireResistance) + string.Format("Frost: {0:0}\r\n", BasicStats.FrostResistance) + string.Format("Nature: {0:0}\r\n", BasicStats.NatureResistance) + string.Format("Shadow: {0:0}", BasicStats.ShadowResistance); dict["Total Avoidance"] = (Miss + Parry + Dodge).ToString("P2"); // Another duplicate math location. dict["Health"] = BasicStats.Health.ToString("F0") + "*" + SEStats.Health.ToString("F0") + " after special effects"; dict["Armor"] = BasicStats.Armor.ToString("F0") + "*" + SEStats.Armor.ToString("F0") + " after special effects"; dict["Strength"] = BasicStats.Strength.ToString("F0") + "*" + SEStats.Strength.ToString("F0") + " after special effects"; dict["Agility"] = BasicStats.Agility.ToString("F0") + "*" + SEStats.Agility.ToString("F0") + " after special effects"; dict["Stamina"] = BasicStats.Stamina.ToString("F0") + "*" + SEStats.Stamina.ToString("F0") + " after special effects"; dict["Hit Rating"] = BasicStats.HitRating.ToString("F0") + "*" + SEStats.HitRating.ToString("F0") + " after special effects"; dict["Haste Rating"] = BasicStats.HasteRating.ToString("F0") + "*" + SEStats.HasteRating.ToString("F0") + " after special effects"; dict["Crit Rating"] = BasicStats.CritRating.ToString("F0") + "*" + SEStats.CritRating.ToString("F0") + " after special effects"; dict["Physical Crit"] = BasicStats.PhysicalCrit.ToString("P2") + "*" + SEStats.PhysicalCrit.ToString("F0") + " after special effects"; dict["Expertise"] = Expertise.ToString("F0") + "*" + SEStats.Expertise.ToString("F0") + " after special effects"; dict["Attack Power"] = BasicStats.AttackPower.ToString("F0") + "*" + SEStats.AttackPower.ToString("F0") + " after special effects including Vengeance"; dict["Mastery"] = BasicStats.Mastery.ToString("F2") + String.Format(" ({0:0.00} %)*", (BasicStats.Mastery * 6.25f)) + BasicStats.MasteryRating.ToString("F0") + " Rating - " + SEStats.MasteryRating.ToString("F0") + " after special effects"; dict["DPS"] = DPS.ToString("F0") + "* At Max Vengeance"; dict["Rotation Time"] = String.Format("{0:0.00} sec", RotationTime); dict["Total Threat"] = TotalThreat.ToString("F0"); #region Ability Costs dict["Blood"] = Blood.ToString("F0"); dict["Frost"] = Frost.ToString("F0"); dict["Unholy"] = Unholy.ToString("F0"); dict["Death"] = Death.ToString("F0"); dict["Runic Power"] = RP.ToString("F0"); dict["RE Runes"] = FreeRERunes.ToString("F0"); #endregion dict["Overall Points"] = OverallPoints.ToString("F1"); dict["Mitigation Points"] = String.Format("{0:0.0}*" + "{1:000000.0} Crit Mitigation" + "\r\n{2:000000.0} Avoidance Mitigation" + "\r\n{3:000000.0} Armor Mitigation" + "\r\n{4:000000.0} Damage Taken Mitigation" + "\r\n{5:000000.0} Impedence Mitigation" + "\r\n{6:000000.0} Health Restoration Mitigation", Mitigation, CritMitigation, AvoidanceMitigation, ArmorMitigation, DamageTakenMitigation, ImpedenceMitigation, HealsMitigation); dict["Survival Points"] = String.Format("{0:0.0}*" + "{1:000000.0} Physical Survival" + "\r\n{2:000000.0} Bleed Survival" + "\r\n{3:000000.0} Magic Survival", Survivability, PhysicalSurvival, BleedSurvival, MagicSurvival); dict["Burst Points"] = String.Format("{0:0.0}", Burst * BurstWeight); // Modified Burst dict["Recovery Points"] = String.Format("{0:0.0}", Recovery * RecoveryWeight); // Modified Burst dict["Threat Points"] = String.Format("{0:0.0}", Threat * ThreatWeight); // Modified Threat dict["Target Miss"] = (TargetMiss).ToString("P1"); dict["Target Dodge"] = (TargetDodge).ToString("P1"); dict["Target Parry"] = (TargetParry).ToString("P1"); dict["DTPS"] = DTPS.ToString("F2"); dict["HPS"] = HPS.ToString("F2"); dict["DPS Avoided"] = AvoidanceMitigation.ToString("F0"); dict["DPS Reduced By Armor"] = ArmorMitigation.ToString("F0"); dict["Death Strike"] = TotalDShealed.ToString("F0") + "*" + DSCount.ToString("F0") + " Death Strikes Healing for " + DSHeal.ToString("F0") + " avg " + DSOverHeal.ToString("F0") + " avg Overheal"; dict["Blood Shield"] = TotalBShield.ToString("F0") + "*" + BShield.ToString("F0") + " average shield size"; return(dict); }
public void TestCreateWorkNullException() { Frost frost = new Frost(APIKey, GetConfiguration(), Logging); Assert.ThrowsAsync(new ArgumentNullException().GetType(), () => { return(frost.CreateWork(null)); }); }
public override Dictionary <string, string> GetCharacterDisplayCalculationValues() { Dictionary <string, string> dict = new Dictionary <string, string>(); dict["Miss"] = Miss.ToString("F2") + "%"; dict["Dodge"] = Dodge.ToString("F2") + "%"; dict["Parry"] = Parry.ToString("F2") + "%"; dict["Armor Damage Reduction"] = (ArmorDamageReduction * 100.0f).ToString("F2") + "%"; dict["Magic Damage Reduction"] = (MagicDamageReduction * 100.0f).ToString("F2") + "%" + string.Format("*Arcane: {0:0}\n", BasicStats.ArcaneResistance) + string.Format("Fire: {0:0}\n", BasicStats.FireResistance) + string.Format("Frost: {0:0}\n", BasicStats.FrostResistance) + string.Format("Nature: {0:0}\n", BasicStats.NatureResistance) + string.Format("Shadow: {0:0}", BasicStats.ShadowResistance); dict["Total Avoidance"] = (Miss + Parry + Dodge).ToString("F2") + "%"; // Another duplicate math location. dict["Burst Time"] = String.Format("{0:0.0} sec", BurstTime); dict["Reaction Time"] = String.Format("{0:0.0} sec", ReactionTime); dict["Health"] = BasicStats.Health.ToString("F0"); dict["Armor"] = BasicStats.Armor.ToString("F0"); dict["Strength"] = BasicStats.Strength.ToString("F0"); dict["Agility"] = BasicStats.Agility.ToString("F0"); dict["Stamina"] = BasicStats.Stamina.ToString("F0"); dict["Hit Rating"] = BasicStats.HitRating.ToString("F0"); dict["Haste Rating"] = BasicStats.HasteRating.ToString("F0"); dict["Crit Rating"] = BasicStats.CritRating.ToString("F0"); dict["Physical Crit"] = (BasicStats.PhysicalCrit * 100f).ToString("F2"); dict["Expertise"] = Expertise.ToString("F0"); dict["Attack Power"] = BasicStats.AttackPower.ToString("F0"); dict["Armor Penetration"] = (BasicStats.ArmorPenetration * 100f).ToString("F2") + "%"; dict["Armor Penetration Rating"] = BasicStats.ArmorPenetrationRating.ToString("F0"); dict["DPS"] = DPS.ToString("F0"); dict["Rotation Time"] = String.Format("{0:0.00} sec", (RotationTime / 1000)); dict["Total Threat"] = TotalThreat.ToString("F0"); #region Rune Strike Limit dict["RS Limited"] = ""; if (RSLimit == (int)RSState.Good) { dict["RS Limited"] = "none"; } else { if (1 == (RSLimit & (int)RSState.TimeStarved)) { dict["RS Limited"] += "Swing Starved "; } if (1 == (RSLimit & (int)RSState.RPStarved)) { dict["RS Limited"] += "RP Starved "; } } #endregion #region Ability Costs dict["Blood"] = Blood.ToString("F0"); dict["Frost"] = Frost.ToString("F0"); dict["Unholy"] = Unholy.ToString("F0"); dict["Death"] = Death.ToString("F0"); dict["Runic Power"] = RP.ToString("F0"); #endregion dict["Overall Points"] = OverallPoints.ToString("F1"); dict["Mitigation Points"] = String.Format("{0:0.0}", (Mitigation * MitigationWeight)); // Modified Mitigation. dict["Survival Points"] = String.Format("{0:0.0}", (Survival * SurvivalWeight)) + string.Format("*Physical:{0:0.0}\n", (PhysicalSurvival * SurvivalWeight)) + string.Format("Bleed:{0:0.0}\n", (BleedSurvival * SurvivalWeight)) + string.Format("Magic:{0:0.0}", (MagicSurvival * SurvivalWeight)); // Modified Survival dict["Threat Points"] = String.Format("{0:0.0}", (Threat * ThreatWeight)); // Modified Threat dict["Crit"] = Crit.ToString("F2"); dict["Defense"] = Defense.ToString("F0"); dict["Resilience"] = Resilience.ToString("F0"); dict["Defense Rating"] = DefenseRating.ToString("F0"); dict["Defense Rating needed"] = DefenseRatingNeeded.ToString("F0"); dict["Target Miss"] = (TargetMiss * 100.0f).ToString("F1") + "%"; dict["Target Dodge"] = (TargetDodge * 100.0f).ToString("F1") + "%"; dict["Target Parry"] = (TargetParry * 100.0f).ToString("F1") + "%"; return(dict); }