protected Fighter(string type, double h, double d, double dex) { count++; ID = Level.GetHashCode() + Dexterity.GetHashCode() + HP.GetHashCode() + Damage.GetHashCode(); this.type = type; HP = Convert.ToInt32(400 * h); Damage = Convert.ToInt32(10 * d); Dexterity = Convert.ToInt32(20 * dex); Level = 1; }
public override int GetHashCode() { int hashCode = 0; unchecked { if (unknown != null) { hashCode += 1000000007 * unknown.GetHashCode(); } hashCode += 1000000009 * Type.GetHashCode(); hashCode += 1000000021 * Gender.GetHashCode(); hashCode += 1000000033 * Race.GetHashCode(); hashCode += 1000000087 * Class.GetHashCode(); hashCode += 1000000093 * Magic.GetHashCode(); hashCode += 1000000097 * Level.GetHashCode(); hashCode += 1000000103 * Language.GetHashCode(); hashCode += 1000000123 * Appearance.GetHashCode(); hashCode += 1000000181 * Face.GetHashCode(); hashCode += 1000000207 * InventoryPicture.GetHashCode(); hashCode += 1000000223 * ActionPoints.GetHashCode(); hashCode += 1000000241 * DialogueOptions.GetHashCode(); hashCode += 1000000271 * ResponseOptions.GetHashCode(); hashCode += 1000000289 * TrainingPoints.GetHashCode(); hashCode += 1000000297 * Gold.GetHashCode(); hashCode += 1000000321 * Rations.GetHashCode(); hashCode += 1000000349 * Conditions.GetHashCode(); hashCode += 1000000363 * Strength.GetHashCode(); hashCode += 1000000403 * Intelligence.GetHashCode(); hashCode += 1000000409 * Dexterity.GetHashCode(); hashCode += 1000000411 * Speed.GetHashCode(); hashCode += 1000000427 * Stamina.GetHashCode(); hashCode += 1000000433 * Luck.GetHashCode(); hashCode += 1000000439 * MagicResistance.GetHashCode(); hashCode += 1000000447 * MagicTallent.GetHashCode(); hashCode += 1000000453 * CloseRangeCombat.GetHashCode(); hashCode += 1000000459 * LongRangeCombat.GetHashCode(); hashCode += 1000000483 * CriticalHit.GetHashCode(); hashCode += 1000000513 * Lockpicking.GetHashCode(); hashCode += 1000000531 * LifePoints.GetHashCode(); hashCode += 1000000579 * SpellPoints.GetHashCode(); hashCode += 1000000007 * Age.GetHashCode(); hashCode += 1000000009 * BaseProtection.GetHashCode(); hashCode += 1000000021 * Protection.GetHashCode(); hashCode += 1000000033 * BaseDamage.GetHashCode(); hashCode += 1000000087 * Damage.GetHashCode(); hashCode += 1000000093 * Experience.GetHashCode(); if (Spells != null) { hashCode += 1000000097 * Spells.GetHashCode(); } if (Name != null) { hashCode += 1000000103 * Name.GetHashCode(); } if (SpellStrengths != null) { hashCode += 1000000123 * SpellStrengths.GetHashCode(); } } return(hashCode); }
public override int GetHashCode() { return(Level.GetHashCode() + Dexterity.GetHashCode() + HP.GetHashCode() + Damage.GetHashCode()); }