Esempio n. 1
0
        //
        // GET: /Game/ArmorSeed
        public ActionResult ArmorSeed(int id)
        {
            Character character = db.Characters.Find(id);

            Armor armor = new Armor();
            Modifier mod = new Modifier();
            ArmorResistance res = new ArmorResistance();
            armor.Name = "Leather Armor";
            armor.Description = "A shirt made of leather and padded for extra protection.";
            armor.Value = 700;
            armor.Weight = 8;
            armor.SlotType = ArmorSlot.Body;
            mod = new Modifier();
            mod.ArmorClass = 15;
            //Normal
            res = new ArmorResistance();
            res.Threshold = 2;
            res.Resistance = 25;
            res.ResistanceType = ResistType.Normal;
            mod.ArmorResists.Add(res);
            //Laser
            res = new ArmorResistance();
            res.Threshold = 0;
            res.Resistance = 20;
            res.ResistanceType = ResistType.Laser;
            mod.ArmorResists.Add(res);
            //Fire
            res = new ArmorResistance();
            res.Threshold = 0;
            res.Resistance = 20;
            res.ResistanceType = ResistType.Fire;
            mod.ArmorResists.Add(res);
            //Plasma
            res = new ArmorResistance();
            res.Threshold = 0;
            res.Resistance = 10;
            res.ResistanceType = ResistType.Plasma;
            mod.ArmorResists.Add(res);
            //Explosion
            res = new ArmorResistance();
            res.Threshold = 0;
            res.Resistance = 20;
            res.ResistanceType = ResistType.Explosion;
            mod.ArmorResists.Add(res);
            armor.Mod = mod;
            character.Gear.Add(armor);

            armor = new Armor();
            mod = new Modifier();
            res = new ArmorResistance();
            armor.Name = "Football Padding";
            armor.Description = "Football Padding";
            armor.Value = 1000;
            armor.Weight = 15;
            armor.SlotType = ArmorSlot.Body;
            mod = new Modifier();
            mod.ArmorClass = 15;
            //Normal
            res = new ArmorResistance();
            res.Threshold = 2;
            res.Resistance = 25;
            res.ResistanceType = ResistType.Normal;
            mod.ArmorResists.Add(res);
            //Laser
            res = new ArmorResistance();
            res.Threshold = 1;
            res.Resistance = 25;
            res.ResistanceType = ResistType.Laser;
            mod.ArmorResists.Add(res);
            //Fire
            res = new ArmorResistance();
            res.Threshold = 2;
            res.Resistance = 25;
            res.ResistanceType = ResistType.Fire;
            mod.ArmorResists.Add(res);
            //Plasma
            res = new ArmorResistance();
            res.Threshold = 5;
            res.Resistance = 25;
            res.ResistanceType = ResistType.Plasma;
            mod.ArmorResists.Add(res);
            //Explosion
            res = new ArmorResistance();
            res.Threshold = 5;
            res.Resistance = 20;
            res.ResistanceType = ResistType.Explosion;
            mod.ArmorResists.Add(res);
            armor.Mod = mod;
            character.Gear.Add(armor);

            //armor = new Armor();
            //armor.Name = "Metal Armor";
            //armor.Description = "A jacket of armor made from pieces of scrap metal welded together.";
            //armor.Value = 1100;
            //armor.Weight = 35;
            //armor.SlotType = ArmorSlot.Body;
            //mod = new Modifier();
            //mod.ArmorClass = 10;
            //mod.ResistNormal.Resistance = 30;
            //mod.ResistNormal.Threshold = 4;
            //mod.ResistLaser.Resistance = 75;
            //mod.ResistLaser.Threshold = 6;
            //mod.ResistFire.Resistance = 10;
            //mod.ResistFire.Threshold = 4;
            //mod.ResistPlasma.Resistance = 20;
            //mod.ResistPlasma.Threshold = 4;
            //mod.ResistExplosion.Resistance = 25;
            //mod.ResistExplosion.Threshold = 4;
            //armor.Mod = mod;
            //SkillModifier skillmod = new SkillModifier();
            //skillmod.Skill = "Sneak";
            //skillmod.Value = -25;
            //mod.Skill.Add(skillmod);

            //character.Gear.Add(armor);

            //armor = new Armor();
            //armor.Name = "Leather Cap";
            //armor.Description = "A simple cap, made from tanned Brahmin hide.";
            //armor.Value = 90;
            //armor.Weight = 0;
            //armor.SlotType = ArmorSlot.Head;
            //mod = new Modifier();
            //mod.ArmorClass = 3;
            //mod.ResistNormal.Resistance = 0;
            //mod.ResistNormal.Threshold = 0;
            //mod.ResistLaser.Resistance = 0;
            //mod.ResistLaser.Threshold = 0;
            //mod.ResistFire.Resistance = 0;
            //mod.ResistFire.Threshold = 0;
            //mod.ResistPlasma.Resistance = 0;
            //mod.ResistPlasma.Threshold = 0;
            //mod.ResistExplosion.Resistance = 0;
            //mod.ResistExplosion.Threshold = 0;
            //armor.Mod = mod;
            //character.Gear.Add(armor);

            //armor = new Armor();
            //armor.Name = "Combat Helmet";
            //armor.Description = "Part of a suit of combat armor, this helmet is made of Kevlar and reinforced plastics.";
            //armor.Value = 500;
            //armor.Weight = 0;
            //armor.SlotType = ArmorSlot.Head;
            //mod = new Modifier();
            //mod.ArmorClass = 9;
            //mod.ResistNormal.Resistance = 0;
            //mod.ResistNormal.Threshold = 0;
            //mod.ResistLaser.Resistance = 0;
            //mod.ResistLaser.Threshold = 0;
            //mod.ResistFire.Resistance = 0;
            //mod.ResistFire.Threshold = 0;
            //mod.ResistPlasma.Resistance = 0;
            //mod.ResistPlasma.Threshold = 0;
            //mod.ResistExplosion.Resistance = 0;
            //mod.ResistExplosion.Threshold = 0;
            //armor.Mod = mod;
            //character.Gear.Add(armor);

            //armor = new Armor();
            //armor.Name = "No Helmet";
            //armor.Description = "May your hair keep you warm";
            //armor.Value = 0;
            //armor.Weight = 0;
            //armor.SlotType = ArmorSlot.Head;
            //mod = new Modifier();
            //mod.ArmorClass = 0;
            //mod.ResistNormal.Resistance = 0;
            //mod.ResistNormal.Threshold = 0;
            //mod.ResistLaser.Resistance = 0;
            //mod.ResistLaser.Threshold = 0;
            //mod.ResistFire.Resistance = 0;
            //mod.ResistFire.Threshold = 0;
            //mod.ResistPlasma.Resistance = 0;
            //mod.ResistPlasma.Threshold = 0;
            //mod.ResistExplosion.Resistance = 0;
            //mod.ResistExplosion.Threshold = 0;
            //armor.Mod = mod;
            //character.Gear.Add(armor);

            //armor = new Armor();
            //armor.Name = "No Armor";
            //armor.Description = "Those are some snazzy clothes you have on.";
            //armor.Value = 0;
            //armor.Weight = 0;
            //armor.SlotType = ArmorSlot.Body;
            //mod = new Modifier();
            //mod.ArmorClass = 0;
            //mod.ResistNormal.Resistance = 0;
            //mod.ResistNormal.Threshold = 0;
            //mod.ResistLaser.Resistance = 0;
            //mod.ResistLaser.Threshold = 0;
            //mod.ResistFire.Resistance = 0;
            //mod.ResistFire.Threshold = 0;
            //mod.ResistPlasma.Resistance = 0;
            //mod.ResistPlasma.Threshold = 0;
            //mod.ResistExplosion.Resistance = 0;
            //mod.ResistExplosion.Threshold = 0;
            //armor.Mod = mod;
            //character.Gear.Add(armor);
            //armor = new Armor();
            //armor.Name = "Robe";
            //armor.Description = "Those are some snazzy clothes you have on.";
            //armor.Value = 1;
            //armor.Weight = 2;
            //armor.SlotType = ArmorSlot.Body;
            //mod = new Modifier();
            //mod.ArmorClass = 5;
            //mod.ResistNormal.Resistance = 20;
            //mod.ResistNormal.Threshold = 0;
            //mod.ResistLaser.Resistance = 25;
            //mod.ResistLaser.Threshold = 0;
            //mod.ResistFire.Resistance = 10;
            //mod.ResistFire.Threshold = 0;
            //mod.ResistPlasma.Resistance = 10;
            //mod.ResistPlasma.Threshold = 0;
            //mod.ResistExplosion.Resistance = 10;
            //mod.ResistExplosion.Threshold = 0;
            //armor.Mod = mod;
            //character.Gear.Add(armor);
            db.SaveChanges();
            return RedirectToAction("Character", new { id = id });
        }
Esempio n. 2
0
        public ActionResult CyberneticSeed(int id)
        {
            Cybernetics cyber = new Cybernetics();
            Modifier mod = new Modifier();
            mod.ResistRadiation = 80;
            mod.Intelligence = 2;
            mod.ResistGasDR = 70;
            mod.Strength = 1;
            mod.Endurance = 1;
            mod.Agility = -1;
            mod.ArmorClass = 5;
            ArmorResistance res = new ArmorResistance();
            //Normal
            res = new ArmorResistance();
            res.Threshold = 3;
            res.Resistance = 20;
            res.ResistanceType = ResistType.Normal;
            mod.ArmorResists.Add(res);
            //Laser
            res = new ArmorResistance();
            res.Threshold = 1;
            res.Resistance = 10;
            res.ResistanceType = ResistType.Laser;
            mod.ArmorResists.Add(res);
            //Fire
            res = new ArmorResistance();
            res.Threshold = 1;
            res.Resistance = 10;
            res.ResistanceType = ResistType.Fire;
            mod.ArmorResists.Add(res);
            //Plasma
            res = new ArmorResistance();
            res.Threshold = 0;
            res.Resistance = 5;
            res.ResistanceType = ResistType.Plasma;
            mod.ArmorResists.Add(res);
            //Explosion
            res = new ArmorResistance();
            res.Threshold = 5;
            res.Resistance = 25;
            res.ResistanceType = ResistType.Explosion;
            mod.ArmorResists.Add(res);

            SkillModifier skill = new SkillModifier();
            skill.Skill = "Small Guns";
            skill.Value = 10;
            mod.Skill.Add(skill);
            skill = new SkillModifier();
            skill.Skill = "Big Guns";
            skill.Value = 10;
            mod.Skill.Add(skill);
            skill = new SkillModifier();
            skill.Skill = "Energy Weapons";
            skill.Value = 10;
            mod.Skill.Add(skill);
            skill = new SkillModifier();
            skill.Skill = "Throwing";
            skill.Value = 10;
            mod.Skill.Add(skill);
            cyber.StaticMods = mod;
            Character character = db.Characters.Find(id);
            character.Cybernetics = cyber;
            db.SaveChanges();

            return RedirectToAction("Character", new { id = id });
        }