static internal TBAGW.KeyValuePair <Type, int> getStat(String statName) { LuaStat temp = new LuaStat(statName, 5); LuaStatEdit coll = new LuaStatEdit(); coll.modifyStats.Add(temp); STATChart sc = coll.ExtractStatChart(); for (int i = 0; i < sc.currentActiveStats.Count; i++) { if (sc.currentActiveStats[i] != 0) { return(new TBAGW.KeyValuePair <Type, int>(typeof(STATChart.ACTIVESTATS), i)); } } for (int i = 0; i < sc.currentPassiveStats.Count; i++) { if (sc.currentPassiveStats[i] != 0) { return(new TBAGW.KeyValuePair <Type, int>(typeof(STATChart.PASSIVESTATS), i)); } } for (int i = 0; i < sc.currentSpecialStats.Count; i++) { if (sc.currentSpecialStats[i] != 0) { return(new TBAGW.KeyValuePair <Type, int>(typeof(STATChart.SPECIALSTATS), i)); } } return(new TBAGW.KeyValuePair <Type, int>(null, 0)); }
internal virtual void Process() { STATChart sc = statMod.ExtractStatChart(); BaseModifier bm = new BaseModifier(); bm.statModifier = sc.Clone(); bm.abilityModifierLength = length; lci.parent.modifierList.Add(bm); }
internal void HandleLevelUp(BaseClass equippedClass, BaseCharacter currentBC) { STATChart tempStatAddition = null; ClassPoints tempCP = null; #region if (statAddition != null) { try { tempStatAddition = statAddition.ExtractStatChart(); } catch (Exception) { } } if (classPoints != null) { try { tempCP = ClassPoints.toClassPoints(classPoints); } catch (Exception) { } } #endregion #region if (tempStatAddition != null) { try { equippedClass.classStats.AddStatChartWithoutActive(tempStatAddition); } catch (Exception) { } } if (tempCP != null) { try { equippedClass.AddPoints(tempCP); } catch (Exception) { } } #endregion additionStat = tempStatAddition; additionPoints = tempCP; TBAGW.Utilities.ExpGainScreen.levelUpInfo = this; }