Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- internal class Program
- {
- static void Main(string[] args)
- {
- const string MagicFireballCommand = "Fireball";
- const string MagicHealthRegenCommand = "Regen";
- const string NormalPunchCommand = "Punch";
- const string MagicBangCommand = "Boom";
- Random random = new Random();
- int minPlayerDamage = 1;
- int maxPlayerDamage = 20;
- int playerDamage;
- int minStartPlayerHealth = 50;
- int maxStartPlayerHealth = 100;
- int minManaPlayer = 10;
- int maxManaPlayer = 50;
- int manaPlayerRegen = 2;
- float playerHealth = random.Next(minStartPlayerHealth, maxStartPlayerHealth);
- int minEnemyDamage = 2;
- int maxEnemyDamage = 30;
- int enemyDamage;
- int minStartEnemyHealth = 80;
- int maxStartEnemyHealth = 200;
- int enemyHealth = random.Next(minStartEnemyHealth, maxStartEnemyHealth);
- int fireballDamage = 20;
- int quantityRegenHealth = 35;
- int bangAttackDamage = 50;
- bool isFierballAttackUsed = false;
- int minNumberForCriticalDamage = 1;
- int maxNumberForCriticalDamage = 5;
- int minCoefficentCriticalDamage = 2;
- int maxCoefficentCriticalDamage = 4;
- int coefficentCriticalDamage;
- int probablyCriticalDamage;
- int needNumberForCriticalDamage;
- while (playerHealth > 0 && enemyHealth > 0)
- {
- string? userInput;
- int quantityManaForMagicFireball = 3;
- int quantityManaForMagicHealthRegen = 5;
- int quantityManaForBang = 6;
- int coefficentSplitDamage = 2;
- probablyCriticalDamage = random.Next(minNumberForCriticalDamage, maxNumberForCriticalDamage);
- needNumberForCriticalDamage = random.Next(minNumberForCriticalDamage, maxNumberForCriticalDamage);
- coefficentCriticalDamage = random.Next(minCoefficentCriticalDamage, maxCoefficentCriticalDamage);
- playerDamage = random.Next(minPlayerDamage, maxPlayerDamage);
- enemyDamage = random.Next(minEnemyDamage, maxEnemyDamage);
- Console.WriteLine($"{playerHealth} - здоровья игрока. {minManaPlayer} - мана игрока.");
- Console.WriteLine($"{enemyHealth} - здоровья босса.");
- Console.WriteLine();
- Console.WriteLine($"У вас есть несколько комнд для боя с боссом:\n" +
- $"{NormalPunchCommand} - нанести обычный удар.\n" +
- $"{MagicFireballCommand} - удар огненным шаром. Необходимо {quantityManaForMagicFireball} ед маны.\n" +
- $"{MagicBangCommand} - произвести взрыв. Необходимо {quantityManaForBang} маны и воспользоваться огненным ударом.\n" +
- $"{MagicHealthRegenCommand} - восстановить {quantityRegenHealth} жизней. Необходимо {quantityManaForMagicHealthRegen} маны\n");
- Console.WriteLine();
- Console.Write("Введите команду: ");
- userInput = Console.ReadLine();
- switch (userInput)
- {
- case NormalPunchCommand:
- if (probablyCriticalDamage == needNumberForCriticalDamage)
- {
- playerDamage *= coefficentCriticalDamage;
- enemyHealth -= playerDamage;
- }
- else
- {
- enemyHealth -= playerDamage;
- }
- break;
- case MagicFireballCommand:
- if (minManaPlayer >= quantityManaForMagicFireball)
- {
- minManaPlayer -= quantityManaForMagicFireball;
- enemyHealth -= fireballDamage;
- isFierballAttackUsed = true;
- }
- else
- {
- if (probablyCriticalDamage == needNumberForCriticalDamage)
- {
- playerDamage *= coefficentCriticalDamage;
- enemyHealth -= playerDamage;
- }
- else
- {
- enemyHealth -= playerDamage;
- }
- }
- break;
- case MagicBangCommand:
- if (minManaPlayer >= quantityManaForBang && isFierballAttackUsed == true)
- {
- minManaPlayer -= quantityManaForBang;
- enemyHealth -= bangAttackDamage;
- isFierballAttackUsed = false;
- }
- else
- {
- if (probablyCriticalDamage == needNumberForCriticalDamage)
- {
- playerDamage *= coefficentCriticalDamage;
- enemyHealth -= playerDamage;
- }
- else
- {
- enemyHealth -= playerDamage;
- }
- }
- break;
- case MagicHealthRegenCommand:
- if (minManaPlayer >= quantityManaForMagicHealthRegen)
- {
- playerHealth += quantityRegenHealth;
- minManaPlayer -= quantityManaForMagicHealthRegen;
- if (playerHealth > maxStartPlayerHealth)
- {
- playerHealth = maxStartPlayerHealth;
- }
- }
- else
- {
- if (probablyCriticalDamage == needNumberForCriticalDamage)
- {
- playerDamage *= coefficentCriticalDamage;
- enemyHealth -= playerDamage;
- }
- else
- {
- enemyHealth -= playerDamage;
- }
- }
- break;
- default:
- Console.WriteLine("Вы промахнулись и нанесли 0 единиц урона.\nНажмите любую клавишу...");
- Console.ReadKey();
- break;
- }
- if (minManaPlayer > maxManaPlayer)
- {
- minManaPlayer = maxManaPlayer;
- }
- if (playerHealth > maxStartPlayerHealth)
- {
- playerHealth = maxStartPlayerHealth;
- }
- if (probablyCriticalDamage == needNumberForCriticalDamage)
- {
- enemyDamage *= coefficentCriticalDamage;
- playerHealth -= enemyDamage;
- }
- else
- {
- playerHealth -= enemyDamage;
- }
- minManaPlayer += manaPlayerRegen;
- Console.Clear();
- }
- if (playerHealth <= 0 && enemyHealth > 0)
- {
- Console.WriteLine($"Босс победил.\n" +
- $"Ваши жизни {playerHealth}\n" +
- $"Жизни противника: {enemyHealth}\n");
- }
- else if (playerHealth > 0 && enemyHealth <= 0)
- {
- Console.WriteLine($"Вы победили!\n" +
- $"Ваши жизни {playerHealth}\n" +
- $"Жизни противника: {enemyHealth}\n");
- }
- else if (playerHealth <= 0 && enemyHealth <= 0)
- {
- Console.WriteLine($"Ничья. Оба мертвы.\n" +
- $"Ваши жизни {playerHealth}\n" +
- $"Жизни противника: {enemyHealth}\n");
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Comments
-
- FREE CRYPTO WALLET
- Alex Hudson,
- 70 Calero St,
- Lithgow, NSW 2790, Australia
- Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-03-30 05:51 EDT
- Nmap scan report for cpe-101-191-210-122.nb15.nsw.asp.telstra.net (101.191.210.122)
- Host is up (0.63s latency).
- Not shown: 40 filtered tcp ports (no-response)
- PORT STATE SERVICE
- 7/tcp open echo
- 9/tcp closed discard
- 21/tcp open ftp
- 22/tcp open ssh
- 23/tcp open telnet
- 25/tcp open smtp
- 26/tcp closed rsftp
- 37/tcp open time
- 53/tcp open domain
- 80/tcp open http
- 110/tcp open pop3
- 111/tcp open rpcbind
- 113/tcp open ident
- 119/tcp open nntp
- 135/tcp open msrpc
- 139/tcp open netbios-ssn
- 143/tcp open imap
- 144/tcp open news
- 179/tcp open bgp
- 199/tcp open smux
- 427/tcp open svrloc
- 443/tcp open https
- 444/tcp closed snpp
- 445/tcp open microsoft-ds
- 548/tcp closed afp
- 554/tcp open rtsp
- 990/tcp closed ftps
- 993/tcp open imaps
- 995/tcp open pop3s
- 1025/tcp open NFS-or-IIS
- 1026/tcp closed LSA-or-nterm
- 1028/tcp open unknown
- 1029/tcp closed ms-lsa
- 1720/tcp open h323q931
- 1723/tcp open pptp
- 2000/tcp closed cisco-sccp
- 2001/tcp closed dc
- 2049/tcp closed nfs
- 3000/tcp closed ppp
- 3306/tcp open mysql
- 3389/tcp open ms-wbt-server
- 3986/tcp open mapper-ws_ethd
- 5009/tcp open airport-admin
- 5051/tcp open ida-agent
- 5060/tcp closed sip
- 5190/tcp closed aol
- 5631/tcp open pcanywheredata
- 5666/tcp closed nrpe
- 5900/tcp open vnc
- 6646/tcp closed unknown
- 7070/tcp open realserver
- 8000/tcp open http-alt
- 8008/tcp open http
- 8080/tcp open http-proxy
- 8443/tcp closed https-alt
- 8888/tcp open sun-answerbook
- 32768/tcp open filenet-tms
- 49153/tcp closed unknown
- 49154/tcp closed unknown
- 49155/tcp closed unknown
- Name: Alex Hudson
- Discord:
- Radlic#2809
- Steam:
- https://steamcommunity.com/id/2528865
- Nicknames:
- radleaf3331@gmail.com
- walker3331@gmail.com
- alexhudson124
- Beetleboy124
- 2528865
- radlicuwu
- alyxuwu
- infinitepossibility42
- dusky042
- mennwomennbooze
- Username | Passwords
- ---------------------------------------------
- walker3331 | jg0112; walker33
- Rad2809 | callum
- radleaf | eclipse4
- ---------------------------------------------
- Phones:
- (02) 6352 3590 <- Acc
- (04) 5741 3967 <- Acc
- (04) 0005 4914 <- PayPal
- +61 263523590 <- Acc
- +61 457413967 <- Acc
- +61 400054914 <- PayPal
- Home:
- 70 Calero St, Lithgow, NSW 2790, Australia.
- IP:
- 101.166.94.231
-
- aaaaaa
Add Comment
Please, Sign In to add comment
Advertisement