public static void GetArmor(player newPlayer) { Random rand = new Random(); //initialize armor to be returned armor Armor = new armor(); int rng = rand.Next(1, 100); if (rng >= 96) { Armor = LegendaryDrops.PullLegendaryArmor(newPlayer); } else { Armor = ArmorStats.GetEffects(newPlayer, Armor); while (true) { Console.WriteLine("Would you like to equip this armor?"); Console.WriteLine("Current set: "); ArmorStats.ShowArmorStats(newPlayer.armorEquipped); Console.WriteLine("\nNew set: "); ArmorStats.ShowArmorStats(Armor); Console.WriteLine("Would you like to equip the new armor?"); string armorChoice = Console.ReadLine(); if (armorChoice.ToLower() == "yes") { newPlayer.armorEquipped = Armor; break; } else if (armorChoice.ToLower() == "no") { Console.WriteLine("You toss the armor to the side."); break; } Console.Clear(); } } }
public static void chapterTwo(player newPlayer) { partyMembers member = new partyMembers(); bool isAlive = true; enemies Enemy = new enemies(); Console.WriteLine("As the trio continues north, the Green Dome gate becomes visible in the distance."); Console.WriteLine("You look behind you, seeing Red Sands grotto off in the distance, hidden slightly by the artificial atmosphere."); Console.ReadLine(); Console.WriteLine("STU: I'm not gonna miss that place. So many dumpfolk and other trash roam that place, sulking in their own damn misery."); Console.WriteLine("SAI: Not far off from Cratertown. Only difference is the violent thugs get dealt with by the police force."); Console.WriteLine("STU: Thats a step up, at the least."); Console.ReadLine(); Console.WriteLine("As the gate gets closer, you see several guards standing by."); Console.WriteLine("STU: We're approaching the checkpoint. Let me handle this, I'm hoping I can get us in there."); Console.ReadLine(); Console.WriteLine("GUARD: Stay back. Present your ID."); Console.WriteLine("STU: Hail, sir. We have important business in Cratertown."); Console.WriteLine("GUARD: Is that right? Let me go... discuss this with upper management."); Console.WriteLine("STU: Hopefully they just let us pass. I've not heard of them being super strict here before."); Console.ReadLine(); Console.WriteLine("The guards return, approaching Stu."); Console.WriteLine("GUARD: Alright, Stu, follow me. We'll get you sorted out."); Console.WriteLine("Stu backs off a bit."); Console.ReadLine(); Console.WriteLine("STU: You know my name?"); Console.WriteLine("GUARD: Hmm. You're pretty popular around here, Stu. We've been wondering when you'd show up."); Console.WriteLine("STU: I think we're just gonna... go."); Console.ReadLine(); Console.WriteLine("GUARD: No, I don't think so. We've got some questions we need to ask you. You're coming with us."); Write("STU: You're with Baris. Why are you posted here?"); Write("GUARD: Heh. Baris and the police force struck a deal. Long story short, we have permission to kill you on sight."); Read(); Write("STU: Look, " + newPlayer.name + ", I'll explain this later. Let's just take care of these guys."); Write("GUARD: Take care of us? You guys hear that? Well, we'll see about that."); Read(); isAlive = Combat.combat(Enemy.RedSandsGuard, newPlayer, 2); }
public static void LevelTracker(player newPlayer) { int xpToNextLevel = (int)(Math.Pow((double)newPlayer.level, 4.0 / 3.0) * 1500.0); bool doneLeveling = false; while (!doneLeveling) { // Console.WriteLine("Current xp: " + newPlayer.xp + "XP to next: " + xpToNextLevel); if (newPlayer.xp >= xpToNextLevel) { newPlayer.level++; Console.WriteLine("Congratulations, you are now level " + newPlayer.level + "!"); xpToNextLevel = (int)(Math.Pow((double)newPlayer.level, 4.0 / 3.0) * 1500.0); newPlayer.health = GetPlayerHP(newPlayer.health, newPlayer.level); newPlayer.currentHP = newPlayer.health; continue; } doneLeveling = true; } Console.WriteLine("You have " + newPlayer.xp + " xp.\nYou need " + xpToNextLevel + " xp to reach level " + (int)(newPlayer.level + 1)); }
public static GunPulled PullLegendaryGuns(player newPlayer) { GunPulled Gun = new GunPulled(); Random rand = new Random(); int legendaryPull = rand.Next(69); if (legendaryPull == 0) { GunPulled Clanker = new GunPulled("MarsWares", "Minigun", "Clanker", 6, 52, 65, 3, 5); Gun = Clanker; } else if (legendaryPull == 1) { GunPulled DeathRay = new GunPulled("Ultra", "Laser Ray Series", "Death Ray", 3, 50, 87, 50, 3); Gun = DeathRay; } else if (legendaryPull == 2) { GunPulled ForceBlaster = new GunPulled("Ultra", "Laser Ray Series", "Force Blaster", 27, 3, 90, 30, 3); Gun = ForceBlaster; } else if (legendaryPull == 3) { GunPulled ColtOcto = new GunPulled("Inum", "Pistol", "Colt Octo", 8, 8, 88, 88, 8); Gun = ColtOcto; } else if (legendaryPull == 4) { GunPulled Missfire = new GunPulled("JelTech", "Assault Rifle", "Missfire", 15, 17, 45, 45, 4); Gun = Missfire; } else if (legendaryPull == 5) { GunPulled PlasmaImploder = new GunPulled("Ultra", "Plasma Series", "Plasma Imploder", 30, 3, 83, 10, 10); Gun = PlasmaImploder; } else if (legendaryPull == 6) { GunPulled MasterBlaster = new GunPulled("TopNotch", "RPG", "Master Blaster", 40, 1, 85, 10, 5); Gun = MasterBlaster; } else if (legendaryPull == 7) { GunPulled ColtOcto = new GunPulled("TopNotch", "Doom Series Shotgun", "Hell Shotgun", 27, 4, 84, 5, 5); Gun = ColtOcto; } else if (legendaryPull == 8) { GunPulled PlasmaCannon = new GunPulled("TopNotch", "Doom Series Cannon", "Plasma Cannon", 45, 1, 81, 10, 2); Gun = PlasmaCannon; } else if (legendaryPull == 9) { GunPulled BigGun = new GunPulled("BoomCo", "RPG", "Big Gun", 70, .1, 45, 11, 2); Gun = BigGun; } else if (legendaryPull == 10) { GunPulled RocketGun = new GunPulled("BoomCo", "Pistol", "Rocket Gun", 20, 6, 77, 7, 4); Gun = RocketGun; } else if (legendaryPull == 11) { GunPulled MRE = new GunPulled("BoomCo", "RPG", "Missile Rocket Explosioneer", 105, .0001, 95, 20, 2); Gun = MRE; } else if (legendaryPull == 12) { GunPulled DeathActivist = new GunPulled("JelTech", "Assault Rifle", "Death Activist", 9, 12, 88, 17, 4); Gun = DeathActivist; } else if (legendaryPull == 13) { GunPulled CrossFire = new GunPulled("Inum", "SMG", "CrossFire!", 4, 77, 50, 10, 12); Gun = CrossFire; } else if (legendaryPull == 14) { GunPulled Pepsifier = new GunPulled("PepsiCo", "Pistol", "Pepsifier", 1, 1000, 99, 2, 1000); Gun = Pepsifier; } else if (legendaryPull == 15) { GunPulled DigiHom = new GunPulled("STUDIO Homicide", "Pistol", "Digital Suicide", 3, 5, 83, 50, 666); Gun = DigiHom; } else if (legendaryPull == 16) { GunPulled DigiHom = new GunPulled("JelTech", "Assault Rifle", "Polybius", 21, 7, 80, 3, 10); Gun = DigiHom; } else if (legendaryPull == 17) { GunPulled DigiHom = new GunPulled("MarsWares", "Pistol", "Treasure Master", 6, 14, 78, 25, 25); Gun = DigiHom; } else if (legendaryPull == 18) { GunPulled SHS = new GunPulled("TopNotch", "SMG", "Super Hyper Scanner", 5, 65, 83, 15, 12); Gun = SHS; } else if (legendaryPull == 19) { GunPulled ALF = new GunPulled("Ultra", "SMG", "Alpha Loop Fighter", 10, 25, 87, 3, 6); Gun = ALF; } else if (legendaryPull == 20) { GunPulled BigRig = new GunPulled("JelTech", "Melee", "Biggest Rig", 46, 1, 83, 3, 66); Gun = BigRig; } else if (legendaryPull == 21) { GunPulled BubbleWand = new GunPulled("MarsWares", "Melee", "Bubble Wand", 3, 1, 25, 75, 1000); Gun = BubbleWand; } else if (legendaryPull == 22) { GunPulled DigiHom = new GunPulled("MarsWares", "Pistol", "Plankton's Chum Ray", 21, 12, 83, 15, 7); Gun = DigiHom; } else if (legendaryPull == 23) { GunPulled SSOL = new GunPulled("Ultra", "Melee", "Supreme Lance Of Light", 40, 1, 87, 20, 2); Gun = SSOL; } else if (legendaryPull == 24) { GunPulled WOG = new GunPulled("CDI Incorporated", "Melee", "Wand of Gamelon", 14, 1, 50, 50, 9); Gun = WOG; } else if (legendaryPull == 25) { GunPulled BOK = new GunPulled("CDI Incorporated", "Melee", "Book of Koridai", 1, 1, 1, 100, 9999); Gun = BOK; } else if (legendaryPull == 26) { GunPulled MasterChu = new GunPulled("Inum", "Assault Rifle", "Master Chu", 25, 5, 80, 5, 2); Gun = MasterChu; } else if (legendaryPull == 27) { GunPulled Bimmy = new GunPulled("MarsWares", "Pistol", "Bimmy Device", 9, 22, 67, 10, 3); Gun = Bimmy; } else if (legendaryPull == 28) { GunPulled Jimmy = new GunPulled("MarsWares", "Pistol", "Jimmy Device", 10, 21, 70, 5, 6); Gun = Jimmy; } else if (legendaryPull == 29) { GunPulled Freedom = new GunPulled("JelTech", "Shotgun", "Freedom", 13, 50, 50, 50, 2); Gun = Freedom; } else if (legendaryPull == 30) { GunPulled GalaxyRevolver = new GunPulled("TopNotch", "Galaxy Series - Pistol", "Galaxy Revolver", 23, 6, 98, 25, 3); Gun = GalaxyRevolver; } else if (legendaryPull == 31) { GunPulled GalaxyBoomStick = new GunPulled("TopNotch", "Galaxy Series - Shotgun", "Galaxy BoomStick", 36, 2, 97, 35, 2); Gun = GalaxyBoomStick; } else if (legendaryPull == 32) { GunPulled GalaxyAR = new GunPulled("TopNotch", "Galaxy Series - Assault Rifle", "Galaxy AR", 10, 13, 97, 20, 3); Gun = GalaxyAR; } else if (legendaryPull == 33) { GunPulled GalaxyLauncher = new GunPulled("TopNotch", "Galaxy Series - RPG", "Galaxy Launcher", 42, 1, 95, 45, 6); Gun = GalaxyLauncher; } else if (legendaryPull == 34) { GunPulled GalaxySMG = new GunPulled("TopNotch", "Galaxy Series - SMG", "Galaxy SMG", 8, 24, 98, 15, 4); Gun = GalaxySMG; } else if (legendaryPull == 35) { GunPulled ManRay = new GunPulled("Ultra", "Laser Ray Series", "Man Ray", 2, 999, 45, 50, 2); Gun = ManRay; } else if (legendaryPull == 36) { GunPulled UDDER = new GunPulled("ULTIMATE", "ULTIMATE Single - Shotgun", "Ultimate Death Device Enticer Revamped - UDDER", 1, 10, 2, 100, 99999); Gun = UDDER; } else if (legendaryPull == 37) { GunPulled DMO = new GunPulled("ULTIMATE", "ULTIMATE Single - RPG", "Death Machina Omega - Alpha Version", 999, 1, 50, 95, 0); Gun = DMO; } else if (legendaryPull == 38) { GunPulled Bloxor = new GunPulled("Inum", "Assault Rifle", "Bloxor", 21, 6, 87, 10, 2); Gun = Bloxor; } else if (legendaryPull == 39) { GunPulled ChainsawRifle = new GunPulled("MarsWares", "Chainsaw Rifle", "Lancer", 12, 22, 86, 1, 2); Gun = ChainsawRifle; } else if (legendaryPull == 40) { GunPulled KinglyHook = new GunPulled("Ultra", "Melee", "Kingly Hook", 65, .0001, 90, 1, 20); Gun = KinglyHook; } else if (legendaryPull == 41) { GunPulled GlitchGun = new GunPulled("Binary Systems", "P1st01", "Gl1tch Gun", 10, 10, 32, 32, 101); Gun = GlitchGun; } else if (legendaryPull == 42) { GunPulled GlitchGun2 = new GunPulled("Binary Systems", "Assault R1fle", "Gl1tch Gun Version 000010", 25, 2, 86, 32, 4); Gun = GlitchGun2; } else if (legendaryPull == 43) { GunPulled GlitchGun3 = new GunPulled("Binary Systems", "Sh0tgun", "Gl1tch Gun Vers1on 000011", 32, 1, 86, 32, 4); Gun = GlitchGun3; } else if (legendaryPull == 44) { GunPulled GlitchBoom = new GunPulled("Binary Systems", "RPG", "Gl1tch B00m", 50, 2, 101, 15, 5); Gun = GlitchBoom; } else if (legendaryPull == 45) { GunPulled MeatWagon = new GunPulled("Unknown Brand", "Minigun", "Meat Wagon", 11, 202, 44, 2, 4); Gun = MeatWagon; } else if (legendaryPull == 46) { GunPulled TheApple = new GunPulled("JelTech", "Launcher", "The Apple", 37, 2, 70, 5, 5); Gun = TheApple; } else if (legendaryPull == 47) { GunPulled PeaShooter = new GunPulled("JelTech", "Pistol", "The Pea Shooter", 12, 17, 100, 3, 3); Gun = PeaShooter; } else if (legendaryPull == 48) { GunPulled MasterCrossbow = new GunPulled("Inum", "Crossbow", "Master Crossbow", 24, 1, 75, 40, 3); Gun = MasterCrossbow; } else if (legendaryPull == 49) { GunPulled CriticalCrossbow = new GunPulled("Inum", "Crossbow", "Critical Crossbow", 13, 3, 75, 95, 5); Gun = CriticalCrossbow; } else if (legendaryPull == 50) { GunPulled RapidCrossbow = new GunPulled("Inum", "Crossbow", "Rapid Crossbow", 5, 65, 50, 25, 2); Gun = RapidCrossbow; } else if (legendaryPull == 51) { GunPulled CriticalConferenceCall = new GunPulled("TopNotch", "Shotgun", "Critical Conference Call", 24, 8, 84, 20, 4); Gun = CriticalConferenceCall; } else if (legendaryPull == 52) { GunPulled GaussRifle = new GunPulled("Ultra", "Rifle", "Gauss Rifle", 40, 2, 90, 80, 2); Gun = GaussRifle; } else if (legendaryPull == 53) { GunPulled Maria = new GunPulled("MarsWares", "Pistol", "Maria", 16, 13, 82, 8, 3); Gun = Maria; } else if (legendaryPull == 54) { GunPulled Supernova = new GunPulled("BoomCo", "RPG", "Supernova", 65, 1, 95, 50, 2); Gun = Supernova; } else if (legendaryPull == 55) { GunPulled Hypernova = new GunPulled("BoomCo", "RPG", "Hypernova", 95, .01, 90, 10, 3); Gun = Hypernova; } else if (legendaryPull == 56) { GunPulled Nova = new GunPulled("BoomCo", "RPG", "Nova", 48, 3, 97, 25, 2); Gun = Nova; } else if (legendaryPull == 57) { GunPulled KitchenGun = new GunPulled("Baum LTD", "Pistol", "Kitchen Gun!", 10, 3, 95, 52, 15); Gun = KitchenGun; } else if (legendaryPull == 58) { GunPulled GalacticConsequences = new GunPulled("Unknown Brand", "RPG", "Galactic Consequences", 30, 10, 75, 60, 2); Gun = GalacticConsequences; } else if (legendaryPull == 59) { GunPulled DeadlySins = new GunPulled("Ultra", "Pistol", "7 Sins", 7, 7, 100, 95, 7); Gun = DeadlySins; } else if (legendaryPull == 60) { GunPulled Plague = new GunPulled("JelTech", "Shotgun", "Plague", 4, 300, 80, 1, 2); Gun = Plague; } else if (legendaryPull == 61) { GunPulled DPFD = new GunPulled("Ultra", "Laser Ray Series", "Directed Particle Fusion Device", 200, .000000001, 5, 100, 500); Gun = DPFD; } else if (legendaryPull == 62) { GunPulled Stardust = new GunPulled("JelTech", "Assault Rifle", "Stardust", 15, 8, 85, 10, 2); Gun = Stardust; } else if (legendaryPull == 63) { GunPulled Darkspawn = new GunPulled("Inum", "SMG", "Darkspawn", 12, 20, 80, 5, 5); Gun = Darkspawn; } else if (legendaryPull == 64) { GunPulled Nebulae = new GunPulled("TopNotch", "SMG", "Nebulae", 10, 15, 75, 30, 5); Gun = Nebulae; } else if (legendaryPull == 65) { GunPulled BlackHole = new GunPulled("TopNotch", "Shotgun", "Black Hole", 80, 3, 50, 15, 0); Gun = BlackHole; } else if (legendaryPull == 66) { GunPulled SpaceTime = new GunPulled("Inum", "SMG", "Space-Time", 5, 100, 80, 90, 5); Gun = SpaceTime; } else if (legendaryPull == 67) { GunPulled Revolution = new GunPulled("MarsWares", "Assault Rifle", "Revolution", 11, 23, 60, 4, 2); Gun = Revolution; } else if (legendaryPull == 68) { GunPulled SmartShopper = new GunPulled("S-Mart", "Boomstick", "The Smart Shopper", 53, 2, 80, 4, 5); Gun = SmartShopper; } else if (legendaryPull == 69) { GunPulled NuclearOption = new GunPulled("BoomCo", "MiniNuker", "The Nuclear Option", 90, .0001, 99, 100, 2); Gun = NuclearOption; } else if (legendaryPull == 70) { GunPulled DynaSpatula = new GunPulled("JelTech", "Melee", "Hydro-Dynamic Spatula with Port and Starboard Attachments and TurboDrive", 9, 27, 91, 3, 2); Gun = DynaSpatula; } Gun.weaponDam *= (Gun.weaponDam * newPlayer.level); return(Gun); }
public static armor PullLegendaryArmor(player newPlayer) { armor Armor = new armor(); Random rand = new Random(); int armorRNG = rand.Next(20); if (armorRNG == 0) { //Chance to reflect bullets, nothing armor PowerArmor = new armor("T51-B Power Armor", "Reflect", 6, 1, 130); Armor = PowerArmor; } else if (armorRNG == 1) { //Critical percent, critical multiplier armor ShadowShroud = new armor("Shadow Shroud", "Critical Boost", 5, 1, 25); Armor = ShadowShroud; } else if (armorRNG == 2) { //RPG Damage, RPG Accuracy armor Astro = new armor("The Astro", "RPG Specialist", 10, 5, 45); Armor = Astro; } else if (armorRNG == 3) { //Pistol damage, pistol accuracy armor Cowboy = new armor("The Cowboy", "Pistol Specialist", 4, 10, 35); Armor = Cowboy; } else if (armorRNG == 4) { //Shotgun damage, shotgun accuracy armor Enforcer = new armor("The Enforcer", "Shotgun Specialist", 6, 4, 30); Armor = Enforcer; } else if (armorRNG == 5) { //Assault Rifle damage, accuracy armor Mercenary = new armor("The Mercenary", "Assault Rifle Specialist", 3, 3, 40); Armor = Mercenary; } else if (armorRNG == 6) { //SMG damage, SMG Accuracy armor Mobster = new armor("The Mobster", "SMG Specialist", 2, 4, 45); Armor = Mobster; } else if (armorRNG == 7) { //Melee Damage, melee accuracy armor Gladiator = new armor("The Gladiator", "Melee Specialist", 8, 3, 55); Armor = Gladiator; } else if (armorRNG == 8) { armor MartianSpaceSuit = new armor("Martian Space Suit", "Laser Specialist", 8, 25, 45); Armor = MartianSpaceSuit; } else if (armorRNG == 9) { armor MirrorGear = new armor("Mirror Gear", "Reflect", 12, 1, 120); Armor = MirrorGear; } else if (armorRNG == 10) { armor MasterSet = new armor("Master Set", "Universal Specialist", 2, 2, 35); Armor = MasterSet; } else if (armorRNG == 11) { armor NovaArmor = new armor("Nova Armor", "Stun", 15, 1, 95); Armor = NovaArmor; } else if (armorRNG == 12) { armor HellArmor = new armor("Hell Armor", "Damage Boost", 3, 1, 125); Armor = HellArmor; } else if (armorRNG == 13) { armor SniperOutfit = new armor("Sniper's Outfit", "Accuracy Boost", 15, 1, 110); Armor = SniperOutfit; } else if (armorRNG == 14) { armor TitanArmor = new armor("Titan Armor", "", 1, 1, 185); Armor = TitanArmor; } return(Armor); }
public static bool combat(enemy Enemy, player newPlayer, int numberOfEnemies) { partyMembers member = new partyMembers(); int drinksUsed = 0; bool enemyAisAlive = true, enemyBisAlive = true, enemyCisAlive = true, enemyDisAlive = true; int[] enemyHPArray = new int[numberOfEnemies]; bool[] enemyIsAlive = new bool[numberOfEnemies]; for (int i = 0; i < numberOfEnemies; i++) { enemyHPArray[i] = GetEnemyStats.GetEnemyHP(Enemy.hp, newPlayer.level); enemyIsAlive[i] = true; } int enemyDam = GetEnemyStats.GetEnemyDam(Enemy.damage, newPlayer.level); int enemyDefense = Enemy.defense; // enemyHP = GetEnemyStats.GetEnemyHP(enemyHP, level); int playerDefense = newPlayer.armorEquipped.defense; int timesFired; Random rand = new Random(); int damageDealt = (int)Math.Round(newPlayer.gunEquip.weaponDam); bool battleOver = false; Console.WriteLine("You are approached by a " + Enemy.name + ". It seems like you aren't getting out of this without a fight!"); Console.WriteLine(newPlayer.health); while (!battleOver) { int bonusDam = 0; int bonusAcc = 0; int bonusCritPercent = 0; int bonusCritMult = 0; int bonusReflect = 0; //checks to see if the player is dead if (newPlayer.currentHP <= 0) { battleOver = true; continue; } bool cancel = false; while (!cancel) { playerDefense = newPlayer.armorEquipped.defense; enemyDefense = Enemy.defense; Console.WriteLine("|===========================|"); Console.WriteLine("| (F)ire (E)quipped |"); Console.WriteLine("| |"); Console.WriteLine("| (D)efend (S)witch |"); Console.WriteLine("| |"); Console.WriteLine("| (H)eal |"); Console.WriteLine("|===========================|"); string action = ""; while (action == "") { action = Console.ReadLine(); } action = action.ToLower(); char actionChar = action[0]; if (actionChar == 'f') { int target = 0; while (true) { //checks to see if the player has any of these armors equipped if (newPlayer.armorEquipped.effect == "RPG Specialist" && newPlayer.gunEquip.weaponType == "RPG") { bonusDam = newPlayer.armorEquipped.bonus1; bonusAcc = newPlayer.armorEquipped.bonus2; } else if (newPlayer.armorEquipped.effect == "Pistol Specialist" && newPlayer.gunEquip.weaponType == "Pistol") { bonusDam = newPlayer.armorEquipped.bonus1; bonusAcc = newPlayer.armorEquipped.bonus2; } else if (newPlayer.armorEquipped.effect == "Shotgun Specialist" && newPlayer.gunEquip.weaponType == "Shotgun") { bonusDam = newPlayer.armorEquipped.bonus1; bonusAcc = newPlayer.armorEquipped.bonus2; } else if (newPlayer.armorEquipped.effect == "SMG Specialist" && newPlayer.gunEquip.weaponType == "SMG") { bonusDam = newPlayer.armorEquipped.bonus1; bonusAcc = newPlayer.armorEquipped.bonus2; } else if (newPlayer.armorEquipped.effect == "Assault Rifle Specialist" && newPlayer.gunEquip.weaponType == "Assault Rifle") { bonusDam = newPlayer.armorEquipped.bonus1; bonusAcc = newPlayer.armorEquipped.bonus2; } else if (newPlayer.armorEquipped.effect == "Melee Specialist" && newPlayer.gunEquip.weaponType == "Melee") { bonusDam = newPlayer.armorEquipped.bonus1; bonusAcc = newPlayer.armorEquipped.bonus2; } else if (newPlayer.armorEquipped.effect == "Laser Specialist" && newPlayer.gunEquip.weaponType == "Laser Ray Series") { bonusDam = newPlayer.armorEquipped.bonus1; bonusAcc = newPlayer.armorEquipped.bonus2; } else if (newPlayer.armorEquipped.effect == "Universal Specialist") { bonusDam = newPlayer.armorEquipped.bonus1; bonusAcc = newPlayer.armorEquipped.bonus2; } else if (newPlayer.armorEquipped.effect == "Critical Boost") { bonusCritPercent = newPlayer.armorEquipped.bonus1; bonusCritMult = newPlayer.armorEquipped.bonus2; } else if (newPlayer.armorEquipped.effect == "Reflect") { bonusReflect = newPlayer.armorEquipped.bonus1; } else if (newPlayer.armorEquipped.effect == "Damage Boost") { bonusDam = newPlayer.armorEquipped.bonus1; } else if (newPlayer.armorEquipped.effect == "Accuracy Boost") { bonusAcc = newPlayer.armorEquipped.bonus1; } //Negative side effects of drinking too much Ultra Smart if (drinksUsed <= 1) { } else if (drinksUsed <= 2) { Console.WriteLine("You start to feel a little shaky. It's probably fine, though."); bonusAcc -= 2; } else if (drinksUsed <= 3) { Console.WriteLine("You are feeling very shaky."); bonusAcc -= 8; } else if (drinksUsed <= 4) { Console.WriteLine("You should stop with the Ultra Smarts, you don't look so good."); bonusAcc -= 20; } else if (drinksUsed <= 5) { Console.WriteLine("You begin to hallucinate. The skies are green and the ocean is... wait, since when has there been an ocean on mars?"); bonusAcc -= 40; } else if (drinksUsed <= 6) { Console.WriteLine("Your skin looks very green, and you see stuff coming out of your mouth as you fall to the ground."); Console.WriteLine("You died."); battleOver = true; continue; } Console.WriteLine("Attack who:"); for (int i = 0; i < numberOfEnemies; i++) { if (enemyIsAlive[i]) { Console.WriteLine(Enemy.name + " " + (char)('A' + i)); } } string whoToAttack = Console.ReadLine(); //These ifs tell the program who to attack/subtract health from if (whoToAttack.ToUpper() == "A") { break; } else if (whoToAttack.ToUpper() == "B" && numberOfEnemies >= 2) { target = 1; break; } else if (whoToAttack.ToUpper() == "C" && numberOfEnemies >= 2) { target = 2; break; } else if (whoToAttack.ToUpper() == "D" && numberOfEnemies >= 2) { target = 3; break; } else { Console.WriteLine("Please enter a valid input."); } } Console.WriteLine("You prepare to start attacking: "); if (newPlayer.gunEquip.weaponFR >= 4) { timesFired = rand.Next(1, (int)Math.Round(newPlayer.gunEquip.weaponFR) + 1); } else if (newPlayer.gunEquip.weaponFR >= 2) { timesFired = rand.Next(1, (int)Math.Round(newPlayer.gunEquip.weaponFR)); } else if (newPlayer.gunEquip.weaponFR >= 1) { timesFired = rand.Next(0, (int)Math.Round(newPlayer.gunEquip.weaponFR) + 2); } else { int chanceToFire = rand.Next(0, 10); if (chanceToFire >= 6) { timesFired = 1; } else { timesFired = 0; } } if (timesFired == 0) { Console.WriteLine("You were too slow, and you missed your turn."); } int total = 0; for (int a = 1; a <= timesFired; a++) { damageDealt = (int)Math.Round(newPlayer.gunEquip.weaponDam); int damageMinusDefense = (int)((double)damageDealt * (100.0 / (100 + enemyDefense))); int accPercent = rand.Next(1, 100); if (accPercent + bonusAcc <= newPlayer.gunEquip.weaponAcc) { int critChance = rand.Next(1, 100); if (critChance <= newPlayer.gunEquip.weaponCritPercent + bonusCritPercent) { damageDealt *= newPlayer.gunEquip.weaponCritMultiplier; Console.WriteLine("Critical Hit! " + damageMinusDefense * newPlayer.gunEquip.weaponCritMultiplier + " damage dealt!"); total += damageMinusDefense * newPlayer.gunEquip.weaponCritMultiplier + bonusCritMult; } else { Console.WriteLine(damageMinusDefense + " damage dealt."); total += damageMinusDefense; } enemyHPArray[target] = GetEnemyStats.CalculateDamageTakenEnemy(damageDealt + bonusDam, enemyDefense, enemyHPArray[target]); } else { Console.WriteLine("You missed!"); } } Console.WriteLine("You dealt a total of " + total + " damage."); Console.WriteLine("The " + Enemy.name + " " + (char)('A' + target) + " has " + enemyHPArray[target] + " left."); if (enemyHPArray[target] <= 0) { if (target == 0) { enemyAisAlive = false; enemyIsAlive[target] = false; } else if (target == 1) { enemyBisAlive = false; enemyIsAlive[target] = false; } else if (target == 2) { enemyCisAlive = false; enemyIsAlive[target] = false; } else if (target == 3) { enemyDisAlive = false; enemyIsAlive[target] = false; } } cancel = true; } else if (actionChar == 'd') { playerDefense *= 2; Console.WriteLine("You defend. You have two times as much defense this turn!"); cancel = true; } else if (actionChar == 'e') { GetWeaponStats.ShowWeaponStats(newPlayer.gunEquip); ArmorStats.ShowArmorStats(newPlayer.armorEquipped); } else if (actionChar == 's') { if (newPlayer.gunEquip.Equals(newPlayer.gunPrimary)) { newPlayer.gunEquip = newPlayer.gunSecondary; Console.WriteLine("You switched over to your secondary weapon."); } else { newPlayer.gunEquip = newPlayer.gunPrimary; Console.WriteLine("You switched over to your primary weapon."); } cancel = true; } else if (actionChar == 'h') { if (newPlayer.ultraSmartDrinks >= 1) { Console.WriteLine("You drink an Ultra Smart drink!\nYou feel great!"); newPlayer.currentHP += newPlayer.health / 2; if (newPlayer.currentHP >= newPlayer.health) { newPlayer.currentHP = newPlayer.health; } Console.WriteLine("You gain " + (int)(newPlayer.health / 2) + " hp and you currently have " + newPlayer.currentHP + " health left!"); newPlayer.ultraSmartDrinks--; drinksUsed++; cancel = true; } else { Console.WriteLine("Out of healing items!"); } } Console.ReadLine(); Console.Clear(); } //restore enemy defense to original value enemyDefense = Enemy.defense; //Checks to see if the enemy is dead if (numberOfEnemies == 1 && !enemyAisAlive) { battleOver = true; Console.WriteLine("The " + Enemy.name + " is defeated."); newPlayer.xp += GetEnemyStats.GetEnemyHP(Enemy.hp, newPlayer.level) * numberOfEnemies; GetPlayerStats.LevelTracker(newPlayer); LootDrops.GetWeapon(newPlayer); LootDrops.GetArmor(newPlayer); continue; } else if (numberOfEnemies == 2 && !enemyAisAlive && !enemyBisAlive) { battleOver = true; Console.WriteLine("The " + Enemy.name + "s are defeated."); newPlayer.xp += GetEnemyStats.GetEnemyHP(Enemy.hp, newPlayer.level) * numberOfEnemies; GetPlayerStats.LevelTracker(newPlayer); LootDrops.GetWeapon(newPlayer); LootDrops.GetArmor(newPlayer); continue; } else if (numberOfEnemies == 3 && !enemyAisAlive && !enemyBisAlive && !enemyCisAlive) { battleOver = true; Console.WriteLine("The " + Enemy.name + "s are defeated."); newPlayer.xp += GetEnemyStats.GetEnemyHP(Enemy.hp, newPlayer.level) * numberOfEnemies; GetPlayerStats.LevelTracker(newPlayer); LootDrops.GetWeapon(newPlayer); LootDrops.GetArmor(newPlayer); continue; } else if (numberOfEnemies == 4 && !enemyAisAlive && !enemyBisAlive && !enemyCisAlive && !enemyDisAlive) { battleOver = true; Console.WriteLine("The " + Enemy.name + "s are defeated."); newPlayer.xp += GetEnemyStats.GetEnemyHP(Enemy.hp, newPlayer.level) * numberOfEnemies; GetPlayerStats.LevelTracker(newPlayer); LootDrops.GetWeapon(newPlayer); LootDrops.GetArmor(newPlayer); continue; } //If stu is in the party he may toss a flash grenade if (member.Stu.inParty) { int chanceToStun = rand.Next(1, 100); if (chanceToStun <= 2) { Console.WriteLine("Stu busted out into prayer and tossed in a holy hand grenade!"); Console.WriteLine("STU: 1... 2... 3!"); Console.ReadLine(); Console.WriteLine("HALLELUJAH!"); Console.WriteLine("Each enemy takes " + (5000 * newPlayer.level) + " damage!"); Console.ReadLine(); for (int i = 0; i < numberOfEnemies; i++) { enemyHPArray[i] -= 5000 * newPlayer.level; Console.WriteLine("The " + Enemy.name + " " + (char)('A' + i) + " has " + enemyHPArray[i] + " health left."); if (enemyHPArray[i] <= 0) { if (i == 0) { enemyAisAlive = false; enemyIsAlive[i] = false; } else if (i == 1) { enemyBisAlive = false; enemyIsAlive[i] = false; } else if (i == 2) { enemyCisAlive = false; enemyIsAlive[i] = false; } else if (i == 3) { enemyDisAlive = false; enemyIsAlive[i] = false; } } Console.ReadLine(); Console.WriteLine("The holy hand grenade causes the enemy to miss their turn!"); Console.ReadLine(); } Console.ReadLine(); Console.Clear(); continue; } else if (chanceToStun <= 20) { Console.WriteLine("Stu tossed a flash grenade at the opponent, causing them to miss their turn!"); Console.ReadLine(); Console.Clear(); continue; } } //Chance for sai to heal you if he's in the party if (member.Sai.inParty) { int saiRNG = rand.Next(1, 100); if (saiRNG <= 3) { Console.WriteLine("Sai pulls out his medkit and pulls out a hardening spray!"); Console.WriteLine("Sai sprays you down, healing you to full health and massively increasing your defense for this turn!"); newPlayer.currentHP = newPlayer.health; Console.WriteLine("You have " + newPlayer.currentHP + " health!"); } else if (saiRNG <= 15) { Console.WriteLine("Sai pulls out a medkit and quickly sprays down some of your wounds with some MediSpray!"); newPlayer.currentHP += (int)(newPlayer.health / 2); if (newPlayer.currentHP >= newPlayer.health) { newPlayer.currentHP = newPlayer.health; } Console.WriteLine("You gain " + (int)(newPlayer.health / 2) + " hp and you currently have " + newPlayer.currentHP + " health left!"); } Console.ReadLine(); Console.Clear(); } if (newPlayer.armorEquipped.effect == "Stun") { int rng = rand.Next(1, 100); if (rng <= newPlayer.armorEquipped.bonus1) { Console.WriteLine("Your armor shone brightly, stunning all enemies.\nThey miss their turn."); Console.ReadLine(); Console.Clear(); continue; } } for (int i = 0; i < numberOfEnemies; i++) { if (enemyIsAlive[i]) { int enemyAction = rand.Next(1, 100); Console.WriteLine("The " + Enemy.name + " " + (char)('A' + i) + " prepares to attack: "); if (enemyAction <= 5) { enemyDefense *= 2; Console.WriteLine("But instead chooses to defend."); Console.WriteLine("The enemy's defense is doubled this turn!"); } else { int enemyAcc = rand.Next(1, 100); int timesFiredEnemy = 0; timesFiredEnemy = rand.Next(0, Enemy.fireRate + 1); if (timesFiredEnemy == 0) { Console.WriteLine("The enemy was too slow, and missed its turn."); } int total = 0; for (int a = 1; a <= timesFiredEnemy; a++) { damageDealt = enemyDam; int enemyDamageMinusDefense = (int)((double)damageDealt * (100.0 / (100 + playerDefense))); int accPercent = rand.Next(1, 100); if (accPercent <= Enemy.acc) { int critChance = rand.Next(1, 100); if (critChance <= Enemy.critPercent) { damageDealt *= Enemy.critMultiplier; Console.WriteLine("Critical Hit! " + (int)(enemyDamageMinusDefense * Enemy.critMultiplier) + " damage was taken!"); total += enemyDamageMinusDefense * Enemy.critMultiplier; } else { Console.WriteLine(enemyDamageMinusDefense + " damage received."); total += enemyDamageMinusDefense; } int chanceToReflect = rand.Next(1, 100); if (newPlayer.armorEquipped.effect == "Reflect" && chanceToReflect <= bonusReflect) { Console.WriteLine("But wait! Your armor reflected the bullet, and the enemy took all the damage!"); enemyHPArray[i] = GetEnemyStats.CalculateDamageTakenEnemy(damageDealt, enemyDefense, enemyHPArray[i]); } else { newPlayer.currentHP = GetPlayerStats.CalculateDamageTakenPlayer(damageDealt, playerDefense, newPlayer.currentHP); } } else { Console.WriteLine("The " + Enemy.name + " missed!"); } } Console.WriteLine("You received a total of " + total + " damage."); Console.WriteLine("You have " + newPlayer.currentHP + " left."); } } Console.ReadLine(); Console.Clear(); } } return(false); }
public static armor GetEffects(player newPlayer, armor newArmor) { Random rand = new Random(); if ((newArmor.defense <= 4 + newPlayer.level && newPlayer.level <= 25) || (newArmor.defense <= newPlayer.level - 10 && (newPlayer.level <= 50 && newPlayer.level > 25)) || (newArmor.defense <= newPlayer.level - 25 && newPlayer.level > 50)) { if (newPlayer.level <= 10) { newArmor.defense = rand.Next(1, 10); } else if (newPlayer.level <= 15) { newArmor.defense = rand.Next(2, 20); } else if (newPlayer.level <= 20) { newArmor.defense = rand.Next(3, 30); } else if (newPlayer.level <= 25) { newArmor.defense = rand.Next(5, 40); } else if (newPlayer.level <= 35) { newArmor.defense = rand.Next(10, 50); } else if (newPlayer.level <= 45) { newArmor.defense = rand.Next(15, 65); } else if (newPlayer.level <= 60) { newArmor.defense = rand.Next(15, 75); } else if (newPlayer.level <= 80) { newArmor.defense = rand.Next(15, 100); } else if (newPlayer.level <= 100) { newArmor.defense = rand.Next(20, 140); } else { newArmor.defense = rand.Next(25, 150); } int rng = rand.Next(0, 3); if (rng == 0) { newArmor.effect = "Reflect"; newArmor.bonus1 = rand.Next(3, 7); newArmor.bonus2 = 1; } else if (rng == 1) { newArmor.effect = "Stun"; newArmor.bonus1 = rand.Next(4, 8); newArmor.bonus2 = 1; } else if (rng == 1) { newArmor.effect = "Damage Boost"; newArmor.bonus1 = rand.Next(1, 2); newArmor.bonus2 = 0; } else if (rng == 2) { newArmor.effect = "Accuracy Boost"; newArmor.bonus1 = rand.Next(3, 6); newArmor.bonus2 = 0; } } else { newArmor.effect = ""; newArmor.bonus1 = 0; newArmor.bonus2 = 0; } return(newArmor); }
public static void chapterOne(player newPlayer) { partyMembers member = new partyMembers(); bool isAlive = true; enemies Enemy = new enemies(); Console.WriteLine("A pale blue dot in a sun beam."); Console.WriteLine("A cold, red planet millions of miles away."); Console.WriteLine("A young boy is looking towards the pale blue dot. He can just barely glimpse it through Mars' nonexistent atmosphere."); Console.WriteLine("Little does it matter. Life is a fickle thing. One second its there, one second its ceases to be."); Console.WriteLine("Same goes for the pale blue dot. As the dot fades into obscurity, tears fall in remembrance of what once was, and what now remains."); Console.WriteLine("Where once was life now remains darkness. Its almost as if nothing ever existed there at all."); Console.WriteLine("Questions linger, as to the meaning of it all."); Console.WriteLine("But the boy will have to find answers for himself."); Console.ReadLine(); Console.WriteLine("16 YEARS LATER..."); Console.ReadLine(); Console.WriteLine("RAHL: Okay. So you're telling me you don't have any money? At all?"); Console.WriteLine("RAHL: What if I told you that if you don't pay up I'll just take it off your corpse?"); Console.WriteLine("STU: I, I mean, i'm not interested in that deal."); Console.WriteLine("STU: Hey, you! What's your name, pal?"); Console.WriteLine("Enter your name: "); newPlayer.name = Console.ReadLine(); Console.WriteLine("STU: " + newPlayer.name + ", huh? Pleased to meet ya, now, could you help me deal with this guy? Here's some weapons for ya."); GunPulled Chub = new GunPulled("MarsWares", "Pistol", "Chub", Math.Pow(7, 2) * newPlayer.level, 9, 70, 20, 2); newPlayer.gunPrimary = Chub; newPlayer.gunEquip = newPlayer.gunPrimary; GunPulled Dagger = new GunPulled("MarsWares", "Melee", "Dagger", Math.Pow(14, 2) * newPlayer.level, 3, 80, 20, 3); newPlayer.gunSecondary = Dagger; isAlive = Combat.combat(Enemy.Rahl, newPlayer, 1); Console.WriteLine("STU: Whew, you saved my hide there."); Console.WriteLine("STU: Hey, what're you doing here anyways?"); Console.ReadLine(); Console.WriteLine("STU: This seems like an odd place for a gunslinger to hang out, you know."); Console.WriteLine("STU: I just came here to have some booze and forget about, you know... whatever."); Console.WriteLine("(1): I'm just passing through."); Console.WriteLine("(2): None of your business."); Console.WriteLine("(3): I'm just wandering aimlessly, to be honest."); Console.WriteLine("(4): If I knew where I was going I wouldn't be caught dead here, I'll tell you that much."); Console.WriteLine("(5): I dunno. Where are we, anyways?"); int choice; int.TryParse(Console.ReadLine(), out choice); switch (choice) { case 1: Console.WriteLine("STU: That's it, huh? Nowhere specific in mind? I'd be keen on getting down to Cratertown, myself.\nSTU: If I had the means, anyway."); break; case 2: Console.WriteLine("STU: Hey, I was just askin'. No need to get worked up."); break; case 3: Console.WriteLine("STU: Nothing wrong with that. Troubled times as of the moment, not surprised you're so effective with a firearm.\nSTU: If'n you got the means, might as well ya head down to Cratertown. Safest place you'll find this side a'Mars."); break; case 4: Console.WriteLine("STU: Ha. Fair, fair. If I were you I'd head straight for Cratertown, leave this dump."); break; case 5: Console.WriteLine("STU: Why this is the Red Sands Bar, dump side of the Red Sands region."); Console.WriteLine("STU: If you were looking for a slum, you just found it here."); break; default: Console.WriteLine("STU: Quiet guy, huh? Why is this damn neighborhood full of weirdos?"); break; } Console.WriteLine("STU: Alright, I'll tell you what. As thanks for saving my hide, I'll escort you to Cratertown. Free of charge."); Console.WriteLine("STU: Also, it'll help get me out of this dump, so there's that."); Console.WriteLine("STU: You'll let me tag along, right?"); Console.WriteLine("Yes or No?"); string stringInput = Console.ReadLine(); if (stringInput.ToLower() == "yes") { Console.WriteLine("STU: Excellent. Let's get the hell out of here."); } else { Console.WriteLine("STU: I insist, you can't just leave me here! No, no, I'm coming with you."); } Console.ReadLine(); Console.WriteLine("Stu has joined your party!"); Console.ReadLine(); Console.WriteLine("You have gained a party member! Some party members will do different things for you during combat."); Console.WriteLine("Stu will sometimes stun the enemies with a handmade flash grenade, forcing them to skip their turn."); Console.WriteLine("Sometimes a party member's ability won't be so obvious, so you'll have to keep an eye out."); Console.ReadLine(); Console.WriteLine("With Stu's guidance, you head out of the dank bar and into the streets of Red Sands grotto."); Console.WriteLine("The buildings are all run down and decrepit. A huge glass dome surrounds you."); Console.ReadLine(); Console.WriteLine("STU: If we just head north, we can go towards the north gate and into the Green Dome\nFrom there if we continue west we'll find the Cratertown gate."); Console.WriteLine("You head north, up the streets. You pass several shady looking people sitting by oil fires."); Console.ReadLine(); Console.WriteLine("STU: Watch out through here. Some people will just up and kill ya if they think you've got anything that can pay for dinner."); Console.WriteLine("STU: Ah, here come some dumpfolk. Great, just what we needed right now."); Console.ReadLine(); Console.WriteLine("THUG: Hey you, give us yer valuables or else... I, I'll pierce ya through meself!"); Console.ReadLine(); isAlive = Combat.combat(Enemy.Thug, newPlayer, 2); Console.WriteLine("STU: Damn, you're not bad. Two people at once? I'm glad you're on my side, pal."); Console.WriteLine("(1): I'm not bad."); Console.WriteLine("(2): Why are you even here? I hope you aren't planning on being a freeloader."); Console.WriteLine("(3): Thanks, glad to have you here, Stu."); Console.WriteLine("(4): I've noticed your flash grenades, where'd you get them from?"); int.TryParse(Console.ReadLine(), out choice); switch (choice) { case 1: Console.WriteLine("STU: Not bad? I guess that's one way to put it.\nSTU: You're a real killer, " + newPlayer.name + ". I'd better not tick you off."); break; case 2: Console.WriteLine("STU: I already told you, I'm trying to get out of the Red Sands region. It's god awful there."); break; case 3: Console.WriteLine("STU: Thanks, " + newPlayer.name + ".\nSTU: Hopefully we can get into the Cratertown Dome with no hassle, I'd sooner sleep in a beef beast nest than Red Sands bar. I'd probably be safer."); break; case 4: Console.WriteLine("STU: I handcraft them. I was once an explosives engineer, but... things have changed.\nSTU: I've been working on something special also. I might try it out sometime, but uh... I don't have many, so I'll likely hold off."); break; default: Console.WriteLine("STU: Nothing to say? Is that modesty, or..? Well, you do you I suppose."); break; } Console.WriteLine("STU: Well, let's just keep moving. We need to keep north for now."); Console.WriteLine("STU: We'll be walking for probably another hour or so. Then we'll reach the Green Dome gate."); Console.ReadLine(); Console.WriteLine("You walk along the road, leaving Red Sands grotto behind you."); Console.WriteLine("You are now on open highway, your left and right both containing vast expanses of red sand."); Console.WriteLine("Ahead of you on your right is a rover station, with a bill board posted outside of it."); Console.WriteLine("The billboard reads \"Don't just drink smart... Drink Ultra Smart! Your Ultra source of nutrients and bullet mending technology!\""); Console.ReadLine(); Console.WriteLine("STU: Shockingly, that stuff actually works. I don't know how many years its taken off my life at this point, but at least its kept me from bein' dead more times than I can count."); Console.WriteLine("STU: Let's check this rover station. Maybe he's got some deals for us in there."); Console.ReadLine(); Console.WriteLine("You walk into the rover station, whose slogan reads \"Where rovers refill for a voyage beyond the stars!\""); Console.WriteLine("You walk into the station building itself, a small building with some windows. It's lined with shelves of general purpose stuff, like sugar drinks and booze."); Console.WriteLine("The man behind the cash register looks up at you, seemingly surprised at having anyone enter his shop."); Console.ReadLine(); Console.WriteLine("MAN: Why hello, isn't it a beautiful day today under these martian skies? A wonderful day for some Ultra Smart, for certain!"); Console.WriteLine("STU: Don't you think you're laying it on a bit thick? We're heading to the Green Dome, and were looking to pick up some supplies."); Console.ReadLine(); Console.WriteLine("MAN: Thick?! Whatever could you... oh screw it. Ultra Corp is really pressuring me to sell this stuff, alright? If I don't sell enough of it, they're putting me out of business!"); Console.WriteLine("MAN: Could you just buy some of this stuff? Please? In fact, they're just pressuring me to get it off the shelves, so I'll sell a bunch of it to you for dirt cheap. Just take some, please?"); Console.ReadLine(); Console.WriteLine("STU: Uh, ok. I'll take however many you want to sell me."); Console.WriteLine("STU: Oh, and, " + newPlayer.name + ", don't worry about it. These are on me."); Console.ReadLine(); Console.WriteLine("MAN: Oh, thank you so much. If I don't sell enough of these this month I'll be put out of damn business."); Console.WriteLine("You have received 8 Ultra Smart drinks."); newPlayer.ultraSmartDrinks += 8; Console.WriteLine("You now have some Ultra Smart drinks!\nDon't think too hard about what negative consequences this might have on your body,"); Console.WriteLine("rather you should be thinking about how alive you'll be when you use it! - sponsored by Ultra Corp TM"); Console.WriteLine("Use this in battle by using the 'h' option, and you'll be healed for half of your max hp."); Console.ReadLine(); Console.WriteLine("STU: Here ya go, pal. These should help out in a pinch."); Console.WriteLine("MAN: Uh, so I wouldn't recommend you drink too many of those at once. You, know, its, uh, it wouldn't be good for you. Lot of sugar, right? Haha, ha."); Console.ReadLine(); Console.WriteLine("STU: Thanks for the advice? We'll take our leave now, thanks."); Console.WriteLine("You head out of the rover station, and back under the huge Red Sands dome. Some people are walking down the road, armed with rocket launchers."); Console.ReadLine(); Console.WriteLine("STU: Uh, let's go hide inside for now."); Console.WriteLine("As you head back towards the station, you notice that the man has locked the door and is nowhere to be seen."); Console.ReadLine(); Console.WriteLine("STU: Well, this isn't how I planned today to go. Three gunfights in one day? What a miraculous turn of events."); Console.WriteLine("STU: Look, maybe we can avoid a fight. These guys are raiders, they roam the open areas in the domes and kill anyone who might have anything of value to them."); Console.WriteLine("STU: Just don't make eye contact."); Console.ReadLine(); Console.WriteLine("The raiders notice you, however. They walk straight up to you, rpg's out."); Console.WriteLine("RAIDER: Isn't it your lucky day? I'll take everything you've got. Also, make it quick. I've gotta go take a leak."); Console.ReadLine(); Console.WriteLine("STU: We don't have nuthin', I'm sorry to say."); Console.ReadLine(); Console.WriteLine("RAIDER: Is that right? These fellas sound like they're putting up a fight, would you agree Sai?"); Console.WriteLine("SAI: Hmph."); Console.WriteLine("STU: So much for not having to fight..."); Console.ReadLine(); isAlive = Combat.combat(Enemy.raiderRPG, newPlayer, 2); Console.WriteLine("STU: Huh, guys had a lot of gusto for being such weaklings. And you, Sai was it?"); Console.WriteLine("STU: You weren't fighting with them. Who are you?"); Console.ReadLine(); Console.WriteLine("SAI: Please don't kill me. They dragged me along with them because I'm a medic. Otherwise, they would have killed me by now."); Console.WriteLine("SAI: Look, if you don't kill me I can join you. I'll provide medic capabilities in combat."); Console.ReadLine(); Console.WriteLine("STU: Well, " + newPlayer.name + ", I think we should give him a chance. What say you?"); Console.WriteLine("Yes or No?"); string option = Console.ReadLine(); if (option.ToLower() == "yes") { Console.WriteLine("STU: I agree. Alright Sai, you're coming with us."); } else { Console.WriteLine("STU: Don't you think that's a bit harsh?\nSTU: This isn't a democracy, I'm just gonna pretend you said yes. No need to be a jerk."); } Console.ReadLine(); Console.WriteLine("Sai has joined your party!"); member.Sai.inParty = true; Console.ReadLine(); Console.WriteLine("SAI: Alright, thanks for having me. I swear I'll make this up to you, I might even save your life at some point!"); Console.WriteLine("STU: We're going to Cratertown. Heard only nice things about it."); Console.ReadLine(); Console.WriteLine("SAI: I used to live there at one point. It's actually patrolled by the Mars Police Force, so its not quite as lawless as Red Sands."); Console.WriteLine("STU: That sounds like what I've 'erd. We're almost to Green Dome gate now, so let's hit the road."); Console.WriteLine("SAI: Got it. Let's go, then."); Console.ReadLine(); Console.WriteLine("END OF CHAPTER 1"); Console.ReadLine(); Console.Clear(); }
public static void GetWeapon(player newPlayer) { Random rand = new Random(); //initializes the struct to be returned, Gun GunPulled Gun = new GunPulled(); int rng = rand.Next(100); if (rng > 93) { Gun = LegendaryDrops.PullLegendaryGuns(newPlayer); Console.Write("LEGENDARY " + Gun.weaponName + " "); } else { //Calls each method to get all the factors of the gun struct Gun.weaponType = TypeMethod.PullType(); Gun.weaponBrand = BrandMethod.PullBrand(); Gun.weaponDam = DamCalc.PullDam(Gun.weaponType, Gun.weaponBrand, newPlayer.level); Gun.weaponAcc = AccCalc.PullAcc(Gun.weaponType, Gun.weaponBrand); Gun.weaponFR = FireRateCalc.PullFR(Gun.weaponType, Gun.weaponBrand); Gun.weaponName = ""; Gun.weaponCritPercent = 5; Gun.weaponCritMultiplier = 2; } Console.WriteLine("Damage: " + Gun.weaponDam + " Acc: " + Gun.weaponAcc + " FR: " + Gun.weaponFR + " " + Gun.weaponBrand + " " + Gun.weaponType); bool choicePicked = false; while (!choicePicked) { Console.WriteLine("Would you like to equip this to (p)rimary, (s)econdary, or (t)rash it?"); string gunChoice = Console.ReadLine(); string clarificationVariable; if (gunChoice.ToLower() == "p") { GetWeaponStats.ShowWeaponStats(newPlayer.gunPrimary); Console.WriteLine("Are you sure about this?"); clarificationVariable = Console.ReadLine(); if (clarificationVariable.ToLower() == "yes") { newPlayer.gunPrimary = Gun; newPlayer.gunEquip = Gun; Console.WriteLine("The " + Gun.weaponName + " " + Gun.weaponType + " was equipped in your primary holster."); choicePicked = true; } } else if (gunChoice.ToLower() == "s") { GetWeaponStats.ShowWeaponStats(newPlayer.gunSecondary); Console.WriteLine("Are you sure about this?"); clarificationVariable = Console.ReadLine(); if (clarificationVariable.ToLower() == "yes") { newPlayer.gunSecondary = Gun; newPlayer.gunEquip = Gun; Console.WriteLine("The " + Gun.weaponName + " " + Gun.weaponType + " was equipped in your secondary holster."); choicePicked = true; } } else if (gunChoice.ToLower() == "t") { Console.WriteLine("You threw away the weapon."); choicePicked = true; } } Console.ReadLine(); Console.Clear(); }