private Adjective findAdjective(string _adjective) { Adjective result = new Adjective(); foreach (Adjective a in AdjectiveIndex) { if (a.Text == _adjective) { result = a; } } return(result); }
private Adjective sumAdjectives() { Adjective result = new Adjective(); if (Adjectives != null && Adjectives.Count > 0) { foreach (string a in Adjectives) { result += findAdjective(a); } } return(result); }
public Weapon(Adjective _adjective, string _name, string _id, int _value, int _weight) { Weight = 5; Value = 10; Damage = 10; Accuracy = 75; Name = _name; Accuracy = 1 + Accuracy * (int)((float)_value / (float)Value); Damage = 1 + Damage * (int)((float)_weight / (float)Weight); Value = _value; Weight = _weight; Adjectives = new List <string>(); Adjectives.Add(_adjective.Text); Buffs = Buff.Randomized(_name.GetHashCode(), 10); ID = _id; }
public Weapon(Adjective _adjective, string _name, string _id, int _value, int _weight) { Weight = 5; Value = 10; Damage = 10; Accuracy = 75; Name = _name; Accuracy = 1 + Accuracy * (int)((float)_value / (float)Value); Damage = 1 + Damage * (int)((float)_weight / (float)Weight); Value = _value; Weight = _weight; Adjectives = new List<string>(); Adjectives.Add(_adjective.Text); Buffs = Buff.Randomized(_name.GetHashCode(), 10); ID = _id; }
private Adjective sumAdjectives() { Adjective result = new Adjective(); if (Adjectives != null && Adjectives.Count > 0) { foreach (string a in Adjectives) { result += findAdjective(a); } } return result; }
private Adjective findAdjective(string _adjective) { Adjective result = new Adjective(); foreach (Adjective a in AdjectiveIndex) { if (a.Text == _adjective) { result = a; } } return result; }