//Organize and display character information.
        public void DisplayCharacterInfo()
        {
            string title  = " 1920's Investigator \n";
            string spacer = "- - - - - - - - - - - \n";
            string stat   = "\n Characteristics \n";

            String[,] invDet = new string[, ]
            {
                { "Name: ", Name },
                { "Player: ", Player },
                { "Occupation: ", Occupation },
                { "Sex: ", Sex },
                { "Age: ", Age.ToString() },
                { "Birthplace: ", BirthPlace },
                { "Residence: ", Residence }
            };

            String[,] invCha = new string[, ]
            {
                { "STR: ", Strength.ToString() },
                { "DEX: ", Dexterity.ToString() },
                { "INT: ", Intelligence.ToString() },
                { "CON: ", Constitution.ToString() },
                { "APP: ", Appearance.ToString() },
                { "POW: ", Power.ToString() },
                { "SIZ: ", Size.ToString() },
                { "EDU: ", Education.ToString() }
            };

            Console.WriteLine(title + spacer);
            DisplaySplit(invDet, false);
            Console.WriteLine(stat + spacer);
            Console.WriteLine("       #   | 1/2 | 1/5 ");
            DisplaySplit(invCha, true);
        }
Exemple #2
0
        public override NameValueCollection GetQueryParameters()
        {
            NameValueCollection ParameterCollection = new NameValueCollection();

            // Build the path (format: lat,lng lat,lng lat,lng ...)
            StringBuilder PathBuilder = new StringBuilder();

            foreach (ILocation Waypoint in Waypoints)
            {
                if (PathBuilder.Length > 0)
                {
                    PathBuilder.Append(" ");
                }
                PathBuilder.Append(Waypoint.Location.Position.Latitude.ToString(CultureInfo.InvariantCulture) + "," + Waypoint.Location.Position.Longitude.ToString(CultureInfo.InvariantCulture));
            }
            ParameterCollection.Add("path", PathBuilder.ToString());

            if (Constitution >= 1 && Constitution <= 5)
            {
                ParameterCollection.Add("constitution", Constitution.ToString(CultureInfo.InvariantCulture));
            }

            ParameterCollection.Add("sport", Sport.ToString());
            ParameterCollection.Add("format", Format.ToString());

            return(ParameterCollection);
        }
        private void NextStep(object sender, RoutedEventArgs e)
        {
            Constitution c = new Constitution();
            c.CreateSampleDocument(stokvel_id, name, purpose, joining_fee, contributions);

            this.Close();
        }
Exemple #4
0
    public void LoadTexture()
    {
        //check to see if PlayerPrefs (our save location) HasKey (has a save file...you will need to reference the name of a file)
        if (!PlayerPrefs.HasKey("CharacterName"))
        {
            //if it doesnt then load the CustomSet level
            SceneManager.LoadScene("CharacterSettings");
        }
        else
        {
            //if it does have a save file then load and SetTexture Skin, Hair, Mouth and Eyes from PlayerPrefs
            SetTexture("Skin", PlayerPrefs.GetInt("SkinIndex"));
            SetTexture("Hair", PlayerPrefs.GetInt("HairIndex"));
            SetTexture("Mouth", PlayerPrefs.GetInt("MouthIndex"));
            SetTexture("Eyes", PlayerPrefs.GetInt("EyesIndex"));
            SetTexture("Armour", PlayerPrefs.GetInt("ArmourIndex"));
            SetTexture("Clothes", PlayerPrefs.GetInt("ClothesIndex"));
            //grab the gameObject in scene that is our character and set its Object name to the Characters name
            gameObject.name = PlayerPrefs.GetString("CharacterName");
            //get character class
            characterClass = PlayerPrefs.GetString("CharacterClass");
            //get character skills stats
            Strength     = PlayerPrefs.GetInt("Strength");
            Dexterity    = PlayerPrefs.GetInt("Dexterity");
            Constitution = PlayerPrefs.GetInt("Constitution");
            Intelligence = PlayerPrefs.GetInt("Intelligence");
            Wisdom       = PlayerPrefs.GetInt("Wisdom");
            Charisma     = PlayerPrefs.GetInt("Charisma");

            Debug.Log(gameObject.name + "  " + characterClass);
            Debug.Log("Strength:" + Strength.ToString() + "  Dexterity:" + Dexterity.ToString()
                      + "  Constitution:" + Constitution.ToString() + "  Intelligence:" + Intelligence.ToString()
                      + "  Wisdom:" + Wisdom.ToString() + "  Charisma:" + Charisma.ToString());
        }
    }
Exemple #5
0
        /// <summary>
        /// Saves properties
        /// </summary>
        /// <param name="writer">XmlWriter</param>
        /// <returns>True if saved</returns>
        public virtual bool Save(XmlWriter writer)
        {
            if (writer == null || writer.WriteState != WriteState.Element)
            {
                return(false);
            }

            HitPoint.Save(writer);
            Strength.Save("strength", writer);
            Intelligence.Save("intelligence", writer);
            Wisdom.Save("wisdom", writer);
            Dexterity.Save("dexterity", writer);
            Constitution.Save("constitution", writer);
            Charisma.Save("charisma", writer);

            writer.WriteStartElement("alignment");
            writer.WriteAttributeString("value", Alignment.ToString());
            writer.WriteEndElement();

            writer.WriteStartElement("movespeed");
            writer.WriteAttributeString("value", MoveSpeed.TotalMilliseconds.ToString());
            writer.WriteEndElement();


            return(true);
        }
Exemple #6
0
    void Start()
    {
        MainCharacter mainCharacter = Manager.Instance.Object.MainCharacter;

        EConstitution constitution   = mainCharacter.Constitution;
        int           constitutionId = (int)constitution;
        Constitution  c = Manager.Instance.DT.Constitution[constitutionId];

        ConstitutionImage.sprite = c.sprite;
        ConstitutionImage.color  = c.color;
        //setConstitutionText(get(constitution));

        EZodiac zodiac = Manager.Instance.Object.NurtureMode.Character.Zodiac;

        ZodiacImage.sprite = get(zodiac);
        //setZodiacText(get(zodiac));

        int age = mainCharacter.Age;

        setAgeText(age);

        string name = mainCharacter.Name;

        setNameText(name);

        Manager.Instance.Object.NurtureMode.Character.AgeChangeEvent.Attach(onAgeChanged);
    }
Exemple #7
0
 public Entity(int strength, int dex, int con, int intelligence, int wisdom, int charisma)
 {
     Ammunition = new List <Ammunition>();
     Purse      = new CoinPurse();
     Weapons    = new List <Weapon>();
     Strength   = new Strength()
     {
         Score = strength
     };
     Dexterity = new Dexterity()
     {
         Score = dex
     };
     Constitution = new Constitution()
     {
         Score = con
     };
     Intelligence = new Intelligence()
     {
         Score = intelligence
     };
     Wisdom = new Wisdom()
     {
         Score = wisdom
     };
     Charisma = new Charisma()
     {
         Score = charisma
     };
 }
        public async Task <IActionResult> Edit(int id, [Bind("Constitutionid,Consaveprof,Convalue")] Constitution constitution)
        {
            if (id != constitution.Constitutionid)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(constitution);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ConstitutionExists(constitution.Constitutionid))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(constitution));
        }
        private void NextStep(object sender, RoutedEventArgs e)
        {
            Constitution c = new Constitution();

            c.CreateSampleDocument(stokvel_id, name, purpose, joining_fee, contributions);

            this.Close();
        }
Exemple #10
0
        public void Bonus_ConstitutionSpecified_ShouldWork()
        {
            SetupCharacter();

            SavingThrows constitution = new Constitution(true);

            Assert.AreEqual(-5, constitution.Bonus);
            Assert.IsTrue(constitution.Proficiency);
        }
 public bool Equals(StatBlock other)
 {
     return(Strength.Equals(other.Strength) &&
            Dexterity.Equals(other.Dexterity) &&
            Constitution.Equals(other.Constitution) &&
            Intelligence.Equals(other.Intelligence) &&
            Wisdom.Equals(other.Wisdom) &&
            Charisma.Equals(other.Charisma));
 }
Exemple #12
0
 public StatArray(byte str, byte dex, byte con, byte intel, byte wis, byte cha)
 {
     Strength     = new Strength(str);
     Dexterity    = new Dexterity(dex);
     Constitution = new Constitution(con);
     Intelligence = new Intelligence(intel);
     Wisdom       = new Wisdom(wis);
     Charisma     = new Charisma(cha);
 }
Exemple #13
0
 public StatArray()
 {
     Strength     = new Strength();
     Dexterity    = new Dexterity();
     Constitution = new Constitution();
     Intelligence = new Intelligence();
     Wisdom       = new Wisdom();
     Charisma     = new Charisma();
 }
Exemple #14
0
 public override string ToString()
 {
     return(Stregnth.ToString() + ' ' +
            Dexterity.ToString() + ' ' +
            Constitution.ToString() + ' ' +
            Intelligence.ToString() + ' ' +
            Wisdom.ToString() + ' ' +
            Charisma.ToString());
 }
Exemple #15
0
 public static DndCharacter Generate()
 {
     Strength     = Strength.Ability();
     Dexterity    = Dexterity.Ability();
     Constitution = Constitution.Ability();
     Intelligence = Intelligence.Ability();
     Wisdom       = Wisdom.Ability();
     Charisma     = Charisma.Ability();
     Hitpoints    = 10 + Modifier();
 }
        public async Task <IActionResult> Create([Bind("Constitutionid,Consaveprof,Convalue")] Constitution constitution)
        {
            if (ModelState.IsValid)
            {
                _context.Add(constitution);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(constitution));
        }
Exemple #17
0
 public AbilityScores DeepCopy()
 {
     return(new AbilityScores
     {
         Strength = Strength.DeepCopy(),
         Dexterity = Dexterity.DeepCopy(),
         Constitution = Constitution.DeepCopy(),
         Intelligence = Intelligence.DeepCopy(),
         Wisdom = Wisdom.DeepCopy(),
         Charisma = Charisma.DeepCopy(),
     });
 }
Exemple #18
0
        public override Skill Clone(int value)
        {
            var tmp = new Constitution
            {
                Description = Description,
                MaxValue    = MaxValue,
                Name        = Name,
                Value       = value
            };

            return(tmp);
        }
Exemple #19
0
 public Entity()
 {
     Strength     = new Strength();
     Dexterity    = new Dexterity();
     Constitution = new Constitution();
     Intelligence = new Intelligence();
     Wisdom       = new Wisdom();
     Charisma     = new Charisma();
     Weapons      = new List <Weapon>();
     Ammunition   = new List <Ammunition>();
     Purse        = new CoinPurse();
 }
 public IResettable Reset()
 {
     Name = "";
     Strength.Reset();
     Dexterity.Reset();
     Constitution.Reset();
     Intelligence.Reset();
     Wisdom.Reset();
     Charisma.Reset();
     Level.Reset();
     Race = Race.Unset;
     return(this);
 }
Exemple #21
0
 public override string ToString()
 {
     return(String.Format("Race: {0}\nStrength: {1}\nDexterity: {2}\nConstitution: {3}\nIntelligence: {4}\nWisdom: {5}\nCharisma: {6}\nArcane: {7}\nDivine: {8}\nDeviation Index: {9}",
                          Race.ToString(),
                          Strength.ToString(),
                          Dexterity.ToString(),
                          Constitution.ToString(),
                          Intelligence.ToString(),
                          Wisdom.ToString(),
                          Charisma.ToString(),
                          Arcane.ToString(),
                          Divine.ToString(),
                          DeviationIndex));
 }
Exemple #22
0
 public Abilities(
     Strength strength,
     Dexterity dexterity,
     Constitution constitution,
     Intelligence intelligence,
     Wisdom wisdom, Charisma charisma)
 {
     Strength     = strength;
     Dexterity    = dexterity;
     Constitution = constitution;
     Intelligence = intelligence;
     Wisdom       = wisdom;
     Charisma     = charisma;
 }
Exemple #23
0
        }                                                      // modiferDict -> key: MemberName as string. Value: int modifier

        public Character(string name, string race, int str, int dex, int con, int intelligence, int wis, int cha, AbstractClass charClass, AbstractWeapon weapon, AbstractArmor armor, bool shield, int team, int level = 1)
        {
            Name = name;
            Race = race;

            Str   = new Strength(str);
            Dex   = new Dexterity(dex);
            Con   = new Constitution(con);
            Int   = new Intelligence(intelligence);
            Wis   = new Wisdom(wis);
            Cha   = new Charisma(cha);
            Class = new Fighter(level);

            EquippedArmor  = armor;
            EquippedWeapon = weapon;
            ShieldEquipped = shield;

            CalculateHitPoints();
            CalculateAC();
            CalculateAttackBonus();

            Team = team;
        }
Exemple #24
0
        public override void WritePropertyXML(XmlWriter xmlWriter)
        {
            base.WritePropertyXML(xmlWriter);

            xmlWriter.WriteStartElement("Type");
            xmlWriter.WriteString(Methods.GetCreatureTypeString(Type));
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("ChallengeRating");
            xmlWriter.WriteString(ChallengeRating.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("AttackSets");
            foreach (AttackSet attackSet in AttackSets)
            {
                attackSet.WriteXML(xmlWriter);
            }
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Strength");
            xmlWriter.WriteString(Strength.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Dexterity");
            xmlWriter.WriteString(Dexterity.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Constitution");
            xmlWriter.WriteString(Constitution.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Intelligence");
            xmlWriter.WriteString(Intelligence.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Wisdom");
            xmlWriter.WriteString(Wisdom.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Charisma");
            xmlWriter.WriteString(Charisma.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("BaseAttackBonus");
            xmlWriter.WriteString(BaseAttackBonus.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("GrappleModifier");
            xmlWriter.WriteString(GrappleModifier.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("HitPoints");
            xmlWriter.WriteString(HitPoints.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("HitDice");
            xmlWriter.WriteString(HitDice.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("HitDieType");
            xmlWriter.WriteString(Methods.GetDieTypeString(HitDieType));
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("ArmorClass");
            xmlWriter.WriteString(ArmorClass.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("TouchArmorClass");
            xmlWriter.WriteString(TouchArmorClass.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("FlatFootedArmorClass");
            xmlWriter.WriteString(FlatFootedArmorClass.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Speed");
            Speed.WriteXML(xmlWriter);
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("FortitudeSave");
            xmlWriter.WriteString(FortitudeSave.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("ReflexSave");
            xmlWriter.WriteString(ReflexSave.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("WillSave");
            xmlWriter.WriteString(WillSave.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Feats");
            foreach (string feat in Feats)
            {
                xmlWriter.WriteStartElement("Feat");
                xmlWriter.WriteString(feat);
                xmlWriter.WriteEndElement();
            }
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Space");
            xmlWriter.WriteString(Space.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Reach");
            xmlWriter.WriteString(Reach.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Size");
            xmlWriter.WriteString(Methods.GetSizeString(Size));
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("DamageReductions");
            foreach (DamageReduction dr in DamageReductions)
            {
                dr.WriteXML(xmlWriter);
            }
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("Immunities");
            Immunities.WriteXML(xmlWriter);
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("EnergyResistances");
            foreach (EnergyResistance er in EnergyResistances)
            {
                er.WriteXML(xmlWriter);
            }
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("SpellResistance");
            xmlWriter.WriteString(SpellResistance.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("FastHealing");
            xmlWriter.WriteString(FastHealing.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("SpecialAttacks");
            xmlWriter.WriteString(SpecialAttacks);
            xmlWriter.WriteEndElement();

            xmlWriter.WriteStartElement("SpecialQualities");
            xmlWriter.WriteString(String.Join(", ", SpecialQualities));
            xmlWriter.WriteEndElement();
        }
Exemple #25
0
        /// <summary>
        /// Loads
        /// </summary>
        /// <param name="node">XmlNode handle</param>
        public virtual bool Load(XmlNode node)
        {
            if (node == null)
            {
                return(false);
            }


            if (node.NodeType == XmlNodeType.Comment)
            {
                return(false);
            }

            switch (node.Name.ToLower())
            {
            case "strength":
            {
                Strength.Load(node);
            }
            break;

            case "intelligence":
            {
                Intelligence.Load(node);
            }
            break;

            case "wisdom":
            {
                Wisdom.Load(node);
            }
            break;

            case "dexterity":
            {
                Dexterity.Load(node);
            }
            break;

            case "constitution":
            {
                Constitution.Load(node);
            }
            break;

            case "charisma":
            {
                Charisma.Load(node);
            }
            break;

            case "alignment":
            {
                Alignment = (EntityAlignment)Enum.Parse(typeof(EntityAlignment), node.Attributes["value"].Value, true);
            }
            break;

            case "hitpoint":
            {
                HitPoint.Load(node);
            }
            break;

            case "movespeed":
            {
                MoveSpeed = TimeSpan.FromMilliseconds(int.Parse(node.Attributes["value"].Value));
            }
            break;

            default:
            {
                Trace.WriteLine("[Entity] Load() : Unknown node : <{0}>", node.Name);
            }
            break;
            }


            return(true);
        }
Exemple #26
0
 internal override void SetConstitution(Character character, int constitution) => character.Constitution = Constitution.FromInteger(constitution);
 void Start()
 {
     player = GlobalRef.playerPos.gameObject.GetComponent <Constitution>();
     SetupBhTree();
 }
Exemple #28
0
 public IActionResult Index(Constitution constitution)
 {
     return(View("ModelRecipe", new UserConstitution {
         Constitution = constitution
     }));
 }
Exemple #29
0
 public PhysiqueJewel2()
 {
     Name  = "Physique Jewel 2";
     Skill = new Constitution(1);
     Type  = SlotType.Medium;
 }