public OSRICCharacterModifier(OSRIC_CHARACTER_VARIABLES _charVariable, OSRIC_ATTRIBUTES _attribute, OSRIC_ATTRIBUTE_MODIFIER_TYPE _type, int _value) { this.characterVariable = _charVariable; this.attribute = _attribute; this.type = _type; this.name = "unkown"; this.value = _value; }
public List<OSRICCharacterModifier> GetModifierByCharacterVariable(OSRIC_CHARACTER_VARIABLES ocv) { List<OSRICCharacterModifier> retList = new List<OSRICCharacterModifier>(); foreach(OSRICCharacterModifier ocm in ModifierList) { if(ocm.characterVariable == ocv) retList.Add(ocm); } return retList; }
public OSRICCharacterModifier(JSONObject obj) { attribute = OSRICConstants.GetEnum<OSRIC_ATTRIBUTES>(obj["attribute"].str); type = OSRICConstants.GetEnum<OSRIC_ATTRIBUTE_MODIFIER_TYPE>(obj["type"].str); characterVariable = OSRICConstants.GetEnum<OSRIC_CHARACTER_VARIABLES> (obj["characterVariable"].str); savingThrow = OSRICConstants.GetEnum<OSRIC_SAVING_THROWS>(obj["savingThrow"].str); name = obj["name"].str; description = obj["description"].str; value = (int)obj["value"].n; duration = (int)obj["duration"].n; }