Beispiel #1
0
        public void EnsureItems()
        {
            {
                var kinds = Enum.GetValues(typeof(AbilityKind)).Cast <AbilityKind>().ToList();
                foreach (var kind in kinds)
                {
                    if (passiveAbilities.Any(i => i.Kind == kind) || kind == AbilityKind.Unset)
                    {
                        continue;
                    }

                    Ability ab = null;
                    if (kind == AbilityKind.ExplosiveCocktail ||
                        kind == AbilityKind.ThrowingStone ||
                        kind == AbilityKind.ThrowingKnife ||
                        kind == AbilityKind.HunterTrap ||
                        kind == AbilityKind.PoisonCocktail ||
                        kind == AbilityKind.Stride ||
                        kind == AbilityKind.OpenWound ||
                        kind == AbilityKind.Rage ||
                        kind == AbilityKind.WeightedNet ||
                        kind == AbilityKind.ArrowVolley ||
                        kind == AbilityKind.PiercingArrow ||
                        kind == AbilityKind.PerfectHit
                        )
                    {
                        ab = new ActiveAbility()
                        {
                            Kind = kind
                        };
                        activeAbilities.Add(ab as ActiveAbility);
                    }
                    else
                    {
                        if (kind == AbilityKind.LootingMastering)
                        {
                            ab = new LootAbility(true)
                            {
                                Kind = AbilityKind.LootingMastering
                            }
                        }
                        ;
                        else
                        {
                            ab = new PassiveAbility()
                            {
                                Kind = kind
                            }
                        };

                        passiveAbilities.Add(ab as PassiveAbility);
                    }
                }
            }
        }
Beispiel #2
0
        public void EnsureItems()
        {
            {
                var kinds = Enum.GetValues(typeof(AbilityKind)).Cast <AbilityKind>().ToList();
                foreach (var kind in kinds)
                {
                    if (passiveAbilities.Any(i => i.Kind == kind) || kind == AbilityKind.Unset)
                    {
                        continue;
                    }

                    Ability ab = null;
                    if (kind == AbilityKind.ExplosiveMastering ||
                        kind == AbilityKind.ThrowingStoneMastering ||
                        kind == AbilityKind.ThrowingKnifeMastering ||
                        kind == AbilityKind.HunterTrapMastering ||
                        kind == AbilityKind.PoisonMastering)
                    {
                        ab = new ActiveAbility()
                        {
                            Kind = kind
                        };
                        activeAbilities.Add(ab as ActiveAbility);
                    }
                    else
                    {
                        if (kind == AbilityKind.LootingMastering)
                        {
                            ab = new LootAbility(true)
                            {
                                Kind = AbilityKind.LootingMastering
                            }
                        }
                        ;
                        else
                        {
                            ab = new PassiveAbility()
                            {
                                Kind = kind
                            }
                        };

                        passiveAbilities.Add(ab as PassiveAbility);
                    }
                    //allItems.Add(ab);
                }
            }
        }