Example #1
0
        public async Task <IActionResult> AnnulerMonFeat([Bind("Id, CreationDate, RealisationDate, HeureDebut, HeureFin, AcceptationDate, EnCoursRealisation, SurPlace, FinFeatHelper, ClotureDate, SommePrevoir, SommeAvancee, SommeRembourseeDate, AnnulationDate, EchangeMonetaire, AideChoisie, Materiel")] Feat featToModify, int IdMembre)

        {
            featToModify.AnnulationDate = DateTime.Now;
            // featToModify.ClotureDate = DateTime.Now;
            if (ModelState.IsValid)
            {
                _context.Update(featToModify);
                await _context.SaveChangesAsync();


                return(RedirectToAction("MesFeats", "PAFeats", new { @id = IdMembre }));
            }
            return(RedirectToAction("HomeFeatsHome"));
        }
Example #2
0
        private void SetUpFeats()
        {
            for (var i = 1; i <= 4; i++)
            {
                var feat = new Feat();
                feat.Name  = $"Feat {i}";
                feat.Power = i;

                feats.Add(feat);
            }

            fortitudeSaveFeats.Add(feats[0].Name);
            reflexSaveFeats.Add(feats[1].Name);
            willSaveFeats.Add(feats[2].Name);
        }
Example #3
0
    public void MultiShotApplied()
    {
        Feat    feat = featTree.GetFeatByName("multi_shot");
        Vector3 gap  = 0.1f * Vector3.left;

        if (feat.FeatLevel <= 0)
        {
            return;
        }
        for (int i = 0; i < feat.FeatLevel; i++)
        {
            Vector2 origin = transform.position + ((i % 2 == 0) ? (i + 2.0f) / 2.0f * gap : -(i + 1.0f) / 2.0f * gap);
            Fire(origin, origin + Vector2.up);
        }
    }
Example #4
0
        public void FeatTokensKnowWhetherAFeatMatches()
        {
            var combatFeat = Feat.Named("Power Attack");

            combatFeat.Tags.Add("combat");
            combatFeat.Tags.Add("critical");
            var magicFeat = Feat.Named("Create Potion");

            magicFeat.Tags.Add("item creation");

            var featToken = new FeatToken("combat");

            Assert.True(featToken.Qualifies(combatFeat));
            Assert.False(featToken.Qualifies(magicFeat));
        }
Example #5
0
 private void cbFeat_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     try
     {
         Feat temp = (Feat)cbFeat.SelectedItem;
         tbPrereq.Text = temp.GetPrereq();
         rtbDesc.Document.Blocks.Clear();
         rtbDesc.Document.Blocks.Add(new Paragraph(new Run(temp.GetDesc())));
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
         throw;
     }
 }
        private static void buildRequirementsList(string property, string value, Feat feat)
        {
            if (String.IsNullOrEmpty(value))
            {
                return;
            }

            List <string> parts = ToStringList(value);

            if (!feat.Requirements.Any())
            {
                for (int i = 0; i < parts.Count; ++i)
                {
                    feat.Requirements.Add(new FeatRequirement());
                }
            }

            feat.Requirements = feat.Requirements.Zip(parts, (a, b) => {
                switch (property)
                {
                case "RACELIST": {
                    a.RaceName = RaceName.FromRaceName(b);

                    break;
                }

                case "CLASSLIST": {
                    a.ClassName = Enumeration.FromDisplayName <ClassName>(b);

                    break;
                }

                case "ACQUIRE": {
                    a.Acquire = b;

                    break;
                }

                case "LEVEL": {
                    a.Level = Int32.Parse(b);

                    break;
                }
                }

                return(a);
            }).ToList();
        }
        private void AddClicked(Feat feat)
        {
            string name = feat.Name;

            if (feat.AltName != null && feat.AltName.Length > 0)
            {
                name = feat.AltName;
            }

            if (!CurrentMonster.FeatsList.Contains(name))
            {
                CurrentMonster.AddFeat(name);
                _CurrentFeats.Add(new ParsedFeat(name));
                CurrentFeatsView.ReloadData();
            }
        }
        // GET: Feat/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Feat feat = DAL.GetFeat((int)id);

            if (feat == null)
            {
                return(NotFound());
            }

            return(View(feat));
        }
Example #9
0
        public void Test_IsFeatShapeShiftRequired_FalseResult()
        {
            Feat objFeat  = new Feat();
            Feat objFeat2 = new Feat();

            bool blnFeatisShapeShiftRequired;

            objFeat.GetFeat(1);
            objFeat2.GetFeat(808);

            blnFeatisShapeShiftRequired = Feat.IsFeatShapeShiftRequired(objFeat, false);
            Assert.IsTrue(blnFeatisShapeShiftRequired);

            blnFeatisShapeShiftRequired = Feat.IsFeatShapeShiftRequired(objFeat2, false);
            Assert.IsFalse(blnFeatisShapeShiftRequired);
        }
Example #10
0
        public void Test_IsFeatRageRequired_FalseResult()
        {
            Feat objFeat  = new Feat();
            Feat objFeat2 = new Feat();

            bool blnFeatIsRageRequired;

            objFeat.GetFeat(1);
            objFeat2.GetFeat(791);

            blnFeatIsRageRequired = Feat.IsFeatRageRequired(objFeat, false);
            Assert.IsTrue(blnFeatIsRageRequired);

            blnFeatIsRageRequired = Feat.IsFeatRageRequired(objFeat2, false);
            Assert.IsFalse(blnFeatIsRageRequired);
        }
Example #11
0
        public FeatTests()
        {
            var data = FeatYamlFile.ParseYaml();
            var list = new List <Feat>();

            foreach (var c in data.Children)
            {
                list.Add(new Feat(c));
            }

            Acrobatic       = list.First(x => x.Name == "Acrobatic");
            CombatExpertise = list.First(x => x.Name == "Combat Expertise");
            PowerAttack     = list.First(x => x.Name == "Power Attack");
            CraftWand       = list.First(x => x.Name == "Craft Wand");
            MultipleSelect  = list.First(x => x.Name == "Multiple Select");
        }
Example #12
0
        public void Test_RemoveFeatListFromList_GoodResult()
        {
            Feat        objFeat            = new Feat();
            List <Feat> objRemoveFeats     = new List <Feat>();
            List <Feat> objFeats           = new List <Feat>();
            int         intTotalFeatsCount = 0;

            objFeats           = objFeat.GetFeats("FeatID IN (1,2)", "");
            intTotalFeatsCount = objFeats.Count;

            objRemoveFeats = objFeat.GetFeats("FeatID IN (1)", "");

            objFeats = Feat.RemoveFeatListFromList(objRemoveFeats, objFeats);

            Assert.AreEqual(intTotalFeatsCount, objFeats.Count + 1);
        }
Example #13
0
        public void FeatsKnowWhetherYouQualify()
        {
            var smartCharacter = CharacterTestTemplates.AverageBob();

            smartCharacter.AbilityScores.SetScore(AbilityScoreTypes.Intelligence, 15);
            var dumbCharacter = CharacterTestTemplates.AverageBob();

            dumbCharacter.AbilityScores.SetScore(AbilityScoreTypes.Intelligence, 5);

            var CombatExpertise = Feat.Named("Combat Expertise");

            CombatExpertise.Prerequisites.Add(new AbilityPrerequisite(AbilityScoreTypes.Intelligence, 13));

            Assert.True(CombatExpertise.IsQualified(smartCharacter));
            Assert.False(CombatExpertise.IsQualified(dumbCharacter));
        }
        protected override Feat GetFeat(string response)
        {
            var(name, description, propertyNodes) = GetNameDescriptionAndPropertyNodes(response);

            var feat = new Feat()
            {
                Name          = name,
                Description   = description,
                Benefit       = GetPropertyValue("Benefit", propertyNodes),
                Normal        = GetPropertyValue("Normal", propertyNodes),
                Prerequisites = GetPropertyValue("Prerequisites", propertyNodes),
                Special       = GetPropertyValue("Special", propertyNodes)
            };

            return(feat);
        }
        // GET: Feat/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Feat feat = DAL.GetFeat((int)id);

            if (feat == null)
            {
                return(NotFound());
            }
            ViewData["FeatTypeID"] = new SelectList(DAL.GetFeatTypes(), "ID", "Name", feat.FeatTypeID);
            return(View(feat));
        }
            public void Can_Check_Complex_Prereqs_When_Does_Not_Satisfy(bool goodFeat, bool goodStat)
            {
                Feat feat      = FeatBuilder.Get().Build();
                var  character = new Character(
                    StatBlock.With().Default()
                    .Str(goodStat ? 14 : 12).Build(),
                    goodFeat ? new[] { feat } : new Feat[] {}
                    );
                StatBlock stat = StatBlock.With().Str(13).Build();
                Feat      sut  = FeatBuilder.Get().Build();

                sut.AddFeatPrereq(feat);
                sut.AddStatPrereq(stat);

                Check.That(sut.CanBeTakenBy(character)).IsFalse();
            }
Example #17
0
    private static int EffectivePower(Feat feat, Battler user, Battler target)
    {
        switch (feat.technique.data.techniqueType)
        {
        case TechniqueType.Melee:
            return(user.character.mainHand.damage.Roll());

        case TechniqueType.Ranged:
            throw new NotImplementedException();

        case TechniqueType.Magic:
            throw new NotImplementedException();

        default:
            throw new NotImplementedException();
        }
    }
Example #18
0
        public void Test_SaveAndDeleteFeat_ModifyFeats()
        {
            bool returnVal;

            Feat objFeat    = new Feat();
            Feat objNewFeat = new Feat();

            objFeat.FeatName        = "TestFeat";
            objFeat.FeatDescription = "New Feat Description";
            objNewFeat = objFeat.SaveFeat();

            Assert.IsTrue(objNewFeat.FeatID != 0);

            returnVal = objNewFeat.DeleteFeat();

            Assert.IsTrue(returnVal);
        }
Example #19
0
 public async Task <object> GetFeats()
 {
     return(await TakePostAction <FeatsRequest>((res, data) =>
     {
         RemoteFeatList list = new RemoteFeatList();
         list.Feats = new List <RemoteFeat>();
         if (data.Feats != null)
         {
             foreach (var fr in data.Feats)
             {
                 Feat f = Feat.ByID(fr.IsCustom, fr.ID);
                 list.Feats.Add(f.ToRemote());
             }
         }
         res.Data = list;
     }));
 }
 public ActionResult Create([Bind("FeatTypeID,Prerequisites,Description,Name,ID")] Feat feat)
 {
     if (ModelState.IsValid)
     {
         if (DAL.CreateFeat(feat) > 0)
         {
             //success
         }
         else
         {
             //error
         }
         return(RedirectToAction(nameof(Index)));
     }
     ViewData["FeatTypeID"] = new SelectList(DAL.GetFeatTypes(), "ID", "Name", feat.FeatTypeID);
     return(View(feat));
 }
Example #21
0
        public async Task <IActionResult> Create([Bind("Id, CreationDate, RealisationDate, HeureDebut, HeureFin, AcceptationDate, EnCoursRealisation, SurPlace, FinFeatHelper, ClotureDate, SommePrevoir, SommeAvancee, SommeRembourseeDate, AnnulationDate, EchangeMonetaire, AideChoisie, Materiel")] Feat newFeat, int Createur, string Type, string Materiel, string Adresse)
        {
            var aideChoisieNewFeat = await(from m in _context.TypeAides
                                           where m.NomAide.Equals(Type)
                                           select m).FirstOrDefaultAsync();

            var membreLogged = await(from m in _context.Membres
                                     where m.Id.Equals(Createur)
                                     select m).FirstOrDefaultAsync();

            var materielChoisi = await(from m in _context.Materiels
                                       where m.NomMateriel.Equals(Materiel)
                                       select m).FirstOrDefaultAsync();

            var adresseChoisie = await(from m in _context.Adresses
                                       where m.NomDeVoie.Equals(Adresse)
                                       select m).FirstOrDefaultAsync();

            ViewBag.IdMembre = Createur;


            Feat feat = new Feat()
            {
                CreationDate     = DateTime.Now,
                RealisationDate  = newFeat.RealisationDate,
                HeureDebut       = newFeat.HeureDebut,
                HeureFin         = newFeat.HeureFin,
                SommePrevoir     = newFeat.SommePrevoir,
                EchangeMonetaire = newFeat.EchangeMonetaire,
                Type             = aideChoisieNewFeat,
                Createur         = membreLogged,
                Materiel         = materielChoisi,
                Adresse          = adresseChoisie
            };

            if (ModelState.IsValid)
            {
                _context.Add(feat);
                await _context.SaveChangesAsync();


                return(RedirectToAction("MesFeats", "PAFeats", new { @id = ViewBag.IdMembre }));
            }
            return(RedirectToAction("Profil", "PAMembres"));
        }
Example #22
0
        public void Test_SaveAndDeleteFeat_ModifyCharaterFeats()
        {
            int intCharacterID = 1;
            int intFeatID      = 3;

            bool returnVal;

            Feat objFeat     = new Feat();
            Feat objCharFeat = new Feat();

            objCharFeat = objFeat.SaveCharacterFeat(intCharacterID, intFeatID);

            Assert.IsTrue(objCharFeat.FeatID == intFeatID);

            returnVal = objCharFeat.DeleteCharacterFeat(intCharacterID, intFeatID);

            Assert.IsTrue(returnVal);
        }
        public static Cooldown Get(Guid playerID, Feat feat)
        {
            var key = BuildKey(playerID, feat);

            if (!DB.Exists(key))
            {
                var entity = new Cooldown
                {
                    DateUnlocked = DateTime.UtcNow,
                    Feat         = feat
                };

                Set(playerID, entity);
                return(entity);
            }

            return(DB.Get <Cooldown>(key));
        }
Example #24
0
        public void Test_CheckFeatCount_FalseResult()
        {
            Feat objFeat = new Feat();

            List <Feat> lstFeatList = new List <Feat>();
            bool        blnFeatCountLessThanMax;

            objFeat.GetFeat(116);

            for (int i = 0; i < objFeat.MultipleSelection + 3; i++)
            {
                lstFeatList.Add(objFeat);
            }

            blnFeatCountLessThanMax = Feat.CheckFeatCount(objFeat, lstFeatList);

            Assert.IsFalse(blnFeatCountLessThanMax);
        }
Example #25
0
        public OptionFeatForm(Feat feat)
        {
            InitializeComponent();

            Array tiers = Enum.GetValues(typeof(Tier));

            foreach (Tier tier in tiers)
            {
                TierBox.Items.Add(tier);
            }

            fFeat = feat.Copy();

            NameBox.Text         = fFeat.Name;
            PrereqBox.Text       = fFeat.Prerequisites;
            TierBox.SelectedItem = fFeat.Tier;
            BenefitBox.Text      = fFeat.Benefits;
        }
Example #26
0
        public void Test_IsFeatInList_TrueResult()
        {
            Feat objFeat = new Feat();

            List <Feat> lstFeatList = new List <Feat>();
            bool        blnFeatIsInList;

            objFeat.GetFeat(1);

            for (int i = 0; i < 3; i++)
            {
                lstFeatList.Add(objFeat);
            }

            blnFeatIsInList = Feat.IsFeatInList(objFeat, lstFeatList);

            Assert.IsTrue(blnFeatIsInList);
        }
Example #27
0
        public void Test_IsFeatInList_FalseResult()
        {
            Feat        objFeat     = new Feat();
            Feat        objFeat2    = new Feat();
            List <Feat> lstFeatList = new List <Feat>();
            bool        blnFeatIsInList;

            objFeat.GetFeat(1);

            for (int i = 0; i < 3; i++)
            {
                lstFeatList.Add(objFeat);
            }
            objFeat2.GetFeat(2);
            blnFeatIsInList = Feat.IsFeatInList(objFeat2, lstFeatList);

            Assert.IsFalse(blnFeatIsInList);
        }
Example #28
0
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            if (cbFeat.SelectedItem != null)
            {
                Feat temp = (Feat)cbFeat.SelectedItem;

                if (!db.AddFeatToCharacter(c.GetID(), temp.id))
                {
                    MessageBox.Show("You already have this feature!");
                }
            }
            else
            {
                MessageBox.Show("Please select a Feat!");
            }

            detail.UpdateFeatList();
        }
Example #29
0
        public void FillFormWithFeat(int FeatID)
        {
            Feat feat = new Feat();

            feat.GetFeat(FeatID);

            if (feat.FeatID != 0)
            {
                SetForm(feat, false);
            }
            if (dbconn.Open)
            {
                dbconn.CloseDatabaseConnection();
            }
            this.btnSave.Enabled = false;
            this.btnNew.Enabled  = true;
            this.btnEdit.Enabled = true;
        }
Example #30
0
        void ShowImportDialog(String filename)
        {
            try
            {
                ExportData data = XmlLoader <ExportData> .Load(filename);


                ImportExportDialog ied = new ImportExportDialog(this, data, true);
                ied.Show();
                ied.DialogComplete += (sender, e) =>
                {
                    foreach (Monster m in e.Data.Monsters)
                    {
                        m.DBLoaderID = 0;
                        MonsterDB.DB.AddMonster(m);
                        Monster.Monsters.Add(m);
                    }
                    foreach (Spell s in e.Data.Spells)
                    {
                        s.DBLoaderID = 0;
                        Spell.AddCustomSpell(s);
                    }
                    foreach (Feat s in e.Data.Feats)
                    {
                        s.DBLoaderID = 0;
                        Feat.AddCustomFeat(s);
                    }
                    foreach (Condition s in e.Data.Conditions)
                    {
                        Condition.CustomConditions.Add(s);
                    }
                    if (e.Data.Conditions.Count > 0)
                    {
                        Condition.SaveCustomConditions();
                    }

                    RefreshForImport(e.Data);
                };
            }
            catch (Exception ex)
            {
                DebugLogger.WriteLine(ex.ToString());
            }
        }
Example #31
0
    public CharacterData(int scene, int slot, int world, int levelUpsAvailable, int experience, int hitDie,
	int expGive, bool friendly, Talk talk,
	EnumList.Race race, EnumList.Alignment alignment, EnumList.Affiliation affiliation, EnumList.Profession profession, EnumList.Title title, EnumList.CharacterClass characterClass1, EnumList.CharacterClass characterClass2, EnumList.CharacterClass prestigeClass, bool controlled,
	string name, int level1, int level2, int prestigeLevel, int totalLevel, int strength, int dexterity, int constitution, int intelligence, int wisdom, int charisma, int initiativeBonus, bool hostile, bool initSet, bool turn, bool done, int initiative, int[] basicAttackBonus, int fortitude, int reflex, int will, int[] skill, Feat[] feat, int skillPoints, int featPoints, bool[] classSkill, float xLocation, float yLocation, float xDirection, float yDirection, Inventory inventory, EnumList.Status status,
	int currentHealth, int maxHealth, int armorClass, string prefabName,
	DateTime dateTime, float transformLocationX, float transformLocationY,
	int standardAction, int moveAction, int freeAction, int swiftAction, int immediateAction, int aoo, int currentSpeed, int maxSpeed, bool moveLock, bool aooProvoked, float xEnd, float yEnd, float xDir, float yDir)
    {
        //controlled
        this.scene = scene;
        this.slot = slot;
        this.world = world;
        this.levelUpsAvailable = levelUpsAvailable;
        this.experience = experience;
        this.hitDie = hitDie;

        //!controlled
        this.expGive = expGive;
        this.friendly = friendly;
        this.talk = talk;

        //character
        this.race = race;
        this.alignment = alignment;
        this.affiliation = affiliation;
        this.profession = profession;
        this.title = title;
        this.characterClass1 = characterClass1;
        this.characterClass2 = characterClass2;
        this.prestigeClass = prestigeClass;
        this.controlled = controlled;

        //entity
        this.name = name;
        this.level1 = level1;
        this.level2 = level2;
        this.prestigeLevel = prestigeLevel;
        this.totalLevel = totalLevel;
        this.strength = strength;
        this.dexterity = dexterity;
        this.constitution = constitution;
        this.intelligence = intelligence;
        this.wisdom = wisdom;
        this.charisma = charisma;
        this.initiativeBonus = initiativeBonus;
        this.hostile = hostile;
        this.initSet = initSet;
        this.turn = turn;
        this.done = done;
        this.initiative = initiative;
        this.basicAttackBonus = basicAttackBonus;
        this.fortitude = fortitude;
        this.reflex = reflex;
        this.will = will;
        this.skill = skill;
        this.feat = feat;
        this.skillPoints = skillPoints;
        this.featPoints = featPoints;
        this.classSkill = classSkill;
        this.xLocation = xLocation;
        this.yLocation = yLocation;
        this.xDirection = xDirection;
        this.yDirection = yDirection;
        this.inventory = inventory;
        this.status = status;

        //attackable
        this.currentHealth = currentHealth;
        this.maxHealth = maxHealth;
        this.armorClass = armorClass;
        this.prefabName = prefabName;

        //system
        this.dateTime = dateTime;
        this.transformLocationX = transformLocationX;
        this.transformLocationY = transformLocationY;

        //action
        this.standardAction = standardAction;
        this.moveAction = moveAction;
        this.freeAction = freeAction;
        this.swiftAction = swiftAction;
        this.immediateAction = immediateAction;
        this.aoo = aoo;
        this.currentSpeed = currentSpeed;
        this.maxSpeed = maxSpeed;
        this.moveLock = moveLock;
        this.aooProvoked = aooProvoked;
        this.xEnd = xEnd;
        this.yEnd = yEnd;
        this.xDir = xDir;
        this.yDir = yDir;
    }
Example #32
0
 public void Add_Feat(Feat ft)
 {
     ft.Apply_Feat (this);
 }
Example #33
0
    public AnimalData(EnumList.Species species,
	string name, int level1, int level2, int prestigeLevel, int totalLevel, int strength, int dexterity, int constitution, int intelligence, int wisdom, int charisma, int initiativeBonus, bool hostile, bool initSet, bool turn, bool done,
	int initiative, int[] basicAttackBonus, int fortitude, int reflex, int will, int[] skill, Feat[] feat, int skillPoints, int featPoints, bool[] classSkill, float xLocation, float yLocation, float xDirection, float yDirection, Inventory inventory, EnumList.Status status,
	int currentHealth, int maxHealth, int armorClass, string prefabName,
	int standardAction, int moveAction, int freeAction, int swiftAction, int immediateAction, int aoo, int currentSpeed, int maxSpeed, bool moveLock, bool aooProvoked, float xEnd, float yEnd, float xDir, float yDir)
    {
        //animal
        this.species = species;

        //entity
        this.name = name;
        this.level1 = level1;
        this.level2 = level2;
        this.prestigeLevel = prestigeLevel;
        this.totalLevel = totalLevel;
        this.strength = strength;
        this.dexterity = dexterity;
        this.constitution = constitution;
        this.intelligence  = intelligence;
        this.wisdom = wisdom;
        this.charisma = charisma;
        this.initiativeBonus = initiativeBonus;
        this.hostile = hostile;
        this.initSet = initSet;
        this.turn = turn;
        this.done = done;
        this.initiative = initiative;
        this.basicAttackBonus = basicAttackBonus;
        this.fortitude = fortitude;
        this.reflex = reflex;
        this.will = will;
        this.skill = skill;
        this.feat = feat;
        this.skillPoints = skillPoints;
        this.featPoints = featPoints;
        this.classSkill = classSkill;
        this.xLocation = xLocation;
        this.yLocation = yLocation;
        this.xDirection = xDirection;
        this.yDirection = yDirection;
        this.inventory = inventory;
        this.status = status;

        //attackable
        this.currentHealth = currentHealth;
        this.maxHealth = maxHealth;
        this.armorClass = armorClass;
        this.prefabName = prefabName;

        //action
        this.standardAction = standardAction;
        this.moveAction = moveAction;
        this.freeAction = freeAction;
        this.swiftAction = swiftAction;
        this.immediateAction = immediateAction;
        this.aoo = aoo;
        this.currentSpeed = currentSpeed;
        this.maxSpeed = maxSpeed;
        this.moveLock = moveLock;
        this.aooProvoked = aooProvoked;
        this.xEnd = xEnd;
        this.yEnd = yEnd;
        this.xDir = xDir;
        this.yDir = yDir;
    }
Example #34
0
 public void setFeat(Feat[] i)
 {
     feat = i;
 }
Example #35
0
 protected void addFeat(int id)
 {
     Feat[] temp = new Feat[feat.Length+1];
     feat.CopyTo(temp, 0);
     temp[feat.Length] = new Feat(id);
     feat = new Feat[temp.Length];
     feat = temp;
 }