Beispiel #1
0
        public override List <LootStatInfo> GetLootStatInfo(LivingEntity caller)
        {
            if (m_lootStatInfo == null || !m_lootStatInfo.Any())
            {
                var lootStatInfos = new List <LootStatInfo>();
                var props         = enhancmentProps[this.TinyTrophyKind];

                var lootStatInfo = new LootStatInfo();
                lootStatInfo.Desc = "Weapons: " + props[EquipmentKind.Weapon].ToDescription() + " " + GetStatIncrease(EquipmentKind.Weapon);
                lootStatInfo.Kind = LootStatKind.Weapon;
                lootStatInfos.Add(lootStatInfo);

                lootStatInfo      = new LootStatInfo();
                lootStatInfo.Desc = "Armor: " + props[EquipmentKind.Armor].ToDescription() + " " + GetStatIncrease(EquipmentKind.Weapon);
                lootStatInfo.Kind = LootStatKind.Armor;
                lootStatInfos.Add(lootStatInfo);

                lootStatInfo      = new LootStatInfo();
                lootStatInfo.Desc = "Jewellery: " + props[EquipmentKind.Amulet].ToDescription() + " " + GetStatIncrease(EquipmentKind.Ring);
                lootStatInfo.Kind = LootStatKind.Jewellery;
                lootStatInfos.Add(lootStatInfo);

                m_lootStatInfo = lootStatInfos;
            }
            return(base.GetLootStatInfo(caller));
        }
Beispiel #2
0
        public override List <LootStatInfo> GetLootStatInfo(LivingEntity caller)
        {
            Caller = caller; //Damage needs it!
            var res = base.GetLootStatInfo(caller);
            var add = true;  //buggy :  m_lootStatInfo == null || !m_lootStatInfo.Any();

            res.Clear();
            if (add)
            {
                var esk     = EntityStatKind.Unset;
                var lsk     = LootStatKind.Weapon;
                var preffix = "";
                if (FightItemKind == FightItemKind.ExplosiveCocktail)
                {
                    esk     = EntityStatKind.FireAttack;
                    lsk     = LootStatKind.Unset;
                    preffix = "Fire ";
                }
                else if (FightItemKind == FightItemKind.PoisonCocktail)
                {
                    esk     = EntityStatKind.PoisonAttack;
                    lsk     = LootStatKind.Unset;
                    preffix = "Poison ";
                }
                var lsi = new LootStatInfo()
                {
                    EntityStatKind = esk,
                    Kind           = lsk,
                    Desc           = preffix + "Damage: " + Damage + " " + FormatTurns(this.TurnLasting)
                };

                res.Add(lsi);
            }
            return(res);
        }
Beispiel #3
0
        LootStatInfo GetLootStatInfo(LootStatKind lsk, EquipmentKind ek, Dictionary <EquipmentKind, EntityStatKind> gemKindInfo)
        {
            var lootStatInfo = new LootStatInfo();

            lootStatInfo.Kind = lsk;
            var post = "";
            var desc = "Weapons: ";

            if (lsk == LootStatKind.Armor)
            {
                desc  = "Armor: ";
                post += "%";
            }
            else if (lsk == LootStatKind.Jewellery)
            {
                desc = "Jewellery: ";
            }

            lootStatInfo.Desc = desc;
            if (this.GemKind == GemKind.Amber)
            {
                if (lsk == LootStatKind.Weapon)
                {
                    lootStatInfo.Desc += "all elemental attacks";
                }
                else if (lsk == LootStatKind.Armor)
                {
                    lootStatInfo.Desc += "all elemental resists";
                }
                else
                {
                    var gemKind    = GemKind.Diamond;//read props from any
                    var otherKinds = GetOtherKinds(gemKind);

                    string other = "";
                    foreach (var otherKind in otherKinds)
                    {
                        var gemKindInfo_ = enhancmentProps[otherKind];
                        if (other.Any())
                        {
                            lootStatInfo.Desc += ", ";
                        }

                        var otDesc = gemKindInfo_[EquipmentKind.Ring].ToDescription();
                        lootStatInfo.Desc += otDesc;
                        other             += otDesc;
                    }
                }
            }
            else
            {
                lootStatInfo.Desc += gemKindInfo[ek].ToDescription();
            }

            lootStatInfo.Desc += " +" + GetStatIncrease(ek, gemKindInfo[ek]);

            lootStatInfo.Desc += post;

            return(lootStatInfo);
        }