Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _14._2
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- Random random = new Random();
- float healthHero;
- float healthBoss;
- float damageWither;
- float damageVampirism;
- float healingHeroFromHealthHero;
- float percentageHealingHeroFromHealthHero = 0.10f;
- float bossHealthPercentageDamageFromWither = 0.20f;
- float bossHealthPercentageDamageFromVampirism = 0.10f;
- float percentagesVampirismDamage;
- float percentagesVampirismHealing;
- float percentagesWitherDamage;
- int oneHundredPercent = 100;
- int startValue = 0;
- int halfHeroHealth = 250;
- int roundCount = 0;
- int healthHeroMax = 500;
- int healingRazlom = 250;
- int bossDamage;
- int bossDamageMin = 90;
- int bossDamageMax = 151;
- int selfDamageRashamon = 100;
- int damageHuranzakura;
- int damageHuranzakuraMin = 100;
- int damageHuranzakuraMax = 151;
- int ultimateDamage = 500;
- int ultimateDamageCount = 0;
- int ultimateDamageCountMax = 5;
- int countdownHuranzakura = 1;
- int countdownHuranzakuraCount = 1;
- int countdownWither = 2;
- int countdownWitherCount = 2;
- int countdownRazlom = 3;
- int countdownRazlomCount = 3;
- int countdownVampirism = 2;
- int countdownVampirismCount = 2;
- int numberRoundsActionsWither = 2;
- int numberRoundsActionsWitherCount = 0;
- int numberRoundsActionsVampirism = 2;
- int numberRoundsActionsVampirismCount = 0;
- healthBoss = random.Next(500, 1001);
- healthHero = random.Next(100, 501);
- percentagesVampirismDamage = bossHealthPercentageDamageFromVampirism * oneHundredPercent;
- percentagesVampirismHealing = percentageHealingHeroFromHealthHero * oneHundredPercent;
- percentagesWitherDamage = bossHealthPercentageDamageFromWither * oneHundredPercent;
- string tie = "Ничья...";
- string units = " ед.";
- string heroLost = "Герой проиграл...";
- string heroWin = "Герой победил! Ура! Ура! Ура!";
- string requestEnterSpell = "\nВведите заклинание: ";
- string damageAlertFirstPart = "По вам был нанесён урон в ";
- string damageAlert;
- string menuAbilities = "\n" +
- "====================================================================================================================================================================\n" +
- "|| Вам доступно несколько заклинаний: ||\n" +
- "|| Рашамон - призыв теневого духа для нанесения атаки Хуганзакура стоимость " + selfDamageRashamon + " хп (способность не является атакой!). ||\n" +
- "|| Хуганзакура - Может быть выполнен только после призыва теневого духа. Наносит от " + damageHuranzakuraMin + " до " + damageHuranzakuraMax + " ед. урона. Перезарядка " + countdownHuranzakura + " раунд. ||\n" +
- "|| Ульта - " + ultimateDamage + " единиц урона по боссу и полная защита от урона со стороны босса, но можно использовать после проведения " + ultimateDamageCountMax + " атак; ||\n" +
- "|| Иссушение - наносит автоматический урон по боссу в " + percentagesWitherDamage + "% от его здоровья " + numberRoundsActionsWither + " раунда подряд, не работает с вампиризмом. Перезарядка " + countdownWither + " раунда. ||\n" +
- "|| Межпространственный разлом - позволяет скрыться в разломе и восстановить " + healingRazlom + " хп. Урон босса по вам не проходит, но и вы не наносите урон. Перезарядка " + countdownRazlom + " раунда.||\n" +
- "|| Вампиризм - наносит автоматический урон по боссу в " + percentagesVampirismDamage + "% от его здоровья " + numberRoundsActionsVampirism + " раунда подряд, а так же пополнение своего здоровья на " + percentagesVampirismHealing + "%. Перезарядка " + countdownVampirism + " раунда. ||\n" +
- "====================================================================================================================================================================\n";
- string reaload =
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" +
- "! Способность перезаряжается !\n" +
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
- string noActivatedAbility =
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" +
- "! Вы не активировали нужные способности для открытия этой !\n" +
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
- string activatedAbility = "Вы активироваили способность";
- string activatedAbilityAgain =
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" +
- "! Вы уже активировали данную способность !\n" +
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
- string ultimateNotAccumulated =
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" +
- "! Ульта не накопилась (не было проведено " + ultimateDamageCountMax + " атак) !\n" +
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
- string incompatibleVampirism =
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" +
- "! Нельзя активировать, при активированном вампиризме !\n" +
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
- string incompatibleWither =
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" +
- "! Нельзя активировать, при активированном иссушении !\n" +
- "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
- string suchAbilityNo =
- "!!!!!!!!!!!!!!!!!!!!!!!!!\n" +
- "! Такой способности нет !\n" +
- "!!!!!!!!!!!!!!!!!!!!!!!!!";
- string separator = "====================================================================================================================================================================";
- string abilityReadyHuranzakura = "Способность Хуганзакура готова!";
- string abilityReadyRazlom = "Cпособность Межпространственный разлом готова!";
- string abilityReadyUltimate = "Cпособность Ульта готова!";
- string abilityReadyWither = "Cпособность Иссушение готова!";
- string abilityReadyVampirism = "Cпособность Вампиризм готова!";
- string healthBarHealthHero = " ваше здоровье, ";
- string healthBarHealthBoss = " здоровье босса.\n";
- string healthBar;
- string ultimativeAttack = "Вы нанесли" + ultimateDamage + " ед. урона по боссу";
- string informationFullRecoveryHealthRazlom = "Вы полностью восстановили своё здоровье.";
- string InformationRecoveryHealthRazlomFirstPart = "Вы восстановили своё здоровье до ";
- string InformationRecoveryHealthRazlom;
- string informationRashamonDamageFirstPart = "Вы нанесли урона в ";
- string informationRashamonDamage;
- string informationActivatedWither = "Вы активировали иссушение. В последующие " + numberRoundsActionsWither + " раунда боссу будет наноситься урон в " + percentagesVampirismDamage + "% от его здоровья.";
- string informationWhitherDamageFirstPart = "Иссушение нанесло урон в ";
- string informationWhitherDamage;
- string informationWhitherTermination = "Эффект иссушения прошёл, перезарядка " + countdownWither + " раунда.";
- string informationVampirismActivated = "Вы активировали вампиризм. В последующие " + numberRoundsActionsVampirism + " раунда боссу будет наноситься урон в " + percentagesWitherDamage + "% от его здоровья. А вы будете лечиться на " + percentagesVampirismHealing + "% от своего здоровья.";
- string informationVampirismDamageFirstPart = "Вампиризм нанёс урон в ";
- string informationVampirismDamage;
- string informationVampirismHealingHeroFirstPart = "Вампириз восстановил здоровье в ";
- string informationVampirismHealingHero;
- string infOrmationVampirismTermination = "Эффект вампиризма прошёл, перезарядка " + countdownVampirism + " раунда.";
- string userInput;
- bool activatedRashamon = false;
- bool activatedWither = false;
- bool activatedVampirism = false;
- while (healthBoss > startValue && healthHero > startValue)
- {
- roundCount++;
- healthBar = menuAbilities + "\n" + healthHero + healthBarHealthHero + healthBoss + healthBarHealthBoss;
- Console.WriteLine(separator);
- Console.WriteLine(roundCount);
- Console.WriteLine(healthBar);
- if (activatedWither == true)
- {
- if (numberRoundsActionsWitherCount < numberRoundsActionsWither)
- {
- numberRoundsActionsWitherCount++;
- damageWither = healthBoss * bossHealthPercentageDamageFromWither;
- healthBoss -= damageWither;
- countdownWitherCount = startValue;
- informationWhitherDamage = informationWhitherDamageFirstPart + damageWither + units;
- Console.WriteLine(informationWhitherDamage);
- }
- else if (numberRoundsActionsWitherCount == numberRoundsActionsWither)
- {
- damageWither = healthBoss * bossHealthPercentageDamageFromWither;
- healthBoss -= damageWither;
- activatedWither = false;
- countdownWitherCount = startValue;
- numberRoundsActionsWitherCount = startValue;
- informationWhitherDamage = informationWhitherDamageFirstPart + damageWither + units;
- Console.WriteLine(informationWhitherDamage);
- Console.WriteLine(informationWhitherTermination);
- }
- }
- else if (activatedVampirism == true)
- {
- if (numberRoundsActionsVampirismCount < numberRoundsActionsVampirism)
- {
- numberRoundsActionsVampirismCount++;
- damageVampirism = healthBoss * bossHealthPercentageDamageFromVampirism;
- healthBoss -= damageVampirism;
- healingHeroFromHealthHero = healthHero * percentageHealingHeroFromHealthHero;
- healthHero += healingHeroFromHealthHero;
- countdownVampirismCount = startValue;
- informationVampirismDamage = informationVampirismDamageFirstPart + damageVampirism + units;
- informationVampirismHealingHero = informationVampirismHealingHeroFirstPart + healingHeroFromHealthHero + units;
- Console.WriteLine(informationVampirismDamage);
- Console.WriteLine(informationVampirismHealingHero);
- }
- else if (numberRoundsActionsVampirismCount == numberRoundsActionsVampirism)
- {
- damageVampirism = healthBoss * bossHealthPercentageDamageFromVampirism;
- healthBoss -= damageVampirism;
- healingHeroFromHealthHero = healthHero * percentageHealingHeroFromHealthHero;
- healthHero += healingHeroFromHealthHero;
- activatedVampirism = false;
- countdownVampirismCount = startValue;
- numberRoundsActionsVampirismCount = startValue;
- informationVampirismDamage = damageVampirism + informationVampirismDamageFirstPart + units;
- informationVampirismHealingHero = informationVampirismHealingHeroFirstPart + healingHeroFromHealthHero + units;
- Console.WriteLine(informationVampirismDamage);
- Console.WriteLine(informationVampirismHealingHero);
- Console.WriteLine(infOrmationVampirismTermination);
- }
- }
- if (countdownHuranzakuraCount <= countdownHuranzakura && activatedRashamon == true)
- {
- countdownHuranzakuraCount++;
- if (countdownHuranzakuraCount < countdownHuranzakura)
- {
- countdownHuranzakuraCount++;
- }
- else
- {
- Console.WriteLine(abilityReadyHuranzakura);
- }
- }
- if (countdownWitherCount <= countdownWither)
- {
- if (countdownWitherCount < countdownWither)
- {
- countdownWitherCount++;
- }
- else
- {
- Console.WriteLine(abilityReadyWither);
- }
- }
- if (countdownRazlomCount <= countdownRazlom)
- {
- if (countdownRazlomCount < countdownRazlom)
- {
- countdownRazlomCount++;
- }
- else
- {
- Console.WriteLine(abilityReadyRazlom);
- }
- }
- if (countdownVampirismCount <= countdownVampirism)
- {
- if (countdownVampirismCount < countdownVampirism)
- {
- countdownVampirismCount++;
- }
- else
- {
- Console.WriteLine(abilityReadyVampirism);
- }
- }
- if (ultimateDamageCount >= ultimateDamageCountMax)
- {
- Console.WriteLine(abilityReadyUltimate);
- }
- Console.Write(requestEnterSpell);
- userInput = Console.ReadLine();
- Console.WriteLine(separator);
- switch (userInput)
- {
- case "Рашамон":
- if (activatedRashamon == false)
- {
- activatedRashamon = true;
- bossDamage = random.Next(bossDamageMin, bossDamageMax);
- healthHero -= bossDamage + selfDamageRashamon;
- damageAlert = damageAlertFirstPart + bossDamage + units;
- Console.WriteLine(activatedAbility);
- Console.WriteLine(damageAlert);
- }
- else
- {
- bossDamage = random.Next(bossDamageMin, bossDamageMax);
- healthHero -= bossDamage;
- damageAlert = damageAlertFirstPart + bossDamage + units;
- Console.WriteLine(activatedAbilityAgain);
- Console.WriteLine(damageAlert);
- }
- break;
- case "Хуганзакура":
- if (activatedRashamon == true)
- {
- if (countdownHuranzakuraCount >= countdownHuranzakura)
- {
- bossDamage = random.Next(bossDamageMin, bossDamageMax);
- healthHero -= bossDamage;
- damageHuranzakura = random.Next(damageHuranzakuraMin, damageHuranzakuraMax);
- healthBoss -= damageHuranzakura;
- countdownHuranzakuraCount = startValue;
- ultimateDamageCount++;
- damageAlert = damageAlertFirstPart + bossDamage + units;
- informationRashamonDamage = informationRashamonDamageFirstPart + damageHuranzakura + units;
- Console.WriteLine(activatedAbility);
- Console.WriteLine(damageAlert);
- Console.WriteLine(informationRashamonDamage);
- }
- else
- {
- bossDamage = random.Next(bossDamageMin, bossDamageMax);
- healthHero -= bossDamage;
- damageAlert = damageAlertFirstPart + bossDamage + units;
- Console.WriteLine(reaload);
- Console.WriteLine(damageAlert);
- }
- }
- else
- {
- bossDamage = random.Next(bossDamageMin, bossDamageMax);
- healthHero -= bossDamage;
- damageAlert = damageAlertFirstPart + bossDamage + units;
- Console.WriteLine(noActivatedAbility);
- Console.WriteLine(damageAlert);
- }
- break;
- case "Ульта":
- if (ultimateDamageCount >= ultimateDamageCountMax)
- {
- healthBoss -= ultimateDamage;
- ultimateDamageCount = startValue;
- Console.WriteLine(activatedAbility);
- Console.WriteLine(ultimativeAttack);
- }
- else
- {
- bossDamage = random.Next(bossDamageMin, bossDamageMax);
- healthHero -= bossDamage;
- damageAlert = damageAlertFirstPart + bossDamage + units;
- Console.WriteLine(ultimateNotAccumulated);
- Console.WriteLine(damageAlert);
- }
- break;
- case "Иссушение":
- if (activatedVampirism != true)
- {
- if (activatedWither == false)
- {
- if (countdownWitherCount >= countdownWither)
- {
- activatedWither = true;
- bossDamage = random.Next(bossDamageMin, bossDamageMax);
- healthHero -= bossDamage;
- ultimateDamageCount++;
- Console.WriteLine(informationActivatedWither);
- damageAlert = damageAlertFirstPart + bossDamage + units;
- Console.WriteLine(damageAlert);
- }
- else
- {
- bossDamage = random.Next(bossDamageMin, bossDamageMax);
- healthHero -= bossDamage;
- damageAlert = damageAlertFirstPart + bossDamage + units;
- Console.WriteLine(reaload);
- Console.WriteLine(damageAlert);
- }
- }
- else
- {
- bossDamage = random.Next(bossDamageMin, bossDamageMax);
- healthHero -= bossDamage;
- Console.WriteLine(activatedAbilityAgain);
- damageAlert = damageAlertFirstPart + bossDamage + units;
- Console.WriteLine(damageAlert);
- }
- }
- else
- {
- bossDamage = random.Next(bossDamageMin, bossDamageMax);
- healthHero -= bossDamage;
- Console.WriteLine(incompatibleVampirism);
- damageAlert = damageAlertFirstPart + bossDamage + units;
- Console.WriteLine(damageAlert);
- }
- break;
- case "Межпространственный разлом":
- if (countdownRazlomCount >= countdownRazlom)
- {
- if (healthHero >= halfHeroHealth)
- {
- healthHero = healthHeroMax;
- countdownRazlomCount = startValue;
- Console.WriteLine(informationFullRecoveryHealthRazlom);
- }
- else
- {
- healthHero += healingRazlom;
- countdownRazlomCount = startValue;
- InformationRecoveryHealthRazlom = InformationRecoveryHealthRazlomFirstPart + healingRazlom + units;
- Console.WriteLine(InformationRecoveryHealthRazlom);
- }
- }
- else
- {
- bossDamage = random.Next(bossDamageMin, bossDamageMax);
- healthHero -= bossDamage;
- damageAlert = damageAlertFirstPart + bossDamage + units;
- Console.WriteLine(reaload);
- Console.WriteLine(damageAlert);
- }
- break;
- case "Вампиризм":
- if (activatedWither != true)
- {
- if (activatedVampirism == false)
- {
- if (countdownVampirismCount >= countdownVampirism)
- {
- activatedVampirism = true;
- bossDamage = random.Next(bossDamageMin, bossDamageMax);
- healthHero -= bossDamage;
- ultimateDamageCount++;
- Console.WriteLine(informationVampirismActivated);
- damageAlert = damageAlertFirstPart + bossDamage + units;
- Console.WriteLine(damageAlert);
- }
- else
- {
- bossDamage = random.Next(bossDamageMin, bossDamageMax);
- healthHero -= bossDamage;
- Console.WriteLine(reaload);
- damageAlert = damageAlertFirstPart + bossDamage + units;
- Console.WriteLine(damageAlert);
- }
- }
- else
- {
- bossDamage = random.Next(bossDamageMin, bossDamageMax);
- healthHero -= bossDamage;
- Console.WriteLine(activatedAbilityAgain);
- damageAlert = damageAlertFirstPart + bossDamage + units;
- Console.WriteLine(damageAlert);
- }
- }
- else
- {
- bossDamage = random.Next(bossDamageMin, bossDamageMax);
- healthHero -= bossDamage;
- Console.WriteLine(incompatibleWither);
- damageAlert = damageAlertFirstPart + bossDamage + units;
- Console.WriteLine(damageAlert);
- }
- break;
- default:
- bossDamage = random.Next(bossDamageMin, bossDamageMax);
- healthHero -= bossDamage;
- Console.WriteLine(suchAbilityNo);
- damageAlert = damageAlertFirstPart + bossDamage + units;
- Console.WriteLine(damageAlert);
- break;
- }
- Console.WriteLine();
- }
- if (healthBoss <= startValue && healthHero <= startValue)
- {
- Console.WriteLine(tie);
- }
- else if (healthHero <= startValue)
- {
- Console.WriteLine(heroLost);
- }
- else
- {
- Console.WriteLine(heroWin);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement