//public static IndividualStatBlock_Combat GetByID(int ID) //{ // IndividualStatBlock SB = IndividualStatBlock_Select.GetByID(ID); // Type type = SB.GetType(); // type = type.BaseType; // type = type.BaseType; // IndividualStatBlock_Combat SBC = new IndividualStatBlock_Combat(); // StatBlockGlobals.UpdateForType(type, SB, SBC); // return SBC; //} public void AddOnGoingStatBlockMod(OnGoingStatBlockModifier SBM) { StatBlockGlobals.StatBlockModifierTotal temp; OnGoingStatBlockMods.Add(SBM); if (StatBlockModTotalList.ContainsKey(SBM.Name)) { temp = StatBlockModTotalList[SBM.Name]; temp.Modifier = temp.Modifier + SBM.Modifier; temp.ModifierList = temp.ModifierList + ", " + SBM.Modifier.ToString() + PathfinderConstants.SPACE + SBM.Name; StatBlockModTotalList[SBM.Name] = temp; } else //new { temp = new StatBlockGlobals.StatBlockModifierTotal(); temp.Modifier = SBM.Modifier; temp.ModifierList = SBM.Modifier.ToString() + PathfinderConstants.SPACE + SBM.Name; StatBlockModTotalList[SBM.Name] = temp; } }
private void UpdateStatBlockMods() { OnGoingStatBlockModifier tempSBM; StatBlockGlobals.StatBlockModifierTotal temp; StatBlockModTotalList = new Dictionary <string, StatBlockGlobals.StatBlockModifierTotal>(); //re-do mods each round foreach (OnGoingStatBlockModifier SBM in OnGoingStatBlockMods) { tempSBM = SBM; if (tempSBM.Duration > 0) // -1 duration = on-going { tempSBM.Duration--; } if (tempSBM.Duration == 0) { OnGoingStatBlockMods.Remove(tempSBM); } else { if (StatBlockModTotalList.ContainsKey(tempSBM.Name)) { temp = StatBlockModTotalList[tempSBM.Name]; temp.Modifier = temp.Modifier + tempSBM.Modifier; temp.ModifierList = temp.ModifierList + ", " + tempSBM.Modifier.ToString() + PathfinderConstants.SPACE + tempSBM.Name; StatBlockModTotalList[tempSBM.Name] = temp; } else //new { temp = new StatBlockGlobals.StatBlockModifierTotal(); temp.Modifier = tempSBM.Modifier; temp.ModifierList = tempSBM.Modifier.ToString() + PathfinderConstants.SPACE + tempSBM.Name; StatBlockModTotalList[tempSBM.Name] = temp; } } } }