public List <KeyValuePair <String, int> > Differencewith(BaseEquipment be)
        {
            List <KeyValuePair <String, int> > temp = new List <KeyValuePair <string, int> >();

            if (be == null)
            {
                int index = 0;
                foreach (var item in statModifier.currentPassiveStats)
                {
                    if (item != 0)
                    {
                        STATChart.PASSIVESTATSNames name = (STATChart.PASSIVESTATSNames)index;
                        temp.Add(new KeyValuePair <string, int>(name.ToString() + ": " + item, item));
                    }
                    index++;
                }
            }
            else
            {
                int index = 0;
                foreach (var item in statModifier.currentPassiveStats)
                {
                    if (item != 0 || be.statModifier.currentPassiveStats[index] != 0)
                    {
                        STATChart.PASSIVESTATSNames name = (STATChart.PASSIVESTATSNames)index;
                        temp.Add(new KeyValuePair <string, int>(name.ToString() + ": " + item, -(be.statModifier.currentPassiveStats[index] - item)));
                    }
                    index++;
                }
            }

            return(temp);
        }
Пример #2
0
 public EnemyAIInfo(BaseCharacter bc, MapRegion r)
 {
     EnemyChar        = bc.Clone();
     charID           = bc.shapeID;
     EnemyWeapon      = bc.weapon == null ? null : bc.weapon.Clone() as BaseEquipment;
     charWeaponID     = bc.weaponID;
     charArmorID      = bc.armourID;
     EnemyArmor       = bc.armour == null ? null : bc.armour.Clone() as BaseEquipment;
     enemyStats       = bc.statChart.Clone();
     CCCidentifier    = bc.CCCidentifier;
     CCC              = bc.CCC.Clone();
     enemyWeaponArray = new List <int>(bc.enemyWeaponArray);
     enemyArmourArray = new List <int>(bc.enemyArmourArray);
     enemyName        = bc.displayName;
     infoID           = r.highestEnemyID++;
 }