string GetAttributeAdjustments(OSRIC_ATTRIBUTES oa, int val) { string retStr=""; AttributeAdjustment[] attCollector; if(val<1) return retStr; switch(oa) { case OSRIC_ATTRIBUTES.Strength: attCollector = engine.GetStrengthAdjustments(val); break; case OSRIC_ATTRIBUTES.Dexterity: attCollector = engine.GetDexterityAdjustments(val); break; case OSRIC_ATTRIBUTES.Constitution: attCollector = engine.GetConstitutionAdjustments(val); break; case OSRIC_ATTRIBUTES.Intellegence: attCollector = engine.GetIntelligenceAdjustments(val); break; case OSRIC_ATTRIBUTES.Wisdom: attCollector = engine.GetWisdomAdjustments(val); break; case OSRIC_ATTRIBUTES.Charisma: attCollector = engine.GetCharismaAdjustments(val); break; default: attCollector = new AttributeAdjustment[0]; break; } if(attCollector.Length>0) { retStr = attCollector[0].title + ": " + attCollector[0].adjustment; for(int i=1;i<attCollector.Length;i++) retStr += " " + attCollector[i].title + ": " + attCollector[i].adjustment; } return retStr; }
public AttributeAdjustment[] GetWisdomAdjustments(int _wis) { AttributeAdjustment[] retArr = new AttributeAdjustment[1]; _wis = attributeTable.GetYIndexOf(_wis); retArr[0] = new AttributeAdjustment("Mental Saving Throw Bonus",attributeTable.GetValue("wis_mental_saving_throw_bonus",_wis)); return retArr; }
public AttributeAdjustment[] GetStrengthAdjustments(int _str) { AttributeAdjustment[] retArr = new AttributeAdjustment[5]; _str = attributeTable.GetYIndexOf(_str); retArr[0] = new AttributeAdjustment("Bonus to Hit",attributeTable.GetValue("str_bonus_to_hit",_str)); retArr[1] = new AttributeAdjustment("Bonus to Damage",attributeTable.GetValue("str_bonus_to_damage",_str)); retArr[2] = new AttributeAdjustment("Encumberance Adjustment",attributeTable.GetValue("str_encumberance_adjustment",_str)); retArr[3] = new AttributeAdjustment("Minor Tests",attributeTable.GetValue("str_minor_tests",_str)); retArr[4] = new AttributeAdjustment("Major Tests",attributeTable.GetValue("str_major_test",_str)); return retArr; }
public AttributeAdjustment[] GetIntelligenceAdjustments(int _int) { AttributeAdjustment[] retArr = new AttributeAdjustment[1]; _int = attributeTable.GetYIndexOf(_int); retArr[0] = new AttributeAdjustment("Max Additional Languages",attributeTable.GetValue("int_max_additional_languages",_int)); return retArr; }
public AttributeAdjustment[] GetDexterityAdjustments(int _dex) { AttributeAdjustment[] retArr = new AttributeAdjustment[3]; _dex = attributeTable.GetYIndexOf(_dex); retArr[0] = new AttributeAdjustment("Surprise Bonus",attributeTable.GetValue("dex_surprise_bonus",_dex)); retArr[1] = new AttributeAdjustment("Missile Bonus",attributeTable.GetValue("dex_missile_bonus",_dex)); retArr[2] = new AttributeAdjustment("AC Adjustment",attributeTable.GetValue("dex_AC_adjustment",_dex)); return retArr; }
public AttributeAdjustment[] GetConstitutionAdjustments(int _con) { AttributeAdjustment[] retArr = new AttributeAdjustment[3]; _con = attributeTable.GetYIndexOf(_con); retArr[0] = new AttributeAdjustment("HP per die",attributeTable.GetValue("con_HP_per_die",_con)); retArr[1] = new AttributeAdjustment("Survive Resurrection & Raise Dead",attributeTable.GetValue("con_survive_resurrection_raise_dead",_con)); retArr[2] = new AttributeAdjustment("Survive System Shock",attributeTable.GetValue("con_survive_system_shock",_con)); return retArr; }
public AttributeAdjustment[] GetCharismaAdjustments(int _cha) { AttributeAdjustment[] retArr = new AttributeAdjustment[3]; _cha = attributeTable.GetYIndexOf(_cha); retArr[0] = new AttributeAdjustment("Max Henchman",attributeTable.GetValue("cha_max_henchmen",_cha)); retArr[1] = new AttributeAdjustment("Loyalty Bonus",attributeTable.GetValue("cha_loyalty_bonus",_cha)); retArr[2] = new AttributeAdjustment("Reaction Bonus",attributeTable.GetValue("cha_reaction_bonus",_cha)); return retArr; }