public PlayerCharacter(string name, string alignment, List <PlayerClass> classes, PlayerRace race, string deity, string homeland, string size,
                               string gender, int age, int[] height, int weight, string hairColor, string eyeColor, int healthMaximum, int healthCurrent, int carryLimit,
                               Dictionary <string, int> currency, Dictionary <string, int> stats, Dictionary <string, int> saves, Dictionary <string, int> defenses, Dictionary <string, int> skills,
                               Dictionary <string, Equipment> equipped, Dictionary <int, int> spellsKnown, Dictionary <int, int> spellsAvailable, List <Spell> spellbook, List <Ability> abilities,
                               List <string> knownLanguages, List <CombatBonus> combatBonuses)
        {
            Name      = name;
            Alignment = alignment;
            Classes   = new List <PlayerClass>(classes);
            Race      = race;
            Deity     = deity;
            Homeland  = homeland;
            Size      = size;
            Gender    = gender;
            Age       = age;
            Height    = height;
            Weight    = weight;
            HairColor = hairColor;
            EyeColor  = eyeColor;

            HealthMaximum = healthMaximum;
            HealthCurrent = healthCurrent;
            CarryLimit    = carryLimit;

            Currency        = new Dictionary <string, int>(currency);
            Stats           = new Dictionary <string, int>(stats);
            Saves           = new Dictionary <string, int>(saves);
            Defenses        = new Dictionary <string, int>(defenses);
            Skills          = new Dictionary <string, int>(skills);
            Equipped        = new Dictionary <string, Equipment>(equipped);
            SpellsKnown     = new Dictionary <int, int>(spellsKnown);
            SpellsAvailable = new Dictionary <int, int>(spellsAvailable);
            Spellbook       = new List <Spell>(spellbook);
            Abilities       = new List <Ability>(abilities);
            KnownLanguages  = new List <string>(knownLanguages);
            CombatBonuses   = new List <CombatBonus>(combatBonuses);
        }
Beispiel #2
0
        public static void PopulateRaces()
        {
            // DWARF RACE
            PlayerRace dwarf = new PlayerRace("coredwarf", "Dwarf");

            dwarf.DefineRaceTraits(SIZE_MEDIUM, 20, true);
            dwarf.SetDescriptions("Dwarves are a short and stocky race, and stand about a foot shorter than most humans, with wide, compact bodies that account for their burly appearance. Male and female dwarves pride themselves on the length of their hair, and men often decorate their beards with a variety of clasps and intricate braids. A clean-shaven male dwarf is a sure sign of madness, or worse—no one familiar with their race trusts a beardless dwarf.",
                                  "The great distances between their mountain citadels account for many of the cultural differences that exist within dwarven society. Despite these schisms, dwarves throughout the world are characterized by their love of stonework, their passion for stone- and metal-based craftsmanship and architecture, and a fierce hatred of giants, orcs, and goblinoids.",
                                  "Dwarves and orcs have long dwelt in proximity, theirs a history of violence as old as both their races. Dwarves generally distrust and shun half-orcs. They find halflings, elves, and gnomes to be too frail, flighty, or 'pretty' to be worthy of proper respect. It is with humans that dwarves share the strongest link, for humans' industrious nature and hearty appetites come closest to matching those of the dwarven ideal.",
                                  "Dwarves are driven by honor and tradition, and while they are often satirized as standoffish, they have a strong sense of friendship and justice, and those who win their trust understand that, while they work hard, they play even harder—especially when good ale is involved. Most dwarves are lawful good.",
                                  "Although dwarven adventurers are rare compared to humans, they can be found in most regions of the world. Dwarves often leave the confines of their redoubts to seek glory for their clans, to find wealth with which to enrich the fortress-homes of their birth, or to reclaim fallen dwarven citadels from racial enemies. Dwarven warfare is often characterized by tunnel fighting and melee combat, and as such most dwarves tend toward classes such as fighters and barbarians.",
                                  "Dwarves are both tough and wise, but a bit gruff (+2 Con, +2 Wis, -2 Cha)\nDwarves are Medium-sized creatures and have no bonuses or penalties due to their size.\nDwarves have a base speed of 20 feet, but their speed is never modified by armor or encumbrance.\nDwarves can see in the dark up to 60 feet.\nDwarves get a +4 dodge bonus to AC against monsters of the Giant subtype.\nDwarves receive a +2 racial bonus to Appraise.\nDwarves receive a +1 bonus on Attack Rolls made against humanoid creatures of the Goblin and Giant subtypes.\nDwarves receive a +2 bonus to saving throws against poisons, spells, and spell-like abilities.\nDwarves receive a +4 bonus to their Combat Maneuver Defense when resisting bull rush or trip.\nDwarves receive a +2 bonus to Perception against unusual stonework passively.\nDwarves are proficient with battleaxes, heavy picks, warhammers, and treat any weapon with 'dwarven' in its name as a Martial-class weapon.\nDwarves being play speaking Common and Dwarven. Dwarves with higher intelligence can choose from the following additional languages: Giant, Gnome, Goblin, Terran, and Undercommon.");
            dwarf.AddStatModifier(CON, 2);
            dwarf.AddStatModifier(WIS, 2);
            dwarf.AddStatModifier(CHA, -2);
            dwarf.AddSkillBonus(SKILL_APPRAISE, 2);
            dwarf.AddSkillBonus(SKILL_PERCEPTION, 2);
            dwarf.AddSensesModifier(SENSE_DARKVISION, 60);
            dwarf.AddAvailableLanguage(LANG_COMMON);
            dwarf.AddAvailableLanguage(LANG_DWARF);
            dwarf.AddAvailableLanguage(LANG_GIANT);
            dwarf.AddAvailableLanguage(LANG_GNOME);
            dwarf.AddAvailableLanguage(LANG_GOBLIN);
            dwarf.AddAvailableLanguage(LANG_ORC);
            dwarf.AddAvailableLanguage(LANG_TERRAN);
            dwarf.AddAvailableLanguage(LANG_UNDERCOMMON);
            dwarf.AddKnownLanguage(LANG_COMMON);
            dwarf.AddKnownLanguage(LANG_DWARF);
            dwarf.AddUsableEquipment("battleaxe");
            dwarf.AddUsableEquipment("heavypick");
            dwarf.AddUsableEquipment("warhammer");
            dwarf.AddCombatBonus(new CMDBonus(ATTACK_BULLRUSH, 4));
            dwarf.AddCombatBonus(new CMDBonus(ATTACK_TRIP, 4));

            AttackBonus dwarfvsgiantbonus = new AttackBonus(ATTACK_REGULAR, 1);

            dwarfvsgiantbonus.AddCreatureSubtype(CREATURESUBTYPE_GIANT);
            dwarfvsgiantbonus.AddCreatureSubtype(CREATURESUBTYPE_GOBLINOID);
            dwarf.AddCombatBonus(dwarfvsgiantbonus);

            DefenseBonus dwarfdefensebonus1 = new DefenseBonus(ATTACK_REGULAR, 4);

            dwarfdefensebonus1.AddCreatureSubtype(CREATURESUBTYPE_GIANT);
            dwarf.AddCombatBonus(dwarfdefensebonus1);

            // ELF RACE
            PlayerRace elf = new PlayerRace("coreelf", "Elf");

            elf.DefineRaceTraits(SIZE_MEDIUM, 30, false);
            elf.SetDescriptions("Although generally taller than humans, elves possess a graceful, fragile physique that is accentuated by their long, pointed ears. Their eyes are wide and almond-shaped, and filled with large, vibrantly colored pupils. While elven clothing often plays off the beauty of the natural world, those elves that live in cities tend to bedeck themselves in the latest fashion.",
                                "Many elves feel a bond with nature and strive to live in harmony with the natural world. Most, however, find manipulating earth and stone to be distasteful, and prefer instead to indulge in the finer arts, with their inborn patience making them particularly suited to wizardry.",
                                "Elves are prone to dismissing other races, writing them off as rash and impulsive, yet they are excellent judges of character. An elf might not want a dwarf neighbor, but would be the first to acknowledge that dwarf's skill at smithing. They regard gnomes as strange (and sometimes dangerous) curiosities, and halflings with a measure of pity, for these small folk seem to the elves to be adrift, without a traditional home. Elves are fascinated with humans, as evidenced by the number of half-elves in the world, even if they usually disown such offspring. They regard half-orcs with distrust and suspicion.",
                                "Elves are emotional and capricious, yet value kindness and beauty. Most elves are chaotic good.",
                                "Many elves embark on adventures out of a desire to explore the world, leaving their secluded forest realms to reclaim forgotten elven magic or search out lost kingdoms established millennia ago by their forefathers. For those raised among humans, the ephemeral and unfettered life of an adventurer holds natural appeal. Elves generally eschew melee because of their frailty, preferring instead to pursue classes such as wizards and rangers.",
                                "TRAIT DESCRIPTIONS");
            elf.AddStatModifier(DEX, 2);
            elf.AddStatModifier(INT, 2);
            elf.AddStatModifier(CON, -2);
            elf.AddSensesModifier(SENSE_DIMVISION, 60);
            elf.AddSkillBonus(SKILL_PERCEPTION, 2);
            elf.AddSkillBonus(SKILL_SPELLCRAFT, 2);
            elf.AddKnownLanguage(LANG_COMMON);
            elf.AddKnownLanguage(LANG_ELF);
            elf.AddAvailableLanguage(LANG_CELESTIAL);
            elf.AddAvailableLanguage(LANG_DRAGON);
            elf.AddAvailableLanguage(LANG_GNOLL);
            elf.AddAvailableLanguage(LANG_GNOME);
            elf.AddAvailableLanguage(LANG_GOBLIN);
            elf.AddAvailableLanguage(LANG_ORC);
            elf.AddAvailableLanguage(LANG_SYLVAN);
            elf.AddUsableEquipment("longbow");
            elf.AddUsableEquipment("complongbow");
            elf.AddUsableEquipment("longsword");
            elf.AddUsableEquipment("rapier");
            elf.AddUsableEquipment("shortbow");
            elf.AddUsableEquipment("compshortbow");

            PlayerRace gnome = new PlayerRace("coregnome", "Gnome");


            // Add Races
            Races.Add(dwarf);
            Races.Add(elf);
            Races.Add(gnome);
        }