Exemple #1
0
        public ActionResult TraitSeed(int id)
        {
            Trait trait = new Trait();
            trait.Name = "Good Mannered";
            trait.Description = "Good at medicy-talky, bad at shooty stabby";
            trait.Mod = new Modifier();
            SkillModifier smallguns = new SkillModifier();
            smallguns.Skill = "Small Guns";
            smallguns.Value = -10;
            trait.Mod.Skill.Add(smallguns);
            SkillModifier bigguns = new SkillModifier();
            bigguns.Skill = "Big Guns";
            bigguns.Value = -10;
            trait.Mod.Skill.Add(bigguns);
            SkillModifier energy = new SkillModifier();
            energy.Skill = "Energy Weapons";
            energy.Value = -10;
            trait.Mod.Skill.Add(energy);
            SkillModifier unarmed = new SkillModifier();
            unarmed.Skill = "Unarmed";
            unarmed.Value = -10;
            trait.Mod.Skill.Add(unarmed);
            SkillModifier melee = new SkillModifier();
            melee.Skill = "Melee";
            melee.Value = -10;
            trait.Mod.Skill.Add(melee);
            SkillModifier firstaid = new SkillModifier();
            firstaid.Skill = "First Aid";
            firstaid.Value = 20;
            trait.Mod.Skill.Add(firstaid);
            SkillModifier doctor = new SkillModifier();
            doctor.Skill = "Doctor";
            doctor.Value = 20;
            trait.Mod.Skill.Add(doctor);
            SkillModifier speech = new SkillModifier();
            speech.Skill = "Speech";
            speech.Value = 20;
            trait.Mod.Skill.Add(speech);
            SkillModifier barter = new SkillModifier();
            barter.Skill = "Barter";
            barter.Value = 20;
            trait.Mod.Skill.Add(barter);

            Character character = db.Characters.Find(id);
            character.Traits = new List<Trait>();
            character.Traits.Add(trait);
            db.SaveChanges();

            return RedirectToAction("Character", new { id = id });
        }
Exemple #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 });
        }