static void Main() { string FolderAssembly = Assembly.GetExecutingAssembly().Location; string Folder = Path.GetDirectoryName(FolderAssembly); string MonsterPath = @"..\..\csv\Monster.Character.csv"; string TankPath = @"..\..\csv\Tank.Character.csv"; string StatSupportPath = @"..\..\csv\StatSupport.Character.csv"; string CloseRangeDPSPath = @"..\..\csv\CloseRangeDPS.Character.csv"; string LongRangeDPSPath = @"..\..\csv\LongRangeDPS.Character.csv"; string HealerPath = @"..\..\csv\Healer.Character.csv"; //Creates all the characters and allows you to rename the monster and characters string CreateorNo; string MonsterName; string MonsterClass; Console.WriteLine("Would you like to choose a new monster or use the previous/default one? Type yes to do so."); CreateorNo = Console.ReadLine(); if (CreateorNo == "yes") { Console.WriteLine("Write your monster name and then your monster class. Monster Class must be Physical Monster or Magical Monster."); MonsterName = Console.ReadLine(); Start: MonsterClass = Console.ReadLine(); if (MonsterClass == "Physical Monster" || MonsterClass == "Magical Monster") { using (StreamWriter write = new StreamWriter(MonsterPath)) { write.WriteLine(MonsterName + "," + MonsterClass + "," + "4500," + "4500," + "450," + "450," + "200," + "200," + "200," + "200," + "200," + "200," + "50," + "50"); } } else { Console.WriteLine("You need to choose Physical Monster or Magical Monster. Please enter one or the other."); goto Start; } } else if (CreateorNo != "yes") { Console.WriteLine("You choose to use the old/default monster."); } string RenameorNoTank; string TankName; Console.WriteLine("Would you like to rename your tank? Type yes to do so."); RenameorNoTank = Console.ReadLine(); if (RenameorNoTank == "yes") { Console.WriteLine("Write your character name for your tank."); TankName = Console.ReadLine(); using (StreamWriter write = new StreamWriter(TankPath)) { write.WriteLine(TankName + "," + "Physical Tank" + "," + "1000," + "1000," + "250," + "250," + "100," + "100," + "0," + "0," + "750," + "750," + "500," + "500"); } } else if (RenameorNoTank != "yes") { Console.WriteLine("You choose to use the old/default tank name."); } string RenameorNoStatSupport; string StatSupportName; Console.WriteLine("Would you like to rename your stat support? Type yes to do so."); RenameorNoStatSupport = Console.ReadLine(); if (RenameorNoStatSupport == "yes") { Console.WriteLine("Write your character name for your stat support."); StatSupportName = Console.ReadLine(); using (StreamWriter write = new StreamWriter(StatSupportPath)) { write.WriteLine(StatSupportName + "," + "Stat Support" + "," + "600," + "600," + "300," + "300," + "150," + "150," + "0," + "0," + "350," + "350," + "350," + "350"); } } else if (RenameorNoStatSupport != "yes") { Console.WriteLine("You choose to use the old/default stat support name."); } string CreateorNoCloseRDPS; string CloseRangeDPSName; string CloseRangeDPSClass; Console.WriteLine("Would you like to choose a new Close Range DPS or use the previous/default one? Type yes to do so."); CreateorNoCloseRDPS = Console.ReadLine(); if (CreateorNo == "yes") { Console.WriteLine("Write your character name and then your character class. Close Range DPS Class must be an Assassin, Warrior, or Battle Mage."); CloseRangeDPSName = Console.ReadLine(); Start: CloseRangeDPSClass = Console.ReadLine(); if (CloseRangeDPSClass == "Assassin" || CloseRangeDPSClass == "Warrior" || CloseRangeDPSClass == "Battle Mage") { using (StreamWriter write = new StreamWriter(CloseRangeDPSPath)) { write.WriteLine(CloseRangeDPSName + "," + CloseRangeDPSClass + "," + "500," + "500," + "250," + "250," + "850," + "850," + "850," + "850," + "200," + "200," + "300," + "300"); } } else { Console.WriteLine("You need to choose Assassin, Warrior or Battle Mage. Please enter one of those options."); goto Start; } } else if (CreateorNoCloseRDPS != "yes") { Console.WriteLine("You choose to use the old/default Close Range DPS."); } string CreateorNoLongRDPS; string LongRangeDPSName; string LongRangeDPSClass; Console.WriteLine("Would you like to choose a new Long Range DPS or use the previous/default one? Type yes to do so."); CreateorNoLongRDPS = Console.ReadLine(); if (CreateorNo == "yes") { Console.WriteLine("Write your character name and then your character class. Long Range DPS Class must be a Mage, Archer, or Knife Slinger."); LongRangeDPSName = Console.ReadLine(); Start: LongRangeDPSClass = Console.ReadLine(); if (LongRangeDPSClass == "Mage" || LongRangeDPSClass == "Archer" || LongRangeDPSClass == "Knife Slinger") { using (StreamWriter write = new StreamWriter(LongRangeDPSPath)) { write.WriteLine(LongRangeDPSName + "," + LongRangeDPSClass + "," + "450," + "450," + "850," + "850," + "700," + "700," + "700," + "700," + "200," + "200," + "350," + "350"); } } else { Console.WriteLine("You need to choose Mage, Archer or Knife Slinger. Please enter one of those options."); goto Start; } } else if (CreateorNoLongRDPS != "yes") { Console.WriteLine("You choose to use the old/default Long Range DPS."); } string RenameorNoHealer; string HealerName; Console.WriteLine("Would you like to rename your healer? Type yes to do so."); RenameorNoHealer = Console.ReadLine(); if (RenameorNoHealer == "yes") { Console.WriteLine("Write your character name for your healer."); HealerName = Console.ReadLine(); using (StreamWriter write = new StreamWriter(HealerPath)) { write.WriteLine(HealerName + "," + "Healer" + "," + "450," + "450," + "500," + "500," + "0," + "0," + "100," + "100," + "300," + "300," + "300," + "300"); } } else if (RenameorNoHealer != "yes") { Console.WriteLine("You choose to use the old/default healer name."); } Turns Catt = new Turns() { CATT = 0 }; Character Monster = ReadMonsterStats(MonsterPath); Character Tank = ReadTankStats(TankPath); Character StatSupport = ReadStatSupportStats(StatSupportPath); Character CloseRangeDPS = ReadCloseRangeDPSStats(CloseRangeDPSPath); Character LongRangeDPS = ReadLongRangeDPSStats(LongRangeDPSPath); Character Healer = ReadHealerStats(HealerPath); GameScript GameRun = new GameScript(); //All the methods that run the actual game. GameRun.OpeningDialogue(); GameRun.ShowCharacterStats(Monster, Tank, StatSupport, CloseRangeDPS, LongRangeDPS, Healer); //Loops until the monster dies do { GameRun.TankActions(Monster, Tank, StatSupport); GameRun.StatSupportActions(Monster, Tank, StatSupport, CloseRangeDPS, LongRangeDPS, Healer); GameRun.CloseRangeDPSActions(Monster, Tank, StatSupport, CloseRangeDPS, LongRangeDPS, Healer, Catt); GameRun.LongRangeDPSActions(Monster, Tank, StatSupport, CloseRangeDPS, LongRangeDPS, Healer); GameRun.HealerActions(Monster, Tank, StatSupport, CloseRangeDPS, LongRangeDPS, Healer); GameRun.MonsterActions(Monster, Tank, StatSupport, CloseRangeDPS, LongRangeDPS, Healer, Catt); } while (Monster.Health >= 0 || Tank.Health <= 0 && StatSupport.Health <= 0 && CloseRangeDPS.Health <= 0 && LongRangeDPS.Health <= 0 && Healer.Health <= 0); }
public void MonsterActions(Character Monster, Character Tank, Character StatSupport, Character CloseRangeDPS, Character LongRangeDPS, Character Healer, Turns Catt) { Monster MonsterAction = new Monster(); if (Catt.CATT == 0 && CloseRangeDPSAct == "1") { Catt.CATT += 1; } else if (Catt.CATT == 1 && CloseRangeDPSAct == "2") { Catt.CATT -= 1; } else if (Catt.CATT == 1 && CloseRangeDPSAct != "2") { Catt.CATT -= 1; } MonsterAction.MonsterDamageSingleTarget(Monster, Tank, StatSupport, CloseRangeDPS, LongRangeDPS, Healer); if (CloseRangeDPSAct == "2" && CloseRangeDPS.Class == "Assassin") { MonsterAction.MonsterAttacksifStealth(Monster, Tank, StatSupport, CloseRangeDPS, LongRangeDPS, Healer); } if (TankAct == "1") { MonsterAction.MonsterAttacksifGuardAllies(Monster, Tank, StatSupport, CloseRangeDPS, LongRangeDPS, Healer); } else { MonsterAction.MonsterBigAttacks(Monster, Tank, StatSupport, CloseRangeDPS, LongRangeDPS, Healer); } Console.WriteLine(""); Console.WriteLine($"{Tank.Name} {Tank.Class} HP:{Tank.Health}/{Tank.MaxHealth} MP:{Tank.ManaPool}/{Tank.MaxManaPool} " + $"PhyAtt:{Tank.PhysicalAttack} MagAtt:{Tank.MagicalAttack} PhyDef:{Tank.Defense} MagDef:{Tank.MagicalDefense}"); Console.WriteLine($"{StatSupport.Name} {StatSupport.Class} HP:{StatSupport.Health}/{StatSupport.MaxHealth} MP:{StatSupport.ManaPool}/{StatSupport.MaxManaPool} " + $"PhyAtt:{StatSupport.PhysicalAttack} MagAtt:{StatSupport.MagicalAttack} PhyDef:{StatSupport.Defense} MagDef:{StatSupport.MagicalDefense}"); Console.WriteLine($"{CloseRangeDPS.Name} {CloseRangeDPS.Class} HP:{CloseRangeDPS.Health}/{CloseRangeDPS.MaxHealth} MP:{CloseRangeDPS.ManaPool}/{CloseRangeDPS.MaxManaPool} " + $"PhyAtt:{CloseRangeDPS.PhysicalAttack} MagAtt:{CloseRangeDPS.MagicalAttack} PhyDef:{CloseRangeDPS.Defense} MagDef:{CloseRangeDPS.MagicalDefense}"); Console.WriteLine($"{LongRangeDPS.Name} {LongRangeDPS.Class} HP:{LongRangeDPS.Health}/{LongRangeDPS.MaxHealth} MP:{LongRangeDPS.ManaPool}/{LongRangeDPS.MaxManaPool} " + $"PhyAtt:{LongRangeDPS.PhysicalAttack} MagAtt:{LongRangeDPS.MagicalAttack} PhyDef:{LongRangeDPS.Defense} MagDef:{LongRangeDPS.MagicalDefense}"); Console.WriteLine($"{Healer.Name} {Healer.Class} HP:{Healer.Health}/{Healer.MaxHealth} MP:{Healer.ManaPool}/{Healer.MaxManaPool} " + $"PhyAtt:{Healer.PhysicalAttack} MagAtt:{Healer.MagicalAttack} PhyDef:{Healer.Defense} MagDef:{Healer.MagicalDefense}"); Console.WriteLine(""); Console.WriteLine($"{Monster.Name} {Monster.Class} HP:{Monster.Health}/{Monster.MaxHealth} MP:{Monster.ManaPool}/{Monster.MaxManaPool} " + $"PhyAtt:{Monster.PhysicalAttack} MagAtt:{Monster.MagicalAttack} PhyDef:{Monster.Defense} MagDef:{Monster.MagicalDefense}"); MonsterAction.MonsterDeath(Monster); }
public void ChargeStrike(Character Monster, Character Tank, Character StatSupport, Character CloseRangeDPS, Character LongRangeDPS, Character Healer, Turns Catt) { if (CloseRangeDPS.Class == "Assassin") { var AssassinateDmg = (CloseRangeDPS.PhysicalAttack * 2) - Monster.Defense; Monster.Health -= AssassinateDmg; Console.WriteLine($"{CloseRangeDPS.Name} did {AssassinateDmg} damage to {Monster.Name} using Assassinate."); } else if (CloseRangeDPS.Class == "Warrior") { if (Catt.CATT == 0) { Console.WriteLine($"{CloseRangeDPS.Name} is charging up their attack."); } else if (Catt.CATT == 1) { var ChargeAttackDmg = (CloseRangeDPS.PhysicalAttack * 2) - Monster.Defense; Monster.Health -= ChargeAttackDmg; Console.WriteLine($"{CloseRangeDPS.Name} did {ChargeAttackDmg} damage to {Monster.Name} using their charged attack."); } } else if (CloseRangeDPS.Class == "Battle Mage") { var BurstBombDmg = (CloseRangeDPS.PhysicalAttack * 2) - Monster.Defense; Monster.Health -= BurstBombDmg; Console.WriteLine($"{CloseRangeDPS.Name} did {BurstBombDmg} damage to {Monster.Name} using their burst bomb attack."); } }
public void CloseRangeDPSActions(Character Monster, Character Tank, Character StatSupport, Character CloseRangeDPS, Character LongRangeDPS, Character Healer, Turns Catt) { Console.WriteLine(""); Console.WriteLine($"It's {CloseRangeDPS.Name}'s turn. Select {CloseRangeDPS.Name}'s abilites by using the corresponding number below."); if (CloseRangeDPS.Class == "Assassin") { Console.WriteLine("Assassinate = 1"); Console.WriteLine("Stealth = 2"); } else if (CloseRangeDPS.Class == "Warrior") { Console.WriteLine("Charge Attack = 1"); Console.WriteLine("Berserk = 2"); } else if (CloseRangeDPS.Class == "Battle Mage") { Console.WriteLine("Burst Bomb = 1"); Console.WriteLine("Bubble Shield = 2"); } CloseRangeDPS CloseRangeDPSAction = new CloseRangeDPS(); Start: CloseRangeDPSAct = Console.ReadLine(); if (CloseRangeDPSAct == "1") { CloseRangeDPSAction.ChargeStrike(Monster, Tank, CloseRangeDPS, CloseRangeDPS, LongRangeDPS, Healer, Catt); } else if (CloseRangeDPSAct == "2") { CloseRangeDPSAction.DefensiveAbility(Monster, Tank, CloseRangeDPS, CloseRangeDPS, LongRangeDPS, Healer); } else { Console.WriteLine($"You must select an action for {CloseRangeDPS.Name} to continue."); goto Start; } Console.WriteLine($"Would you like to continue to {LongRangeDPS.Name}'s turn? Type yes to continue."); Start2: var ContTTurn = Console.ReadLine(); if (ContTTurn != "yes") { Console.WriteLine("You must select yes to continue."); goto Start2; } }