public TestDataUtil AddSpecialityWithAllData(Action <Speciality> customizer = null)
        {
            var suffix = RngUtil.GetRandomHexString(8);

            var job        = GetLast <Job>();
            var speciality = _defaultEntityCreator.CreateSpeciality(job, suffix);

            speciality.Modifiers = new List <SpecialityModifier>
            {
                new SpecialityModifier
                {
                    Stat  = GetLast <Stat>().Name,
                    Value = 2
                }
            };

            speciality.Specials = new List <SpecialitySpecial>
            {
                new SpecialitySpecial
                {
                    Description = $"some-speciality-special-description-{suffix}",
                    Flags       = @"[{""data"": ""some-data"", ""type"": ""ONE_SPECIALITY""}]",
                    IsBonus     = true,
                }
            };
            return(SaveEntity(speciality, customizer));
        }
        public Skill CreateSkill(string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new Skill
            {
                Name = $"some-skill-name-{suffix}",
                Description = $"some-skill-description-{suffix}",
                Flags = @"[{""type"": ""value""}]",
                PlayerDescription = $"some-player-description-{suffix}",
                Require = $"some-require-{suffix}",
                Roleplay = $"some-roleplay-{suffix}",
                Resist = $"some-resist-{suffix}",
                Using = $"some-using-{suffix}",
                Stat = "FO",
                Test = 2,
                SkillEffects = new List <SkillEffect>
                {
                    new SkillEffect
                    {
                        Value = 5,
                        StatName = "CHA"
                    }
                }
            });
        }
        public TestDataUtil AddJobWithAllData(Action <Job> customizer = null)
        {
            var suffix = RngUtil.GetRandomHexString(8);

            var job = _defaultEntityCreator.CreateJob(suffix);

            var stat = AddStat().GetLast <Stat>();

            var skill1 = AddSkill().GetLast <Skill>();
            var skill2 = AddSkill().GetLast <Skill>();

            job.Bonuses = new List <JobBonus>
            {
                new JobBonus
                {
                    Description = $"some-job-bonus-description-{suffix}"
                }
            };
            job.Requirements = new List <JobRequirement>
            {
                new JobRequirement
                {
                    Stat     = stat,
                    MinValue = 2,
                    MaxValue = 4,
                }
            };
            job.Restrictions = new List <JobRestriction>
            {
                new JobRestriction
                {
                    Text  = $"some-job-restriction-{suffix}",
                    Flags = "[]"
                }
            };
            job.Skills = new List <JobSkill>
            {
                new JobSkill
                {
                    Default = true,
                    Skill   = skill1
                },
                new JobSkill
                {
                    Default = false,
                    Skill   = skill2
                },
            };

            SaveEntity(job, customizer);

            AddSpecialityWithAllData();

            return(this);
        }
        public EffectType CreateEffectType(string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new EffectType
            {
                Name = $"some-effect-type-name-{suffix}"
            });
        }
        public ItemType CreateItemType(string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new ItemType
            {
                DisplayName = $"some-display-name-{suffix}",
                TechName = $"some-tech-name-{suffix}"
            });
        }
Beispiel #6
0
        public MonsterType CreateMonsterType(string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new MonsterType()
            {
                Name = $"some-monster-type-name-{suffix}",
                SubCategories = new List <MonsterSubCategory>()
            });
        }
Beispiel #7
0
        public God CreateGod(string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new God
            {
                TechName = $"some-tech-name-{suffix}",
                DisplayName = $"some-display-name-{suffix}",
                Description = $"some-description-{suffix}"
            });
        }
Beispiel #8
0
        public MonsterTrait CreateMonsterTrait(string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new MonsterTrait
            {
                Name = $"some-monster-trait-name-{suffix}",
                Description = $"some-monster-trait-description-{suffix}",
                Levels = @"[""level1"", ""level2""]"
            });
        }
Beispiel #9
0
        public MonsterTemplate CreateMonsterTemplate(MonsterSubCategory subCategory, string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new MonsterTemplate
            {
                Name = $"some-monster-template-name-{suffix}",
                SubCategory = subCategory,
                Data = @"{""key"":""value""}"
            });
        }
Beispiel #10
0
        public Npc CreateNpc(Group group, string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new Npc()
            {
                Data = "{}",
                GroupId = group.Id,
                Name = $"some-npc-name-{suffix}"
            });
        }
        public Slot CreateSlot(string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new Slot
            {
                Count = 1,
                Name = $"some-name-{suffix}",
                TechName = $"some-tech-name-{suffix}"
            });
        }
Beispiel #12
0
        public Group CreateGroup(int masterId, string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new Group
            {
                Name = $"some-name-{suffix}",
                Data = "{}",
                MasterId = masterId
            });
        }
Beispiel #13
0
        public Stat CreateStat(string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new Stat
            {
                Name = $"some-stat-name-{suffix}",
                Description = $"some-stat-description-{suffix}",
                DisplayName = $"some-stat-display-name-{suffix}"
            });
        }
        public ItemTemplateSection CreateItemTemplateSection(string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new ItemTemplateSection
            {
                Name = $"some-item-name-{suffix}",
                Note = $"some-note-{suffix}",
                Special = $"some-special-{suffix}",
                Icon = $"some-icon-{suffix}"
            });
        }
Beispiel #15
0
        public Calendar CreateCalendar(string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new Calendar
            {
                Name = $"some-name-{suffix}",
                Note = "some-note",
                StartDay = 1,
                EndDay = 10
            });
        }
Beispiel #16
0
        public Event CreateEvent(Group group, string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new Event
            {
                Name = $"some-event-name-{suffix}",
                Description = $"some-event-description-{suffix}",
                GroupId = group.Id,
                Timestamp = 721487
            });
        }
Beispiel #17
0
        public Monster CreateMonster(Group group, string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new Monster
            {
                Name = $"some-monster-name-{suffix}",
                Group = group,
                GroupId = group.Id,
                Data = @"{""key"": ""value""}"
            });
        }
Beispiel #18
0
        public Loot CreateLoot(Group group, string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new Loot
            {
                Name = $"some-name-{suffix}",
                Group = group,
                GroupId = group.Id,
                IsVisibleForPlayer = false
            });
        }
Beispiel #19
0
        public MonsterSubCategory CreateMonsterSubCategory(MonsterType monsterType, string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new MonsterSubCategory
            {
                MonsterTemplates = new List <MonsterTemplate>(),
                Name = $"some-name-{suffix}",
                Type = monsterType,
                TypeId = monsterType.Id
            });
        }
        public Speciality CreateSpeciality(Job job, string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new Speciality
            {
                Name = $"some-speciality-name-{suffix}",
                Description = $"some-speciality-description-{suffix}",
                Flags = @"[{""type"": ""value""}]",
                Job = job
            });
        }
        public ItemTemplateSubCategory CreateItemTemplateSubCategory(ItemTemplateSection section, string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new ItemTemplateSubCategory
            {
                Section = section,
                Note = $"some-note-{suffix}",
                Description = $"some-description-{suffix}",
                TechName = $"some-tech-name-{suffix}",
                Name = $"some-name-{suffix}"
            });
        }
        public EffectSubCategory CreateEffectSubCategory(EffectType effectType, string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new EffectSubCategory
            {
                Name = $"some-effect-sub-category-name-{suffix}",
                Note = $"some-effect-name-{suffix}",
                DiceCount = 1,
                DiceSize = 20,
                Type = effectType
            });
        }
        public UserAccessToken CreateUserAccessToken(User user, string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new UserAccessToken
            {
                Id = Guid.NewGuid(),
                Name = $"some-token-name-{suffix}",
                Key = RngUtil.GetRandomHexString(10),
                UserId = user.Id,
                DateCreated = DateTimeOffset.Now.ToUniversalTime()
            });
        }
        public ItemTemplate CreateItemTemplate(ItemTemplateSubCategory subCategory, string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new ItemTemplate
            {
                SubCategory = subCategory,
                Data = @"{""key"": ""value""}",
                CleanName = $"some-item-name-{suffix}",
                Name = $"some-item-name-{suffix}",
                Source = "official",
                TechName = $"some-tech-name-{suffix}"
            });
        }
Beispiel #25
0
        public GroupHistoryEntry CreateGroupHistory(Group group, string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new GroupHistoryEntry
            {
                Data = "{}",
                Gm = true,
                Date = new DateTime(2020, 10, 5, 5, 7, 8, DateTimeKind.Utc),
                GroupId = group.Id,
                Action = $"some-group-history-action-{suffix}",
                Info = $"some-info-{suffix}"
            });
        }
Beispiel #26
0
        public CharacterHistoryEntry CreateCharacterHistoryEntry(Character character, string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new CharacterHistoryEntry
            {
                Data = "{}",
                Gm = false,
                Date = new DateTime(2019, 10, 5, 5, 7, 8, DateTimeKind.Utc),
                CharacterId = character.Id,
                Action = $"some-character-history-action-{suffix}",
                Info = $"some-info-{suffix}"
            });
        }
Beispiel #27
0
        public CharacterModifier CreateCharacterModifier(IList <CharacterModifierValue> values, string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new CharacterModifier
            {
                Name = $"some-character-name-{suffix}",
                Description = "some-description",
                DurationType = "forever",
                IsActive = true,
                Reusable = false,
                Permanent = false,
                Values = values
            });
        }
        public Job CreateJob(string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new Job
            {
                Name = $"some-job-name-{suffix}",
                Flags = @"[{""type"": ""value""}]",
                PlayerDescription = $"some-player-description-{suffix}",
                Information = $"some-information-{suffix}",
                PlayerSummary = $"some-player-summary-{suffix}",
                Data = @"{""forOrigin"": {""all"": {""baseEa"": 20, ""diceEaLevelUp"": 6}}}",
                IsMagic = true,
            });
        }
        public User CreateUser(string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new User
            {
                Username = $"some-username-{suffix}",
                DisplayName = $"some-display-name-{suffix}",
                HashedPassword = $"some-hashed-password-{suffix}",
                ActivationCode = "some-activation-code",
                FbId = "some-fb-id",
                GoogleId = "some-google-id",
                TwitterId = "some-twitter-id",
                MicrosoftId = "some-microsoft-id"
            });
        }
        public Effect CreateEffect(EffectSubCategory subCategory, string suffix = null)
        {
            if (suffix == null)
            {
                suffix = RngUtil.GetRandomHexString(8);
            }

            return(new Effect
            {
                SubCategory = subCategory,
                Description = $"some-description-{suffix}",
                Dice = 4,
                Name = $"some-effect-name-{suffix}",
                DurationType = "combat",
                CombatCount = 2,
                Modifiers = new List <EffectModifier>
                {
                    new EffectModifier
                    {
                        StatName = "CHA",
                        Value = 1,
                        Type = "ADD"
                    },
                    new EffectModifier
                    {
                        StatName = "FO",
                        Value = 4,
                        Type = "ADD"
                    },
                    new EffectModifier
                    {
                        StatName = "INT",
                        Value = -2,
                        Type = "ADD"
                    },
                }
            });
        }