// ______ _ _ _ _ _____ ___ // / ____| | (_) | | |_ _| | | | | (_) //| (___ | | ___| | | | | _ __ | |_ ___ _ __ __ _ ___| |_ _ ___ _ __ ___ // \___ \| |/ / | | | | | | '_ \| __/ _ \ '__/ _` |/ __| __| |/ _ \| '_ \/ __| // ____) | <| | | | _| |_| | | | || __/ | | (_| | (__| |_| | (_) | | | \__ \ //|_____/|_|\_\_|_|_| |_____|_| |_|\__\___|_| \__,_|\___|\__|_|\___/|_| |_|___/ //Normal Strike internal static void NormalStrike(Dragon player1, Dragon player2) { Random random = new Random(); double hitRateModifier = 0; double critRateModifier = 0; int damageDealt = 0; double variance = random.Next(90, 110) * 0.01; double actualHitRate = player1.HitRate + hitRateModifier - player2.EvdRate; double actualCritRate = player1.CritRate + critRateModifier - player2.CritEvdRate; if (actualHitRate > random.Next(0, 100)) { damageDealt = (int)((variance) * (player1.Attack - player2.Defense)); if (actualCritRate > random.Next(0, 100)) { Console.WriteLine("A critical strike! This should hurt!"); damageDealt *= 2; } if (damageDealt < 0) { damageDealt = 0; } player2.HP -= damageDealt; Console.WriteLine("That attack did {0} damage!", damageDealt); BattleDialogue.DamageBehavior(player1, player2, damageDealt); } else { Console.WriteLine("The attack missed!"); damageDealt = -1; BattleDialogue.DamageBehavior(player1, player2, damageDealt); } }
//Pommel internal static void Pommel(Dragon player1, Dragon player2) { Random random = new Random(); double hitRateModifier = 200; double critRateModifier = -2; int damageDealt = 0; double variance = random.Next(90, 110) * 0.01; player1.SP -= 20; double actualHitRate = player1.HitRate + hitRateModifier - player2.EvdRate; double actualCritRate = player1.CritRate + critRateModifier - player2.CritEvdRate; int attack = player1.Strength * 3; int defense = player2.Resilience * 2; if (actualHitRate > random.Next(0, 100)) { damageDealt = (int)((variance) * (attack * 2 - defense)); if (actualCritRate > random.Next(0, 100)) { Console.WriteLine("A critical strike! This should hurt!"); damageDealt *= 2; } if (damageDealt < 0) { damageDealt = 0; } player2.HP -= damageDealt; Console.WriteLine("That attack did {0} damage!", damageDealt); BattleDialogue.DamageBehavior(player1, player2, damageDealt); Util.SPause(); Console.WriteLine("\nYou also apply a debuff to the enemy!"); Util.SPause(); Console.WriteLine("\nThe enemy loses 3 resilience for 3 turns."); Console.WriteLine("They will restore 1 resilience every start of turn."); player1.BuffDuration[3] = 4; player2.Resilience -= 4; } else { Console.WriteLine("The attack missed!"); damageDealt = -1; BattleDialogue.DamageBehavior(player1, player2, damageDealt); } player1.SkillCooldown[3] = 5; }
//Reckless Charge internal static void RecklessCharge(Dragon player1, Dragon player2) { Random random = new Random(); double hitRateModifier = -15; double critRateModifier = 8; int damageDealt = 0; double variance = random.Next(75, 125) * 0.01; player1.SP -= 5; double actualHitRate = player1.HitRate + hitRateModifier - player2.EvdRate; double actualCritRate = player1.CritRate + critRateModifier - player2.CritEvdRate; int attack = player1.Strength * 2; int defense = player2.Resilience * 2; if (actualHitRate > random.Next(0, 100)) { damageDealt = (int)((variance) * (player1.Attack * 1.25 - player2.Defense)); if (actualCritRate > random.Next(0, 100)) { Console.WriteLine("A critical strike! This should hurt!"); damageDealt *= 2; } if (damageDealt < 0) { damageDealt = 0; } player2.HP -= damageDealt; Console.WriteLine("That attack did {0} damage!", damageDealt); BattleDialogue.DamageBehavior(player1, player2, damageDealt); } else { Console.WriteLine("The attack missed!"); damageDealt = -1; BattleDialogue.DamageBehavior(player1, player2, damageDealt); } player1.SkillCooldown[1] = 2; }
//Double Strike internal static void DoubleUp(Dragon player1, Dragon player2) { Random random = new Random(); double hitRateModifier = 0; double critRateModifier = 0; int damageDealt = 0; double variance = random.Next(80, 120) * 0.01; player1.SP -= 30; double actualHitRate = player1.HitRate + hitRateModifier - player2.EvdRate; double actualCritRate = player1.CritRate + critRateModifier - player2.CritEvdRate; int attack = player1.Strength * 3; int defense = player2.Resilience * 2; if (actualHitRate > random.Next(0, 100)) { damageDealt = (int)((variance) * (attack * 5 - defense * 2.5)); if (actualCritRate > random.Next(0, 100)) { Console.WriteLine("A critical strike! This should hurt!"); damageDealt *= 2; } if (damageDealt < 0) { damageDealt = 0; } player2.HP -= damageDealt; Console.WriteLine("The first attack did {0} damage!", damageDealt); BattleDialogue.DamageBehavior(player1, player2, damageDealt); } else { Console.WriteLine("The first attack missed!"); damageDealt = -1; BattleDialogue.DamageBehavior(player1, player2, damageDealt); } Util.MPause(); if (actualHitRate > random.Next(0, 100)) { damageDealt = (int)((variance) * (attack * 3 - defense * 1.5)); if (actualCritRate > random.Next(0, 100)) { Console.WriteLine("\nA critical strike! This should hurt!"); damageDealt *= 2; } player2.HP -= damageDealt; Console.WriteLine("\nThe second attack did {0} damage!", damageDealt); BattleDialogue.DamageBehavior(player1, player2, damageDealt); } else { Console.WriteLine("The second attack missed!"); damageDealt = -1; BattleDialogue.DamageBehavior(player1, player2, damageDealt); } player1.SkillCooldown[2] = 3; }