コード例 #1
0
        public int GetMaxFightingValue(FightingValue fightingValue, AbstractTalentFighting talent)
        {
            var taw      = GetFightingValue(fightingValue, talent);
            var bonusTaw = GetModFightingValue(fightingValue, talent);

            return(taw + bonusTaw);
        }
コード例 #2
0
ファイル: CharakterTraits.cs プロジェクト: Neburel/DSAProject
        public int GetBLBonus(AbstractTalentFighting item)
        {
            var ret = 0;

            foreach (var trait in traits)
            {
                ret = ret + trait.GetBLBonus(item);
            }
            return(ret);
        }
コード例 #3
0
        public int GetBLValue(AbstractTalentFighting talent)
        {
            if (talent == null)
            {
                return(0);
            }
            var baseBlock = charakter.Values.UsedValues.Where(x => x.GetType() == typeof(BaseBlock)).ToList()[0];
            var value     = charakter.Values.GetMAXValue(baseBlock, out DSAError error) + GetMaxFightingValue(FightingValue.Blocken, talent);

            return(value);
        }
コード例 #4
0
        public int GetPAValue(AbstractTalentFighting talent)
        {
            if (talent == null)
            {
                return(0);
            }
            var baseParade = charakter.Values.UsedValues.Where(x => x.GetType() == typeof(BaseParade)).ToList()[0];
            var pa         = charakter.Values.GetMAXValue(baseParade, out DSAError error) + GetMaxFightingValue(FightingValue.Parade, talent);

            return(pa);
        }
コード例 #5
0
        public override int GetBL(AbstractTalentFighting talent)
        {
            var sql = this.talentRepository.Get(talent);

            if (sql != null)
            {
                return(sql.BL != null ? (int)sql.BL : 0);
            }
            else
            {
                return(0);
            }
        }
コード例 #6
0
        public void SetFightingValue(FightingValue fightingValue, AbstractTalentFighting talent, int value)
        {
            if (talent == null)
            {
                return;
            }

            Dictionary <AbstractTalentFighting, int> fightingDictionary;

            FightingValueDictionary.TryGetValue(fightingValue, out fightingDictionary);
            if (fightingDictionary.TryGetValue(talent, out int innerValue))
            {
                fightingDictionary.Remove(talent);
            }
            fightingDictionary.Add(talent, value);
        }
コード例 #7
0
        public int GetFightingValue(FightingValue fightingValue, AbstractTalentFighting talent)
        {
            if (talent == null)
            {
                return(0);
            }

            Dictionary <AbstractTalentFighting, int> fightingDictionary;

            FightingValueDictionary.TryGetValue(fightingValue, out fightingDictionary);
            if (fightingDictionary.TryGetValue(talent, out int innerValue))
            {
                return(innerValue);
            }
            return(0);
        }
コード例 #8
0
        public int GetATValue(AbstractTalentFighting talent)
        {
            if (talent == null)
            {
                return(0);
            }

            var type = typeof(BaseAttack);

            if (typeof(TalentRange).IsAssignableFrom(talent.GetType()))
            {
                type = typeof(BaseRange);
            }
            var baseAttack = charakter.Values.UsedValues.Where(x => x.GetType() == type).ToList()[0];
            var at         = charakter.Values.GetMAXValue(baseAttack, out DSAError error) + GetMaxFightingValue(FightingValue.Attacke, talent);

            return(at);
        }
コード例 #9
0
        private int GetProbeATValue(AbstractTalentFighting talent)
        {
            var talentType = talent.GetType();
            var valueRepo  = charakter.Values;

            if (typeof(TalentWeaponless).IsAssignableFrom(talentType))
            {
                var value = valueRepo.GetItemByType(typeof(BaseAttack));
                return(this.charakter.Values.GetMAX(value) + this.GetATMax(talent));
            }
            else if (typeof(TalentClose).IsAssignableFrom(talentType))
            {
                var value = valueRepo.GetItemByType(typeof(BaseAttack));
                return(this.charakter.Values.GetMAX(value) + this.GetATMax(talent));
            }
            else if (typeof(TalentRange).IsAssignableFrom(talentType))
            {
                var value = valueRepo.GetItemByType(typeof(BaseRange));
                return(this.charakter.Values.GetMAX(value) + this.GetATMax(talent));
            }
            throw new NotImplementedException();
        }
コード例 #10
0
        public int GetModFightingValue(FightingValue fightingValue, AbstractTalentFighting talent)
        {
            if (talent == null)
            {
                return(0);
            }

            if (fightingValue == FightingValue.Attacke)
            {
                return(charakter.Traits.GetATBonus(talent));
            }
            else if (fightingValue == FightingValue.Blocken)
            {
                return(charakter.Traits.GetBLBonus(talent));
            }
            else if (fightingValue == FightingValue.Parade)
            {
                return(charakter.Traits.GetPABonus(talent));
            }
            else
            {
                throw new NotImplementedException();
            }
        }
コード例 #11
0
 private int GetPAMax(AbstractTalentFighting talent)
 {
     return(GetPA(talent) + GetModPA(talent));
 }
コード例 #12
0
 private int GetATMax(AbstractTalentFighting talent)
 {
     return(GetAT(talent) + GetModAT(talent));
 }
コード例 #13
0
 protected int GetModBL(AbstractTalentFighting talent)
 {
     return(this.charakter.Traits.GetBL(talent));
 }
コード例 #14
0
 abstract public int GetBL(AbstractTalentFighting talent);
コード例 #15
0
        private int GetProbeBLValue(AbstractTalentFighting talent)
        {
            var value = charakter.Values.GetItemByType(typeof(BaseBlock));

            return(this.charakter.Values.GetMAX(value) + this.GetBLMax(talent));
        }
コード例 #16
0
 private int GetBLMax(AbstractTalentFighting talent)
 {
     return(GetBL(talent) + GetModBL(talent));
 }
コード例 #17
0
 public abstract int GetBL(AbstractTalentFighting value);
コード例 #18
0
 public override int GetBL(AbstractTalentFighting value)
 {
     return(this.talentRepository.GetTotalBL(value.ID.ToString()));
 }