示例#1
0
        public Race()
        {
            Name        = "";
            Key         = "";
            Description = "empty";

            StartingAttributes = new List <GameValue>();
            SkillProficiencies = new List <SkillProficiency>();
            Resistances        = new List <ResistanceData>();

            Traits = new List <AbilityUnlock>();
            Powers = new List <AbilityUnlock>();
            Spells = new List <AbilityUnlock>();

            ExpModifier = 1.0f;
            BaseSpeed   = 10;

            Upkeep         = new UpkeepData();
            StartingWealth = new GameValue();
            scale          = Vector3.one;

            maleDefaultHair    = "";
            maleDefaultBeard   = "";
            femaleDefaultHair  = "";
            femaleDefaultBeard = "";
        }
示例#2
0
        public Profession(string name, string key, string description, int hire_cost, UpkeepData upkeep, GameValue wealth)
        {
            Name        = name;
            Key         = key;
            Description = description;

            HealthPerLevel  = new GameValue();
            StaminaPerLevel = new GameValue();
            EssencePerLevel = new GameValue();

            MinimumAttributes = new List <int>();

            int index = 0;

            for (int i = 0; i < (int)BaseAttribute.Number; i++)
            {
                MinimumAttributes.Add(0);
                index++;
            }

            AttributePriorities = new List <BaseAttribute>();

            SkillProficiencies = new List <SkillProficiency>();

            StartingItems = new List <ItemShort>();

            Traits = new List <AbilityUnlock>();
            Powers = new List <AbilityUnlock>();
            Spells = new List <AbilityUnlock>();

            BaseHireCost   = hire_cost;
            Upkeep         = new UpkeepData(upkeep);
            StartingWealth = new GameValue(wealth);
        }
示例#3
0
 public UpkeepData(UpkeepData data)
 {
     Coin      = data.Coin;
     Rations   = data.Rations;
     Materials = data.Materials;
     Essence   = data.Essence;
 }
示例#4
0
        public PcData()
        {
            wealth        = 0;
            upkeep        = new UpkeepData();
            name          = new FantasyName();
            gender        = Gender.None;
            background    = null;
            status        = PcStatus.Idle;
            faction       = Faction.Player;
            raceKey       = "";
            professionKey = "";
            description   = "";

            listIndex      = -1;
            partyIndex     = -1;
            hair           = "Hair 01";
            beard          = "";
            maxAccessories = 1;

            level      = 0;
            experience = 0;
            expToLevel = 0;
            maxExp     = 0;
            expBonus   = 0;

            attributes = new AttributeManager();

            for (int i = 0; i < (int)BaseAttribute.Number; i++)
            {
                attributes.AddAttribute(AttributeListType.Base, new Attribute(AttributeType.Base, i, 1));
            }

            for (int i = 0; i < (int)DerivedAttribute.Number; i++)
            {
                attributes.AddAttribute(AttributeListType.Derived, new Attribute(AttributeType.Derived, i, 0));
            }

            for (int i = 0; i < (int)DamageType.Number; i++)
            {
                attributes.AddAttribute(AttributeListType.Resistance, new Attribute(AttributeType.Resistance, i, 0));
            }

            for (int i = 0; i < (int)Skill.Number; i++)
            {
                attributes.SetSkill(new Attribute(AttributeType.Skill, i, 0));
            }

            abilities = new CharacterAbilities();
            inventory = new CharacterInventory();
        }
示例#5
0
        public PcData(FantasyName name, Gender gender, int level, string raceKey, string professionKey, string hair, string beard, int listIndex, int partyIndex,
                      int power_slots, int spell_slots)
        {
            wealth = 0;
            upkeep = new UpkeepData();

            this.name          = name;
            this.gender        = gender;
            this.raceKey       = raceKey;
            this.professionKey = professionKey;
            this.listIndex     = listIndex;
            this.partyIndex    = partyIndex;

            this.hair  = hair;
            this.beard = beard;

            maxAccessories = Random.Range(1, 4);

            level      = 0;
            experience = 0;
            expToLevel = 0;
            maxExp     = 0;
            expBonus   = 0.0f;

            attributes = new AttributeManager();

            for (int i = 0; i < (int)BaseAttribute.Number; i++)
            {
                attributes.AddAttribute(AttributeListType.Base, new Attribute(AttributeType.Base, i, 1));
            }

            for (int i = 0; i < (int)DerivedAttribute.Number; i++)
            {
                attributes.AddAttribute(AttributeListType.Derived, new Attribute(AttributeType.Derived, i, 0));
            }

            for (int i = 0; i < (int)DamageType.Number; i++)
            {
                attributes.AddAttribute(AttributeListType.Resistance, new Attribute(AttributeType.Resistance, i, 0));
            }

            for (int i = 0; i < (int)Skill.Number; i++)
            {
                attributes.SetSkill(new Attribute(AttributeType.Skill, i, 0));
            }

            abilities = new CharacterAbilities(this, power_slots, spell_slots);
            inventory = new CharacterInventory();
            faction   = Faction.Player;
        }
示例#6
0
        public PcData(PcData pc)
        {
            name   = pc.Name;
            gender = pc.gender;

            wealth        = pc.Wealth;
            upkeep        = new UpkeepData(pc.Upkeep);
            background    = new Background(pc.background);
            raceKey       = pc.raceKey;
            professionKey = pc.professionKey;
            listIndex     = pc.listIndex;
            partyIndex    = pc.PartyIndex;
            hair          = pc.hair;
            beard         = pc.beard;

            description = pc.description;

            level      = pc.Level;
            experience = pc.Experience;
            expToLevel = pc.ExpToLevel;
            maxExp     = pc.MaxExp;
            expBonus   = pc.ExpBonus;

            attributes = new AttributeManager();

            for (int i = 0; i < (int)BaseAttribute.Number; i++)
            {
                attributes.AddAttribute(AttributeListType.Base, new Attribute(pc.attributes.GetAttribute(AttributeListType.Base, i)));
            }

            for (int i = 0; i < (int)DerivedAttribute.Number; i++)
            {
                attributes.AddAttribute(AttributeListType.Derived, new Attribute(pc.attributes.GetAttribute(AttributeListType.Derived, i)));
            }

            for (int i = 0; i < (int)DamageType.Number; i++)
            {
                attributes.AddAttribute(AttributeListType.Resistance, new Attribute(pc.attributes.GetAttribute(AttributeListType.Resistance, i)));
            }

            for (int i = 0; i < (int)Skill.Number; i++)
            {
                attributes.SetSkill(new Attribute(pc.attributes.GetSkill(i)));
            }

            abilities = new CharacterAbilities(pc);
            inventory = new CharacterInventory(pc.inventory);
            faction   = Faction.Player;
        }
示例#7
0
        public Race(string name, string key, string male, string female, bool small, string wings, string horns, bool helm, bool shoes,
                    GameValue health, GameValue stamina, GameValue essence, int movement, float exp_mod, UpkeepData upkeep, GameValue wealth,
                    Vector3 scale, string maleHair, string maleBeard, string femaleHair, string femaleBeard)
        {
            Name            = name;
            Key             = key;
            Description     = "empty";
            maleModelPath   = male;
            femaleModelPath = female;

            Short     = small;
            wingsPath = wings;
            hornsPath = horns;

            maleDefaultHair    = maleHair;
            maleDefaultBeard   = maleBeard;
            femaleDefaultHair  = femaleHair;
            femaleDefaultBeard = femaleBeard;

            HelmAllowed  = helm;
            ShoesAllowed = shoes;
            this.scale   = scale;

            StartingAttributes = new List <GameValue>();
            for (int i = 0; i < (int)BaseAttribute.Number; i++)
            {
                StartingAttributes.Add(new GameValue(5, 4));
            }

            SkillProficiencies = new List <SkillProficiency>();
            Resistances        = new List <ResistanceData>();

            Traits = new List <AbilityUnlock>();
            Powers = new List <AbilityUnlock>();
            Spells = new List <AbilityUnlock>();

            HealthPerLevel  = new GameValue(health.Number, health.Die);
            StaminaPerLevel = new GameValue(stamina.Number, stamina.Die);
            EssencePerLevel = new GameValue(essence.Number, essence.Die);

            ExpModifier = exp_mod;
            BaseSpeed   = movement;

            Upkeep         = new UpkeepData(upkeep);
            StartingWealth = new GameValue(wealth);
        }
示例#8
0
        public void CalculateUpkeep()
        {
            upkeep = new UpkeepData();

            Race race = Database.GetRace(raceKey);

            Upkeep.Coin      = race.Upkeep.Coin;
            Upkeep.Essence   = race.Upkeep.Essence;
            Upkeep.Materials = race.Upkeep.Materials;
            Upkeep.Rations   = race.Upkeep.Rations;

            Profession profession = Database.GetProfession(professionKey);

            Upkeep.Coin      += profession.Upkeep.Coin;
            Upkeep.Essence   += profession.Upkeep.Essence;
            Upkeep.Materials += profession.Upkeep.Materials;
            Upkeep.Rations   += profession.Upkeep.Rations;

            wealth = Database.Races[raceKey].StartingWealth.Roll(false) + Database.Professions[professionKey].StartingWealth.Roll(false);
        }
示例#9
0
        public Profession()
        {
            Name        = "";
            Key         = "";
            Description = "empty";

            HealthPerLevel  = new GameValue();
            StaminaPerLevel = new GameValue();
            EssencePerLevel = new GameValue();

            MinimumAttributes   = new List <int>();
            AttributePriorities = new List <BaseAttribute>();
            SkillProficiencies  = new List <SkillProficiency>();
            StartingItems       = new List <ItemShort>();

            Traits = new List <AbilityUnlock>();
            Powers = new List <AbilityUnlock>();
            Spells = new List <AbilityUnlock>();

            BaseHireCost   = 0;
            Upkeep         = new UpkeepData();
            StartingWealth = new GameValue();
        }