public override string DescribeGene(System.Reflection.PropertyInfo prop, GeneAttribute attr) { if (attr != null) { switch (attr.Name) { case "Versatility": { if (StatCapFactor < 1.97) return "Limited"; if (StatCapFactor < 1.99) return "Reserved"; if (StatCapFactor < 2.01) return "Able"; if (StatCapFactor < 2.03) return "Versatile"; else return "Dynamic"; } case "Scales": { if (VirtualArmor < 54) return "Flimsy"; if (VirtualArmor < 58) return "Durable"; if (VirtualArmor < 62) return "Rugged"; if (VirtualArmor < 66) return "Hard"; return "Plated"; } case "Claw Size": { switch (DamageMax) { case 20: return "Undeveloped"; case 21: return "Small"; case 22: return "Ample"; case 23: return "Large"; case 24: return "Frightening"; } break; } case "Claw Accuracy": { if (DamageMin < 14) return "Unwieldy"; if (DamageMin < 16) return "Able"; if (DamageMin < 18) return "Deft"; return "Precise"; } case "Physique": { if (HitsMaxDiff < -10) return "Frail"; if (HitsMaxDiff < -5) return "Spindly"; if (HitsMaxDiff < 0) return "Slight"; if (HitsMaxDiff < 5) return "Lithe"; if (HitsMaxDiff < 10) return "Sturdy"; return "Tough"; } case "Hides": { if (Hides < 15) return "Delicate"; if (Hides < 18) return "Supple"; if (Hides < 22) return "Thick"; if (Hides < 25) return "Heavy"; return "Mountainous"; } case "Meat": { if (Meat < 16) return "Frail"; if (Meat < 20) return "Lean"; if (Meat < 24) return "Brawny"; return "Colossal"; } default: return base.DescribeGene(prop, attr); } } return "Error"; }
public virtual string DescribeGene(PropertyInfo prop, GeneAttribute attr) { double val = (Convert.ToDouble(prop.GetValue(this, null)) - attr.BreedMin) / (attr.BreedMax - attr.BreedMin); switch (attr.Name) { case "Temper": { if (val < .2) return "Angelic"; if (val < .4) return "Happy"; if (val <= .6) return "Even"; if (val <= .8) return "Disagreeable"; else return "Caustic"; } case "Patience": { if (val < .2) return "Headlong"; if (val < .4) return "Anxious"; if (val <= .6) return "Reserved"; if (val <= .8) return "Mild"; else return "Gentle"; } case "Wisdom": { if (val < .2) return "Foolish"; if (val < .4) return "Short-sighted"; if (val <= .6) return "Thoughtful"; if (val <= .8) return "Sage"; else return "Learned"; } case "Gender": { if (val == 1.0) return "Female"; else return "Male"; } default: { if (val < .2) return "Extremely Low"; if (val < .4) return "Low"; if (val <= .6) return "Average"; if (val <= .8) return "High"; else return "Extremely High"; } } }
public override string DescribeGene(PropertyInfo prop, GeneAttribute attr) { switch (attr.Name) { case "Meat": { switch (Meat) { case 1: return "Frail"; case 2: return "Lean"; case 3: return "Brawny"; case 4: return "Colossal"; } break; } case "Feathers": { if (Feathers < 22) return "Nearly Bald"; if (Feathers < 24) return "Thin"; if (Feathers < 26) return "Healthy"; if (Feathers < 28) return "Thick"; else return "Extremely Thick"; } case "Physique": { if (HitsMaxFactor < .85) return "Frail"; if (HitsMaxFactor < .90) return "Spindly"; if (HitsMaxFactor < .95) return "Slight"; if (HitsMaxFactor < 1.00) return "Lithe"; if (HitsMaxFactor < 1.05) return "Sturdy"; else return "Tough"; } case "Versatility": { if (StatCapFactor < 1.97) return "Limited"; if (StatCapFactor < 1.99) return "Reserved"; if (StatCapFactor < 2.01) return "Able"; if (StatCapFactor < 2.03) return "Versatile"; else return "Dynamic"; } case "Talon Accuracy": { switch (DamageMin) { case 1: return "Unwieldy"; case 2: return "Deft"; case 3: return "Precise"; } break; } case "Talon Size": { switch (DamageMax) { case 1: return "Undeveloped"; case 2: return "Small"; case 3: return "Ample"; case 4: return "Large"; case 5: return "Frightening"; } break; } case "Feather Armor": { switch (VirtualArmor) { case 1: return "Flimsy"; case 2: return "Delicate"; case 3: return "Durable"; case 4: return "Rugged"; case 5: return "Hard"; case 6: return "Solid"; } break; } default: return base.DescribeGene(prop, attr); } return "Error"; }