Exemple #1
0
        public bool getMarkedAttribut(DSA_ATTRIBUTE att)
        {
            bool b;

            markedAttributs.TryGetValue(att, out b);
            return(b);
        }
        public int getAttributeBonus(DSA_ATTRIBUTE attribute)
        {
            int x;

            attributeBonus.TryGetValue(attribute, out x);
            return(x);
        }
        private void Attribute_Changed(object sender, EventArgs e)
        {
            TextBox       box  = (TextBox)sender;
            DSA_ATTRIBUTE attr = (DSA_ATTRIBUTE)box.Tag;

            box.Text = controller.Attribute(attr, box.Text);
        }
Exemple #4
0
        public String Attribute(DSA_ATTRIBUTE attribut, String value)
        {
            int x = convertToInt(value);

            feature.setAttributeBonus(attribut, x);
            return(Attribute(attribut));
        }
Exemple #5
0
 private void testFeatureAttribute(Feature feature1, Feature feature2)
 {
     for (int i = 0; i < Enum.GetNames(typeof(DSA_ATTRIBUTE)).Length; i++)
     {
         DSA_ATTRIBUTE value = (DSA_ATTRIBUTE)i;
         Assert.AreEqual(feature1.getAttributeBonus(value), feature1.getAttributeBonus(value));
     }
 }
Exemple #6
0
        public int AttributeAKT(DSA_ATTRIBUTE attribute, String wert)
        {
            var isNumeric = int.TryParse(wert, out var wert_int);

            if (isNumeric == true)
            {
                Charakter.setAttribute(attribute, wert_int);
            }
            return(AttributeAKT(attribute));
        }
Exemple #7
0
        public int AttributeMOD(DSA_ATTRIBUTE attribute, String wert)
        {
            var isNumeric = int.TryParse(wert, out var wert_int);

            if (isNumeric == true)
            {
                /*Dieser Wert Soll Aktuell noch nicht geändert werden*/
            }
            return(AttributeMOD(attribute));
        }
Exemple #8
0
        public int getAttribute_Max(DSA_ATTRIBUTE attribute)
        {
            int featurePoints;
            int akt;

            featurePoints = featureManagment.getAttributeBonus(attribute);
            attributeAKT.TryGetValue(attribute, out akt);

            return(akt + featurePoints);
        }
Exemple #9
0
        public void ControllView_CreateFeatureTests_setAttributeString()
        {
            Random rand = new Random();
            ControllView_CreateFeature controll = new ControllView_CreateFeature(getTalentList());
            Feature feature = new Feature(DSA_FEATURES.VORTEIL);

            controll.setFeature(feature);

            Assert.AreEqual(feature, controll.getFeature());

            for (int i = 0; i < Enum.GetNames(typeof(DSA_ATTRIBUTE)).Length; i++)
            {
                DSA_ATTRIBUTE atr = (DSA_ATTRIBUTE)i;

                controll.Attribute(atr, "Test");

                Assert.AreEqual(0, feature.getAttributeBonus(atr));
                Assert.AreEqual(0.ToString(), controll.Attribute(atr));
            }
        }
Exemple #10
0
        public Feature editFeature(Feature feature)
        {
            /*Clone Feature* -> Nötig wegen Elementaren Fehler im Manager*/
            Feature cloneFeature = new Feature(feature.getFeatureType());

            cloneFeature.setName(feature.getName());
            cloneFeature.setDescription(feature.getSimpleDescription());
            cloneFeature.setGP(feature.getGP());
            cloneFeature.setValue(feature.getValue());
            for (int i = 0; i < Enum.GetNames(typeof(DSA_ATTRIBUTE)).Length; i++)
            {
                DSA_ATTRIBUTE type = (DSA_ATTRIBUTE)i;
                cloneFeature.setAttributeBonus(type, feature.getAttributeBonus(type));
            }
            for (int i = 0; i < Enum.GetNames(typeof(DSA_ENERGIEN)).Length; i++)
            {
                DSA_ENERGIEN type = (DSA_ENERGIEN)i;
                cloneFeature.setEnergieBonus(type, feature.getEnergieBonus(type));
            }
            for (int i = 0; i < Enum.GetNames(typeof(DSA_ADVANCEDVALUES)).Length; i++)
            {
                DSA_ADVANCEDVALUES type = (DSA_ADVANCEDVALUES)i;
                cloneFeature.setAdvancedValues(type, feature.getAdvancedValues(type));
            }

            List <InterfaceTalent> list = feature.getTalentListwithBonus();

            for (int i = 0; i < list.Count; i++)
            {
                cloneFeature.addTalent(list[i], feature.getTaWBonus(list[i]));
            }
            this.feature = cloneFeature;

            View_CreateFeature Form = new View_CreateFeature(this);

            Form.ShowDialog();

            return(this.feature);
        }
Exemple #11
0
 public void setAttributMark(DSA_ATTRIBUTE atr, bool a)
 {
     Charakter.setMarkedAttribut(atr, a);
 }
Exemple #12
0
 public int AttributeMAX(DSA_ATTRIBUTE attribute, String Wert)
 {
     return(AttributeMAX(attribute));
 }
Exemple #13
0
 public bool getAttributMark(DSA_ATTRIBUTE atr)
 {
     return(Charakter.getMarkedAttribut(atr));
 }
        public View_CreateFeature(ControllView_CreateFeature controller)
        {
            InitializeComponent();

            this.controller = controller;
            List <InterfaceTalent> talentList = controller.getTalentList();

            cbTalente.DataSource = talentList;

            ListTalente.Clear();

            ListTalente.Columns.Add(new ColumnHeader().Text = "Name");
            ListTalente.Columns.Add(new ColumnHeader().Text = "TaW");


            txtName.Text        = controller.FeatureName();
            txtDescription.Text = controller.FeatureDescription();
            txtGP.Text          = controller.FeatureGP();
            txtValue.Text       = controller.FeatureValue();

            txtName.KeyUp        += txtName_TextChanged;
            txtDescription.KeyUp += txtDescription_TextChanged;
            txtGP.KeyUp          += txtGP_TextChanged;
            txtValue.KeyUp       += txtValue_TextChanged;

            attributeTextBoxes = new List <TextBox> {
                txtCharisma, txtFingerfertigkeit, txtGewandheit, txtIntuition, txtKonstitution, txtKörperkraft, txtKlugheit, txtMut, txtSozialstatus
            };
            txtCharisma.Tag         = DSA_ATTRIBUTE.CH;
            txtFingerfertigkeit.Tag = DSA_ATTRIBUTE.FF;
            txtGewandheit.Tag       = DSA_ATTRIBUTE.GE;
            txtIntuition.Tag        = DSA_ATTRIBUTE.IN;
            txtKörperkraft.Tag      = DSA_ATTRIBUTE.KK;
            txtKlugheit.Tag         = DSA_ATTRIBUTE.KL;
            txtKonstitution.Tag     = DSA_ATTRIBUTE.KO;
            txtMut.Tag          = DSA_ATTRIBUTE.MU;
            txtSozialstatus.Tag = DSA_ATTRIBUTE.SO;

            for (int i = 0; i < attributeTextBoxes.Count; i++)
            {
                DSA_ATTRIBUTE attr = (DSA_ATTRIBUTE)attributeTextBoxes[i].Tag;
                attributeTextBoxes[i].Text   = controller.Attribute(attr);
                attributeTextBoxes[i].KeyUp += Attribute_Changed;
            }

            energieTextBoxes = new List <TextBox> {
                txtAstralenergie, txtAusdauer, txtKarmaenergie, txtLebensenergie, txtMagieresistenz
            };
            txtAstralenergie.Tag  = DSA_ENERGIEN.ASTRALENERGIE;
            txtAusdauer.Tag       = DSA_ENERGIEN.AUSDAUER;
            txtKarmaenergie.Tag   = DSA_ENERGIEN.KARMAENERGIE;
            txtLebensenergie.Tag  = DSA_ENERGIEN.LEBENSENERGIE;
            txtMagieresistenz.Tag = DSA_ENERGIEN.MAGIERESISTENZ;

            for (int i = 0; i < energieTextBoxes.Count; i++)
            {
                DSA_ENERGIEN energ = (DSA_ENERGIEN)energieTextBoxes[i].Tag;
                energieTextBoxes[i].Text   = controller.Energie(energ);
                energieTextBoxes[i].KeyUp += Energie_Changed;
            }


            advancedTextBoxes = new List <TextBox> {
                txtAttacke, txtParade, txtFernkampf, txtInitiative, txtBeherschungswert, txtArtefaktKontrolle, txtWundschwelle, txtEntrückung, txtGeschwindigkeit
            };
            txtAttacke.Tag           = DSA_ADVANCEDVALUES.ATTACKE_BASIS;
            txtParade.Tag            = DSA_ADVANCEDVALUES.PARADE_BASIS;
            txtFernkampf.Tag         = DSA_ADVANCEDVALUES.FERNKAMPF_BASIS;
            txtInitiative.Tag        = DSA_ADVANCEDVALUES.INITATIVE_BASIS;
            txtBeherschungswert.Tag  = DSA_ADVANCEDVALUES.BEHERSCHUNGSWERT;
            txtArtefaktKontrolle.Tag = DSA_ADVANCEDVALUES.ARTEFAKTKONTROLLE;
            txtWundschwelle.Tag      = DSA_ADVANCEDVALUES.WUNDSCHWELLE;
            txtEntrückung.Tag        = DSA_ADVANCEDVALUES.ENTRÜCKUNG;
            txtGeschwindigkeit.Tag   = DSA_ADVANCEDVALUES.GESCHWINDIGKEIT;

            for (int i = 0; i < advancedTextBoxes.Count; i++)
            {
                DSA_ADVANCEDVALUES advanced = (DSA_ADVANCEDVALUES)advancedTextBoxes[i].Tag;
                advancedTextBoxes[i].Text   = controller.Advanced(advanced);
                advancedTextBoxes[i].KeyUp += Advanced_Changed;
            }

            List <String> talenteWithBonus = controller.TalentewithBonus();

            foreach (String talent in talenteWithBonus)
            {
                ListViewItem lvi = new ListViewItem();
                lvi.Text = talent;
                lvi.SubItems.Add(controller.getTawBonus(talent).ToString());

                ListTalente.Items.Add(lvi);
            }
        }
Exemple #15
0
 public int AttributeMAX(DSA_ATTRIBUTE attribute)
 {
     return(Charakter.getAttribute_Max(attribute));
 }
Exemple #16
0
 public int AttributeMOD(DSA_ATTRIBUTE attribute)
 {
     return(Charakter.getAttribute_Mod(attribute));
 }
Exemple #17
0
 public void setAttribute(DSA_ATTRIBUTE attribute, int wert)
 {
     attributeAKT.Remove(attribute);
     attributeAKT.Add(attribute, wert);
 }
Exemple #18
0
 public void setMarkedAttribut(DSA_ATTRIBUTE att, bool b)
 {
     markedAttributs.Remove(att);
     markedAttributs.Add(att, b);
 }
Exemple #19
0
 public void setAttributeBonus(DSA_ATTRIBUTE attribute, int value)
 {
     value = checkValue(value);
     attributeBonus.Remove(attribute);
     attributeBonus.Add(attribute, value);
 }
Exemple #20
0
 public int getAttribute_Mod(DSA_ATTRIBUTE attribute)
 {
     return(featureManagment.getAttributeBonus(attribute));
 }
Exemple #21
0
 //Attribute#############################################################################################################################################
 public String Attribute(DSA_ATTRIBUTE attribut)
 {
     return(feature.getAttributeBonus(attribut).ToString());
 }
Exemple #22
0
 //###################################################################################################################################
 //Einrichtung der Attribute
 public int AttributeAKT(DSA_ATTRIBUTE attribute)
 {
     return(Charakter.getAttributeAKT(attribute));
 }