using System; using System.Collections; using System.Collections.Generic; using System.Globalization; using DarkTonic.MasterAudio; using Pathfinding; using PixelCrushers.DialogueSystem; using UnityEngine; // Token: 0x02000051 RID: 81 public class Stats : MonoBehaviour { // Token: 0x0600091E RID: 2334 RVA: 0x000C3DEB File Offset: 0x000C1FEB private void Start() { } // Token: 0x0600091F RID: 2335 RVA: 0x000C3DF0 File Offset: 0x000C1FF0 public void SetupStats(Character self, string n) { this.character = self; this.xmlName = n; if (this.character.party && (!Records.x.editor || (Records.x.editor && (!Records.x.useTestCharacters || !Records.x.skipMainMenu)))) { if (!n.Contains("Boro")) { this.xmlName = "Protagonist"; } if (Records.x.banquetIsle && n.Contains("Bloodless")) { this.xmlName = "BloodlessHunter"; } } this.characterRow = Links.x.library.GetPCRowFromName(this.xmlName); if (this.characterRow == null) { Debug.Log("null character row for " + this.xmlName); } this.originalMap = Links.x.diorama.sceneName; this.creaturesName = this.xmlName; this.canUseTwoWeapons = true; this.state = ""; this.useItemsAI = 45; this.autoBuffsAI = 2; this.autoCritsAI = 25; this.level = this.characterRow._Level; if (this.character.party && Records.x.banquetIsle) { if (n.Contains("Bloodless")) { this.level = 49; this.XP = 300126; } if (n.Contains("Viorica")) { this.level = 9; this.XP = 1800; } if (n.Contains("Emil")) { this.level = 8; this.XP = 2200; } } this.modalWindowsOpen = true; this.songPoints = this.SongPointsMax(); if (!this.character.npc) { if (ES3.FileExists(Records.x.openBook + "/Party1.es3")) { this.LoadFromDB(); } else { this.LoadFromDB(); } } else { this.LoadFromDB(); } if (this.character.party && (!Records.x.editor || (Records.x.editor && (!Records.x.useTestCharacters || !Records.x.skipMainMenu))) && !n.Contains("Boro") && !n.Contains("Bloodless")) { this.displayName = n; } if (this.character.party) { if ((!Records.x.editor || (Records.x.editor && (!Records.x.useTestCharacters || !Records.x.skipMainMenu))) && !n.Contains("Boro") && !n.Contains("Bloodless")) { this.xmlName = "Protagonist"; this.displayName = n; n = this.xmlName; } this.maxStamina = 30f; this.stamina = 30f; this.canCharge = true; } this.currLife = this.HealthMax(); this.magicPoints = 0; if (this.character.npc) { this.magicPoints = this.magicPointsBase; if (Records.x.banquetIsle) { this.magicPoints = 300; } } this.CarryingWeight(); if ((this.dialogueFile != "" && this.initiateDialogue >= 1 && this.initiateDialogue < 10) || this.initiateDialogue >= 11) { this.canTalk = true; } } // Token: 0x06000920 RID: 2336 RVA: 0x000C4150 File Offset: 0x000C2350 public void ChangingScene() { List list = new List(); foreach (Effects effects in this.effects) { list.Add(effects); } for (int i = 0; i < list.Count; i++) { list[i].Healed(this.character.dead, false); } } // Token: 0x06000921 RID: 2337 RVA: 0x000C41D4 File Offset: 0x000C23D4 public void RemoveEffect(Effects effect, string n) { int num = this.effects.IndexOf(effect); if (num > -1) { if (num < this.effects.Count) { this.effects.RemoveAt(num); return; } } else if (Records.x.editor) { Debug.Log("Effect gone " + n + " " + ((this != null) ? this.ToString() : null)); } } // Token: 0x06000922 RID: 2338 RVA: 0x000C423C File Offset: 0x000C243C public void ReturnPooledEffects() { for (int i = 0; i < this.effects.Count; i++) { this.effects[i].ReturnPooledEffects(); } } // Token: 0x06000923 RID: 2339 RVA: 0x000C4270 File Offset: 0x000C2470 public void RemoveAllAilments() { List list = new List(); foreach (Effects effects in this.effects) { if (!effects.effect._IsBuff) { list.Add(effects); } } for (int i = 0; i < list.Count; i++) { list[i].Healed(this.character.dead, false); } } // Token: 0x06000924 RID: 2340 RVA: 0x000C4300 File Offset: 0x000C2500 public void ClearAilments() { this.RemoveAllAilments(); this.effects.Clear(); } // Token: 0x06000925 RID: 2341 RVA: 0x000C4313 File Offset: 0x000C2513 public void AddEffect(Effects effect, int var1, float level) { if (!this.effects.Contains(effect)) { this.effects.Add(effect); } } // Token: 0x06000926 RID: 2342 RVA: 0x000C4330 File Offset: 0x000C2530 public void RemoveNullAilments() { if (this.effects.Count > 0) { int count = this.effects.Count; for (int i = 0; i < this.effects.Count; i++) { this.effects[i]; } } this.effects.RemoveAll((Effects item) => item == null); } // Token: 0x06000927 RID: 2343 RVA: 0x000C43AA File Offset: 0x000C25AA public void SaveEffects() { } // Token: 0x06000928 RID: 2344 RVA: 0x000C43AC File Offset: 0x000C25AC public void HealAll() { this.temp.Clear(); for (int i = 0; i < this.effects.Count; i++) { this.temp.Add(this.effects[i]); } int count = this.temp.Count; for (int j = 0; j < count; j++) { this.temp[j].Healed(false, true); } this.currLife = this.HealthMax(); if (this.character.downed) { this.character.downed = false; this.character.GetUp(); } if (this.character.portrait) { this.character.portrait.SetHealthColor(); } if (this.character.dockFriend) { this.character.dockFriend.UpdateHealth(); } this.UpdateStats(); } // Token: 0x06000929 RID: 2345 RVA: 0x000C4498 File Offset: 0x000C2698 public int GetMaxRadiusFromAbilities() { int count = this.abilityNames.Count; int num = 0; for (int i = 0; i < count; i++) { if (this.abilityLevels[i].x > 0f || (this.abilityLevels[i].x == 0f && this.abilityRows[i]._IsSpell)) { Library.Effects effectRow = Links.x.library.GetEffectRow(this.abilityNames[i]); if (this.abilityRows[i]._AINotes.Contains("Crowd") && effectRow != null && effectRow._TileRadius > 0 && effectRow._TileRadius > num) { num = effectRow._TileRadius; } } } return num; } // Token: 0x0600092A RID: 2346 RVA: 0x000C4560 File Offset: 0x000C2760 public int GetLevel(string abilityName) { int count = this.abilityNames.Count; for (int i = 0; i < count; i++) { if (this.abilityNames[i] == abilityName) { return (int)this.abilityLevels[i].x; } } return 0; } // Token: 0x0600092B RID: 2347 RVA: 0x000C45B0 File Offset: 0x000C27B0 public Effects GetExistingEffect(string n) { for (int i = 0; i < this.effects.Count; i++) { if (this.effects[i] && this.effects[i].effectName == n) { return this.effects[i]; } } return null; } // Token: 0x0600092C RID: 2348 RVA: 0x000C4610 File Offset: 0x000C2810 public float GetAmplifyEffects() { float num = 0f; for (int i = 0; i < this.effects.Count; i++) { if (this.effects[i]) { if (this.effects[i].effect._Script.Contains("AmplifyWounds")) { num += this.effects[i].sourceLevel; } if (this.effects[i].effect._Script.Contains("PukeSpore")) { num += this.effects[i].sourceLevel; } } } return num; } // Token: 0x0600092D RID: 2349 RVA: 0x000C46C0 File Offset: 0x000C28C0 public float AddPotionBoosts() { float num = 0f; for (int i = 0; i < this.effects.Count; i++) { if (this.effects[i]) { if (this.effects[i].effect._Name.Contains("HarvestOverflowing")) { num += this.effects[i].sourceLevel; } if (this.effects[i].effect._Name.Contains("HarvestOverflowing")) { num += this.effects[i].sourceLevel; } } } return num; } // Token: 0x0600092E RID: 2350 RVA: 0x000C4770 File Offset: 0x000C2970 public int GetStatusCount(Effects exclude, string type) { int num = 0; for (int i = 0; i < this.effects.Count; i++) { Effects effects = this.effects[i]; if (effects && effects != exclude) { if (type == "Stun") { if (effects.effect._Stun > 0) { num++; } } else if (type == "Flee") { if (effects.effect._Flee > 0) { num++; } } else if (type == "Stuck") { if (effects.effect._StuckInPlace > 0) { num++; } } else if (type == "Confuse" && effects.effect._Confuse > 0) { num++; } } } return num; } // Token: 0x0600092F RID: 2351 RVA: 0x000C4844 File Offset: 0x000C2A44 public bool HasInstrumentEffect(string n) { int count = this.effects.Count; for (int i = 0; i < count; i++) { if (this.effects[i] && this.effects[i].hasAbility && this.effects[i].ability._MainSkill == n) { return true; } } return false; } // Token: 0x06000930 RID: 2352 RVA: 0x000C48B0 File Offset: 0x000C2AB0 public bool HasEffect(string n) { int count = this.effects.Count; for (int i = 0; i < this.effects.Count; i++) { if (this.effects[i] && this.effects[i].effectName == n) { return true; } } return false; } // Token: 0x06000931 RID: 2353 RVA: 0x000C4910 File Offset: 0x000C2B10 public void RemoveCurrentSong(bool isBuff) { for (int i = 0; i < this.effects.Count; i++) { Effects effects = this.effects[i]; if (effects && effects.effect._IsSong && ((effects.effect._IsBuff && isBuff) || (!effects.effect._IsBuff && !isBuff))) { effects.Healed(false, true); return; } } } // Token: 0x06000932 RID: 2354 RVA: 0x000C4980 File Offset: 0x000C2B80 public bool HasSongBuff() { for (int i = 0; i < this.effects.Count; i++) { Effects effects = this.effects[i]; if (effects && effects.effect._IsSong && effects.effect._IsBuff) { return true; } } return false; } // Token: 0x06000933 RID: 2355 RVA: 0x000C49D8 File Offset: 0x000C2BD8 public bool HasSongAilment() { for (int i = 0; i < this.effects.Count; i++) { Effects effects = this.effects[i]; if (effects && effects.effect._IsSong && !effects.effect._IsBuff) { return true; } } return false; } // Token: 0x06000934 RID: 2356 RVA: 0x000C4A30 File Offset: 0x000C2C30 public bool HasAilment() { bool flag = false; int count = this.effects.Count; for (int i = 0; i < count; i++) { if (this.effects[i] && !this.effects[i].effect._IsBuff) { return true; } } return flag; } // Token: 0x06000935 RID: 2357 RVA: 0x000C4A88 File Offset: 0x000C2C88 public void HealEffect(string n) { for (int i = 0; i < 10; i++) { bool flag = false; int count = this.effects.Count; for (int j = 0; j < count; j++) { if (!flag && j < this.effects.Count && this.effects[j] && this.effects[j].effectName == n) { this.effects[j].Healed(false, true); flag = true; } } } } // Token: 0x06000936 RID: 2358 RVA: 0x000C4B10 File Offset: 0x000C2D10 public void HealEffectExcept(string n, Effects e) { for (int i = 0; i < 10; i++) { bool flag = false; int count = this.effects.Count; for (int j = 0; j < count; j++) { if (!flag && j < this.effects.Count && this.effects[j] && this.effects[j].effectName == n && this.effects[j] != e) { this.effects[j].Healed(false, true); flag = true; } } } } // Token: 0x06000937 RID: 2359 RVA: 0x000C4BB0 File Offset: 0x000C2DB0 public bool HasEffectAndCure(string n) { for (int i = 0; i < this.effects.Count; i++) { if (this.effects[i] && this.effects[i].effectName == n && i < this.effects.Count && this.effects[i]) { this.effects[i].Healed(false, true); return true; } } return false; } // Token: 0x06000938 RID: 2360 RVA: 0x000C4C38 File Offset: 0x000C2E38 public void RemoveTileEffect(Effects effect) { int count = this.effects.Count; for (int i = 0; i < count; i++) { if (this.effects[i] == effect) { this.effects[i].Healed(this.character.dead, true); return; } } } // Token: 0x06000939 RID: 2361 RVA: 0x000C4C90 File Offset: 0x000C2E90 public void ChangeAilmentMultiplier(float amt, bool isBuff, bool healed) { for (int i = 0; i < this.effects.Count; i++) { this.effects[i].ChangeAilmentMultiplier(amt, isBuff, healed); } } // Token: 0x0600093A RID: 2362 RVA: 0x000C4CC8 File Offset: 0x000C2EC8 public void SpawnStartingEffect() { if (this.characterRow._StartingEffect != "") { bool flag = true; if (this.xmlName.Contains("RozafirFarmer")) { QuestState questState = QuestLog.GetQuestState("D6_Licech"); if (questState != QuestState.Unassigned && questState != QuestState.Active && questState != QuestState.ActivePart2 && questState != QuestState.Discussed) { flag = false; } } if (flag) { if (Records.x.testQuests) { Debug.Log(((this != null) ? this.ToString() : null) + " " + this.characterRow._StartingEffect); } Effects effects = base.gameObject.AddComponent(); Links.x.cellar.AddEffects(effects); effects.gameObject.SetActive(true); this.effects.Add(effects); effects.source = null; effects.effectStartTime = 0; effects.target = this.character; effects.fromLoad = true; effects.effectName = this.characterRow._StartingEffect; effects.sourceLevel = 0f; effects.Inflicted(false); } } } // Token: 0x0600093B RID: 2363 RVA: 0x000C4DDC File Offset: 0x000C2FDC public void SpawnEffects() { if (this.effectsNamesFromSave.Count > 0) { int count = this.effectsNamesFromSave.Count; for (int i = 0; i < this.effectsNamesFromSave.Count; i++) { Library.Effects effectRow = Links.x.library.GetEffectRow(this.effectsNamesFromSave[i]); if (effectRow != null && !effectRow._IsIntercession && !effectRow._Name.Contains("Ring") && !effectRow._Name.Contains("Circle") && !effectRow._Name.Contains("Circlet") && !effectRow._Name.Contains("Earring") && !effectRow._WhileOnTile && effectRow._Name != "Leader" && effectRow._Name != "Follower") { Effects effects = base.gameObject.AddComponent(); Links.x.cellar.AddEffects(effects); effects.gameObject.SetActive(true); this.effects.Add(effects); effects.source = null; float num = (float)this.effectsTimesFromSave[i]; effects.target = this.character; effects.fromLoad = true; effects.effectName = this.effectsNamesFromSave[i]; effects.sourceLevel = this.effectsVar2FromSave[i]; effects.Inflicted(false); if (effects) { effects.effectStartTime = (int)num; } } } } this.effectsNamesFromSave.Clear(); this.effectsTimesFromSave.Clear(); this.effectsVar2FromSave.Clear(); } // Token: 0x0600093C RID: 2364 RVA: 0x000C4F94 File Offset: 0x000C3194 public string GetStatusEffects(bool characterSheet) { int count = this.effects.Count; this.str.Clear(); int num = 0; if (this.character.stunned && characterSheet) { this.str.Append(""); this.str.Append("Stunned\nKnocked out for up to 24 hours\n"); int num2 = (int)this.character.timeOfDeath - (int)Mathf.Floor((float)Links.x.gameplay.GetCurrentGameTimeHours()); this.str.Append(num2); if ((float)num2 != 1f) { this.str.Append(" hours remaining\n"); } else { this.str.Append(" hour remaining\n"); } } for (int i = 0; i < count; i++) { if (this.effects[i].effect._ShowInStatus && !this.effects[i].effect._Permanent) { if (num == 0) { if (characterSheet) { this.str.Append(""); } } else if (characterSheet) { this.str.Append("\n"); this.str.Append(""); } else { this.str.Append(", "); } this.str.Append(this.effects[i].effect._DisplayName); if (characterSheet) { this.str.Append(""); this.str.Append("\n"); this.str.Append(this.effects[i].displayEffects); } if (this.effects[i].effect._OverallTime > 0f && !this.effects[i].effect._OverTime) { int num3 = this.effects[i].effectStartTime + this.effects[i].timeToWait - (int)Links.x.gameplay.seconds; if (num3 < 0) { num3 *= -1; } num3 = (int)Records.x.ShowSeconds(num3); if (characterSheet) { if (this.effects[i].displayEffects != "") { this.str.Append("\n"); } } else { this.str.Append(" ("); } this.str.Append(num3); if (characterSheet) { if ((float)num3 != 1f) { this.str.Append(" seconds remaining\n"); } else { this.str.Append(" second remaining\n"); } } else { this.str.Append("s)"); } } else if (characterSheet) { this.str.Append("\n"); } num++; } } string text = this.str.ToString(); if (text == "") { return ""; } return text; } // Token: 0x0600093D RID: 2365 RVA: 0x000C5340 File Offset: 0x000C3540 public float GetStatusEffectDuration(string effect) { int count = this.effects.Count; float num = 0f; for (int i = 0; i < count; i++) { if (effect == this.effects[i].effect._Name && this.effects[i].effect._OverallTime > num) { num = (float)(this.effects[i].effectStartTime + this.effects[i].timeToWait - (int)Links.x.gameplay.seconds); } } return num; } // Token: 0x0600093E RID: 2366 RVA: 0x000C53DC File Offset: 0x000C35DC public string GetStatusEffectSingle(string effect) { int count = this.effects.Count; bool flag = false; this.str.Clear(); float num = 0f; for (int i = 0; i < count; i++) { if (effect == this.effects[i].effect._Name) { if (!flag) { this.str.Append(this.effects[i].effect._DisplayName); } flag = true; if (this.effects[i].effect._OverallTime > num) { num = (float)(this.effects[i].effectStartTime + this.effects[i].timeToWait - (int)Links.x.gameplay.seconds); } } } if (flag) { this.str.Append(" ("); float num2 = Records.x.ShowSeconds((int)num); if (num2 < 60f) { this.str.Append(num2); this.str.Append(" sec.)"); } else { float num3 = num2 / 60f; num3 = Mathf.Round(num3); this.str.Append(num3); this.str.Append(" min.)"); } } return this.str.ToString(); } // Token: 0x0600093F RID: 2367 RVA: 0x000C5538 File Offset: 0x000C3738 public void GetEffectStrings() { this.effectsNamesFromSave.Clear(); this.effectsTimesFromSave.Clear(); this.effectsVar2FromSave.Clear(); for (int i = 0; i < this.effects.Count; i++) { if (this.effects[i]) { this.effectsNamesFromSave.Add(this.effects[i].effectName); this.effectsTimesFromSave.Add(this.effects[i].effectStartTime); this.effectsVar2FromSave.Add(this.effects[i].sourceLevel); } } if (this.effectsNamesFromSave.Count > 0) { this.str.Clear(); int count = this.effectsNamesFromSave.Count; for (int j = 0; j < count; j++) { if (j > 0) { this.str.Append(","); } this.str.Append(this.effectsNamesFromSave[j]); this.str.Append(","); this.str.Append(this.effectsTimesFromSave[j]); this.str.Append(","); this.str.Append(0); this.str.Append(","); this.str.Append(this.effectsVar2FromSave[j]); } this.savedEffects = this.str.ToString(); return; } this.savedEffects = ""; } // Token: 0x06000940 RID: 2368 RVA: 0x000C56D8 File Offset: 0x000C38D8 public void AddEffectFromLoad(string x, string y, string z, string w) { this.effectsNamesFromSave.Clear(); this.effectsTimesFromSave.Clear(); this.effectsVar2FromSave.Clear(); this.effectsNamesFromSave.Add(x); if (y == null) { y = "0"; } int num = 0; int.TryParse(y, NumberStyles.Any, CultureInfo.InvariantCulture, out num); this.effectsTimesFromSave.Add(num); num = 0; int.TryParse(w, NumberStyles.Any, CultureInfo.InvariantCulture, out num); this.effectsVar2FromSave.Add((float)num); } // Token: 0x06000941 RID: 2369 RVA: 0x000C5760 File Offset: 0x000C3960 public void UpdateStats() { } // Token: 0x06000942 RID: 2370 RVA: 0x000C5762 File Offset: 0x000C3962 public int XPToNextLevel() { return this.GetNextLevel(this.level); } // Token: 0x06000943 RID: 2371 RVA: 0x000C5770 File Offset: 0x000C3970 public int XPToNextLevelForLevelUp() { int nextLevel = this.GetNextLevel(this.level); int xp = this.XP; return nextLevel - xp; } // Token: 0x06000944 RID: 2372 RVA: 0x000C5794 File Offset: 0x000C3994 public void CheckThatXPLevelIsCorrect(int xpTest, int lvlTest) { if (Records.x.banquetIsle) { return; } int num = this.GetNextLevel(lvlTest - 1); if (lvlTest == 1) { num = 0; } int num2 = this.GetNextLevel(lvlTest) - 1; if (xpTest > num2 || xpTest < num) { Debug.Log("Level is wrong"); Debug.Log(string.Concat(new string[] { ", min: ", num.ToString(), " max: ", num2.ToString(), " xp: ", xpTest.ToString() })); bool flag = false; for (int i = lvlTest; i >= 1; i--) { if (!flag) { Debug.Log("Testing level " + i.ToString()); num = this.GetNextLevel(i - 1) + 1; if (i == 1) { num = 0; } Debug.Log("level min is " + num.ToString()); num2 = this.GetNextLevel(i) - 1; Debug.Log("level max is " + num2.ToString()); if (xpTest <= num2 && xpTest >= num) { this.level = i; Debug.Log("Found correct level: " + i.ToString()); flag = true; if (this.level == 3 && xpTest >= 225) { if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "2"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; } if (this.level == 4 && xpTest >= 375) { if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "3"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; } if (this.level == 5) { if (xpTest >= 375) { if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "3"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; } if (xpTest >= 600) { if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "4"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; } } if (this.level == 6) { if (xpTest >= 375) { if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "3"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; } if (xpTest >= 600) { if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "4"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; } if (xpTest >= 900) { if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "5"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; } } if (this.level == 7) { if (xpTest >= 375) { if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "3"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; } if (xpTest >= 600) { if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "4"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; } if (xpTest >= 900) { if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "5"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; } if (xpTest >= 1250) { if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "6"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; } } } } } } } // Token: 0x06000945 RID: 2373 RVA: 0x000C6A2C File Offset: 0x000C4C2C public int GetNextLevel(int lvl) { if (lvl <= 1) { return 150; } if (lvl == 2) { return 600; } if (lvl == 3) { return 1350; } if (lvl == 4) { return 2400; } if (lvl == 5) { return 3750; } if (lvl == 6) { return 5400; } if (lvl == 7) { return 7350; } if (lvl == 8) { return 9600; } if (lvl == 9) { return 12150; } if (lvl == 10) { return 15000; } if (lvl == 11) { return 18150; } if (lvl == 12) { return 21600; } if (lvl == 13) { return 25350; } if (lvl == 14) { return 29400; } if (lvl == 15) { return 33750; } if (lvl == 16) { return 38400; } if (lvl == 17) { return 43350; } if (lvl == 18) { return 48600; } if (lvl == 19) { return 54150; } if (lvl == 20) { return 60000; } if (lvl == 21) { return 66150; } if (lvl == 22) { return 72600; } if (lvl == 23) { return 79350; } if (lvl == 24) { return 86400; } if (lvl == 25) { return 93750; } if (lvl == 26) { return 101400; } if (lvl == 27) { return 109350; } if (lvl == 28) { return 117600; } if (lvl == 29) { return 126150; } if (lvl == 30) { return 135000; } if (lvl == 31) { return 144150; } if (lvl == 32) { return 153600; } if (lvl == 33) { return 163350; } if (lvl == 34) { return 173400; } if (lvl == 35) { return 183750; } if (lvl == 36) { return 194400; } if (lvl == 37) { return 205350; } if (lvl == 38) { return 216600; } if (lvl == 39) { return 228150; } if (lvl == 40) { return 240000; } if (lvl == 41) { return 252150; } if (lvl == 42) { return 264600; } if (lvl == 43) { return 277350; } if (lvl == 44) { return 290400; } if (lvl == 45) { return 303750; } if (lvl == 46) { return 317400; } if (lvl == 47) { return 331350; } if (lvl == 48) { return 345600; } if (lvl == 49) { return 360150; } if (lvl == 50) { return 375000; } return lvl * lvl * 150; } // Token: 0x06000946 RID: 2374 RVA: 0x000C6C60 File Offset: 0x000C4E60 public int GetNextLevelBefore1_3(int lvl) { if (lvl <= 1) { return 100; } if (lvl == 2) { return 225; } if (lvl == 3) { return 375; } if (lvl == 4) { return 600; } if (lvl == 5) { return 900; } if (lvl == 6) { return 1250; } if (lvl == 7) { return 1600; } if (lvl == 8) { return 2000; } if (lvl == 9) { return 2400; } if (lvl == 10) { return 2800; } if (lvl == 11) { return 3200; } if (lvl == 12) { return 3800; } if (lvl == 13) { return 7000; } if (lvl == 14) { return 10000; } if (lvl == 15) { return 15000; } if (lvl == 16) { return 21000; } if (lvl == 17) { return 27000; } if (lvl == 18) { return 35000; } if (lvl == 19) { return 45000; } if (lvl == 20) { return 55000; } if (lvl == 21) { return 65000; } if (lvl == 22) { return 75000; } if (lvl == 23) { return 85000; } if (lvl == 24) { return 95000; } if (lvl == 25) { return 105000; } if (lvl == 26) { return 115000; } if (lvl == 27) { return 125000; } if (lvl == 28) { return 135000; } if (lvl == 29) { return 145000; } if (lvl == 30) { return 155000; } return 999999; } // Token: 0x06000947 RID: 2375 RVA: 0x000C6DB4 File Offset: 0x000C4FB4 public int CorrectLevelForXP(int prevXP, int prevLevel) { int num = this.GetNextLevel(prevLevel - 1); if (prevLevel == 1) { prevLevel = 0; } int num2 = this.GetNextLevel(prevLevel) - 1; if (prevXP <= num2 && prevXP >= num) { return prevLevel; } Debug.Log("Level is wrong"); Debug.Log(string.Concat(new string[] { ", min: ", num.ToString(), " max: ", num2.ToString(), " xp: ", prevXP.ToString() })); bool flag = false; int num3 = prevLevel; for (int i = 50; i >= 1; i--) { if (!flag) { Debug.Log("Testing level " + i.ToString()); num = this.GetNextLevel(i - 1) + 1; if (i == 1) { num = 0; } Debug.Log("level min is " + num.ToString()); num2 = this.GetNextLevel(i) - 1; Debug.Log("level max is " + num2.ToString()); if (prevXP <= num2 && prevXP >= num) { num3 = i; Debug.Log("Found correct level: " + i.ToString()); flag = true; } } } return num3; } // Token: 0x06000948 RID: 2376 RVA: 0x000C6EDC File Offset: 0x000C50DC public void AddXP(int amt, Character target, bool show) { if (target && target.summoned) { return; } if (!this.character.dead && amt > 0) { if (target) { float num = (float)amt; if (target.numberOfTimesKilled == 1f) { num = (float)amt * 0.75f; } if (target.numberOfTimesKilled == 2f) { num = (float)amt * 0.5f; } if (target.numberOfTimesKilled == 3f) { num = (float)amt * 0.25f; } if (target.numberOfTimesKilled >= 4f) { num = 0f; } amt = Mathf.RoundToInt(num); } this.XP += amt; if (show) { this.ShowXP(amt); } this.CheckForLevelUp(); this.str.Clear(); this.str.Append(Links.x.gameFeed.GetPartyColorText(this.character)); this.str.Append(this.GetName()); this.str.Append(""); this.str.Append(" +"); this.str.Append(amt); this.str.Append(" XP"); if (!Links.x.creation) { Links.x.gameFeed.AddFeed(this.str.ToString()); } this.CheckForLevelUp(); } } // Token: 0x06000949 RID: 2377 RVA: 0x000C7048 File Offset: 0x000C5248 public void ShowXP(int amt) { Animator animatedText = Links.x.cellar.GetAnimatedText("XP", amt.ToString(), false); animatedText.gameObject.transform.position = this.character.body.HeadPosition(0f) + new Vector3(Random.Range(0f, 1f), Random.Range(0f, 1f), 0f) + new Vector3(0f, 2.5f, 0f); animatedText.gameObject.transform.SetParent(this.character.tr, true); animatedText.gameObject.name = this.GetName(); MasterAudio.PlaySoundAndForget("Feedback", 0.6f, new float?(1f), 0f, "XP", null); } // Token: 0x0600094A RID: 2378 RVA: 0x000C7138 File Offset: 0x000C5338 public void CheckForLevelUp() { for (int i = 0; i < 30; i++) { int num = this.level; if (this.GetNextLevel(this.level) <= this.XP) { this.LevelUpSkills(); if (this.levelUpCorout != null) { base.StopCoroutine(this.levelUpCorout); this.levelUpCorout = null; } this.levelUpCorout = this.LevelUpDelay("Skill"); base.StartCoroutine(this.levelUpCorout); this.str.Clear(); this.str.Append(Links.x.gameFeed.GetPartyColorText(this.character)); this.str.Append(this.GetName()); this.str.Append(""); this.str.Append(" leveled up"); Links.x.gameFeed.AddFeed(this.str.ToString()); } } } // Token: 0x0600094B RID: 2379 RVA: 0x000C7230 File Offset: 0x000C5430 private IEnumerator LevelUpDelay(string type) { yield return new WaitForSecondsRealtime(2f); Animator animator; if (type == "Skill") { animator = Links.x.cellar.GetAnimatedText("LevelUp", "", false); } else { animator = Links.x.cellar.GetAnimatedText("Text", "Stat+", false); } animator.gameObject.transform.position = this.character.body.HeadPosition(0f) + new Vector3(Random.Range(0f, 1f), Random.Range(0f, 1f), 0f) + new Vector3(0f, 0.5f, 0f); animator.gameObject.transform.SetParent(this.character.tr, true); animator.gameObject.name = this.GetName(); MasterAudio.PlaySoundAndForget("Feedback", 0.1f, new float?(1f), 0f, "LevelUp", null); this.levelUpCorout = null; yield break; } // Token: 0x0600094C RID: 2380 RVA: 0x000C7248 File Offset: 0x000C5448 public void GetHighestSkills(out int highest1, out int highest2, out int highest3) { highest1 = -1; float num = -1f; highest2 = -1; highest3 = -1; for (int i = 0; i < this.skillsProgress.Count; i++) { if (this.skillsProgress[i] > num && this.skillsProgress[i] > 0f) { highest1 = i; num = this.skillsProgress[i]; } } num = -1f; for (int j = 0; j < this.skillsProgress.Count; j++) { if (this.skillsProgress[j] > num && j != highest1 && this.skillsProgress[j] > 0f) { highest2 = j; num = this.skillsProgress[j]; } } num = -1f; for (int k = 0; k < this.skillsProgress.Count; k++) { if (this.skillsProgress[k] > num && k != highest1 && k != highest2 && this.skillsProgress[k] > 0f) { highest3 = k; num = this.skillsProgress[k]; } } } // Token: 0x0600094D RID: 2381 RVA: 0x000C7358 File Offset: 0x000C5558 public void LevelUpSkills() { int num = 0; int num2 = 1; int num3 = 2; this.GetHighestSkills(out num, out num2, out num3); if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += this.level.ToString(); this.levelUps += ","; this.levelUps += num.ToString(); this.levelUps += ","; this.levelUps += num2.ToString(); this.levelUps += ","; this.levelUps += num3.ToString(); for (int i = 0; i < this.skillsProgress.Count; i++) { this.skillsProgress[i] = 0f; } this.level++; this.LevelUpStats(); } // Token: 0x0600094E RID: 2382 RVA: 0x000C7480 File Offset: 0x000C5680 public void LevelUpStats() { if (this.levelUps != "") { this.levelUps += ","; } this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; this.levelUps += ","; this.levelUps += "-1"; if (this.levelUpCorout != null) { base.StopCoroutine(this.levelUpCorout); this.levelUpCorout = null; } this.levelUpCorout = this.LevelUpDelay("Stat"); base.StartCoroutine(this.levelUpCorout); this.str.Clear(); this.str.Append(Links.x.gameFeed.GetPartyColorText(this.character)); this.str.Append(this.GetName()); this.str.Append(""); Links.x.gameFeed.AddFeed(this.str.ToString()); } // Token: 0x0600094F RID: 2383 RVA: 0x000C75F4 File Offset: 0x000C57F4 public bool ShouldStun(Character target) { bool flag = false; if (target.party) { flag = false; } if (!this.character.npc && !Records.x.kill) { flag = true; } if (this.character.npc && (this.isGuard || this.allegiance == 6U)) { if (!target) { return false; } if (target.stats.animal) { flag = false; } else { flag = true; if (!Records.x.kill && target.stats.allegiance == 7U && target.stats.xmlName.Contains("WestRuins")) { flag = false; } } } return flag; } // Token: 0x06000950 RID: 2384 RVA: 0x000C7697 File Offset: 0x000C5897 public bool CanAttackStunned() { return !this.character.npc || (!this.isGuard && this.allegiance != 6U); } // Token: 0x06000951 RID: 2385 RVA: 0x000C76BC File Offset: 0x000C58BC public string GetDialogueName() { if (!this.character.npc) { return this.displayName; } if (this.initiateDialogue >= 10 && this.race != "Dryad") { return this.displayName + ", " + this.characterRow._GenericName; } if (this.characterRow._GenericName != "") { return this.characterRow._GenericName; } return this.displayName; } // Token: 0x06000952 RID: 2386 RVA: 0x000C7740 File Offset: 0x000C5940 public string GetName() { if (this.character.ghost) { return "Ghost"; } if (!this.character.npc) { return this.displayName; } if (this.initiateDialogue >= 10) { return this.displayName; } if (this.characterRow._GenericName != "") { return this.characterRow._GenericName; } if (this.race.Contains("Forest")) { return "Forest creature"; } if (this.race.Contains("Shroom")) { return "Shroom creature"; } if (this.race.Contains("Fish")) { return "Fish creature"; } if (this.race.Contains("Beast")) { return "Beast"; } if (this.race.Contains("Demon")) { return "Demon"; } return this.displayName; } // Token: 0x06000953 RID: 2387 RVA: 0x000C7826 File Offset: 0x000C5A26 public string GetDisplayName() { return this.displayName; } // Token: 0x06000954 RID: 2388 RVA: 0x000C782E File Offset: 0x000C5A2E public string GetGenericName() { return this.characterRow._GenericName; } // Token: 0x06000955 RID: 2389 RVA: 0x000C783C File Offset: 0x000C5A3C public void UpdateDiceModifiers(int type, int count, int sides, bool removing) { if (!removing) { this.diceCountMods.Add(count); this.diceSideMods.Add(sides); this.diceTypeMods.Add(type); return; } int num = -1; for (int i = 0; i < this.diceTypeMods.Count; i++) { if (this.diceCountMods[i] == count && this.diceSideMods[i] == sides && this.diceTypeMods[i] == type) { num = i; break; } } if (num > -1) { this.diceCountMods.RemoveAt(num); this.diceSideMods.RemoveAt(num); this.diceTypeMods.RemoveAt(num); } } // Token: 0x06000956 RID: 2390 RVA: 0x000C78E3 File Offset: 0x000C5AE3 public int GetDiceModifier(int type) { return 0; } // Token: 0x06000957 RID: 2391 RVA: 0x000C78E6 File Offset: 0x000C5AE6 public int GetDiceModifierAverage(int type) { return 0; } // Token: 0x06000958 RID: 2392 RVA: 0x000C78EC File Offset: 0x000C5AEC public int GetFlatModifier(int type) { if (type == 0) { return (int)this.strengthModFlat; } if (type == 1) { return (int)this.agilityModFlat; } if (type == 2) { return (int)this.auraModFlat; } if (type == 3) { return (int)this.paganModFlat; } if (type == 4) { return (int)this.dexterityModFlat; } if (type == 5) { return (int)this.sensoryModFlat; } if (type == 6) { return (int)this.severityModFlat; } if (type == 7) { return (int)this.paganSeverityModFlat; } if (type == 8) { return (int)this.hitModFlat; } if (type == 9) { return (int)this.paganHitModFlat; } if (type == 10) { return (int)this.evadeModFlat; } if (type == 11) { return (int)this.blockModFlat; } return 0; } // Token: 0x06000959 RID: 2393 RVA: 0x000C798C File Offset: 0x000C5B8C public int GetCombatSkillID(string mainSkill) { int num = 0; if (mainSkill == "Whip") { num = 35; } if (mainSkill == "Pole") { num = 8; } if (mainSkill == "Scepter" || mainSkill == "Scepter") { num = 6; } if (mainSkill == "Sword") { num = 5; } if (mainSkill == "ShortSword") { num = 4; } if (mainSkill == "Sling") { num = 11; } if (mainSkill == "Ax") { num = 7; } if (mainSkill == "Bow") { num = 10; } if (mainSkill == "Edge") { num = 4; } if (mainSkill == "Bindings") { num = 16; } if (mainSkill == "Fauna") { num = 17; } if (mainSkill == "Vines") { num = 18; } if (mainSkill == "Spores") { num = 19; } if (mainSkill == "Elixir") { num = 12; } if (mainSkill == "LargeShield") { num = 14; } if (mainSkill == "SmallShield") { num = 15; } if (mainSkill == "Hand-to-Hand") { num = 13; } if (mainSkill == "Flute") { num = 26; } if (mainSkill == "Horn") { num = 27; } if (mainSkill == "Pipe") { num = 29; } if (mainSkill == "Pearl") { num = 1; } if (mainSkill == "Stonewood") { num = 3; } if (mainSkill == "Robes") { num = 0; } if (mainSkill == "Crimscale") { num = 2; } if (mainSkill == "Multi-Hand") { num = 9; } if (mainSkill == "Flute") { num = 26; } if (mainSkill == "Horn") { num = 27; } if (mainSkill == "Pipe") { num = 29; } return num; } // Token: 0x0600095A RID: 2394 RVA: 0x000C7B60 File Offset: 0x000C5D60 public int GetArmorSkillID(string mainSkill) { int num = 0; if (mainSkill == "Pearl") { num = 1; } if (mainSkill == "Stonewood") { num = 3; } if (mainSkill == "Robes") { num = 0; } if (mainSkill == "Crimscale") { num = 2; } return num; } // Token: 0x0600095B RID: 2395 RVA: 0x000C7BAC File Offset: 0x000C5DAC public int GetCharmerSkillID(string mainSkill) { int num = 0; if (mainSkill == "Forest") { num = 24; } if (mainSkill == "Fish") { num = 23; } if (mainSkill == "Shroom") { num = 25; } return num; } // Token: 0x0600095C RID: 2396 RVA: 0x000C7BEC File Offset: 0x000C5DEC public float R2(float x) { return Mathf.Round(x * 10f) / 10f; } // Token: 0x0600095D RID: 2397 RVA: 0x000C7C00 File Offset: 0x000C5E00 public float R1(float x) { return Mathf.Round(x * 10f) / 10f; } // Token: 0x0600095E RID: 2398 RVA: 0x000C7C14 File Offset: 0x000C5E14 public float PartyAdventureMoveSpeed() { return Links.x.fellowship.GetPartyMoveSpeed(); } // Token: 0x0600095F RID: 2399 RVA: 0x000C7C28 File Offset: 0x000C5E28 public float MoveSpeed(bool forCharacterSheet) { float num = this.moveSpeedMod; float num2; if (!forCharacterSheet) { if (this.animal) { num2 = this.PaganMSNPC() + this.StrengthMSNPC() + this.AglMSNPC(); num2 += this.MoveSpeedBaseNPC() * 35f; } else if (!this.character.party) { num2 = this.PaganMSNPC() + this.StrengthMSNPC() + this.AglMSNPC(); if (this.character.inCombat) { num2 += this.MoveSpeedBaseNPC() * 60f; } else { num2 += this.MoveSpeedBaseNPC() * 91f; } } else { num2 = this.PaganMS() + this.StrengthMS() + this.AglMS(); if (forCharacterSheet || this.character.inCombat) { num2 += 68f; } else { num2 += 97f; } } if (this.character.vipFollow || this.character.summoned) { if (this.character.animator.GetBool("Combat")) { num2 += this.MoveSpeedMS() * 100f; } else { num2 += this.R1(this.summonSpeed) * 100f; } } else { num2 += this.MoveSpeedMS() * 100f; } num2 *= 0.01f; } else { num2 = this.PaganMS() + this.StrengthMS() + this.AglMS(); } if (this.character.party) { float num3 = this.BagWeightMS(); num2 *= num3; } if (num != 0f) { float moveMod = this.GetMoveMod(); num2 *= moveMod; } if (num2 < 0f) { num2 = 0.1f; } return this.R2(num2); } // Token: 0x06000960 RID: 2400 RVA: 0x000C7DC8 File Offset: 0x000C5FC8 public float GetMoveMod() { float num = this.moveSpeedMod; if (num > 10f) { num = 10f; } if (num < -10f) { num = -10f; } float num2 = Mathf.Abs(num / 10f); if (num > 0f) { return this.R1(1f + num2); } return this.R1(1f - num2); } // Token: 0x06000961 RID: 2401 RVA: 0x000C7E28 File Offset: 0x000C6028 public float MoveSpeedBaseNPC() { return 0.675f; } // Token: 0x06000962 RID: 2402 RVA: 0x000C7E2F File Offset: 0x000C602F public float MoveSpeedMS() { return this.R1(this.moveSpeed / 2f); } // Token: 0x06000963 RID: 2403 RVA: 0x000C7E43 File Offset: 0x000C6043 public float PaganMS() { return this.R1((this.Pagan() + this.paganModFlat + (float)this.GetDiceModifierAverage(3)) / 10f); } // Token: 0x06000964 RID: 2404 RVA: 0x000C7E67 File Offset: 0x000C6067 public float StrengthMS() { return this.R1((this.Strength() + this.strengthModFlat + (float)this.GetDiceModifierAverage(0)) / 10f); } // Token: 0x06000965 RID: 2405 RVA: 0x000C7E8B File Offset: 0x000C608B public float PaganMSNPC() { return this.R1((this.Pagan() + this.paganModFlat + (float)this.GetDiceModifierAverage(3)) / 3f); } // Token: 0x06000966 RID: 2406 RVA: 0x000C7EAF File Offset: 0x000C60AF public float StrengthMSNPC() { return this.R1((this.Strength() + this.strengthModFlat + (float)this.GetDiceModifierAverage(0)) / 3f); } // Token: 0x06000967 RID: 2407 RVA: 0x000C7ED3 File Offset: 0x000C60D3 public float AglMSNPC() { return this.R1((this.Agility() + this.agilityModFlat + (float)this.GetDiceModifierAverage(1)) / 3f); } // Token: 0x06000968 RID: 2408 RVA: 0x000C7EF7 File Offset: 0x000C60F7 public float AglMS() { return this.R1((this.Agility() + this.agilityModFlat + (float)this.GetDiceModifierAverage(1)) / 10f); } // Token: 0x06000969 RID: 2409 RVA: 0x000C7F1C File Offset: 0x000C611C public float BagWeightMS() { if (this.character.party && this.character.inventoryBag) { return 1f - Mathf.Clamp(this.R1(this.character.inventoryBag.weight / (float)this.CarryingWeight() * 0.4f), 0f, 0.4f); } return 1f; } // Token: 0x0600096A RID: 2410 RVA: 0x000C7F88 File Offset: 0x000C6188 public float UtilitySpeed() { return 1f; } // Token: 0x0600096B RID: 2411 RVA: 0x000C7F8F File Offset: 0x000C618F public float ActionTime() { if (this.character.pipeSummons) { return 0.1f; } return this.AttackSpeed(this.currentHand, false, false); } // Token: 0x0600096C RID: 2412 RVA: 0x000C7FB4 File Offset: 0x000C61B4 public float Initiative() { float num = (this.Agility() + this.agilityModFlat) / 300f; float num2 = (this.Sensory() + this.sensoryModFlat) / 300f; return this.R1(num + num2 + 0.3f); } // Token: 0x0600096D RID: 2413 RVA: 0x000C7FF8 File Offset: 0x000C61F8 public float AttackSpeed(int index, bool forCharacterSheet, bool forAI) { float num = this.SkillAS(index); float num2 = this.AglAS(forCharacterSheet); float num3 = this.actionTimeMod; float num4 = this.BaseAtkSpeed(index) - num - num2 + num3; if (Records.x.showRuleset && !forCharacterSheet && !forAI) { Debug.Log(string.Concat(new string[] { this.GetName(), "'s attack speed total: ", num4.ToString(), ", agl mod: ", num2.ToString(), ", skill: ", num.ToString(), ", base: ", this.BaseAtkSpeed(index).ToString() })); } if (!forCharacterSheet) { if (this.lastActionModifier == 0f) { this.lastActionModifier = 1f; } num4 *= this.lastActionModifier; if (Records.x.filming && this.character.mainSelected) { num4 *= 0.5f; } } if (num4 < 0.1f) { num4 = 0.1f; } return this.R1(num4); } // Token: 0x0600096E RID: 2414 RVA: 0x000C8104 File Offset: 0x000C6304 public float FreeAttackSpeed(int index, bool forCharacterSheet, bool forAI) { float num = this.SkillAS(index); float num2 = this.AglAS(forCharacterSheet); float num3 = this.actionTimeMod; float num4 = this.BaseAtkSpeed(index) - num - num2 + num3; if (Records.x.showRuleset && !forCharacterSheet && !forAI) { Debug.Log(string.Concat(new string[] { this.GetName(), "'s attack speed total: ", num4.ToString(), ", agl mod: ", num2.ToString(), ", skill: ", num.ToString(), ", base: ", this.BaseAtkSpeed(index).ToString() })); } if (!forCharacterSheet) { if (this.lastActionModifier == 0f) { this.lastActionModifier = 1f; } num4 *= this.lastActionModifier; if (Records.x.filming && this.character.mainSelected) { num4 *= 0.5f; } } num4 *= 0.1f; if (num4 < 0.1f) { num4 = 0.1f; } return this.R1(num4); } // Token: 0x0600096F RID: 2415 RVA: 0x000C8218 File Offset: 0x000C6418 public float AglAS(bool forCharacterSheet) { float num = this.Agility() + this.agilityModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(1); } else { num += (float)this.GetDiceModifier(1); } return this.R1(num / 75f); } // Token: 0x06000970 RID: 2416 RVA: 0x000C825B File Offset: 0x000C645B public bool HasShield() { return this.character.GetInvNum(2) > 1 && Links.x.library.GetInvRowByIndex(this.character.GetInvNum(2))._EquipSlotID == 1; } // Token: 0x06000971 RID: 2417 RVA: 0x000C8292 File Offset: 0x000C6492 public float ShieldAC() { if (this.character.GetInvNum(2) > 1) { return Links.x.library.GetInvRowByIndex(this.character.GetInvNum(2))._AC; } return 0f; } // Token: 0x06000972 RID: 2418 RVA: 0x000C82CC File Offset: 0x000C64CC public float SkillAS(int index) { string text = ""; if (index == 0 && this.character.invRow1 != null) { text = this.character.invRow1._MainSkill; } if (index == 1 && this.character.invRow2 != null) { text = this.character.invRow2._MainSkill; } int num = this.GetCombatSkillID(text); if (index == 7 || index == 13 || index == 14) { Library.Inventory invRowByIndex = Links.x.library.GetInvRowByIndex(this.character.GetInvNum(index * 2)); if (invRowByIndex._MainSkill == "Flute") { num = 26; } if (invRowByIndex._MainSkill == "Horn") { num = 27; } if (invRowByIndex._MainSkill == "Pipe") { num = 29; } if (invRowByIndex._MainSkill.Contains("Elixir")) { num = 12; } } float num2 = this.GetSkill(num); if (num2 < 0f) { num2 = 0f; } num2 /= 400f; return this.R1(num2); } // Token: 0x06000973 RID: 2419 RVA: 0x000C83D0 File Offset: 0x000C65D0 public float BaseAtkSpeed(int index) { if (this.HandCount() <= 1f) { if (this.character.invRow1 != null) { return this.character.invRow1._WpnSpeed; } } else if (this.character.invRow2 != null) { return (this.character.invRow1._WpnSpeed + this.character.invRow2._WpnSpeed) / 2f; } if (index == 7 || index == 13 || index == 14) { return Links.x.library.GetInvRowByIndex(this.character.GetInvNum(index * 2))._WpnSpeed; } return 3f; } // Token: 0x06000974 RID: 2420 RVA: 0x000C8474 File Offset: 0x000C6674 public int GetCurrentHand() { if (this.character.actions) { int num = 0; if (this.character.actions.firstAttack && this.character.inAction && this.character.GetInvNum(2) > 1 && this.character.invRow2._EquipSlotID == 0) { num = 1; } return num; } return 0; } // Token: 0x06000975 RID: 2421 RVA: 0x000C84DA File Offset: 0x000C66DA private float Pagan() { if (this.pagan < 0f) { return 0f; } return this.pagan; } // Token: 0x06000976 RID: 2422 RVA: 0x000C84F5 File Offset: 0x000C66F5 private float Dexterity() { if (this.dexterity < 0f) { return 0f; } return this.dexterity; } // Token: 0x06000977 RID: 2423 RVA: 0x000C8510 File Offset: 0x000C6710 private float Strength() { if (this.strength < 0f) { return 0f; } return this.strength; } // Token: 0x06000978 RID: 2424 RVA: 0x000C852B File Offset: 0x000C672B private float Agility() { if (this.agility < 0f) { return 0f; } return this.agility; } // Token: 0x06000979 RID: 2425 RVA: 0x000C8546 File Offset: 0x000C6746 private float Sensory() { if (this.sensory < 0f) { return 0f; } return this.sensory; } // Token: 0x0600097A RID: 2426 RVA: 0x000C8561 File Offset: 0x000C6761 private float Aura() { if (this.aura < 0f) { return 0f; } return this.aura; } // Token: 0x0600097B RID: 2427 RVA: 0x000C857C File Offset: 0x000C677C public int SpiritCurrent() { return this.magicPoints; } // Token: 0x0600097C RID: 2428 RVA: 0x000C8584 File Offset: 0x000C6784 public int SpiritMax() { return 90; } // Token: 0x0600097D RID: 2429 RVA: 0x000C8588 File Offset: 0x000C6788 public float SpiritAura() { return this.R2((this.Pagan() + this.paganModFlat + (float)this.GetDiceModifierAverage(3)) / 50f); } // Token: 0x0600097E RID: 2430 RVA: 0x000C85AC File Offset: 0x000C67AC public float SpiritPagan() { return this.R2((this.Aura() + this.auraModFlat + (float)this.GetDiceModifierAverage(2)) / 100f); } // Token: 0x0600097F RID: 2431 RVA: 0x000C85D0 File Offset: 0x000C67D0 public float SpiritAbsorptionMultiplier(bool characterSheet) { float num = this.SpiritAura(); float num2 = this.SpiritPagan(); return this.R1((float)this.magicPointsBase + num + num2 + this.spiritAbsorption); } // Token: 0x06000980 RID: 2432 RVA: 0x000C8605 File Offset: 0x000C6805 public int HealthCurrent() { return this.currLife; } // Token: 0x06000981 RID: 2433 RVA: 0x000C8610 File Offset: 0x000C6810 public int HealthMax() { if (this.character.npc) { return Mathf.Clamp(this.lifeBase + this.maxHealthAdd, 0, 1000000); } return Mathf.Clamp(this.lifeBase + this.maxHealthAdd + this.HealthAura(), 0, 10000000); } // Token: 0x06000982 RID: 2434 RVA: 0x000C8662 File Offset: 0x000C6862 public int HealthAura() { return (int)Mathf.Round((this.Aura() + this.auraModFlat + (float)this.GetDiceModifierAverage(2)) / 10f); } // Token: 0x06000983 RID: 2435 RVA: 0x000C8688 File Offset: 0x000C6888 public float Stat(string stat, bool addRolls, out int adjusted) { float num = 0f; adjusted = 0; addRolls = false; if (stat == "Agility") { num = this.agility + this.agilityModFlat; if (this.agilityModFlat > 0f) { adjusted = 1; } else if (this.agilityModFlat < 0f) { adjusted = -1; } if (addRolls) { float num2 = (float)this.GetDiceModifierAverage(1); num += num2; if (num2 > 0f) { adjusted = 1; } else if (num2 < 0f) { adjusted = -1; } } } if (stat == "Aura") { num = this.Aura() + this.auraModFlat; if (this.auraModFlat > 0f) { adjusted = 1; } else if (this.auraModFlat < 0f) { adjusted = -1; } if (addRolls) { float num3 = (float)this.GetDiceModifierAverage(2); num += num3; if (num3 > 0f) { adjusted = 1; } else if (num3 < 0f) { adjusted = -1; } } } if (stat == "Strength") { num = this.strength + this.strengthModFlat; if (this.strengthModFlat > 0f) { adjusted = 1; } else if (this.strengthModFlat < 0f) { adjusted = -1; } if (addRolls) { float num4 = (float)this.GetDiceModifierAverage(0); num += num4; if (num4 > 0f) { adjusted = 1; } else if (num4 < 0f) { adjusted = -1; } } } if (stat == "Dexterity") { num = this.dexterity + this.dexterityModFlat; if (this.dexterityModFlat > 0f) { adjusted = 1; } else if (this.dexterityModFlat < 0f) { adjusted = -1; } if (addRolls) { float num5 = (float)this.GetDiceModifierAverage(4); num += num5; if (num5 > 0f) { adjusted = 1; } else if (num5 < 0f) { adjusted = -1; } } } if (stat == "Pagan") { num = this.pagan + this.paganModFlat; if (this.paganModFlat > 0f) { adjusted = 1; } else if (this.paganModFlat < 0f) { adjusted = -1; } if (addRolls) { float num6 = (float)this.GetDiceModifierAverage(3); num += num6; if (num6 > 0f) { adjusted = 1; } else if (num6 < 0f) { adjusted = -1; } } } if (stat == "Sensory") { num = this.sensory + this.sensoryModFlat; if (this.sensoryModFlat > 0f) { adjusted = 1; } else if (this.sensoryModFlat < 0f) { adjusted = -1; } if (addRolls) { float num7 = (float)this.GetDiceModifierAverage(5); num += num7; if (num7 > 0f) { adjusted = 1; } else if (num7 < 0f) { adjusted = -1; } } } return num; } // Token: 0x06000984 RID: 2436 RVA: 0x000C890C File Offset: 0x000C6B0C public void SetStat(string stat, float x) { if (stat == "Agility") { this.agility = x; } if (stat == "Aura") { this.aura = x; } if (stat == "Strength") { this.strength = x; } if (stat == "Dexterity") { this.dexterity = x; } if (stat == "Pagan") { this.pagan = x; } if (stat == "Sensory") { this.sensory = x; } } // Token: 0x06000985 RID: 2437 RVA: 0x000C8994 File Offset: 0x000C6B94 public void AddStat(string stat, float x) { if (stat == "Agility") { this.agility += x; } if (stat == "Aura") { this.aura += x; } if (stat == "Strength") { this.strength += x; } if (stat == "Dexterity") { this.dexterity += x; } if (stat == "Pagan") { this.pagan += x; } if (stat == "Sensory") { this.sensory += x; } } // Token: 0x06000986 RID: 2438 RVA: 0x000C8A44 File Offset: 0x000C6C44 public float GetStatOnly(string stat) { if (stat == "Agility") { return this.agility; } if (stat == "Aura") { return this.aura; } if (stat == "Strength") { return this.strength; } if (stat == "Dexterity") { return this.dexterity; } if (stat == "Pagan") { return this.pagan; } if (stat == "Sensory") { return this.sensory; } return 0f; } // Token: 0x06000987 RID: 2439 RVA: 0x000C8ACE File Offset: 0x000C6CCE public void SetSkill(int index, float x) { this.skills[index] = x; } // Token: 0x06000988 RID: 2440 RVA: 0x000C8AE0 File Offset: 0x000C6CE0 public float CharacterWeight() { if (!this.character.inventoryBag) { return 0f; } float num = (float)this.weightBase; if (this.character.party && !this.character.isBoro) { num += this.character.inventoryBag.weight; } else if (this.character.isBoro) { num += Records.x.boroWeight; } return num; } // Token: 0x06000989 RID: 2441 RVA: 0x000C8B58 File Offset: 0x000C6D58 public float Level() { if (this.character.party) { return (float)this.level; } float num = (float)this.level - 2f; float num2 = (this.strength + this.dexterity + this.agility + this.sensory + this.pagan + this.aura) / 6f; num2 /= 30f; return num + num2; } // Token: 0x0600098A RID: 2442 RVA: 0x000C8BC1 File Offset: 0x000C6DC1 public float Balance() { return this.balance; } // Token: 0x0600098B RID: 2443 RVA: 0x000C8BCC File Offset: 0x000C6DCC public string BalanceCheck(float amt) { this.str.Clear(); this.str.Append(amt); this.SBP(); this.str.Append("Difficulty"); this.CB(); return this.str.ToString(); } // Token: 0x0600098C RID: 2444 RVA: 0x000C8C1C File Offset: 0x000C6E1C public string BalanceResist(float amt, string stat) { this.str.Clear(); this.str.Append(this.Balance()); this.SBP(); this.str.Append("Balance Mod"); if (stat != "") { this.CPlus(); this.str.Append(amt); this.SBP(); this.str.Append(stat); this.CB(); } else { this.CB(); } return this.str.ToString(); } // Token: 0x0600098D RID: 2445 RVA: 0x000C8CAC File Offset: 0x000C6EAC public float GhostResistance(bool forCharacterSheet) { float num = this.GhostResistAur(forCharacterSheet); if (forCharacterSheet) { return Mathf.Round(num / (float)this.GhostRollMax() * 100f); } return this.R2(num); } // Token: 0x0600098E RID: 2446 RVA: 0x000C8CE0 File Offset: 0x000C6EE0 public float GhostResistAur(bool forCharacterSheet) { if (forCharacterSheet) { return this.Aura() + this.auraModFlat + (float)this.GetDiceModifierAverage(2); } return this.Aura() + this.auraModFlat + (float)this.GetDiceModifier(2); } // Token: 0x0600098F RID: 2447 RVA: 0x000C8D12 File Offset: 0x000C6F12 public int GhostRollMax() { return 40; } // Token: 0x06000990 RID: 2448 RVA: 0x000C8D18 File Offset: 0x000C6F18 public void GhostHit() { if (Links.x.gameplay.seconds > this.lastGhostRoll + 100f && !Records.x.filming && (this.character.party || (this.character.tr.position - Links.x.main.tr.position).sqrMagnitude < 400f) && !this.character.hasIncenseTorch && !this.character.summoned && !this.HasEffect("Ghost")) { this.character.PlayAnimation("Hit", 0f); int num = Mathf.RoundToInt(this.GhostResistance(false)); int num2 = Random.Range(1, this.GhostRollMax()); if (Records.x.showRuleset) { Debug.Log(string.Concat(new string[] { this.GetName(), "'s ghost roll resistance: ", num.ToString(), " roll: ", num2.ToString() })); } this.lastGhostRoll = Links.x.gameplay.seconds; if (num >= num2) { this.str.Clear(); if (!this.character.npc) { this.str.Append(Links.x.gameFeed.GetPartyColorText(this.character)); } this.str.Append(this.GetName()); if (!this.character.npc) { this.str.Append(""); } this.str.Append(" resisted ghost"); Links.x.gameFeed.AddFeed(this.str.ToString()); return; } Effects effects = this.character.gameObject.AddComponent(); Links.x.cellar.AddEffects(effects); effects.gameObject.SetActive(true); effects.source = this.character; effects.target = this.character; effects.effectName = "Ghost"; effects.sourceLevel = 0f; effects.Inflicted(false); } } // Token: 0x06000991 RID: 2449 RVA: 0x000C8F5C File Offset: 0x000C715C public float Disposition(string areaName) { float num = this.DispSen(); num += this.DispSkill(); num += (float)this.character.GetGlam() / 2f; if (Records.x.BribeBadgeCount() > 0) { num -= 100f; } return this.R1(num) / 100f; } // Token: 0x06000992 RID: 2450 RVA: 0x000C8FB0 File Offset: 0x000C71B0 public float DispSen() { return this.R1((this.Sensory() + this.sensoryModFlat + (float)this.GetDiceModifierAverage(5)) / 15f); } // Token: 0x06000993 RID: 2451 RVA: 0x000C8FD4 File Offset: 0x000C71D4 public float DispSkill() { return this.R1(this.GetSkill(22) / 6f); } // Token: 0x06000994 RID: 2452 RVA: 0x000C8FEC File Offset: 0x000C71EC public float DispositionResistance(string areaName, Character dialogueCharacter) { float num = (this.Sensory() + this.sensoryModFlat + (float)this.GetDiceModifierAverage(5)) / 300f; bool flag = false; if (dialogueCharacter && dialogueCharacter.stats.characterRow._Race == this.characterRow._Race) { flag = true; } if (flag) { num *= 0.95f; } if (Records.x.HasBanner(areaName)) { num *= 0.5f; } return num; } // Token: 0x06000995 RID: 2453 RVA: 0x000C9068 File Offset: 0x000C7268 public float DispositionCost(string areaName, Character merchant) { float num = this.Disposition(areaName); if (!merchant) { return 1f - num; } if (Records.x.BribeBadgeCount() > 0) { return num; } return 1f - num * (1f - merchant.stats.DispositionResistance(areaName, this.character)); } // Token: 0x06000996 RID: 2454 RVA: 0x000C90BC File Offset: 0x000C72BC public float DispositionSell(string areaName, Character merchant) { if (!merchant) { return 1f; } return this.Disposition(areaName) / merchant.stats.DispositionResistance(areaName, this.character); } // Token: 0x06000997 RID: 2455 RVA: 0x000C90E6 File Offset: 0x000C72E6 public string Disposition() { this.str.Clear(); return this.str.ToString(); } // Token: 0x06000998 RID: 2456 RVA: 0x000C90FF File Offset: 0x000C72FF public string MerchantDisposition(string areaName, Character merchant) { this.str.Clear(); return this.str.ToString(); } // Token: 0x06000999 RID: 2457 RVA: 0x000C9118 File Offset: 0x000C7318 public float PartyDispositionSell(string areaName, Character merchant) { return 1f; } // Token: 0x0600099A RID: 2458 RVA: 0x000C9120 File Offset: 0x000C7320 public float SongCost(Library.Abilities abilityRow) { return Mathf.Floor((float)abilityRow._SongCost * abilityRow._Difficulty * 30f * this.DispositionCost(Links.x.diorama.sceneName, Links.x.merchant.merchantCharacter)); } // Token: 0x0600099B RID: 2459 RVA: 0x000C916C File Offset: 0x000C736C public float Repair(string mainSkill, bool forCharacterSheet) { float num = this.RepairDex(); int combatSkillID = this.GetCombatSkillID(mainSkill); float num2 = this.R2(this.GetSkill(combatSkillID) / 10f + num + (float)this.nimbleFingers); if (!forCharacterSheet) { this.AddSkillProgress(combatSkillID, 0f, null); this.str2.Clear(); this.str2.Append(Links.x.gameFeed.GetPartyColorText(this.character)); this.str2.Append(this.GetName()); this.str2.Append(""); this.str2.Append(" repairs weapon condition +"); this.str2.Append(num2); if (Records.x.showRulesetInfo) { this.str2.Append(" ... "); this.str2.Append(this.RepairCalculations(false, mainSkill)); this.str2.Append(""); } Links.x.gameFeed.AddFeed(this.str2.ToString()); } if (forCharacterSheet) { return this.R2(num + (float)this.nimbleFingers); } return num2; } // Token: 0x0600099C RID: 2460 RVA: 0x000C9297 File Offset: 0x000C7497 public float RepairDex() { return this.R2((this.Dexterity() + this.dexterityModFlat + (float)this.GetDiceModifierAverage(4)) / 2f); } // Token: 0x0600099D RID: 2461 RVA: 0x000C92BC File Offset: 0x000C74BC public float Fletching(bool forCharacterSheet, string mainSkill) { float num = this.FletchDex(); int combatSkillID = this.GetCombatSkillID(mainSkill); if (!forCharacterSheet) { this.AddSkillProgress(combatSkillID, 0f, null); } if (forCharacterSheet) { return this.R2(num + (float)this.nimbleFingers); } float num2 = this.R2(this.GetSkill(combatSkillID) / 10f + num + (float)this.nimbleFingers); if (!forCharacterSheet) { this.str2.Clear(); this.str2.Append(Links.x.gameFeed.GetPartyColorText(this.character)); this.str2.Append(this.GetName()); this.str2.Append(""); if (mainSkill.Contains("Bow")) { this.str2.Append(" assembles arrows with +"); } else if (mainSkill.Contains("Sling")) { this.str2.Append(" assembles slingstones with +"); } else { this.str2.Append(" assembles vials with +"); } this.str2.Append(num2); this.str2.Append(" damage"); if (Records.x.showRulesetInfo) { this.str2.Append(" ... "); this.str2.Append(this.FletchingCalculations(false, mainSkill)); this.str2.Append(""); } Links.x.gameFeed.AddFeed(this.str2.ToString()); } return num2; } // Token: 0x0600099E RID: 2462 RVA: 0x000C943B File Offset: 0x000C763B public float FletchDex() { return this.R2((this.Dexterity() + this.dexterityModFlat + (float)this.GetDiceModifierAverage(4)) / 10f); } // Token: 0x0600099F RID: 2463 RVA: 0x000C9460 File Offset: 0x000C7660 public float SocketingRepair(int socketRepairAmount, bool forCharacterSheet, string mainSkill) { float num = this.SocketDex(); if (forCharacterSheet) { return this.R2(num + (float)this.nimbleFingers); } int combatSkillID = this.GetCombatSkillID(mainSkill); float num2 = this.R2(this.GetSkill(combatSkillID) / 5f + (num + (float)this.nimbleFingers)); if (num2 > (float)socketRepairAmount) { num2 = (float)socketRepairAmount; } if (!forCharacterSheet) { this.AddSkillProgress(combatSkillID, 0f, null); this.str2.Clear(); this.str2.Append(Links.x.gameFeed.GetPartyColorText(this.character)); this.str2.Append(this.GetName()); this.str2.Append(""); this.str2.Append(" repairs armor condition +"); this.str2.Append(num2); if (Records.x.showRulesetInfo) { this.str2.Append(" ... "); this.str2.Append(this.SocketingCalculations(false, mainSkill)); this.str2.Append(""); } Links.x.gameFeed.AddFeed(this.str2.ToString()); } return num2; } // Token: 0x060009A0 RID: 2464 RVA: 0x000C9593 File Offset: 0x000C7793 public float SocketDex() { return this.R2((this.Dexterity() + this.dexterityModFlat + (float)this.GetDiceModifierAverage(4)) / 3f); } // Token: 0x060009A1 RID: 2465 RVA: 0x000C95B8 File Offset: 0x000C77B8 public string RepairCalculations(bool fromManual, string mainSkill) { this.str.Clear(); float num = (float)this.character.stats.NimbleFingers(); this.str.Append(this.character.stats.RepairDex()); this.SBP(); this.str.Append("DEX/2"); if (num != 0f) { this.CPlus(); this.str.Append(num); this.SBP(); this.str.Append("Nimble Mods"); this.str.Append("] +"); } else { this.CPlus(); } if (fromManual) { this.SBP(); this.str.Append("Skill of Weapon"); this.str.Append("/10"); } else { int combatSkillID = this.GetCombatSkillID(mainSkill); this.str.Append(this.R1(this.GetSkill(combatSkillID) / 10f)); this.SBP(); this.str.Append("Skill of Weapon"); this.str.Append("/10"); } this.CB(); return this.str.ToString(); } // Token: 0x060009A2 RID: 2466 RVA: 0x000C96F0 File Offset: 0x000C78F0 public string FletchingCalculations(bool fromManual, string mainSkill) { this.str.Clear(); float num = (float)this.character.stats.NimbleFingers(); this.str.Append(this.character.stats.RepairDex()); this.SBP(); this.str.Append("DEX/2"); if (num != 0f) { this.CPlus(); this.str.Append(num); this.SBP(); this.str.Append("Nimble Mods"); this.str.Append("] +"); } else { this.CPlus(); } if (fromManual) { this.SBP(); this.str.Append("Skill of Weapon"); this.str.Append("/10"); } else { int combatSkillID = this.GetCombatSkillID(mainSkill); this.str.Append(this.R1(this.GetSkill(combatSkillID) / 10f)); this.SBP(); this.str.Append("Skill of Weapon"); this.str.Append("/10"); } this.CB(); return this.str.ToString(); } // Token: 0x060009A3 RID: 2467 RVA: 0x000C9828 File Offset: 0x000C7A28 public string SocketingCalculations(bool fromManual, string mainSkill) { this.str.Clear(); float num = (float)this.character.stats.NimbleFingers(); this.str.Append(this.character.stats.SocketDex()); this.SBP(); this.str.Append("DEX/3"); if (num != 0f) { this.CPlus(); this.str.Append(num); this.SBP(); this.str.Append("Nimble Mods"); this.str.Append("] +"); } else { this.CPlus(); } if (fromManual) { this.SBP(); this.str.Append("Skill of Armor"); this.str.Append("/5"); } else { int combatSkillID = this.GetCombatSkillID(mainSkill); this.str.Append(this.R1(this.GetSkill(combatSkillID) / 10f)); this.SBP(); this.str.Append("Skill of Armor"); this.str.Append("/5"); } this.CB(); return this.str.ToString(); } // Token: 0x060009A4 RID: 2468 RVA: 0x000C995E File Offset: 0x000C7B5E public float EnchantPowerAura() { return this.R1((this.Aura() + this.auraModFlat + (float)this.GetDiceModifierAverage(2)) / 15f); } // Token: 0x060009A5 RID: 2469 RVA: 0x000C9984 File Offset: 0x000C7B84 public float EnchantPag() { float num = this.Pagan() + this.paganModFlat + (float)this.GetDiceModifierAverage(3); if (num > 10f) { return this.R1((num - 10f) / 15f); } return 0f; } // Token: 0x060009A6 RID: 2470 RVA: 0x000C99CC File Offset: 0x000C7BCC public string IntercessionCalculation() { this.str.Clear(); this.str.Append(this.character.stats.EnchantPowerAura()); this.SBP(); this.str.Append("AUR/15"); this.CPlus(); this.str.Append(this.character.stats.IntercessionSkill()); this.SBP(); this.str.Append("Skill/15"); this.CMin(); this.str.Append(this.character.stats.EnchantPag()); this.SBP(); this.str.Append("(PAG>10)/15"); this.CB(); return this.str.ToString(); } // Token: 0x060009A7 RID: 2471 RVA: 0x000C9A9B File Offset: 0x000C7C9B public float IntercessionSkill() { return this.R1(this.GetSkill(16) / 15f); } // Token: 0x060009A8 RID: 2472 RVA: 0x000C9AB1 File Offset: 0x000C7CB1 public bool CanWearEnchantedItem(float savedDifficulty) { return this.EnchantWearingAbility() >= savedDifficulty; } // Token: 0x060009A9 RID: 2473 RVA: 0x000C9AC0 File Offset: 0x000C7CC0 public float EnchantWearingAbility() { float num = this.EnchantPowerAura(); float num2 = this.EnchantPag(); return this.R1(num - num2 + this.IntercessionSkill()); } // Token: 0x060009AA RID: 2474 RVA: 0x000C9AEB File Offset: 0x000C7CEB public float SightRadiusBase() { return this.sightRadiusBase; } // Token: 0x060009AB RID: 2475 RVA: 0x000C9AF4 File Offset: 0x000C7CF4 public float SightRadius(bool forCharacterSheet, bool forCharacterCreation, bool forFOW) { float num = 0f; float num2 = this.SightRadiusTOD(false, forFOW); float num3 = this.SightRadiusSensory(forCharacterSheet); float num4 = (this.sightRadiusBase - this.blind + num + num3) * num2; if (forCharacterSheet) { num4 = Mathf.Round(num4); } if (forCharacterCreation) { num4 = Mathf.Round(this.sightRadiusBase + num3); } return num4; } // Token: 0x060009AC RID: 2476 RVA: 0x000C9B48 File Offset: 0x000C7D48 public float SightRadiusTOD(bool returnPercent, bool forFOW) { float num = 0.9f; if (Links.x.gameplay.IsNight()) { num = 0.75f; if (this.character.party && Links.x.fellowship.PartyHasTorch()) { num = 1f; } } else if (this.character.desiredGraph == 1) { num = 0.75f; } else if (Links.x.gameplay.IsAfternoon()) { num = 1f; } if (this.character.party && forFOW && Links.x.gaia.sceneLoaded && Links.x.diorama.InResurrectionFog(this.character.tr.position)) { num = 0.5f; } if (returnPercent) { return Mathf.Round(num * 100f); } return this.R2(num); } // Token: 0x060009AD RID: 2477 RVA: 0x000C9C24 File Offset: 0x000C7E24 public float SightRadiusSensory(bool forCharacterSheet) { float num = this.Sensory() + this.sensoryModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(5); } else { num += (float)this.GetDiceModifierAverage(5); } return this.R2(num / 5f); } // Token: 0x060009AE RID: 2478 RVA: 0x000C9C6C File Offset: 0x000C7E6C public float HearingRadius(bool forCharacterSheet, bool forCharacterCreation) { float num = 0f; float num2 = this.HearingRadiusSensory(true); float num3 = this.hearingRadiusBase - this.deaf + num + num2; if (forCharacterSheet) { num3 = Mathf.Round(num3); } if (forCharacterCreation) { num3 = Mathf.Round(this.hearingRadiusBase + num2); } return num3; } // Token: 0x060009AF RID: 2479 RVA: 0x000C9CB8 File Offset: 0x000C7EB8 public float HearingRadiusSensory(bool forCharacterSheet) { float num = this.Sensory() + this.sensoryModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(5); } else { num += (float)this.GetDiceModifierAverage(5); } return num / 5f; } // Token: 0x060009B0 RID: 2480 RVA: 0x000C9CF8 File Offset: 0x000C7EF8 public void StartSneak() { float num = 0f; if (this.character.IsSentient()) { bool flag = this.Sneaking(false, out num); string text = this.SearchingCalculation(false); if (this.character.CheckLights(true)) { flag = false; } this.str.Clear(); if (!this.character.npc) { this.str.Append(Links.x.gameFeed.GetPartyColorText(this.character)); } this.str.Append(this.GetName()); if (!this.character.npc) { this.str.Append(""); } if (flag) { this.str.Append(" is sneaking for "); this.str.Append(this.R1(num)); this.str.Append(" seconds"); this.character.body.Sneaking(true); this.character.SetupSneakGauge((int)Mathf.Round(num)); } else { this.str.Append(" failed to sneak"); GameObject pooledGameObject = Links.x.cellar.GetPooledGameObject(58); if (pooledGameObject) { pooledGameObject.transform.position = this.character.body.headBone.position + new Vector3(0f, 1f, 0f); pooledGameObject.SetActive(true); } } if (Records.x.showRulesetInfo) { this.str.Append(" ... "); this.str.Append(text); this.str.Append(""); } Links.x.gameFeed.AddFeed(this.str.ToString()); } } // Token: 0x060009B1 RID: 2481 RVA: 0x000C9EC4 File Offset: 0x000C80C4 public bool Sneaking(bool forCharacterSheet, out float duration) { float num = this.RaceMod(); float num2 = this.AglSneak(); float num3 = this.SenSneak(); float num4 = this.SneakSkill(); duration = this.R1((num + num2 + num3 + (float)this.invisible) * num4); if (!forCharacterSheet && duration > 1f) { this.AddSkillProgress(21, 0f, null); } return duration > 1f; } // Token: 0x060009B2 RID: 2482 RVA: 0x000C9F2A File Offset: 0x000C812A public float Stealing() { return this.SneakSkillStealing(); } // Token: 0x060009B3 RID: 2483 RVA: 0x000C9F32 File Offset: 0x000C8132 public float HearStealing() { return this.SenSneakHearing(); } // Token: 0x060009B4 RID: 2484 RVA: 0x000C9F3C File Offset: 0x000C813C public float SenSneakHearing() { float num = this.Sensory() + this.sensoryModFlat; return this.R1(num); } // Token: 0x060009B5 RID: 2485 RVA: 0x000C9F5E File Offset: 0x000C815E public float SneakSkillStealing() { return this.R1(this.GetSkill(21) * 2f / 10f); } // Token: 0x060009B6 RID: 2486 RVA: 0x000C9F7C File Offset: 0x000C817C public string StealingCalculation(bool fromManual) { this.str.Clear(); float num = (float)this.character.stats.NimbleFingers(); this.str.Append(this.character.stats.SneakSkillStealing()); this.SBP(); this.str.Append("(Skill*2)/10"); if (num != 0f) { this.CPlus(); this.str.Append(num); this.SBP(); this.str.Append("Nimble Mods"); this.str.Append("]"); } this.CB(); return this.str.ToString(); } // Token: 0x060009B7 RID: 2487 RVA: 0x000CA02E File Offset: 0x000C822E public float SneakSkill() { return this.R1(this.GetSkill(21) / 25f); } // Token: 0x060009B8 RID: 2488 RVA: 0x000CA044 File Offset: 0x000C8244 public float RaceMod() { float num = 2f; if (this.race == "Yeti") { num = 0f; } if (this.race == "Taratorith") { num = 0.15f; } if (this.race == "Pasaaren") { num = 0.25f; } if (this.race == "Ameythevian") { num = 0.3f; } if (this.race == "Varuchov") { num = 0.5f; } return num; } // Token: 0x060009B9 RID: 2489 RVA: 0x000CA0D0 File Offset: 0x000C82D0 public float AglSneak() { float num = this.Agility() + this.agilityModFlat; num += (float)this.GetDiceModifierAverage(1); num /= 20f; return this.R1(num); } // Token: 0x060009BA RID: 2490 RVA: 0x000CA108 File Offset: 0x000C8308 public float SenSneak() { float num = this.Sensory() + this.sensoryModFlat; num += (float)this.GetDiceModifierAverage(5); num /= 15f; return this.R1(num); } // Token: 0x060009BB RID: 2491 RVA: 0x000CA140 File Offset: 0x000C8340 public string SearchingCalculation(bool fromManual) { this.str.Clear(); this.str.Append("("); this.str.Append(this.character.stats.AglSneak()); this.SBP(); this.str.Append("AGL/20"); this.CPlus(); this.str.Append(this.character.stats.SenSneak()); this.SBP(); this.str.Append("SEN/15"); this.CPlus(); this.str.Append(this.character.stats.RaceMod()); this.SBP(); this.str.Append("Race Bonus"); if (this.character.stats.Invisible() != 0) { this.CPlus(); this.str.Append(this.character.stats.Invisible()); this.SBP(); this.str.Append("Invisible Mod"); } this.str.Append("]"); this.str.Append(") * "); this.str.Append(this.character.stats.SneakSkill()); this.SBP(); this.str.Append("Skill/25"); this.CB(); return this.str.ToString(); } // Token: 0x060009BC RID: 2492 RVA: 0x000CA2C0 File Offset: 0x000C84C0 public bool IsInvisible() { return this.character.body.sneaking; } // Token: 0x060009BD RID: 2493 RVA: 0x000CA2D4 File Offset: 0x000C84D4 public float Charming(string skill, bool forCharacterSheet) { float num = this.CharmSkill(skill); float num2 = this.CharmSen(forCharacterSheet); float num3 = this.R1(num + (float)this.charming + num2); if (Records.x.showRuleset && !forCharacterSheet) { Debug.Log(string.Concat(new string[] { this.GetName(), " charm hit chance ", num3.ToString(), " from sensory ", num2.ToString(), " and skill ", skill, " ", num.ToString() })); } return num3; } // Token: 0x060009BE RID: 2494 RVA: 0x000CA36F File Offset: 0x000C856F public float SummonModCharm() { return (float)Links.x.GetSummonsCount(0) * 2f; } // Token: 0x060009BF RID: 2495 RVA: 0x000CA383 File Offset: 0x000C8583 public float SummonModSpells() { return (float)Links.x.GetSummonsCount(1) * 2f; } // Token: 0x060009C0 RID: 2496 RVA: 0x000CA398 File Offset: 0x000C8598 public float CharmSkill(string skill) { int num = 23; if (skill.Contains("Forest")) { num = 24; } else if (skill.Contains("Fish")) { num = 23; } else if (skill.Contains("Shroom")) { num = 25; } if (skill == "") { num = 23; if (this.GetSkill(24) > this.GetSkill(num)) { num = 24; } if (this.GetSkill(25) > this.GetSkill(num)) { num = 25; } } float num2 = this.GetSkill(num) / 20f; return this.R1(num2); } // Token: 0x060009C1 RID: 2497 RVA: 0x000CA430 File Offset: 0x000C8630 public float CharmSen(bool forCharacterSheet) { float num = this.Sensory() + this.sensoryModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(5); } else { num += (float)this.GetDiceModifier(5); } num /= 30f; return this.R1(num); } // Token: 0x060009C2 RID: 2498 RVA: 0x000CA478 File Offset: 0x000C8678 public float CharmResistance(bool forCharacterSheet, float health) { float num = this.CharmResistSen(forCharacterSheet); float num2 = this.CharmResistAura(forCharacterSheet); float num3 = this.CharmHealth(health); if (Records.x.showRuleset) { Debug.Log(string.Concat(new string[] { this.GetName(), " charm resistance ", this.R2(num * num3).ToString(), " from sensory ", (num2 + num).ToString(), " and health factor ", num3.ToString() })); } return this.R2((num2 + num) * num3); } // Token: 0x060009C3 RID: 2499 RVA: 0x000CA514 File Offset: 0x000C8714 public float CharmResistSen(bool forCharacterSheet) { float num = this.Sensory() + this.sensoryModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(5); } else { num += (float)this.GetDiceModifier(5); } return this.R1(num / 2f); } // Token: 0x060009C4 RID: 2500 RVA: 0x000CA558 File Offset: 0x000C8758 public float CharmResistAura(bool forCharacterSheet) { float num = this.Aura() + this.auraModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(2); } else { num += (float)this.GetDiceModifier(2); } return this.R1(num / 2f); } // Token: 0x060009C5 RID: 2501 RVA: 0x000CA59B File Offset: 0x000C879B public float CharmHealth(float health) { return this.R1(0.4f + health / (float)this.HealthMax()); } // Token: 0x060009C6 RID: 2502 RVA: 0x000CA5B4 File Offset: 0x000C87B4 public string CharmingCalculation(string type) { this.str.Clear(); float num = (float)this.character.stats.Charming(); this.str.Append(this.character.stats.CharmSen(true)); this.SBP(); this.str.Append("SEN/30"); if (num != 0f) { this.CPlus(); this.str.Append(num); this.SBP(); this.str.Append("Bind Mods"); this.str.Append("] + "); } else { this.CPlus(); } this.str.Append(this.character.stats.CharmSkill(type)); this.SBP(); this.str.Append("Skill"); this.str.Append("/20"); this.CB(); return this.str.ToString(); } // Token: 0x060009C7 RID: 2503 RVA: 0x000CA6B4 File Offset: 0x000C88B4 public string CharmResist(float summonMod, float health) { this.str.Clear(); float num = this.CharmResistSen(false); float num2 = this.CharmResistAura(false); float num3 = this.CharmHealth(health); this.str.Append("("); this.str.Append(num); this.SBP(); this.str.Append("SEN/2"); this.CPlus(); this.str.Append(num2); this.SBP(); this.str.Append("AUR/2"); this.str.Append("]) * "); this.str.Append(num3); this.SBP(); this.str.Append(".4f + Health/Max Health"); this.CMin(); this.str.Append(summonMod); this.SBP(); this.str.Append("Current Summons Penalty"); this.CB(); return this.str.ToString(); } // Token: 0x060009C8 RID: 2504 RVA: 0x000CA7B4 File Offset: 0x000C89B4 public int CarryingWeight() { return this.CarryWeightStrength() + this.CarryWeightAgility() + this.CarryWeightDex(); } // Token: 0x060009C9 RID: 2505 RVA: 0x000CA7CA File Offset: 0x000C89CA public int CarryWeightStrength() { return (int)(Mathf.Round(this.Strength() + this.strengthModFlat + (float)this.GetDiceModifierAverage(0)) * 7f); } // Token: 0x060009CA RID: 2506 RVA: 0x000CA7EE File Offset: 0x000C89EE public int CarryWeightAgility() { return (int)(Mathf.Round(this.Agility() + this.agilityModFlat + (float)this.GetDiceModifierAverage(1)) * 2f); } // Token: 0x060009CB RID: 2507 RVA: 0x000CA812 File Offset: 0x000C8A12 public int CarryWeightDex() { return (int)(Mathf.Round(this.Dexterity() + this.dexterityModFlat + (float)this.GetDiceModifierAverage(4)) * 2f); } // Token: 0x060009CC RID: 2508 RVA: 0x000CA838 File Offset: 0x000C8A38 public float Lockpicking(bool forCharacterSheet) { float num = this.LockSkill(); float num2 = this.LockDex(forCharacterSheet); return this.R1(num + ((float)this.nimbleFingers + num2)); } // Token: 0x060009CD RID: 2509 RVA: 0x000CA865 File Offset: 0x000C8A65 public float LockSkill() { return this.R1(this.GetSkill(20) / 10f); } // Token: 0x060009CE RID: 2510 RVA: 0x000CA87C File Offset: 0x000C8A7C public float LockDex(bool forCharacterSheet) { float num = this.Dexterity() + this.dexterityModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(4); } else { num += (float)this.GetDiceModifierAverage(4); } return num / 10f; } // Token: 0x060009CF RID: 2511 RVA: 0x000CA8BC File Offset: 0x000C8ABC public string LockpickingCalculation(bool fromManual) { this.str.Clear(); float num = (float)this.character.stats.NimbleFingers(); this.str.Append(this.character.stats.LockDex(true)); this.SBP(); this.str.Append("DEX/10"); if (num != 0f) { this.CPlus(); this.str.Append(num); this.SBP(); this.str.Append("Nimble Mods"); this.str.Append("] +"); } else { this.CPlus(); } this.str.Append(this.character.stats.LockSkill()); this.SBP(); this.str.Append("Skill"); this.str.Append("/10"); this.CB(); return this.str.ToString(); } // Token: 0x060009D0 RID: 2512 RVA: 0x000CA9BC File Offset: 0x000C8BBC public string LockDifficultyString(float diff) { this.str.Clear(); this.str.Append(diff); this.SBP(); this.str.Append("Difficulty"); this.CB(); return this.str.ToString(); } // Token: 0x060009D1 RID: 2513 RVA: 0x000CAA0C File Offset: 0x000C8C0C public float SearchNumber(string type, bool forCharacterSheet, string skill) { float num = this.SearchSen(); float num2 = this.SearchSkill(skill, type); return num * num2; } // Token: 0x060009D2 RID: 2514 RVA: 0x000CAA2C File Offset: 0x000C8C2C public float SearchSkill(string skill, string type) { int num = 0; if (type == "Rogue") { num = 20; float num2 = this.GetSkill(num); if (this.GetSkill(21) > num2) { num = 21; num2 = this.GetSkill(21); } if (this.GetSkill(22) > num2) { num = 22; num2 = this.GetSkill(22); } } else if (type == "Charmer") { num = 23; float num3 = this.GetSkill(num); if (this.GetSkill(24) > num3) { num = 24; num3 = this.GetSkill(24); } if (this.GetSkill(25) > num3) { num = 25; num3 = this.GetSkill(25); } } return Mathf.Ceil(this.GetSkill(num) / 50f); } // Token: 0x060009D3 RID: 2515 RVA: 0x000CAADC File Offset: 0x000C8CDC public float SearchSen() { float num = this.Sensory() + this.sensoryModFlat; num += (float)this.GetDiceModifierAverage(5); num /= 5f; return this.R1(num); } // Token: 0x060009D4 RID: 2516 RVA: 0x000CAB14 File Offset: 0x000C8D14 public string SearchCalculation(string type) { this.str.Clear(); this.str.Append(this.character.stats.SearchSen()); this.SBP(); this.str.Append("SEN/5"); this.CMult(); this.str.Append(this.character.stats.SearchSkill("", type)); this.SBP(); if (type == "Charmer") { this.str.Append("Highest Binding Skill"); } else { this.str.Append("Highest Rogue Skill"); } this.str.Append("/50"); this.CB(); return this.str.ToString(); } // Token: 0x060009D5 RID: 2517 RVA: 0x000CABE4 File Offset: 0x000C8DE4 public string SearchDifficultyString(float diff) { this.str.Clear(); this.str.Append(diff); this.SBP(); this.str.Append("Difficulty"); this.CB(); return this.str.ToString(); } // Token: 0x060009D6 RID: 2518 RVA: 0x000CAC34 File Offset: 0x000C8E34 public float WeaponHitChance(bool forCharacterSheet, int weaponIndex) { float num = 0f; int num2 = 0; if (forCharacterSheet) { num2 = 1; } string text = ""; if (weaponIndex == 0) { text = this.character.invRow1._MainSkill; } if (weaponIndex == 1) { text = this.character.invRow2._MainSkill; } string text2; this.GetHitChanceStat(text, out text2, out num, (float)num2); float num3 = this.HitMods(forCharacterSheet); float num4 = this.HitSkill(weaponIndex, false); float num5 = num + num3 + num4; if (forCharacterSheet) { return Mathf.Round(num5); } if (Records.x.showRuleset && !forCharacterSheet) { Debug.Log(string.Concat(new string[] { this.GetName(), "'s hit roll info 2 - stat total: ", num.ToString(), ", hit chance mods: ", num3.ToString(), ", skill: ", num4.ToString() })); } return Mathf.Round(num5); } // Token: 0x060009D7 RID: 2519 RVA: 0x000CAD18 File Offset: 0x000C8F18 public float HandCount() { float num = 1f; if (!this.HasShield()) { if (this.character.GetInvNum(2) > 1) { num += 1f; } else if (this.GetSkill(9) >= 50f) { if (this.character.GetInvNum(0) <= 1) { num += 1f; } else if (this.character.invRow1 != null && this.character.invRow1._ArmorID < 0) { num += 1f; } } } return num; } // Token: 0x060009D8 RID: 2520 RVA: 0x000CADA0 File Offset: 0x000C8FA0 public float HitMods(bool forCharacterSheet) { float num = this.hitModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(8); } else { num += (float)this.GetDiceModifier(8); } return num; } // Token: 0x060009D9 RID: 2521 RVA: 0x000CADD0 File Offset: 0x000C8FD0 public string MainSkill(int weaponIndex) { string text = ""; if (weaponIndex == 0) { text = this.character.invRow1._MainSkill; } if (weaponIndex == 1) { text = "Multi-Hand"; } return Links.x.manual.DisplayNameFromIndex(this.GetCombatSkillID(text), this.character); } // Token: 0x060009DA RID: 2522 RVA: 0x000CAE20 File Offset: 0x000C9020 public int MainSkillIndex(int weaponIndex) { string text = ""; if (weaponIndex == 0) { text = this.character.invRow1._MainSkill; } if (weaponIndex == 1) { text = "Multi-Hand"; } return this.GetCombatSkillID(text); } // Token: 0x060009DB RID: 2523 RVA: 0x000CAE58 File Offset: 0x000C9058 public float HitSkill(int weaponIndex, bool justSkill) { string text = ""; if (weaponIndex == 0) { text = this.character.invRow1._MainSkill; } if (weaponIndex == 1) { text = "Multi-Hand"; } int combatSkillID = this.GetCombatSkillID(text); if (justSkill) { return this.GetSkill(combatSkillID); } return this.R1(this.GetSkill(combatSkillID) / 20f); } // Token: 0x060009DC RID: 2524 RVA: 0x000CAEB0 File Offset: 0x000C90B0 public float HitWpnDur(int weaponIndex, bool returnPercent) { string text = ""; float num = 0f; if (weaponIndex == 0) { num = (float)this.character.invRow1._DurabilityMax; } if (weaponIndex == 1) { num = (float)this.character.invRow2._DurabilityMax; } if (num == -1f) { return 1f; } this.GetCombatSkillID(text); float num2 = this.character.GetDurabilityNum(weaponIndex).x; if (num2 > num) { num2 = num; } if (returnPercent) { return this.R1(num2 / num * 100f); } return this.R2(num2 / num); } // Token: 0x060009DD RID: 2525 RVA: 0x000CAF40 File Offset: 0x000C9140 public string HitChanceCalculation(int hand) { this.str.Clear(); float num = 0f; int num2 = 0; string text = ""; if (hand == 0) { text = this.character.invRow1._MainSkill; } if (hand == 1) { text = this.character.invRow2._MainSkill; } string text2; this.GetHitChanceStat(text, out text2, out num, (float)num2); float num3 = this.HitMods(true); this.str.Append(num); this.SBP(); this.str.Append(text2); this.str.Append("/20"); if (num3 != 0f) { this.CPlus(); this.str.Append(num3); this.SBP(); this.str.Append("Bonuses & Ailments"); this.CPlus(); } else { this.CPlus(); } if (this.animal) { this.str.Append("Skill"); } else { this.str.Append(this.HitSkill(hand, false)); } this.SBP(); this.str.Append(this.MainSkill(hand)); this.str.Append("/20"); this.CB(); return this.str.ToString(); } // Token: 0x060009DE RID: 2526 RVA: 0x000CB084 File Offset: 0x000C9284 private void OP() { this.str.Append("("); } // Token: 0x060009DF RID: 2527 RVA: 0x000CB097 File Offset: 0x000C9297 private void CP() { this.str.Append(")"); } // Token: 0x060009E0 RID: 2528 RVA: 0x000CB0AA File Offset: 0x000C92AA private void SP() { this.str.Append(" "); } // Token: 0x060009E1 RID: 2529 RVA: 0x000CB0BD File Offset: 0x000C92BD private void SOP() { this.str.Append(" ("); } // Token: 0x060009E2 RID: 2530 RVA: 0x000CB0D0 File Offset: 0x000C92D0 private void COL() { } // Token: 0x060009E3 RID: 2531 RVA: 0x000CB0D2 File Offset: 0x000C92D2 private void SBP() { this.str.Append(" ["); } // Token: 0x060009E4 RID: 2532 RVA: 0x000CB0E5 File Offset: 0x000C92E5 private void CB() { this.str.Append("]"); } // Token: 0x060009E5 RID: 2533 RVA: 0x000CB0F8 File Offset: 0x000C92F8 private void CPlus() { this.str.Append("] + "); } // Token: 0x060009E6 RID: 2534 RVA: 0x000CB10B File Offset: 0x000C930B private void CMult() { this.str.Append("] * "); } // Token: 0x060009E7 RID: 2535 RVA: 0x000CB11E File Offset: 0x000C931E private void CMin() { this.str.Append("] - "); } // Token: 0x060009E8 RID: 2536 RVA: 0x000CB134 File Offset: 0x000C9334 public float EvasionChance(bool forCharacterSheet, float dazedCount, out float roll) { float num = this.EvadeAgl(forCharacterSheet); float num2 = this.EvadeMods(forCharacterSheet); float num3 = this.BlockMods(forCharacterSheet); float num4 = -1f; float num5 = -1f; bool flag = false; bool flag2 = false; if (this.character.GetInvNum(2) > 1 && Links.x.library.GetInvRowByIndex(this.character.GetInvNum(2))._Tag == "Shield") { flag = true; } if (this.HasEffect("VineCocoon")) { flag2 = true; flag = true; } float num6; float num7; this.EvadeArmorTotal(out num6, out num4, out num7, false, flag); bool flag3 = false; if (num4 > -1f) { flag3 = true; } float num8; float num9; this.BlockTotal(out num8, out num5, out num9, false, flag3); if (flag2) { flag = true; this.GetExistingEffect("VineCocoon"); num5 = 120f; } float num10 = num; if (flag3) { num10 += num4; } if (flag) { num10 += num5; num10 += num3; } if (!flag3 && !flag) { num10 += this.EvadeUnarmed(false, flag); } num10 += num2; if (dazedCount > 0f && !forCharacterSheet) { num10 *= 1f - dazedCount * 0.2f; } roll = 0f; if (!forCharacterSheet) { float num11 = num10; float num12 = num10 * 0.75f; float num13 = num10 * 1.1f; float num14 = Random.Range(num12, num13); num10 = this.R1(num14); roll = this.R1(num11 - num14); if (this.character.npc) { float num15 = 1f - this.R1(this.stamina / this.maxStamina); num10 -= this.R1(num15 * 10f); } } if (Records.x.showRuleset && !forCharacterSheet) { Debug.Log(string.Concat(new string[] { this.GetName(), "'s evade roll info 2 - stat total: ", num.ToString(), ", evade chance mods: ", num2.ToString(), ", skill: ", num4.ToString() })); Debug.Log(string.Concat(new string[] { this.GetName(), "'s block roll info 2 - block chance mods: ", num3.ToString(), ", skill: ", num5.ToString() })); } return this.R1(num10); } // Token: 0x060009E9 RID: 2537 RVA: 0x000CB374 File Offset: 0x000C9574 public string MainArmorSkill() { if (this.character.GetInvNum(18) > 1) { Library.Inventory invRowByIndex = Links.x.library.GetInvRowByIndex(this.character.GetInvNum(18)); return Links.x.manual.DisplayNameFromIndex(this.GetArmorSkillID(invRowByIndex._MainSkill), this.character); } return "Unarmored"; } // Token: 0x060009EA RID: 2538 RVA: 0x000CB3D8 File Offset: 0x000C95D8 public void EvadeArmorTotal(out float maxDurability, out float skillTotal, out float durability, bool justSkill, bool hasShield) { maxDurability = 1f; skillTotal = -1f; durability = 1f; if (this.character.GetInvNum(18) > 1) { Library.Inventory invRowByIndex = Links.x.library.GetInvRowByIndex(this.character.GetInvNum(18)); maxDurability = (float)invRowByIndex._DurabilityMax; if (this.character.npc) { maxDurability /= 2f; } skillTotal = this.GetSkill(this.GetArmorSkillID(invRowByIndex._MainSkill)); if (hasShield) { skillTotal /= 80f; } else { skillTotal /= 40f; } if (justSkill) { skillTotal = (float)this.GetArmorSkillID(invRowByIndex._MainSkill); } durability = this.character.GetDurabilityNum(9).x / maxDurability; if (justSkill) { durability = Mathf.Round(durability / maxDurability * 100f); } skillTotal = Mathf.Round(skillTotal); } } // Token: 0x060009EB RID: 2539 RVA: 0x000CB4C4 File Offset: 0x000C96C4 public float EvadeAgl(bool forCharacterSheet) { float num = this.Agility() + this.agilityModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(1); } else { num += (float)this.GetDiceModifier(1); } float num2 = 0f; float num3 = 0f; float num4 = 0f; if (this.character.invRow1 != null) { num3 = this.character.invRow1._EvasionReduction; } if (this.character.GetInvNum(2) > 1) { num4 = Links.x.library.GetInvRowByIndex(this.character.GetInvNum(2))._EvasionReduction; } if (this.character.GetInvNum(18) > 1) { num2 = Links.x.library.GetInvRowByIndex(this.character.GetInvNum(18))._EvasionReduction; } num -= num2; num -= num4; num -= num3; return this.R1(num / 20f); } // Token: 0x060009EC RID: 2540 RVA: 0x000CB5A8 File Offset: 0x000C97A8 public float EvadeMods(bool forCharacterSheet) { float num = this.evadeModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(10); } else { num += (float)this.GetDiceModifier(10); } return num; } // Token: 0x060009ED RID: 2541 RVA: 0x000CB5DC File Offset: 0x000C97DC public float EvadeUnarmed(bool forCharacterSheet, bool hasShield) { float num = this.Dexterity() + this.dexterityModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(4); } else { num += (float)this.GetDiceModifier(4); } float num2 = this.Aura() + this.auraModFlat; if (forCharacterSheet) { num2 += (float)this.GetDiceModifierAverage(2); } else { num2 += (float)this.GetDiceModifier(2); } float num3 = this.Sensory() + this.sensoryModFlat; if (forCharacterSheet) { num3 += (float)this.GetDiceModifierAverage(5); } else { num3 += (float)this.GetDiceModifier(5); } float num4 = Mathf.Round(num + num2 + num3) / 40f; return this.R1(num4); } // Token: 0x060009EE RID: 2542 RVA: 0x000CB67C File Offset: 0x000C987C public void BlockTotal(out float maxDurability, out float skillTotal, out float durability, bool justSkill, bool hasArmor) { maxDurability = 1f; skillTotal = -1f; durability = 0f; if (this.character.GetInvNum(2) <= 1) { durability = 0f; return; } Library.Inventory invRowByIndex = Links.x.library.GetInvRowByIndex(this.character.GetInvNum(2)); if (invRowByIndex._Tag == "Shield") { maxDurability = (float)invRowByIndex._DurabilityMax; int num = 15; if (invRowByIndex._MainSkill == "LargeShield") { num = 14; } skillTotal = this.GetSkill(num); if (hasArmor) { skillTotal /= 80f; } else { skillTotal /= 40f; } durability = this.character.GetDurabilityNum(1).x / maxDurability; skillTotal = Mathf.Round(skillTotal); return; } durability = 0f; } // Token: 0x060009EF RID: 2543 RVA: 0x000CB754 File Offset: 0x000C9954 public float BlockMods(bool forCharacterSheet) { float num = this.blockModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(11); } else { num += (float)this.GetDiceModifier(11); } return num; } // Token: 0x060009F0 RID: 2544 RVA: 0x000CB788 File Offset: 0x000C9988 public string MainShieldSkill() { if (this.character.GetInvNum(2) > 1) { Library.Inventory invRowByIndex = Links.x.library.GetInvRowByIndex(this.character.GetInvNum(2)); if (invRowByIndex._Tag == "Shield") { return Links.x.manual.DisplayNameFromIndex(this.GetCombatSkillID(invRowByIndex._MainSkill), this.character); } } return "No Shield"; } // Token: 0x060009F1 RID: 2545 RVA: 0x000CB7FC File Offset: 0x000C99FC public string EvadeChanceCalculation(float evasionBonus, float roll, bool forCharacterSheet) { this.str.Clear(); bool flag = false; if (this.character.GetInvNum(2) > 1 && Links.x.library.GetInvRowByIndex(this.character.GetInvNum(2))._Tag == "Shield") { flag = true; } float num = -1f; float num2 = -1f; float num3; float num4; this.EvadeArmorTotal(out num3, out num, out num4, false, flag); bool flag2 = false; if (num > -1f) { flag2 = true; } float num5; float num6; this.BlockTotal(out num5, out num2, out num6, false, flag2); float num7 = this.EvadeMods(true); float num8 = this.BlockMods(true); if (evasionBonus > 0f) { this.str.Append("("); } this.str.Append(this.EvadeAgl(true)); this.SBP(); this.str.Append("(AGL - Equipment Evasion Reduction)/20"); this.CPlus(); if (flag2 || flag) { if (flag2) { this.str.Append(num); this.SBP(); this.str.Append(this.MainArmorSkill()); if (flag) { this.str.Append("/80"); } else { this.str.Append("/40"); } } if (flag) { if (flag2) { this.CPlus(); } this.str.Append(num2); this.SBP(); this.str.Append(this.MainShieldSkill()); if (flag2) { this.str.Append("/80"); } else { this.str.Append("/40"); } } } else { this.str.Append(this.EvadeUnarmed(true, flag)); this.SBP(); this.str.Append("(DEX + AUR + SEN)/40"); } if (num8 != 0f) { this.CPlus(); this.str.Append(num8); this.SBP(); this.str.Append("Block Chance Mods"); } else if (num7 != 0f) { this.CPlus(); this.str.Append(num7); this.SBP(); this.str.Append("Evade Chance Mods"); } if (evasionBonus > 0f) { this.str.Append(") * "); this.str.Append(evasionBonus); this.SBP(); this.str.Append("Bonus"); } else if (forCharacterSheet) { this.CB(); } if (!forCharacterSheet) { if (roll > 0f) { this.CMin(); this.str.Append(roll); } if (roll < 0f) { this.CPlus(); this.str.Append(roll * -1f); } if (roll == 0f) { this.CPlus(); this.str.Append("0"); } this.SBP(); this.str.Append("Evade Luck"); if (this.character.npc) { this.CMin(); float num9 = 1f - this.R1(this.stamina / this.maxStamina); this.str.Append(this.R1(num9 * 10f)); this.SBP(); this.str.Append("Fatigue"); this.CB(); } else { this.CB(); } } else if (!this.character.party) { this.str.Append("- Fatigue Penalty"); this.CB(); } return this.str.ToString(); } // Token: 0x060009F2 RID: 2546 RVA: 0x000CBB94 File Offset: 0x000C9D94 public float DamageRoll(bool forCharacterSheet, int weaponIndex, out float wpnDmg, bool single, bool marked, Character target) { wpnDmg = 0f; float num = 0f; int num2 = 0; if (forCharacterSheet) { num2 = 1; } string text = ""; Library.Inventory invRow = this.character.invRow1; if (weaponIndex == 0) { text = this.character.invRow1._MainSkill; } if (weaponIndex == 1) { text = this.character.invRow2._MainSkill; Library.Inventory invRow2 = this.character.invRow2; } string text2; this.GetDmgStat(text, out num, out text2, (float)num2); float num3 = this.DmgMods(forCharacterSheet); int num4 = 0; int num5 = 0; this.DmgMinMax(out num4, out num5, weaponIndex, target, forCharacterSheet); float num6 = this.HitWpnDur(this.GetCurrentHand(), false); if (forCharacterSheet) { num6 = 1f; } else { float num7 = num6 * 100f; if (num7 < 100f) { num6 = (float)Random.Range((int)num7, 100) / 100f; } else { num6 = 1f; } } float num8 = (float)num5; wpnDmg = num8 * num6; float num9; if (forCharacterSheet) { num9 = Mathf.Round(num + num3); } else { num9 = this.R1(num8 + num + num3); } if (Records.x.showRuleset && !forCharacterSheet) { Debug.Log(string.Concat(new string[] { this.GetName(), "'s damage roll info - total ", num9.ToString(), ", min: ", num4.ToString(), ", max: ", num5.ToString(), ", roll: ", num8.ToString(), ", strength: ", num.ToString(), ", diff: ", num3.ToString() })); } return num9; } // Token: 0x060009F3 RID: 2547 RVA: 0x000CBD40 File Offset: 0x000C9F40 public string DamageRollString(int weaponIndex, out float floatVersion) { floatVersion = 0f; int num = 0; int num2 = 0; this.DmgMinMax(out num, out num2, weaponIndex, null, true); float num3 = this.HitWpnDur(0, false); float num4 = (float)num2; float num6; float num5 = this.DamageRoll(true, weaponIndex, out num6, false, false, null); floatVersion = num4 * num3 + num5; return this.R1(num4 * num3 + num5).ToString(); } // Token: 0x060009F4 RID: 2548 RVA: 0x000CBDA0 File Offset: 0x000C9FA0 public float DmgStrength(bool forCharacterSheet) { float num = this.Strength() + this.strengthModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(0); } else { num += (float)this.GetDiceModifier(0); } num /= 20f; return this.R1(num); } // Token: 0x060009F5 RID: 2549 RVA: 0x000CBDE8 File Offset: 0x000C9FE8 public float DmgMods(bool forCharacterSheet) { float num = this.severityModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(6); } else { num += (float)this.GetDiceModifier(6); } return this.R1(num); } // Token: 0x060009F6 RID: 2550 RVA: 0x000CBE20 File Offset: 0x000CA020 public void DmgMinMax(out int damageMin, out int damageMax, int weaponIndex, Character target, bool forCS) { damageMin = 0; damageMax = 0; bool flag = false; if (weaponIndex == 0) { damageMax = this.character.invRow1._DmgMax; if (this.character.invRow1._MeleeRangeEnd >= 5f) { flag = true; } if (!forCS) { damageMax += this.CheckForSpecial(this.character.invRow1, target); } } if (weaponIndex == 1) { damageMax = this.character.invRow2._DmgMax; if (!forCS) { damageMax += this.CheckForSpecial(this.character.invRow2, target); } } if (flag) { int num = this.character.selectedAmmoIndex + 4; Library.Inventory invRowByIndex = Links.x.library.GetInvRowByIndex(this.character.GetInvNum(num * 2)); damageMax = invRowByIndex._DmgMax; Vector3 socketNum = this.character.GetSocketNum(num * 2); damageMax += (int)socketNum.x; if (Records.x.showRuleset && !Records.x.paused && Records.x.InCombat(false)) { Debug.Log(string.Concat(new string[] { this.GetName(), "'s damage roll is from projectile ", invRowByIndex._DisplayName, ", min: ", damageMin.ToString(), ", max: ", damageMax.ToString(), ", ammo index: ", num.ToString() })); } } } // Token: 0x060009F7 RID: 2551 RVA: 0x000CBF8C File Offset: 0x000CA18C public int CheckForSpecial(Library.Inventory itemRow, Character target) { if (itemRow._HasUseFill && itemRow._UseFill == "Forest1" && target && target.stats.race == "Forest") { return 1; } return 0; } // Token: 0x060009F8 RID: 2552 RVA: 0x000CBFCC File Offset: 0x000CA1CC public string GetHitChanceStat(string mainSkill, out string abrev, out float num, float forCS) { num = 0f; abrev = "DEX"; if (mainSkill == "Hand-to-Hand") { float num2 = this.Sensory() + this.sensoryModFlat + Mathf.Lerp((float)this.GetDiceModifier(5), (float)this.GetDiceModifierAverage(5), forCS); float num3 = this.Agility() + this.agilityModFlat + Mathf.Lerp((float)this.GetDiceModifier(1), (float)this.GetDiceModifierAverage(1), forCS); float num4 = this.Dexterity() + this.dexterityModFlat + Mathf.Lerp((float)this.GetDiceModifier(4), (float)this.GetDiceModifierAverage(4), forCS); string text = "Sensory"; num = num2; abrev = "SEN"; if (num3 > num2) { text = "Agility"; num = num3; abrev = "AGL"; } if (num4 > num3 && text == "Agility") { text = "Dexterity"; num = num4; abrev = "DEX"; } if (num4 > num2 && text == "Sensory") { num = num4; abrev = "DEX"; } num = this.R1(num / 20f); return "Sensory or Agility or Dexterity (whichever is higher)"; } if (mainSkill == "Whip") { num = this.Dexterity() + this.dexterityModFlat + Mathf.Lerp((float)this.GetDiceModifier(4), (float)this.GetDiceModifierAverage(4), forCS); num = this.R1(num / 20f); return "Dexterity"; } if (mainSkill == "Sword" || mainSkill == "LongSword") { num = this.Dexterity() + this.dexterityModFlat + Mathf.Lerp((float)this.GetDiceModifier(4), (float)this.GetDiceModifierAverage(4), forCS); num = this.R1(num / 20f); return "Dexterity"; } if (mainSkill == "ShortSword") { float num5 = this.Sensory() + this.sensoryModFlat + Mathf.Lerp((float)this.GetDiceModifier(5), (float)this.GetDiceModifierAverage(5), forCS); float num6 = this.Dexterity() + this.dexterityModFlat + Mathf.Lerp((float)this.GetDiceModifier(4), (float)this.GetDiceModifierAverage(4), forCS); num = num5; abrev = "SEN"; if (num6 > num5) { num = num6; abrev = "DEX"; } num = this.R1(num / 20f); return "Sensory or Dexterity (whichever is higher)"; } if (mainSkill == "Bow") { num = this.Sensory() + this.sensoryModFlat + Mathf.Lerp((float)this.GetDiceModifier(5), (float)this.GetDiceModifierAverage(5), forCS); num = this.R1(num / 20f); abrev = "SEN"; return "Sensory"; } if (mainSkill == "Elixir") { float num7 = this.Sensory() + this.sensoryModFlat + Mathf.Lerp((float)this.GetDiceModifier(5), (float)this.GetDiceModifierAverage(5), forCS); float num8 = this.Dexterity() + this.dexterityModFlat + Mathf.Lerp((float)this.GetDiceModifier(4), (float)this.GetDiceModifierAverage(4), forCS); num = num7; abrev = "SEN"; if (num8 > num7) { num = num8; abrev = "DEX"; } num = this.R1(num / 20f); return "Sensory or Dexterity (whichever is higher)"; } if (mainSkill == "Pole") { num = this.Dexterity() + this.dexterityModFlat + Mathf.Lerp((float)this.GetDiceModifier(4), (float)this.GetDiceModifierAverage(4), forCS); num = this.R1(num / 20f); abrev = "DEX"; return "Dexterity"; } if (mainSkill == "Scepter") { float num9 = this.Strength() + this.sensoryModFlat + Mathf.Lerp((float)this.GetDiceModifier(0), (float)this.GetDiceModifierAverage(0), forCS); float num10 = this.Dexterity() + this.dexterityModFlat + Mathf.Lerp((float)this.GetDiceModifier(4), (float)this.GetDiceModifierAverage(4), forCS); num = num9; abrev = "STR"; if (num10 > num9) { num = num10; abrev = "DEX"; } num = this.R1(num / 20f); return "Strength or Dexterity (whichever is higher)"; } if (mainSkill == "Sling") { float num11 = this.Sensory() + this.sensoryModFlat + Mathf.Lerp((float)this.GetDiceModifier(5), (float)this.GetDiceModifierAverage(5), forCS); float num12 = this.Dexterity() + this.dexterityModFlat + Mathf.Lerp((float)this.GetDiceModifier(4), (float)this.GetDiceModifierAverage(4), forCS); num = num11; abrev = "SEN"; if (num12 > num11) { num = num12; abrev = "STR"; } num = this.R1(num / 20f); return "Sensory or Dexterity (whichever is higher)"; } if (mainSkill == "Ax") { float num13 = this.Sensory() + this.sensoryModFlat + Mathf.Lerp((float)this.GetDiceModifier(5), (float)this.GetDiceModifierAverage(5), forCS); float num14 = this.Dexterity() + this.dexterityModFlat + Mathf.Lerp((float)this.GetDiceModifier(4), (float)this.GetDiceModifierAverage(4), forCS); num = num13; abrev = "SEN"; if (num14 > num13) { num = num14; abrev = "DEX"; } num = this.R1(num / 20f); return "Sensory or Dexterity (whichever is higher)"; } num = this.Dexterity() + this.dexterityModFlat + Mathf.Lerp((float)this.GetDiceModifier(4), (float)this.GetDiceModifierAverage(4), forCS); num = this.R1(num / 20f); return "Dexterity"; } // Token: 0x060009F9 RID: 2553 RVA: 0x000CC534 File Offset: 0x000CA734 public string GetDmgStat(string mainSkill, out float num, out string abrev, float forCS) { num = 0f; if (mainSkill == "Hand-to-Hand") { float num2 = this.Strength() + this.sensoryModFlat + Mathf.Lerp((float)this.GetDiceModifier(0), (float)this.GetDiceModifierAverage(0), forCS); float num3 = this.Aura() + this.auraModFlat + Mathf.Lerp((float)this.GetDiceModifier(2), (float)this.GetDiceModifierAverage(2), forCS); num = num2 + num3; num = this.R1(num / 20f); abrev = "(STR + AUR)"; return "Strength + Aura"; } if (mainSkill == "Whip") { float num4 = this.Strength() + this.sensoryModFlat + Mathf.Lerp((float)this.GetDiceModifier(0), (float)this.GetDiceModifierAverage(0), forCS); float num5 = this.Agility() + this.agilityModFlat + Mathf.Lerp((float)this.GetDiceModifier(1), (float)this.GetDiceModifierAverage(1), forCS); num = num4; abrev = "STR"; if (num5 > num4) { num = num5; abrev = "AGL"; } num = this.R1(num / 20f); return "Strength or Agility (whichever is higher)"; } if (mainSkill == "Sword" || mainSkill == "LongSword") { num = this.Strength() + this.sensoryModFlat + Mathf.Lerp((float)this.GetDiceModifier(0), (float)this.GetDiceModifierAverage(0), forCS); abrev = "STR"; num = this.R1(num / 20f); return "Strength"; } if (mainSkill == "ShortSword") { float num6 = this.Strength() + this.sensoryModFlat + Mathf.Lerp((float)this.GetDiceModifier(0), (float)this.GetDiceModifierAverage(0), forCS); float num7 = this.Agility() + this.agilityModFlat + Mathf.Lerp((float)this.GetDiceModifier(1), (float)this.GetDiceModifierAverage(1), forCS); num = num6; abrev = "STR"; if (num7 > num6) { num = num7; abrev = "AGL"; } num = this.R1(num / 20f); return "Strength or Agility (whichever is higher)"; } if (mainSkill == "Bow") { num = this.Strength() + this.sensoryModFlat + Mathf.Lerp((float)this.GetDiceModifier(0), (float)this.GetDiceModifierAverage(0), forCS); num = this.R1(num / 20f); abrev = "STR"; return "Strength"; } if (mainSkill == "Elixir") { abrev = "WPN"; num = 0f; return "From Weapon"; } if (mainSkill == "Pole") { float num8 = this.Strength() + this.sensoryModFlat + Mathf.Lerp((float)this.GetDiceModifier(0), (float)this.GetDiceModifierAverage(0), forCS); float num9 = this.Sensory() + this.sensoryModFlat + Mathf.Lerp((float)this.GetDiceModifier(5), (float)this.GetDiceModifierAverage(5), forCS); num = num8; abrev = "STR"; if (num9 > num8) { num = num9; abrev = "SEN"; } num = this.R1(num / 20f); return "Strength or Sensory (whichever is higher)"; } if (mainSkill == "Scepter") { num = this.Strength() + this.sensoryModFlat + Mathf.Lerp((float)this.GetDiceModifier(0), (float)this.GetDiceModifierAverage(0), forCS); num = this.R1(num / 20f); abrev = "STR"; return "Strength"; } if (mainSkill == "Sling") { abrev = "WPN"; num = 0f; return "From Weapon"; } mainSkill == "Ax"; num = this.Strength() + this.sensoryModFlat + Mathf.Lerp((float)this.GetDiceModifier(0), (float)this.GetDiceModifierAverage(0), forCS); num = this.R1(num / 20f); abrev = "STR"; return "Strength"; } // Token: 0x060009FA RID: 2554 RVA: 0x000CC8FC File Offset: 0x000CAAFC public float ArmorNumber(bool forCharacterSheet, bool addDurability) { bool flag = false; float num = -1f; float num2 = 0f; float num3 = 0f; float num4 = 0f; float num5 = 0f; float num6 = 0f; float num7 = 0f; if (this.character.GetInvNum(2) > 1) { Library.Inventory invRowByIndex = Links.x.library.GetInvRowByIndex(this.character.GetInvNum(2)); if (invRowByIndex._Tag == "Shield") { flag = true; } num6 = invRowByIndex._AC; } this.EvadeArmorTotal(out num2, out num, out num3, false, flag); bool flag2 = false; if (num > -1f) { flag2 = true; if (this.character.GetInvNum(18) > 1) { num7 = Links.x.library.GetInvRowByIndex(this.character.GetInvNum(18))._AC; } } if (flag) { float num8; this.BlockTotal(out num4, out num8, out num5, false, flag2); } float num9 = 0f; if (flag2) { float num10 = num3; if (forCharacterSheet) { num10 = num3; } if (!addDurability) { num10 = 1f; } num9 += num7 * num10; } if (flag) { float num11 = num5 * 100f; float num12; if (num11 < 100f) { num12 = (float)Random.Range((int)num11, 100) / 100f; if (forCharacterSheet) { num12 = num11 / 100f; } } else { num12 = 1f; } if (forCharacterSheet) { num12 = num5; } if (!addDurability) { num12 = 1f; } num9 += num6 * num12; } if (this.character.npc && this.xmlName.Contains("FishMonsterWhite") && (this.character.node.GraphIndex == 1U || Links.x.gameplay.IsNight())) { num9 += 40f; } float num13 = this.characterRow._NaturalArmor; if (this.naturalArmorBase > 0f) { num13 = this.naturalArmorBase; } if (num13 < 0f) { num13 = 0f; } num9 += num13; bool flag3 = forCharacterSheet && addDurability; return this.R1(num9); } // Token: 0x060009FB RID: 2555 RVA: 0x000CCAF8 File Offset: 0x000CACF8 public float ArmorAura(int forCS) { float num = this.Aura() + this.auraModFlat + Mathf.Lerp((float)this.GetDiceModifier(2), (float)this.GetDiceModifierAverage(2), (float)forCS); return this.R1(num / 4f); } // Token: 0x060009FC RID: 2556 RVA: 0x000CCB38 File Offset: 0x000CAD38 public float ArmorPaganAura(int forCS) { float num = this.Aura() + this.auraModFlat + Mathf.Lerp((float)this.GetDiceModifier(2), (float)this.GetDiceModifierAverage(2), (float)forCS); return this.R1(num / 2f); } // Token: 0x060009FD RID: 2557 RVA: 0x000CCB78 File Offset: 0x000CAD78 public bool AttackIsPoison(bool firstAttack, Library.Inventory ammoRow) { if (this.xmlName.Contains("Frog")) { return true; } if (ammoRow != null) { if (ammoRow._Effect.Contains("Frog")) { return true; } if (ammoRow._Name.Contains("Poison")) { return true; } } return (firstAttack && this.character.invRow1._Effect.Contains("Poison")) || (!firstAttack && this.character.invRow2 != null && this.character.invRow2._Effect.Contains("Poison")); } // Token: 0x060009FE RID: 2558 RVA: 0x000CCC14 File Offset: 0x000CAE14 public float HeavyDamageModifier() { return 1.15f + (this.dexterity + this.dexterityModFlat) / 200f; } // Token: 0x060009FF RID: 2559 RVA: 0x000CCC2F File Offset: 0x000CAE2F public float MultiHitMod() { return this.character.invRow1._MultiTargetMod; } // Token: 0x06000A00 RID: 2560 RVA: 0x000CCC41 File Offset: 0x000CAE41 public float LightDamageModifier() { return 0.5f; } // Token: 0x06000A01 RID: 2561 RVA: 0x000CCC48 File Offset: 0x000CAE48 public string DefenseStance(string orig, float perc) { this.str.Clear(); this.str.Append("("); this.str.Append(orig); this.str.Append(" * "); this.str.Append(this.R1(perc)); this.SBP(); this.str.Append("Defend"); this.CB(); this.str.Append(""); return this.str.ToString(); } // Token: 0x06000A02 RID: 2562 RVA: 0x000CCCDC File Offset: 0x000CAEDC public string DirectionalString() { this.str.Clear(); this.str.Append(""); this.str.Append(" + 1"); this.SBP(); this.str.Append("Directional bonus"); this.CB(); this.str.Append(""); return this.str.ToString(); } // Token: 0x06000A03 RID: 2563 RVA: 0x000CCD50 File Offset: 0x000CAF50 public string DamageCalculation(bool fromManual, float wpnDmg, float severity, float targetArmor, bool secondAttack, float damageReduction, string attackType, bool interactable, bool poison, Character target) { this.str.Clear(); float num = this.DmgMods(true); int num2 = 0; int num3 = 0; this.DmgMinMax(out num2, out num3, this.GetCurrentHand(), target, fromManual); float num4 = 0f; int num5 = 0; string text = ""; if (this.GetCurrentHand() == 0) { text = this.character.invRow1._MainSkill; } if (this.GetCurrentHand() == 1) { text = this.character.invRow2._MainSkill; } string text2; this.GetDmgStat(text, out num4, out text2, (float)num5); this.COL(); if (secondAttack || (damageReduction < 1f && damageReduction > 0f)) { this.str.Append("("); } this.str.Append("("); if (fromManual) { this.str.Append("Hit Chance Severity + "); } if (!fromManual) { this.str.Append(this.R1(severity)); this.SBP(); this.str.Append("Severity"); this.CPlus(); } if (text2 != "WPN") { this.str.Append(num4); this.SBP(); this.str.Append(text2); this.str.Append("/20"); this.CPlus(); } if (num != 0f) { this.str.Append(num); this.SBP(); this.str.Append("Damage Mods"); this.str.Append("] + "); } if (fromManual) { this.str.Append(num3); this.SBP(); this.str.Append("Weapon Damage"); this.CMult(); this.str.Append(this.HitWpnDur(this.GetCurrentHand(), false)); this.SBP(); this.str.Append("Weapon Condition"); this.CB(); } else { this.str.Append(this.R1(wpnDmg * this.HitWpnDur(this.GetCurrentHand(), false))); this.SBP(); this.str.Append("Wpn Dmg * Condition"); } if (fromManual) { this.str.Append(") * "); this.str.Append("(Target's Armor % * Armor Condition % + Aur/4)"); this.str.Append("\n\nLeft hand attack damage is halved."); } else { this.CB(); if (!interactable) { this.str.Append(") * "); this.str.Append(this.R1(targetArmor)); this.SBP(); if (poison) { this.str.Append("Armor ineffective to poison"); } else { this.str.Append("Armor"); } this.CB(); if (secondAttack || (damageReduction < 1f && damageReduction > 0f) || damageReduction > 1f) { this.str.Append(")"); if ((damageReduction < 1f && damageReduction > 0f) || damageReduction > 1f) { this.str.Append(" * "); this.str.Append(damageReduction); this.SBP(); if (attackType == "Multi Attack") { this.str.Append("Sweep Penalty"); } if (attackType == "Heavy Attack") { this.str.Append("Marked Penalty"); } if (attackType == "Grazing") { this.str.Append("Grazed"); } if (attackType == "Spirit Attack 1") { this.str.Append("Rally Bonus"); } this.CB(); } if (secondAttack) { this.str.Append(" * "); this.str.Append(0.5); this.SBP(); this.str.Append("Left Hand Penalty"); this.CB(); } } } else { if ((damageReduction < 1f && damageReduction > 0f) || damageReduction > 1f) { this.str.Append(") * "); this.str.Append(damageReduction); this.SBP(); if (attackType == "Multi Attack") { this.str.Append("Sweep Penalty"); } if (attackType == "Heavy Attack") { this.str.Append("Marked Penalty"); } if (attackType == "Spirit Attack 1") { this.str.Append("Rally Bonus"); } this.CMin(); } else { this.str.Append(") * "); } this.str.Append(this.R1(targetArmor)); this.SBP(); this.str.Append("Armor"); this.CB(); if (secondAttack) { this.COL(); this.str.Append(")/2"); this.SBP(); this.str.Append("Left Hand"); this.CB(); } } } return this.str.ToString(); } // Token: 0x06000A04 RID: 2564 RVA: 0x000CD29C File Offset: 0x000CB49C public float PaganHitChance(bool forCharacterSheet, string skill) { float num = this.PaganHit(forCharacterSheet); float num2 = this.PaganMods(forCharacterSheet); float num3 = 1f; float num4; this.PaganTotals(out num4, out num3, skill, false, forCharacterSheet); float num5 = num + num2 + num3; if (Records.x.showRuleset && !forCharacterSheet) { Debug.Log(string.Concat(new string[] { this.GetName(), "'s pagan hit roll info - total is: ", (Mathf.Round(num5 * 100f) / 100f).ToString(), ", pagan: ", num.ToString(), ", pagan mods: ", num2.ToString(), ", skill: ", num3.ToString() })); } return Mathf.Round(num5); } // Token: 0x06000A05 RID: 2565 RVA: 0x000CD364 File Offset: 0x000CB564 public void PaganTotals(out float durability, out float skillTotal, string skill, bool justSkill, bool forCharacterSheet) { durability = 1f; skillTotal = 1f; int combatSkillID = this.GetCombatSkillID(skill); skillTotal = this.GetSkill(combatSkillID) / 10f; if (justSkill) { skillTotal = this.GetSkill(combatSkillID); } if (Records.x.showRuleset && !justSkill && Records.x.InCombat(false) && !Records.x.paused && !forCharacterSheet) { Debug.Log(string.Concat(new string[] { this.GetName(), "'s pagan roll info 1 - skill raw: ", this.GetSkill(combatSkillID).ToString(), ", dur: ", this.character.GetDurabilityNum(0).y.ToString(), ", max dur: , staff: ", this.character.invRow1._DisplayName })); } } // Token: 0x06000A06 RID: 2566 RVA: 0x000CD44C File Offset: 0x000CB64C public float PaganHit(bool forCharacterSheet) { float num = this.Pagan() + this.paganModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(3); } else { num += (float)this.GetDiceModifier(3); } return num / 5f; } // Token: 0x06000A07 RID: 2567 RVA: 0x000CD48C File Offset: 0x000CB68C public float PaganMods(bool forCharacterSheet) { float num = this.paganHitModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(9); } else { num += (float)this.GetDiceModifier(9); } return num; } // Token: 0x06000A08 RID: 2568 RVA: 0x000CD4C0 File Offset: 0x000CB6C0 public void PaganSpellCost(string spellName, bool remove, out float spiritCost, out float healthCost) { int num = this.uniqueNames.IndexOf(spellName); spiritCost = 0f; healthCost = 0f; if (num > -1) { spiritCost = this.abilityCost[num].x; if (Records.x.showRuleset) { Debug.Log(string.Concat(new string[] { this.GetName(), "'s spell cost - spirit: ", spiritCost.ToString(), ", health: ", healthCost.ToString() })); } if (remove && !this.semizenMagic && this.customAI != "SpellsOnly") { this.AddSpirit((int)spiritCost * (-1 * Records.x.spiritFragment)); } } } // Token: 0x06000A09 RID: 2569 RVA: 0x000CD580 File Offset: 0x000CB780 public bool HasPaganCostForSpell(string spellName) { int num = this.uniqueNames.IndexOf(spellName); float num2 = 0f; if (num > -1) { float num3 = this.abilityCost[num].x * (float)Records.x.spiritFragment; return num2 <= (float)this.currLife && num3 <= (float)this.magicPoints; } return false; } // Token: 0x06000A0A RID: 2570 RVA: 0x000CD5E4 File Offset: 0x000CB7E4 public float PaganPower(float tether, bool forCharacterSheet) { float num = this.PaganPowerAura(forCharacterSheet); float num2 = this.PaganPowerPag(forCharacterSheet); float num3 = this.PaganPowerMods(forCharacterSheet); if (forCharacterSheet) { return this.R1(num + num2 + num3 + (float)this.character.GetMagicItems()); } float num4 = this.R1(tether + num + num2 + num3 + (float)this.character.GetMagicItems()); if (Records.x.showRuleset && !forCharacterSheet) { Debug.Log(string.Concat(new string[] { this.GetName(), "'s spell power - aura: ", num.ToString(), ", pagan: ", num2.ToString(), ", mods: ", num3.ToString(), ", tether: ", tether.ToString(), ", magic items: ", this.character.GetMagicItems().ToString(), " total is ", num4.ToString() })); } return this.R1(num4); } // Token: 0x06000A0B RID: 2571 RVA: 0x000CD6FC File Offset: 0x000CB8FC public float PaganRollString() { float num = this.PaganPowerAura(true); float num2 = this.PaganPowerPag(true); float num3 = this.PaganPowerMods(true); return this.R1(num + num2 + num3 + (float)this.character.GetMagicItems()); } // Token: 0x06000A0C RID: 2572 RVA: 0x000CD73C File Offset: 0x000CB93C public float PaganPowerMods(bool forCharacterSheet) { float num = this.paganSeverityModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(7); } else { num += (float)this.GetDiceModifier(7); } return num; } // Token: 0x06000A0D RID: 2573 RVA: 0x000CD76C File Offset: 0x000CB96C public float PaganPowerPag(bool forCharacterSheet) { float num = this.Pagan() + this.paganModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(3); } else { num += (float)this.GetDiceModifier(3); } num /= 5f; return this.R1(num); } // Token: 0x06000A0E RID: 2574 RVA: 0x000CD7B4 File Offset: 0x000CB9B4 public float PaganPowerAura(bool forCharacterSheet) { float num = this.Aura() + this.auraModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(2); } else { num += (float)this.GetDiceModifier(2); } num /= 7f; return this.R1(num); } // Token: 0x06000A0F RID: 2575 RVA: 0x000CD7FC File Offset: 0x000CB9FC public float PaganPowerFromItem(float severity, float tether) { float num = Mathf.Round(tether + severity); if (Records.x.showRuleset) { Debug.Log(string.Concat(new string[] { this.GetName(), "'s spell power from item - tether: ", tether.ToString(), ", severity: ", severity.ToString() })); } return num; } // Token: 0x06000A10 RID: 2576 RVA: 0x000CD85C File Offset: 0x000CBA5C public string PaganPowerCalculation(bool fromManual, float tether, bool fromItem) { this.str.Clear(); if (fromItem) { this.str.Append(tether); this.SBP(); this.str.Append("Spell Overpower"); this.CB(); } else { this.str.Append(this.PaganPowerAura(true)); this.SBP(); this.str.Append("AUR/7"); this.CPlus(); this.str.Append(this.PaganPowerPag(true)); if (!Records.x.banquetIsle && !this.semizenMagic) { this.SBP(); this.str.Append("PAG/5"); this.CPlus(); } else { this.SBP(); this.str.Append("OCC/5"); this.CPlus(); } this.str.Append(this.character.GetMagicItems()); this.SBP(); this.str.Append("Enhanced Items"); this.CPlus(); float num = this.PaganPowerMods(true); if (num != 0f) { this.str.Append(num); this.SBP(); this.str.Append("Mods"); this.CPlus(); } this.str.Append(tether); this.SBP(); this.str.Append("Spell Overpower"); this.CB(); } return this.str.ToString(); } // Token: 0x06000A11 RID: 2577 RVA: 0x000CD9DD File Offset: 0x000CBBDD public float SpellRadius(Library.Pagan paganRow) { if (this.character.npc) { return 20f; } if (paganRow != null && paganRow._ID == "Revive") { return 5f; } return 20f; } // Token: 0x06000A12 RID: 2578 RVA: 0x000CDA14 File Offset: 0x000CBC14 public float PaganResistance(bool forCharacterSheet, string spellClass, out float roll, out float armor) { armor = (float)this.character.GetMagicAC(); float num = this.PaganResistAura(forCharacterSheet); if (Records.x.showRuleset && !forCharacterSheet) { Debug.Log(string.Concat(new string[] { this.GetName(), "'s spell resistance - aura: ", num.ToString(), ", armor: ", armor.ToString() })); } float num2 = num; roll = 0f; if (!forCharacterSheet) { float num3 = num2; float num4 = num2 * 0.6f; float num5 = num2 * 1.4f; float num6 = Random.Range(num4, num5); num2 = num6; roll = this.R1(num3 - num6); if (spellClass == "Vines") { num2 += this.paganResist.x; } else if (spellClass == "Spores") { num2 += this.paganResist.z; } else if (spellClass == "Fauna") { num2 += this.paganResist.y; } } return num2; } // Token: 0x06000A13 RID: 2579 RVA: 0x000CDB18 File Offset: 0x000CBD18 public float PaganResistAura(bool forCharacterSheet) { float num = this.Aura() + this.auraModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(2); } else { num += (float)this.GetDiceModifier(2); } num /= 3f; return this.R1(num); } // Token: 0x06000A14 RID: 2580 RVA: 0x000CDB60 File Offset: 0x000CBD60 public string PaganResistCalculation(bool fromManual, float luck, string spellClass) { this.str.Clear(); this.str.Append(this.PaganResistAura(true)); this.SBP(); this.str.Append("AUR/3"); int magicAC = this.character.GetMagicAC(); float num = 0f; if (spellClass == "Vines") { num = this.paganResist.x; } else if (spellClass == "Spores") { num = this.paganResist.z; } else if (spellClass == "Fauna") { num = this.paganResist.y; } if (num != 0f) { if (num > 0f) { this.CPlus(); this.str.Append(num); } if (num < 0f) { this.CMin(); this.str.Append(num * -1f); } if (fromManual) { this.SBP(); if (spellClass == "Vines") { this.str.Append("Vines Resistance"); } else if (spellClass == "Spores") { this.str.Append("Spores Resistance"); } else if (spellClass == "Fauna") { this.str.Append("Fauna Resistance"); } } else { this.SBP(); this.str.Append("Resistance Modifier"); } } if (fromManual) { this.CB(); } else { if (luck > 0f) { this.CMin(); this.str.Append(luck); } if (luck < 0f) { this.CPlus(); this.str.Append(luck * -1f); } this.SBP(); this.str.Append("Resist Luck"); this.CB(); } if (fromManual || magicAC > 0) { this.str.Append("Spell effects are reduced "); this.str.Append((float)this.character.GetMagicAC() / 10f); this.str.Append("%"); this.SBP(); this.str.Append("Pagan Armor"); this.CB(); } return this.str.ToString(); } // Token: 0x06000A15 RID: 2581 RVA: 0x000CDDA0 File Offset: 0x000CBFA0 public float SpellDifficulty(string spellName, out float tether) { int num = this.uniqueNames.IndexOf(spellName); float num2 = 0f; tether = 0f; if (num > -1) { Library.Pagan paganRow = Links.x.library.GetPaganRow(this.abilityNames[num]); num2 = Records.x.SpellDifficulty(paganRow, this.abilityLevels[num].x, this.abilityLevels[num].y, this.abilityLevels[num].z); if (paganRow._Slider1.Contains("Summon")) { num2 += this.SummonModSpells(); } } else { Debug.LogError("NO SPELL NAME FOUND " + ((this != null) ? this.ToString() : null)); } return num2; } // Token: 0x06000A16 RID: 2582 RVA: 0x000CDE60 File Offset: 0x000CC060 public float PlayingSkill(string instrument) { int num = 26; if (instrument == "Flute") { num = 26; } if (instrument == "Horn") { num = 27; } if (instrument == "Pipe") { num = 29; } return this.R1(this.GetSkill(num) / 20f); } // Token: 0x06000A17 RID: 2583 RVA: 0x000CDEB4 File Offset: 0x000CC0B4 public float PlayingSkillHighest() { float num = this.R1(this.GetSkill(26) / 20f); float num2 = this.R1(this.GetSkill(27) / 20f); float num3 = this.R1(this.GetSkill(29) / 20f); float num4 = num; if (num2 > num4) { num4 = num2; } if (num3 > num4) { num4 = num3; } return num4; } // Token: 0x06000A18 RID: 2584 RVA: 0x000CDF10 File Offset: 0x000CC110 public float PlaySensory(bool forCharacterSheet) { float num = this.Sensory() + this.sensoryModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(5); } else { num += (float)this.GetDiceModifier(5); } num /= 10f; return this.R1(num); } // Token: 0x06000A19 RID: 2585 RVA: 0x000CDF58 File Offset: 0x000CC158 public float InstrumentPower(float severity, string skill, bool forCharacterSheet, out float instrumentPower) { float num = this.PlayingPowerDex(forCharacterSheet); float num2 = this.PlaySensory(forCharacterSheet); int num3 = 0; int num4 = 0; this.PlayingMinMax(out num3, out num4, forCharacterSheet, skill); instrumentPower = this.R1((float)Random.Range(num3, num4 + 1)); if (forCharacterSheet) { return this.R2((float)num4 + num + num2 + this.R1((float)this.Artistry())); } float num5 = this.PlayingSkill(skill); float num6; if (forCharacterSheet) { num6 = this.R1(instrumentPower + num + num2 + this.R1(this.PlayingSkillHighest()) + this.R1((float)this.Artistry())); } else { num6 = this.R1(instrumentPower + num + num2 + this.R1(num5) + this.R1((float)this.Artistry())); } if (Records.x.showRuleset && !forCharacterSheet) { Debug.Log(string.Concat(new string[] { this.GetName(), "'s instrument potency total: ", num6.ToString(), ", damageMin: ", num3.ToString(), ", damageMax: ", num4.ToString(), ", power: ", instrumentPower.ToString(), ", severity: ", severity.ToString(), " , dex: ", num.ToString(), ", sen: ", num2.ToString() })); } return num6; } // Token: 0x06000A1A RID: 2586 RVA: 0x000CE0D0 File Offset: 0x000CC2D0 public float MusicPowerString() { float num = this.PlayingPowerDex(true); return this.R1(num); } // Token: 0x06000A1B RID: 2587 RVA: 0x000CE0EC File Offset: 0x000CC2EC public void PlayingMinMax(out int damageMin, out int damageMax, bool forCharacterSheet, string skill) { damageMin = 0; damageMax = 0; if (forCharacterSheet) { return; } Library.Inventory inventory = Links.x.library.GetInvRowByIndex(this.character.GetInvNum(this.character.instrumentInUse * 2)); if (this.character.instrumentInUse == 0) { inventory = this.character.GetInstrumentType(skill); } if (inventory != null && (inventory._MainSkill == "Flute" || inventory._MainSkill == "Drums" || inventory._MainSkill == "Pipe" || inventory._MainSkill == "Horn")) { damageMin = inventory._DmgMin; damageMax = inventory._DmgMax; } } // Token: 0x06000A1C RID: 2588 RVA: 0x000CE1A4 File Offset: 0x000CC3A4 public float PlayingPowerDex(bool forCharacterSheet) { float num = this.Dexterity() + this.dexterityModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(4); } else { num += (float)this.GetDiceModifier(4); } num /= 30f; return this.R1(num); } // Token: 0x06000A1D RID: 2589 RVA: 0x000CE1EC File Offset: 0x000CC3EC public string InstrumentPowerCalculation(bool fromManual, string req, float instrumentPower, bool addSkillLevel, float skillLevel, string type) { this.str.Clear(); float num = (float)this.Artistry(); if (num != 0f) { this.CPlus(); this.str.Append(this.R1(num)); this.SBP(); this.str.Append("Artistry Mods"); this.CPlus(); } this.str.Append(this.PlayingPowerDex(true)); this.SBP(); this.str.Append("DEX/30"); this.CPlus(); this.str.Append(this.PlaySensory(true)); this.SBP(); this.str.Append("SEN/10"); this.CPlus(); if (!fromManual) { this.str.Append(this.R1(instrumentPower)); } this.SBP(); if (!fromManual) { if (type == "Pipe") { this.str.Append("Pipe Power"); } else if (type == "Flute") { this.str.Append("Flute Power"); } else { this.str.Append("Horn Power"); } } else { this.str.Append("Instrument Power"); } if (addSkillLevel) { this.str.Append("] + "); this.str.Append(this.PlayingSkill(req)); this.SBP(); this.str.Append("Skill/20"); } else { this.str.Append("] + "); this.str.Append(this.PlayingSkill(req)); this.SBP(); this.str.Append("Highest Instrument Skill/20"); } this.CB(); return this.str.ToString(); } // Token: 0x06000A1E RID: 2590 RVA: 0x000CE3C0 File Offset: 0x000CC5C0 public string SongSkillMultiplierCalculation(float x) { this.str.Clear(); this.str.Append(this.R1(Records.x.SongSkillMultiplier(x))); this.SBP(); this.str.Append("Modified Skill"); this.CB(); return this.str.ToString(); } // Token: 0x06000A1F RID: 2591 RVA: 0x000CE420 File Offset: 0x000CC620 public float InstrumentResistance(bool forCharacterSheet, out float roll) { float num = this.PlayingResistAura(forCharacterSheet); float num2 = this.PlayingResistSensory(forCharacterSheet); float num3 = num + num2; num3 += this.musicResistMod; roll = 0f; if (!forCharacterSheet) { float num4 = num3; float num5 = num3 * 0.6f; float num6 = num3 * 1.4f; float num7 = Random.Range(num5, num6); num3 = num7; roll = this.R1(num4 - num7); } return this.R1(num3); } // Token: 0x06000A20 RID: 2592 RVA: 0x000CE484 File Offset: 0x000CC684 public float PlayingResistAura(bool forCharacterSheet) { float num = this.Aura() + this.auraModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(2); } else { num += (float)this.GetDiceModifier(2); } num /= 4f; return Mathf.Ceil(num); } // Token: 0x06000A21 RID: 2593 RVA: 0x000CE4C8 File Offset: 0x000CC6C8 public float PlayingResistSensory(bool forCharacterSheet) { float num = this.Sensory() + this.sensoryModFlat; if (forCharacterSheet) { num += (float)this.GetDiceModifierAverage(5); } else { num += (float)this.GetDiceModifier(5); } num /= 5f; return Mathf.Ceil(num); } // Token: 0x06000A22 RID: 2594 RVA: 0x000CE50C File Offset: 0x000CC70C public string InstrumentResistCalculation(bool forCS, float luck) { this.str.Clear(); float num; this.str.Append(this.character.stats.InstrumentResistance(true, out num)); this.SBP(); this.str.Append("AUR/4 + SEN/5"); if (this.musicResistMod != 0f) { this.str.Append(" + Bonuses & Ailments"); } if (forCS) { this.CB(); } else { if (luck > 0f) { this.CMin(); this.str.Append(luck); } if (luck < 0f) { this.CPlus(); this.str.Append(luck * -1f); } this.SBP(); this.str.Append("Resist Luck"); this.CB(); } return this.str.ToString(); } // Token: 0x06000A23 RID: 2595 RVA: 0x000CE5E8 File Offset: 0x000CC7E8 public float SongDifficulty(Library.Abilities song) { return song._Difficulty; } // Token: 0x06000A24 RID: 2596 RVA: 0x000CE5F0 File Offset: 0x000CC7F0 public float ElixirDifficulty(Library.Abilities elixir) { return elixir._Difficulty; } // Token: 0x06000A25 RID: 2597 RVA: 0x000CE5F8 File Offset: 0x000CC7F8 public int Stuck() { if (this.character.inventoryBag && this.character.inventoryBag.weight > (float)this.CarryingWeight()) { return 1; } return this.stuck; } // Token: 0x06000A26 RID: 2598 RVA: 0x000CE62D File Offset: 0x000CC82D public bool Overburdened() { return this.character.party && this.character.inventoryBag && this.character.inventoryBag.weight > (float)this.CarryingWeight(); } // Token: 0x06000A27 RID: 2599 RVA: 0x000CE66C File Offset: 0x000CC86C public int Silent() { return this.silent; } // Token: 0x06000A28 RID: 2600 RVA: 0x000CE674 File Offset: 0x000CC874 public int Confuse() { return this.confuse; } // Token: 0x06000A29 RID: 2601 RVA: 0x000CE67C File Offset: 0x000CC87C public int Floating() { return this.floating; } // Token: 0x06000A2A RID: 2602 RVA: 0x000CE684 File Offset: 0x000CC884 public int Flee() { return this.flee; } // Token: 0x06000A2B RID: 2603 RVA: 0x000CE68C File Offset: 0x000CC88C public int AttackAllies() { return this.attackAllies; } // Token: 0x06000A2C RID: 2604 RVA: 0x000CE694 File Offset: 0x000CC894 public float Blind() { return this.R1(this.blind); } // Token: 0x06000A2D RID: 2605 RVA: 0x000CE6A2 File Offset: 0x000CC8A2 public float ArmorReduction() { return this.R1(this.armorReduction); } // Token: 0x06000A2E RID: 2606 RVA: 0x000CE6B0 File Offset: 0x000CC8B0 public float EqArmorReduction() { return this.R1(this.eqArmorReduction); } // Token: 0x06000A2F RID: 2607 RVA: 0x000CE6BE File Offset: 0x000CC8BE public float Deaf() { return this.R1(this.deaf); } // Token: 0x06000A30 RID: 2608 RVA: 0x000CE6CC File Offset: 0x000CC8CC public int Invisible() { return this.invisible; } // Token: 0x06000A31 RID: 2609 RVA: 0x000CE6D4 File Offset: 0x000CC8D4 public int Stun() { return this.stun; } // Token: 0x06000A32 RID: 2610 RVA: 0x000CE6DC File Offset: 0x000CC8DC public int Charming() { return this.charming; } // Token: 0x06000A33 RID: 2611 RVA: 0x000CE6E4 File Offset: 0x000CC8E4 public int Artistry() { return this.artistry; } // Token: 0x06000A34 RID: 2612 RVA: 0x000CE6EC File Offset: 0x000CC8EC public int NimbleFingers() { return this.nimbleFingers; } // Token: 0x06000A35 RID: 2613 RVA: 0x000CE6F4 File Offset: 0x000CC8F4 public float MoveSpeedMod() { return this.R1(this.moveSpeedMod); } // Token: 0x06000A36 RID: 2614 RVA: 0x000CE702 File Offset: 0x000CC902 public float ActionSpeedMod() { return this.actionTimeMod; } // Token: 0x06000A37 RID: 2615 RVA: 0x000CE70C File Offset: 0x000CC90C public void SetHealth(int amt, bool sendDeathEvent) { this.currLife = amt; if (this.currLife > this.HealthMax()) { this.currLife = this.HealthMax(); } this.character.UpdateHealth(); if (this.currLife <= 0) { this.currLife = 0; if (sendDeathEvent) { this.character.Dead(false, Records.x.combat, false); } } if (this.character.party && this.character.portrait) { this.character.portrait.SetHealthColor(); } if (this.character.summoned && this.character.dockFriend) { this.character.dockFriend.UpdateHealth(); } } // Token: 0x06000A38 RID: 2616 RVA: 0x000CE7CD File Offset: 0x000CC9CD public void SetMaxHealth(int amt) { this.lifeBase = amt; } // Token: 0x06000A39 RID: 2617 RVA: 0x000CE7D6 File Offset: 0x000CC9D6 public void SetSpirit(int amt) { this.magicPoints = amt; if (this.magicPoints > this.SpiritMax() && this.character.party) { this.magicPoints = this.SpiritMax(); } } // Token: 0x06000A3A RID: 2618 RVA: 0x000CE806 File Offset: 0x000CCA06 public void SetSpiritMax(int amt) { this.magicPointsBase = amt; } // Token: 0x06000A3B RID: 2619 RVA: 0x000CE810 File Offset: 0x000CCA10 public void AddHealth(int amt) { this.currLife += amt; if (this.currLife > this.HealthMax()) { this.currLife = this.HealthMax(); } if (this.currLife < 0) { this.currLife = 0; } if (this.character.party) { this.character.portrait.SetHealthColor(); } if (this.character.summoned && this.character.dockFriend) { this.character.dockFriend.UpdateHealth(); } this.character.UpdateHealth(); } // Token: 0x06000A3C RID: 2620 RVA: 0x000CE8AC File Offset: 0x000CCAAC public void AddHealthMax(int amt) { this.maxHealthAdd += amt; if (this.currLife > this.HealthMax()) { this.currLife = this.HealthMax(); } this.character.UpdateHealth(); } // Token: 0x06000A3D RID: 2621 RVA: 0x000CE8E4 File Offset: 0x000CCAE4 public void AddSpiritFromKill(float amt) { if (this.HasSpellbook()) { this.magicPoints += (int)amt; if (this.magicPoints > this.SpiritMax() && this.character.party) { this.magicPoints = this.SpiritMax(); } if (this.magicPoints < 0) { this.magicPoints = 0; } if (this.character.portrait) { this.character.portrait.SetMagicColor(); } this.UpdateAbilityTriggers(); if (this.character.party) { GameObject pooledGameObject = Links.x.cellar.GetPooledGameObject(62); pooledGameObject.transform.position = this.character.body.HeadPosition(-0.5f); pooledGameObject.transform.SetParent(this.character.tr); pooledGameObject.SetActive(true); } } } // Token: 0x06000A3E RID: 2622 RVA: 0x000CE9C4 File Offset: 0x000CCBC4 public void AddSpirit(int amt) { if (this.HasSpellbook()) { this.magicPoints += amt; if (this.magicPoints > this.SpiritMax() && this.character.party) { this.magicPoints = this.SpiritMax(); } if (this.magicPoints < 0) { this.magicPoints = 0; } if (this.character.portrait) { this.character.portrait.SetMagicColor(); } this.UpdateAbilityTriggers(); if (amt > 0 && this.character.party) { GameObject pooledGameObject = Links.x.cellar.GetPooledGameObject(62); pooledGameObject.transform.position = this.character.body.HeadPosition(-0.5f); pooledGameObject.transform.SetParent(this.character.tr); pooledGameObject.SetActive(true); } } } // Token: 0x06000A3F RID: 2623 RVA: 0x000CEAA8 File Offset: 0x000CCCA8 public void AddStamina(float amt) { if (amt > 0f) { if (this.staminaRegenMod > 0f) { amt *= this.staminaRegenMod; } else if (this.staminaRegenMod < 0f) { amt /= this.staminaRegenMod * -1f; } } else if (this.staminaReductionMultiplier > 0f) { amt *= this.staminaReductionMultiplier; } this.stamina += amt; if (this.stamina > this.MaxStamina()) { this.stamina = this.MaxStamina(); } if (this.stamina < 0f) { this.stamina = 0f; } if (this.character.npc) { this.character.UpdateStamina(); } if (this.character.party && this.character.portrait) { this.character.portrait.SetFatigue(); } } // Token: 0x06000A40 RID: 2624 RVA: 0x000CEB93 File Offset: 0x000CCD93 public float MaxStamina() { return this.maxStamina + this.maxStaminaAdd; } // Token: 0x06000A41 RID: 2625 RVA: 0x000CEBA2 File Offset: 0x000CCDA2 public void AddStamimaSpeed(float amt) { this.staminaRegenMod += amt; } // Token: 0x06000A42 RID: 2626 RVA: 0x000CEBB2 File Offset: 0x000CCDB2 public void AddStamimaReductionMultipler(float amt) { this.staminaReductionMultiplier += amt; } // Token: 0x06000A43 RID: 2627 RVA: 0x000CEBC2 File Offset: 0x000CCDC2 public float RallySpeed() { return this.R1(this.rallyBase + this.rallySpeed); } // Token: 0x06000A44 RID: 2628 RVA: 0x000CEBD7 File Offset: 0x000CCDD7 public void SetStamina(float amt) { this.stamina = amt; if (this.stamina > this.maxStamina) { this.stamina = this.maxStamina; } if (this.character.npc) { this.character.UpdateStamina(); } } // Token: 0x06000A45 RID: 2629 RVA: 0x000CEC12 File Offset: 0x000CCE12 public float StaminaPercent() { return this.stamina / this.maxStamina; } // Token: 0x06000A46 RID: 2630 RVA: 0x000CEC21 File Offset: 0x000CCE21 public void AddActionTimeMod(float amt) { this.actionTimeMod += amt; } // Token: 0x06000A47 RID: 2631 RVA: 0x000CEC31 File Offset: 0x000CCE31 public void AddMoveSpeedMod(float amt) { this.moveSpeedMod += amt; } // Token: 0x06000A48 RID: 2632 RVA: 0x000CEC41 File Offset: 0x000CCE41 public void AddStrengthMod(float amt) { this.strengthModFlat += amt; } // Token: 0x06000A49 RID: 2633 RVA: 0x000CEC51 File Offset: 0x000CCE51 public void AddAgilityMod(float amt) { this.agilityModFlat += amt; } // Token: 0x06000A4A RID: 2634 RVA: 0x000CEC61 File Offset: 0x000CCE61 public void AddAuraMod(float amt) { this.auraModFlat += amt; this.EnchantJewelryEffects(16, true); this.EnchantJewelryEffects(20, true); this.EnchantJewelryEffects(22, true); this.EnchantJewelryEffects(24, true); } // Token: 0x06000A4B RID: 2635 RVA: 0x000CEC95 File Offset: 0x000CCE95 public void AddDexterityMod(float amt) { this.dexterityModFlat += amt; } // Token: 0x06000A4C RID: 2636 RVA: 0x000CECA5 File Offset: 0x000CCEA5 public void AddPaganMod(float amt) { this.paganModFlat += amt; this.EnchantJewelryEffects(16, true); this.EnchantJewelryEffects(20, true); this.EnchantJewelryEffects(22, true); this.EnchantJewelryEffects(24, true); } // Token: 0x06000A4D RID: 2637 RVA: 0x000CECD9 File Offset: 0x000CCED9 public void AddSensoryMod(float amt) { this.sensoryModFlat += amt; } // Token: 0x06000A4E RID: 2638 RVA: 0x000CECE9 File Offset: 0x000CCEE9 public void AddBalanceMod(float amt) { this.balance += amt; } // Token: 0x06000A4F RID: 2639 RVA: 0x000CECF9 File Offset: 0x000CCEF9 public void AddSilent(int amt) { this.silent += amt; } // Token: 0x06000A50 RID: 2640 RVA: 0x000CED09 File Offset: 0x000CCF09 public void AddConfuse(int amt) { this.confuse += amt; } // Token: 0x06000A51 RID: 2641 RVA: 0x000CED19 File Offset: 0x000CCF19 public void AddFloating(int amt) { this.floating += amt; } // Token: 0x06000A52 RID: 2642 RVA: 0x000CED29 File Offset: 0x000CCF29 public void AddAttackAllies(int amt) { this.attackAllies += amt; } // Token: 0x06000A53 RID: 2643 RVA: 0x000CED39 File Offset: 0x000CCF39 public void AddReduceStun(float amt) { this.reduceStun += amt; } // Token: 0x06000A54 RID: 2644 RVA: 0x000CED49 File Offset: 0x000CCF49 public void AddFlee(int amt) { this.flee += amt; } // Token: 0x06000A55 RID: 2645 RVA: 0x000CED59 File Offset: 0x000CCF59 public void AddBlind(float amt) { this.blind += amt; } // Token: 0x06000A56 RID: 2646 RVA: 0x000CED69 File Offset: 0x000CCF69 public void AddArmorReduction(float amt) { this.armorReduction += amt; } // Token: 0x06000A57 RID: 2647 RVA: 0x000CED79 File Offset: 0x000CCF79 public void AddEqArmorReduction(float amt) { this.eqArmorReduction += amt; } // Token: 0x06000A58 RID: 2648 RVA: 0x000CED89 File Offset: 0x000CCF89 public void AddDeaf(float amt) { this.deaf += amt; } // Token: 0x06000A59 RID: 2649 RVA: 0x000CED99 File Offset: 0x000CCF99 public void AddInvisible(int amt) { this.invisible += amt; } // Token: 0x06000A5A RID: 2650 RVA: 0x000CEDAC File Offset: 0x000CCFAC public void AddStuck(int amt) { this.stuck += amt; if (this.stuck != 0) { if (this.character.hasActions && this.character.moving && this.character.actions) { this.character.TargetReached(); this.character.actions.EndTurn(true); } if (this.character.portrait) { this.character.portrait.SetSynergy(0f, 0f); return; } } else if (this.character.portrait) { this.UpdateRallyCount(false, 0f); } } // Token: 0x06000A5B RID: 2651 RVA: 0x000CEE62 File Offset: 0x000CD062 public void AddStun(int amt) { this.stun += amt; } // Token: 0x06000A5C RID: 2652 RVA: 0x000CEE72 File Offset: 0x000CD072 public void SetStun(int amt) { this.stun = amt; } // Token: 0x06000A5D RID: 2653 RVA: 0x000CEE7B File Offset: 0x000CD07B public void AddCharming(int amt) { this.charming += amt; } // Token: 0x06000A5E RID: 2654 RVA: 0x000CEE8B File Offset: 0x000CD08B public void AddArtistry(int amt) { this.artistry += amt; } // Token: 0x06000A5F RID: 2655 RVA: 0x000CEE9B File Offset: 0x000CD09B public void AddNimbleFingers(int amt) { this.nimbleFingers += amt; } // Token: 0x06000A60 RID: 2656 RVA: 0x000CEEAB File Offset: 0x000CD0AB public void AddStagger(int amt) { this.stagger += amt; } // Token: 0x06000A61 RID: 2657 RVA: 0x000CEEBB File Offset: 0x000CD0BB public void AddLightAtks(int amt) { this.onlyLightAtks += amt; } // Token: 0x06000A62 RID: 2658 RVA: 0x000CEECB File Offset: 0x000CD0CB public void AddDmgMod(float amt) { this.severityModFlat += amt; } // Token: 0x06000A63 RID: 2659 RVA: 0x000CEEDB File Offset: 0x000CD0DB public void AddPaganDmgMod(float amt) { this.paganSeverityModFlat += amt; } // Token: 0x06000A64 RID: 2660 RVA: 0x000CEEEB File Offset: 0x000CD0EB public void AddHitMod(float amt) { this.hitModFlat += amt; } // Token: 0x06000A65 RID: 2661 RVA: 0x000CEEFB File Offset: 0x000CD0FB public void AddPaganHitMod(float amt) { this.paganHitModFlat += amt; } // Token: 0x06000A66 RID: 2662 RVA: 0x000CEF0B File Offset: 0x000CD10B public void AddEvadeMod(float amt) { this.evadeModFlat += amt; } // Token: 0x06000A67 RID: 2663 RVA: 0x000CEF1B File Offset: 0x000CD11B public void AddBlockMod(float amt) { this.blockModFlat += amt; } // Token: 0x06000A68 RID: 2664 RVA: 0x000CEF2B File Offset: 0x000CD12B public void AddRallySpeed(float amt) { this.rallySpeed += amt; } // Token: 0x06000A69 RID: 2665 RVA: 0x000CEF3B File Offset: 0x000CD13B public void AddSpiritAbsorption(float amt) { this.spiritAbsorption += amt; } // Token: 0x06000A6A RID: 2666 RVA: 0x000CEF4B File Offset: 0x000CD14B public void ReduceAllSkills(float amt) { this.allSkillAdd += amt; } // Token: 0x06000A6B RID: 2667 RVA: 0x000CEF5B File Offset: 0x000CD15B public void AddMusicResist(float amt) { this.musicResistMod += amt; } // Token: 0x06000A6C RID: 2668 RVA: 0x000CEF6C File Offset: 0x000CD16C public void AddPaganResist(float amt, string type) { if (type == "Fauna") { this.paganResist.y = this.paganResist.y + amt; return; } if (type == "Vines") { this.paganResist.x = this.paganResist.x + amt; return; } if (type == "Spores") { this.paganResist.z = this.paganResist.z + amt; } } // Token: 0x06000A6D RID: 2669 RVA: 0x000CEFD2 File Offset: 0x000CD1D2 public void SetCompanionControl(string variableName, bool state, int num) { if (variableName == "Magic Tactics") { this.magicTactics = num; } if (variableName == "Use AI") { this.companionAI = num; } } // Token: 0x06000A6E RID: 2670 RVA: 0x000CEFFC File Offset: 0x000CD1FC public void DoHitAI(Character target) { if (this.xmlName == "GoldShroomer" && this.character.actions && target.node != null && !target.summoned) { this.character.actions.SpellFromTrigger("MushroomWall", "Wall", target); } } // Token: 0x06000A6F RID: 2671 RVA: 0x000CF058 File Offset: 0x000CD258 public void LoadFromDB() { this.displayName = this.characterRow._DisplayName; this.currLife = this.characterRow._Life; this.lifeBase = this.currLife; this.sex = this.characterRow._Sex; this.race = this.characterRow._Race; this.character.radius = (float)this.characterRow._Radius; this.moveSpeed = this.characterRow._MoveSpeed; this.summonSpeed = this.characterRow._SummonSpeed; this.character.characterHeight = this.characterRow._Height - 0.5f; this.soundID = this.characterRow._SoundID; this.character.combatLevel = this.characterRow._CombatLevel; this.dialogueFile = this.characterRow._DialogueFile; this.initiateDialogue = this.characterRow._InitiateDialogue; this.strength = (float)this.characterRow._Strength; this.agility = (float)this.characterRow._Agility; this.aura = (float)this.characterRow._Aura; this.dexterity = (float)this.characterRow._Dexterity; this.pagan = (float)this.characterRow._Pagan; this.sensory = (float)this.characterRow._Sensory; this.weightBase = this.characterRow._Weight; this.sightRadiusBase = this.characterRow._Sight; this.hearingRadiusBase = this.characterRow._Hearing; this.flying = this.characterRow._Flying; this.maxStamina = this.characterRow._Stamina; this.stamina = this.maxStamina; this.model = this.characterRow._Model; this.headModel = this.characterRow._ModelHead; this.magicPointsBase = this.characterRow._MaxMP; if (this.magicPointsBase > 0) { this.canCastSpells = true; } else { this.canCastSpells = false; } this.formationGroup = this.characterRow._Formation; this.skinTexture = this.characterRow._SkinTexture; this.hairTexture = this.characterRow._HairTexture; if (this.characterRow._CustomAI != "") { this.hasCustomAI = true; this.customAI = this.characterRow._CustomAI; } if (this.characterRow._EveryAttackAI != "") { this.everyAttackAI = this.characterRow._EveryAttackAI; this.hasEveryAttackAI = true; } if (this.characterRow._NonCombatAI != "") { this.hasNonCombatAI = true; this.nonCombatAI = this.characterRow._NonCombatAI; } this.canJumpEvade = this.characterRow._CanJumpEvade; this.canAggressionGroup = this.characterRow._CanAggressionGroup; this.canSecretGroup = this.characterRow._CanSecretGroup; this.canRecoverGroup = this.characterRow._CanRecoverGroup; this.needsDefending = this.characterRow._NeedsDefending; this.hasCircleAnims = this.characterRow._HasGroupAnims; this.hasEnemies = this.characterRow._HasEnemies; if (this.character.ghost) { this.hasEnemies = true; } else { this.SetAllegiance(); } this.canJump = this.characterRow._CanJump; if (this.race == "Yeti" || this.race == "Ameythevian" || this.race == "Bloodless Hunter" || this.race == "Taratorith" || this.race == "Lachovinian" || this.race == "Pasaaren" || this.race == "Varuchov" || this.race == "Ghost" || this.race == "Dryad" || this.race == "Dolki") { this.animal = false; this.canCharge = true; if (!(this.race == "Dryad") && !(this.characterRow._AnimationPrefix == "_GhostC") && !(this.characterRow._AnimationPrefix == "_ChildPaduri")) { this.canPin = true; } if ((float)this.magicPointsBase == 111111f || (float)this.magicPointsBase == 222222f) { this.semizenMagic = true; } } else { this.animal = true; if ((float)this.magicPointsBase == 111111f || (float)this.magicPointsBase == 222222f) { this.semizenMagic = true; } } this.savedBag.Clear(); this.savedDur.Clear(); this.hasBuffItem = false; this.savedIntercesion = -1; List items = this.characterRow._Items; if (!this.character.ghost) { for (int i = 0; i < items.Count; i++) { if (i % 3 == 0) { this.savedBag.Add(items[i]); Library.Inventory invRow = Links.x.library.GetInvRow(items[i]); if (invRow._Tag == "Consumable" && this.character.npc && (invRow._Effect.Contains("Spirit") || invRow._Effect.Contains("Stamina"))) { this.hasBuffItem = true; } if (this.character.npc && !this.animal && invRow._Name == "RainGodEarring") { this.savedIntercessionA = new Vector3(48f, 1f, 0f); this.savedIntercessionB = new Vector3(0f, 0f, 1f); this.savedIntercesion = invRow._ID; } } else { if (i % 3 == 1) { this.savedBag.Add(items[i]); } if (i % 3 == 2) { float num = (float)items[i]; if (i == 29 && this.character.npc) { num /= 2f; } this.savedDur.Add(new Vector4(num, 0f, 0f, 0f)); } } } } this.hasWordsOfPower = false; List skillLvl = this.characterRow._SkillLvl; for (int j = 0; j < skillLvl.Count; j++) { this.skillsProgress.Add(0f); this.skills.Add((float)skillLvl[j]); if (this.character.npc && (j == 30 || j == 31 || j == 32)) { this.hasWordsOfPower = true; } } if (!this.character.npc && this.characterRow._Knowledge != "") { this.knowledge.Clear(); new string[0]; char c = ','; string[] array = this.characterRow._Knowledge.Split(c, StringSplitOptions.None); int num2 = 0; foreach (string text in array) { if (text != "" && num2 % 2 == 0) { this.knowledge.Add(text); } } } this.SetVoiceID(true); this.magicTactics = 3; this.abilities = this.characterRow._Abilities; this.abilityLevelsTemp = this.characterRow._AbilitiesLevels; this.spellNamesTemp = this.characterRow._AbilitiesNames; this.abilityCostTemp = null; this.SetupAbilities(true); this.UpdateStats(); if (this.character.party) { this.FormationTactics(); } if (this.xmlName.Contains("Fish")) { this.isFishMonster = true; } if (!this.animal && (this.xmlName.Contains("Farmer") || this.xmlName.Contains("Dancer"))) { this.hasCustomIdle = true; if (this.character.animator) { this.character.animator.SetFloat("Idle Variation", 1f); } } if (this.xmlName.Contains("Merchant") || this.xmlName.Contains("StoreGuard")) { this.merchant = true; } if (this.xmlName.Contains("Boro")) { this.boro = true; if (!Records.x.BoroInParty()) { this.dialogueFile = ""; this.canTalk = false; } } } // Token: 0x06000A70 RID: 2672 RVA: 0x000CF920 File Offset: 0x000CDB20 public void SetVoiceID(bool fromDB) { float num = this.characterRow._Sex; if (!fromDB) { num = this.sex; } string text = this.characterRow._Race; if (!fromDB) { text = this.race; } if (this.characterRow._VoiceID == 0) { if (num < 0.5f) { if (text == "Taratorith") { this.voiceID = 0; } else if (text == "Pasaaren") { this.voiceID = 1; } else if (text == "Varuchov") { this.voiceID = 2; } else if (text == "Ameythevian") { this.voiceID = 3; } else if (text == "Yeti") { this.voiceID = 4; } else { this.voiceID = 0; } if (this.characterRow._Height < 3f) { this.voiceID = 9; return; } } else { if (text == "Taratorith") { this.voiceID = 5; } else if (text == "Pasaaren") { this.voiceID = 6; } else if (text == "Varuchov") { this.voiceID = 7; } else if (text == "Ameythevian") { this.voiceID = 8; } else if (text == "Yeti") { this.voiceID = 4; } else { this.voiceID = 5; } if (this.characterRow._Height < 3f) { this.voiceID = 10; } } } } // Token: 0x06000A71 RID: 2673 RVA: 0x000CFA98 File Offset: 0x000CDC98 public void SetAllegiance() { this.allegiance = this.characterRow._Allegiance; if (this.allegiance == 1U || this.allegiance == 10U || this.allegiance == 11U) { this.isGuard = true; } if (this.allegiance == 1U || this.allegiance == 10U) { this.isHouseGuard = true; } if (this.allegiance == 1U) { this.isLazureGuard = true; } this.enemies = this.characterRow._Enemies; for (int i = 0; i < this.enemies.Count; i++) { if (i == 0) { this.enemy1 = this.enemies[i]; } if (i == 1) { this.enemy2 = this.enemies[i]; } if (i == 2) { this.enemy3 = this.enemies[i]; } if (i == 3) { this.enemy4 = this.enemies[i]; } if (i == 4) { this.enemy5 = this.enemies[i]; } if (i == 5) { this.enemy6 = this.enemies[i]; } if (i == 6) { this.enemy7 = this.enemies[i]; } if (i == 7) { this.enemy8 = this.enemies[i]; } if (i == 8) { this.enemy9 = this.enemies[i]; } if (i > 8) { Debug.Log("Not enough faction enemy slots! " + this.characterRow._Name + " " + this.allegiance.ToString()); } } } // Token: 0x06000A72 RID: 2674 RVA: 0x000CFC24 File Offset: 0x000CDE24 public void SetResurrectionFactions() { this.allegiance = 8U; this.enemy1 = 1U; this.enemy2 = 5U; this.enemy3 = 6U; this.enemy4 = 7U; this.enemy5 = 10U; this.enemy6 = 11U; } // Token: 0x06000A73 RID: 2675 RVA: 0x000CFC5C File Offset: 0x000CDE5C public void SetSummonAllegiance() { this.allegiance = 0U; this.enemy1 = 100U; this.enemy2 = 100U; this.enemy3 = 100U; this.enemy4 = 100U; this.enemy5 = 100U; this.enemy6 = 100U; this.enemy7 = 100U; this.enemy8 = 100U; this.enemy9 = 100U; } // Token: 0x06000A74 RID: 2676 RVA: 0x000CFCB8 File Offset: 0x000CDEB8 public void SetHostageAllegiance(bool afterRescue) { if (!afterRescue) { this.isGuard = false; this.isHouseGuard = false; this.isLazureGuard = false; this.allegiance = 0U; this.enemy1 = 100U; this.enemy2 = 100U; this.enemy3 = 100U; this.enemy4 = 100U; this.enemy5 = 100U; this.enemy6 = 100U; this.enemy7 = 100U; this.enemy8 = 100U; this.enemy9 = 100U; return; } this.SetAllegiance(); } // Token: 0x06000A75 RID: 2677 RVA: 0x000CFD33 File Offset: 0x000CDF33 public void Talk() { if ((this.dialogueFile != "" && this.initiateDialogue >= 1 && this.initiateDialogue < 10) || this.initiateDialogue >= 11) { this.canTalk = true; } } // Token: 0x06000A76 RID: 2678 RVA: 0x000CFD6C File Offset: 0x000CDF6C public void ClearAllAbilities() { int count = this.abilities.Count; for (int i = 0; i < count; i++) { Debug.Log("clearing " + this.abilities[i]); } this.abilityNames.Clear(); this.abilityLevels.Clear(); this.uniqueNames.Clear(); this.abilityCost.Clear(); this.abilityRows.Clear(); this.abilityTriggers.Clear(); this.abilityTriggerCount.Clear(); this.abilityReady.Clear(); this.abilityEquipped.Clear(); this.abilities = new List(); this.abilityLevelsTemp = new List(); this.spellNamesTemp = new List(); } // Token: 0x06000A77 RID: 2679 RVA: 0x000CFE30 File Offset: 0x000CE030 public void SetupAbilities(bool fromDB) { this.abilityNames.Clear(); this.abilityLevels.Clear(); this.uniqueNames.Clear(); this.abilityCost.Clear(); bool flag = false; if (!fromDB && this.abilityCostTemp == null) { flag = true; } for (int i = 0; i < this.abilities.Count; i++) { this.abilityNames.Add(this.abilities[i]); this.abilityLevels.Add(this.abilityLevelsTemp[i]); this.uniqueNames.Add(this.spellNamesTemp[i]); if (fromDB || flag) { this.abilityCost.Add(new Vector2((float)((int)this.abilityLevelsTemp[i].w), 0f)); } else { this.abilityCost.Add(this.abilityCostTemp[i]); } } this.abilityRows.Clear(); this.abilityTriggers.Clear(); this.abilityTriggerCount.Clear(); this.abilityReady.Clear(); this.abilityEquipped.Clear(); bool flag2 = false; if (Records.x.editor && Records.x.useTestCharacters && !this.character.npc && this.equippedSongList.Count == 0) { flag2 = true; } int count = this.abilities.Count; for (int j = 0; j < count; j++) { Library.Abilities abilityRow = Links.x.library.GetAbilityRow(this.abilityNames[j]); string trigger = abilityRow._Trigger; this.abilityRows.Add(abilityRow); if (abilityRow._IsSpell) { this.abilityTriggers.Add("Spell"); this.abilityTriggerCount.Add(1); this.abilityReady.Add(true); this.abilityEquipped.Add(0); if (!this.character.npc) { this.canCastSpells = true; } } else { this.abilityTriggers.Add(trigger); this.abilityTriggerCount.Add(0); this.abilityReady.Add(true); if (this.equippedSongList.Contains(this.uniqueNames[j])) { this.abilityEquipped.Add(1); } else { string text = this.uniqueNames[j]; bool flag3 = false; if (this.songPoints > 0 && (this.character.npc || flag2) && (abilityRow._SongCost <= this.songPoints || this.character.npc)) { this.equippedSongList.Add(text); flag3 = true; this.songPoints -= abilityRow._SongCost; } if (flag3) { this.abilityEquipped.Add(1); } else { this.abilityEquipped.Add(0); } } } } if (!fromDB && !flag2) { string[] array = new string[0]; char c = ','; array = this.equippedAbilities.Split(c, StringSplitOptions.None); this.equippedSongList.Clear(); foreach (string text2 in array) { if (text2 != "") { this.equippedSongList.Add(text2); } } for (int l = 0; l < this.abilityEquipped.Count; l++) { this.abilityEquipped[l] = 0; } for (int m = 0; m < this.equippedSongList.Count; m++) { int num = this.uniqueNames.IndexOf(this.equippedSongList[m]); this.songPoints -= this.abilityRows[num]._SongCost; this.abilityEquipped[num] = 1; } string[] array3 = new string[0]; array3 = this.equippedCounts.Split(c, StringSplitOptions.None); int num2 = 0; foreach (string text3 in array) { int num3 = this.uniqueNames.IndexOf(text3); if (text3 != "" && text3 != null && num3 != -1) { if (array3[num2] != "0") { this.abilityTriggerCount[num3] = int.Parse(array3[num2]); } else { this.abilityTriggerCount[num3] = 0; } } num2++; } this.UpdateAbilityTriggers(); } if (this.character.portrait) { this.character.portrait.skillBag.SetTrinketGrid(true); this.character.portrait.skillBag.SetSongGrid(); } } // Token: 0x06000A78 RID: 2680 RVA: 0x000D02E8 File Offset: 0x000CE4E8 public bool HasTokenInSkill(string n, bool majorOnly, bool minorOnly) { if (this.majorSkill1 == null) { return false; } if (majorOnly) { return this.majorSkill1.Contains(n) || this.majorSkill2.Contains(n); } if (minorOnly) { return this.minorSkill3.Contains(n); } return this.majorSkill1.Contains(n) || this.majorSkill2.Contains(n) || this.minorSkill3.Contains(n); } // Token: 0x06000A79 RID: 2681 RVA: 0x000D036A File Offset: 0x000CE56A public bool HasPaganToken() { return this.GetSkill(17) >= 50f || this.GetSkill(18) >= 50f || this.GetSkill(19) >= 50f; } // Token: 0x06000A7A RID: 2682 RVA: 0x000D03A0 File Offset: 0x000CE5A0 public void SetStartingFormation(out int choice1, out int choice2) { choice1 = 0; choice2 = 0; bool flag = false; bool flag2 = false; bool flag3 = false; bool flag4 = false; bool flag5 = false; if (this.HasTokenInSkill("ShortSword", true, false)) { flag2 = true; } if (this.HasTokenInSkill("LongSword", true, false)) { flag2 = true; } if (this.HasTokenInSkill("Scepter", true, false)) { flag2 = true; } if (this.HasTokenInSkill("Ax", true, false)) { flag2 = true; } if (this.HasTokenInSkill("Pole", true, false)) { flag2 = true; } if (this.HasTokenInSkill("Bow", true, false)) { flag = true; } if (this.HasTokenInSkill("Multi-Hand", true, false)) { flag2 = true; } if (this.HasTokenInSkill("Sling", true, false)) { flag = true; } if (this.HasTokenInSkill("Elixir", true, false)) { flag = true; } if (this.HasTokenInSkill("Hand-to-Hand", true, false)) { flag2 = true; } if (this.HasTokenInSkill("LargeShield", false, false)) { flag5 = true; } if (this.HasTokenInSkill("SmallShield", false, false)) { flag5 = true; } if (this.HasTokenInSkill("Whip", true, false)) { flag2 = true; } if (this.HasTokenInSkill("Stonewood", false, false)) { flag5 = true; } if (this.HasTokenInSkill("Crimscale", false, false)) { flag5 = true; } if (this.HasTokenInSkill("Pearl", false, false)) { flag5 = true; } if (this.HasTokenInSkill("ShortSword", false, true)) { flag3 = true; } if (this.HasTokenInSkill("LongSword", false, true)) { flag3 = true; } if (this.HasTokenInSkill("Scepter", false, true)) { flag3 = true; } if (this.HasTokenInSkill("Ax", false, true)) { flag3 = true; } if (this.HasTokenInSkill("Pole", false, true)) { flag3 = true; } if (this.HasTokenInSkill("Bow", false, true)) { flag4 = true; } if (this.HasTokenInSkill("Multi-Hand", false, true)) { flag3 = true; } if (this.HasTokenInSkill("Sling", false, true)) { flag4 = true; } if (this.HasTokenInSkill("Elixir", false, true)) { flag4 = true; } if (this.HasTokenInSkill("Hand-to-Hand", false, true)) { flag3 = true; } if (this.HasTokenInSkill("Whip", false, true)) { flag3 = true; } if (!flag2 && !flag3 && !flag && !flag4) { choice1 = 8; choice2 = 5; return; } if (flag2 && !flag) { if (flag4) { int num; int num2; if (flag5 || this.Stat("Strength", false, out num) > 30f || this.Stat("Dexterity", false, out num2) > 30f) { choice1 = 2; choice2 = 5; if (this.partyID == 2) { choice1 = 3; choice2 = 6; } if (this.partyID == 3) { choice1 = 1; choice2 = 4; } } else { choice1 = 5; choice2 = 2; } } else if (flag5) { choice1 = 2; choice2 = 5; if (this.partyID == 2) { choice1 = 3; choice2 = 6; } if (this.partyID == 3) { choice1 = 1; choice2 = 4; } } else { choice1 = 5; choice2 = 2; if (this.partyID == 2) { choice1 = 3; choice2 = 6; } if (this.partyID == 3) { choice1 = 1; choice2 = 4; } } } if (!flag2 && flag) { if (flag3) { choice1 = 5; choice2 = 8; if (this.partyID == 2) { choice1 = 6; choice2 = 9; } if (this.partyID == 3) { choice1 = 4; choice2 = 7; } } else { choice1 = 8; choice2 = 7; if (this.partyID == 2) { choice1 = 9; choice2 = 9; } if (this.partyID == 3) { choice1 = 7; choice2 = 7; } } } if (flag2 && flag) { bool flag6 = false; int num3; int num4; if (this.Stat("Strength", false, out num3) > 30f || this.Stat("Dexterity", false, out num4) > 30f) { flag6 = true; } if (flag5 || this.Stat("Strength", false, out num3) > 30f || this.Stat("Dexterity", false, out num4) > 30f) { choice1 = 2; choice2 = 5; } else { choice1 = 5; if (flag6) { choice2 = 2; } else { choice2 = 8; } } } if (choice1 == 0) { choice1 = 8; choice2 = 5; } } // Token: 0x06000A7B RID: 2683 RVA: 0x000D0738 File Offset: 0x000CE938 public void SetStartingWeapons() { string text = ""; string text2 = ""; string text3 = ""; string text4 = ""; string text5 = ""; string text6 = ""; string text7 = ""; string text8 = ""; string text9 = ""; string text10 = ""; string text11 = ""; string text12 = ""; int num = 1; int num2 = 1; int num3 = 1; int num4 = 1; int num5 = 1; int num6 = 1; int num7 = 1; int num8 = 1; string text13 = ""; string text14 = ""; string text15 = ""; string text16 = ""; string text17 = ""; int num9 = 1; int num10 = 1; int num11 = 1; int num12 = 1; int num13 = 1; string text18 = ""; string text19 = ""; bool flag = false; bool flag2 = true; bool flag3 = false; bool flag4 = false; for (int i = 0; i < 4; i++) { string text20 = "Flute"; string text21 = "FluteUsed"; if (i == 1) { text20 = "Horn"; text21 = "HornUsed"; } if (i == 2) { text20 = "Drum"; text21 = "DrumUsed"; } if (i == 3) { text20 = "Pipe"; text21 = "PipeUsed"; } if (this.HasTokenInSkill(text20, false, false)) { if (text3 == "") { text3 = text21; } else if (text7 == "") { text7 = text21; } else if (text8 == "") { text8 = text21; } else if (text9 == "") { text9 = text21; } else if (text10 == "") { text10 = text21; } else if (text11 == "") { text11 = text21; } else if (text13 == "") { text13 = text21; } else if (text14 == "") { text14 = text21; } else if (text15 == "") { text15 = text21; } else if (text16 == "") { text16 = text21; } else if (text17 == "") { text17 = text21; } if (!flag3) { global::Item item; ItemEquipped itemEquipped; Links.x.inventory.AddFromGround(null, null, 0, false, 0f, Links.x.library.GetInvRowID("Songbook"), 1, new Vector3((float)this.partyID, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector4(0f, 0f, 0f, 0f), this.character, false, false, out item, out itemEquipped); flag3 = true; } } if (flag) { Debug.Log(string.Concat(new string[] { text3, " ", text7, " ", text8, " ", text9, " ", text10 })); } } if ((this.HasTokenInSkill("Fauna", false, false) || this.HasTokenInSkill("Vines", false, false) || this.HasTokenInSkill("Spores", false, false)) && !flag4) { global::Item item2; ItemEquipped itemEquipped2; Links.x.inventory.AddFromGround(null, null, 0, false, 0f, Links.x.library.GetInvRowID("Spellbook"), 1, new Vector3((float)this.partyID, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector4(0f, 0f, 0f, 0f), this.character, false, false, out item2, out itemEquipped2); this.AddSpirit(30); string text22 = "GemAmeythystGood"; if (text7 == "") { text7 = text22; } else if (text8 == "") { text8 = text22; } else if (text9 == "") { text9 = text22; } else if (text10 == "") { text10 = text22; } else if (text11 == "") { text11 = text22; } else if (text13 == "") { text13 = text22; } else if (text14 == "") { text14 = text22; } else if (text15 == "") { text15 = text22; } else if (text16 == "") { text16 = text22; } else if (text17 == "") { text17 = text22; } text22 = "GemCitrinePoor"; if (text7 == "") { text7 = text22; } else if (text8 == "") { text8 = text22; } else if (text9 == "") { text9 = text22; } else if (text10 == "") { text10 = text22; } else if (text11 == "") { text11 = text22; } else if (text13 == "") { text13 = text22; } else if (text14 == "") { text14 = text22; } else if (text15 == "") { text15 = text22; } else if (text16 == "") { text16 = text22; } else if (text17 == "") { text17 = text22; } text22 = "GemMortarPestle"; if (text7 == "") { text7 = text22; } else if (text8 == "") { text8 = text22; } else if (text9 == "") { text9 = text22; } else if (text10 == "") { text10 = text22; } else if (text11 == "") { text11 = text22; } else if (text13 == "") { text13 = text22; } else if (text14 == "") { text14 = text22; } else if (text15 == "") { text15 = text22; } else if (text16 == "") { text16 = text22; } else if (text17 == "") { text17 = text22; } text22 = "FoodSpiritOk"; if (text3 == "") { text3 = text22; } else if (text18 == "") { text18 = text22; } else if (text19 == "") { text19 = text22; } else if (text7 == "") { text7 = text22; } else if (text8 == "") { text8 = text22; } else if (text9 == "") { text9 = text22; } else if (text10 == "") { text10 = text22; } else if (text11 == "") { text11 = text22; } else if (text13 == "") { text13 = text22; } else if (text14 == "") { text14 = text22; } else if (text15 == "") { text15 = text22; } else if (text16 == "") { text16 = text22; } else if (text17 == "") { text17 = text22; } } if (this.HasTokenInSkill("Fish", false, false) || this.HasTokenInSkill("Forest", false, false) || this.HasTokenInSkill("Shroom", false, false)) { string text23 = "Rosary"; if (text3 == "") { text3 = text23; num = 10; } else if (text18 == "") { text18 = text23; num2 = 10; } else if (text19 == "") { text19 = text23; num3 = 10; } else if (text7 == "") { text7 = text23; num4 = 10; } else if (text8 == "") { text8 = text23; num5 = 10; } else if (text9 == "") { text9 = text23; num6 = 10; } else if (text10 == "") { text10 = text23; num7 = 10; } else if (text11 == "") { text11 = text23; num8 = 10; } else if (text13 == "") { text13 = text23; num9 = 10; } else if (text14 == "") { text14 = text23; num10 = 10; } else if (text15 == "") { text15 = text23; num11 = 10; } else if (text16 == "") { text16 = text23; num12 = 10; } else if (text17 == "") { text17 = text23; num13 = 10; } } for (int j = 0; j < 9; j++) { bool flag5 = true; string text24 = "ShortSword"; string text25 = "SwordBasic"; if (j == 1) { text24 = "LongSword"; text25 = "GreatSwordBasic"; flag5 = false; } if (j == 2) { text24 = "Scepter"; if (this.race == "Yeti") { text25 = "ScepterBasic"; flag5 = false; } else { text25 = "SceptorLightBasic"; } } if (j == 3) { text24 = "Ax"; text25 = "AxBasic"; } if (j == 4) { text24 = "Pole"; text25 = "SpearBasic"; flag5 = false; } if (j == 5) { text24 = "Bow"; text25 = "BowBasic"; flag5 = false; } if (j == 6) { text24 = "Sling"; text25 = "BlowgunBasic"; flag5 = false; } if (j == 7) { text24 = "Elixir"; text25 = "ElixirsBasic"; flag5 = false; } if (j == 8) { text24 = "Whip"; text25 = "WhipBasic"; } if (this.HasTokenInSkill(text24, false, false)) { if (text == "") { text = text25; flag2 = flag5; } else if (text12 == "") { text12 = text25; } else if (text7 == "") { text7 = text25; } else if (text8 == "") { text8 = text25; } else if (text9 == "") { text9 = text25; } else if (text10 == "") { text10 = text25; } else if (text11 == "") { text11 = text25; } else if (text13 == "") { text13 = text25; } else if (text14 == "") { text14 = text25; } else if (text15 == "") { text15 = text25; } else if (text16 == "") { text16 = text25; } else if (text17 == "") { text17 = text25; } if (text24 == "Bow") { text25 = "Arrow"; if (text4 == "") { text4 = text25; } else if (text5 == "") { text5 = text25; } else if (text6 == "") { text6 = text25; } else if (text7 == "") { text7 = text25; } else if (text8 == "") { text8 = text25; } else if (text9 == "") { text9 = text25; } else if (text10 == "") { text10 = text25; } else if (text11 == "") { text11 = text25; } else if (text13 == "") { text13 = text25; } else if (text14 == "") { text14 = text25; } else if (text15 == "") { text15 = text25; } else if (text16 == "") { text16 = text25; } else if (text17 == "") { text17 = text25; } text25 = "Stick"; if (text7 == "") { text7 = text25; num4 = 25; } else if (text8 == "") { text8 = text25; num5 = 25; } else if (text9 == "") { text9 = text25; num6 = 25; } else if (text10 == "") { text10 = text25; num7 = 25; } else if (text11 == "") { text11 = text25; num8 = 25; } else if (text13 == "") { text13 = text25; num9 = 25; } else if (text14 == "") { text14 = text25; num10 = 25; } else if (text15 == "") { text15 = text25; num11 = 25; } else if (text16 == "") { text16 = text25; num12 = 25; } else if (text17 == "") { text17 = text25; num13 = 25; } } if (text24 == "Sling") { text25 = "Dart"; if (text4 == "") { text4 = text25; } else if (text5 == "") { text5 = text25; } else if (text6 == "") { text6 = text25; } else if (text7 == "") { text7 = text25; } else if (text8 == "") { text8 = text25; } else if (text9 == "") { text9 = text25; } else if (text10 == "") { text10 = text25; } else if (text11 == "") { text11 = text25; } else if (text13 == "") { text13 = text25; } else if (text14 == "") { text14 = text25; } else if (text15 == "") { text15 = text25; } else if (text16 == "") { text16 = text25; } else if (text17 == "") { text17 = text25; } text25 = "HollowStick"; if (text7 == "") { text7 = text25; num4 = 25; } else if (text8 == "") { text8 = text25; num5 = 25; } else if (text9 == "") { text9 = text25; num6 = 25; } else if (text10 == "") { text10 = text25; num7 = 25; } else if (text11 == "") { text11 = text25; num8 = 25; } else if (text13 == "") { text13 = text25; num9 = 25; } else if (text14 == "") { text14 = text25; num10 = 25; } else if (text15 == "") { text15 = text25; num11 = 25; } else if (text16 == "") { text16 = text25; num12 = 25; } else if (text17 == "") { text17 = text25; num13 = 25; } } if (text24 == "Elixir") { text25 = "Vial"; if (text4 == "") { text4 = text25; } else if (text5 == "") { text5 = text25; } else if (text6 == "") { text6 = text25; } else if (text7 == "") { text7 = text25; } else if (text8 == "") { text8 = text25; } else if (text9 == "") { text9 = text25; } else if (text10 == "") { text10 = text25; } else if (text11 == "") { text11 = text25; } else if (text13 == "") { text13 = text25; } else if (text14 == "") { text14 = text25; } else if (text15 == "") { text15 = text25; } else if (text16 == "") { text16 = text25; } else if (text17 == "") { text17 = text25; } text25 = "Globe"; if (text7 == "") { text7 = text25; num4 = 25; } else if (text8 == "") { text8 = text25; num5 = 25; } else if (text9 == "") { text9 = text25; num6 = 25; } else if (text10 == "") { text10 = text25; num7 = 25; } else if (text11 == "") { text11 = text25; num8 = 25; } else if (text13 == "") { text13 = text25; num9 = 25; } else if (text14 == "") { text14 = text25; num10 = 25; } else if (text15 == "") { text15 = text25; num11 = 25; } else if (text16 == "") { text16 = text25; num12 = 25; } else if (text17 == "") { text17 = text25; num13 = 25; } } text25 = "Hammers"; if (text7 == "") { text7 = text25; num4 = 5; } else if (text8 == "") { text8 = text25; num5 = 5; } else if (text9 == "") { text9 = text25; num6 = 5; } else if (text10 == "") { text10 = text25; num7 = 5; } else if (text11 == "") { text11 = text25; num8 = 5; } else if (text13 == "") { text13 = text25; num9 = 5; } else if (text14 == "") { text14 = text25; num10 = 5; } else if (text15 == "") { text15 = text25; num11 = 5; } else if (text16 == "") { text16 = text25; num12 = 5; } else if (text17 == "") { text17 = text25; num13 = 5; } } } for (int k = 0; k < 2; k++) { string text26 = "FoodHealthGood"; if (k == 1) { text26 = "FoodHealthOk"; } if (text3 == "") { text3 = text26; } else if (text18 == "") { text18 = text26; } else if (text19 == "") { text19 = text26; } else if (text7 == "") { text7 = text26; } else if (text8 == "") { text8 = text26; } else if (text9 == "") { text9 = text26; } else if (text10 == "") { text10 = text26; } else if (text11 == "") { text11 = text26; } else if (text13 == "") { text13 = text26; } else if (text14 == "") { text14 = text26; } else if (text15 == "") { text15 = text26; } else if (text16 == "") { text16 = text26; } else if (text17 == "") { text17 = text26; } } if (this.HasTokenInSkill("Bow", false, false) || this.HasTokenInSkill("Elixir", false, false) || this.HasTokenInSkill("Sling", false, false)) { string text27 = "ArrowKit"; if (text7 == "") { text7 = text27; } else if (text8 == "") { text8 = text27; } else if (text9 == "") { text9 = text27; } else if (text10 == "") { text10 = text27; } else if (text11 == "") { text11 = text27; } else if (text13 == "") { text13 = text27; } else if (text14 == "") { text14 = text27; } else if (text15 == "") { text15 = text27; } else if (text16 == "") { text16 = text27; } else if (text17 == "") { text17 = text27; } } for (int l = 0; l < 2; l++) { string text28 = "SmallShield"; string text29 = "ShieldBasic"; if (l == 1) { text28 = "LargeShield"; text29 = "ShieldLargeBasic"; } if (this.HasTokenInSkill(text28, false, false)) { if (text2 == "" && flag2) { text2 = text29; } else if (text7 == "") { text7 = text29; } else if (text8 == "") { text8 = text29; } else if (text9 == "") { text9 = text29; } else if (text10 == "") { text10 = text29; } else if (text11 == "") { text11 = text29; } else if (text13 == "") { text13 = text29; } else if (text14 == "") { text14 = text29; } else if (text15 == "") { text15 = text29; } else if (text16 == "") { text16 = text29; } else if (text17 == "") { text17 = text29; } } if (flag) { Debug.Log(string.Concat(new string[] { text2, " ", text7, " ", text8, " ", text9, " ", text10 })); } } for (int m = 0; m < 21; m++) { string text30 = text; int num14 = 0; int num15 = 1; if (m == 1) { text30 = text2; num14 = 2; } if (m == 2) { text30 = text12; num14 = 32; } if (m == 4) { text30 = text3; num14 = 14; num15 = num; } if (m == 5) { text30 = ""; num14 = 18; } if (m == 6) { text30 = text4; num14 = 8; } if (m == 7) { text30 = text5; num14 = 10; } if (m == 8) { text30 = text6; num14 = 12; } if (m == 9) { text30 = text7; num14 = 38; num15 = num4; } if (m == 10) { text30 = text8; num14 = 40; num15 = num5; } if (m == 11) { text30 = text9; num14 = 42; num15 = num6; } if (m == 12) { text30 = text10; num14 = 44; num15 = num7; } if (m == 13) { text30 = text11; num14 = 46; num15 = num8; } if (m == 14) { text30 = text18; num14 = 26; num15 = num2; } if (m == 15) { text30 = text19; num14 = 28; num15 = num3; } if (m == 16) { text30 = text13; num14 = 48; num15 = num9; } if (m == 17) { text30 = text14; num14 = 50; num15 = num10; } if (m == 18) { text30 = text15; num14 = 52; num15 = num11; } if (m == 19) { text30 = text16; num14 = 54; num15 = num12; } if (m == 20) { text30 = text17; num14 = 56; num15 = num13; } if (text30 != "" && text30 != "Fist") { Library.Inventory invRowFromName = Links.x.library.GetInvRowFromName(text30); float num16 = 0f; if (invRowFromName != null) { if (m >= 6 && m <= 8) { num15 = 50; } if (m >= 9 && m != 7 && m != 14 && m != 15) { global::Item item3; ItemEquipped itemEquipped3; Links.x.inventory.AddFromGround(null, null, 0, false, 0f, invRowFromName._ID, num15, Vector3.zero, Vector3.zero, new Vector4((float)invRowFromName._DurabilityMax, 0f, 0f, num16), this.character, false, false, out item3, out itemEquipped3); } else { this.character.UpdateInvLists("Add", num14 / 2, invRowFromName._ID, num15, new Vector4((float)invRowFromName._DurabilityMax, 0f, 0f, num16), Vector3.zero, Vector3.zero, null); if (this.character.inventoryBag) { this.character.inventoryBag.UpdateBagItem(num14 / 2, invRowFromName._ID, num15, new Vector4((float)invRowFromName._DurabilityMax, 0f, 0f, num16), Vector3.zero, Vector3.zero, this.character); } } } } } this.character.AddEquippedItems(); } // Token: 0x06000A7C RID: 2684 RVA: 0x000D1FDF File Offset: 0x000D01DF public void AddPaganKnowledge(string spellName) { if (!this.knowledge.Contains(spellName)) { this.knowledge.Add(spellName); } } // Token: 0x06000A7D RID: 2685 RVA: 0x000D1FFB File Offset: 0x000D01FB public bool HasPaganKnowledge(string spellName) { return this.knowledge.Contains(spellName); } // Token: 0x06000A7E RID: 2686 RVA: 0x000D200C File Offset: 0x000D020C public void AddSong(string songName, string uniqueName, Vector3 l) { if (!this.abilities.Contains(songName)) { this.abilities.Insert(0, songName); Vector4 vector = new Vector4(0f, 0f, 0f, 0f); vector.x = l.x; vector.y = l.y; vector.z = l.z; vector.w = 0f; this.abilityLevels.Insert(0, vector); Library.Abilities abilityRow = Links.x.library.GetAbilityRow(songName); string trigger = abilityRow._Trigger; this.abilityNames.Insert(0, songName); this.abilityReady.Insert(0, true); this.abilityTriggers.Insert(0, trigger); this.abilityTriggerCount.Insert(0, 0); this.abilityCost.Insert(0, new Vector2(1f, 0f)); this.abilityRows.Insert(0, abilityRow); this.abilityEquipped.Insert(0, 0); this.uniqueNames.Insert(0, uniqueName); this.character.portrait.skillBag.SetTrinketGrid(true); this.character.portrait.skillBag.SetSongGrid(); this.UpdateAbilityTriggers(); if (this.songPoints > 0 && abilityRow._SongCost <= this.songPoints) { this.equippedSongList.Add(uniqueName); this.songPoints -= abilityRow._SongCost; this.abilityEquipped[0] = 1; Debug.Log(((this != null) ? this.ToString() : null) + " " + this.songPoints.ToString()); } } } // Token: 0x06000A7F RID: 2687 RVA: 0x000D21BC File Offset: 0x000D03BC public void AddWord(string wordName, string uniqueName, Vector3 l) { if (!this.abilities.Contains(wordName)) { this.abilities.Insert(0, wordName); Vector4 vector = new Vector4(0f, 0f, 0f, 0f); vector.x = l.x; vector.y = l.y; vector.z = l.z; vector.w = 0f; this.abilityLevels.Insert(0, vector); Library.Abilities abilityRow = Links.x.library.GetAbilityRow(wordName); string trigger = abilityRow._Trigger; this.abilityNames.Insert(0, wordName); this.abilityReady.Insert(0, true); this.abilityTriggers.Insert(0, trigger); this.abilityTriggerCount.Insert(0, 0); this.abilityCost.Insert(0, new Vector2(1f, 0f)); this.abilityRows.Insert(0, abilityRow); this.abilityEquipped.Insert(0, 0); this.uniqueNames.Insert(0, wordName); this.UpdateAbilityTriggers(); } } // Token: 0x06000A80 RID: 2688 RVA: 0x000D22D8 File Offset: 0x000D04D8 public int SpellCount() { int num = 0; for (int i = 0; i < this.uniqueNames.Count; i++) { if (this.abilityRows[i]._IsSpell) { num++; } } return num; } // Token: 0x06000A81 RID: 2689 RVA: 0x000D2315 File Offset: 0x000D0515 public int SpellIndex(string s) { return this.abilityNames.IndexOf(s); } // Token: 0x06000A82 RID: 2690 RVA: 0x000D2324 File Offset: 0x000D0524 public void SaveSpell(string knowledgeName, string spellName, int slider1, int slider2, int slider3, int tether, Vector2 cost) { if (this.uniqueNames.IndexOf(spellName) == -1) { List list = new List(); list.Add(spellName); for (int i = 0; i < this.uniqueNames.Count; i++) { if (!this.abilityRows[i]._IsSpell) { list.Add(""); } else { list.Add(this.uniqueNames[i]); } } list.Sort(); int num = list.IndexOf(spellName); this.abilities.Insert(num, spellName); Vector4 vector = new Vector4(0f, 0f, 0f, 0f); vector.x = (float)slider1; vector.y = (float)slider2; vector.z = (float)slider3; vector.w = (float)tether; this.abilityLevels.Insert(num, vector); this.abilityNames.Insert(num, knowledgeName); Library.Abilities abilityRow = Links.x.library.GetAbilityRow(knowledgeName); string trigger = abilityRow._Trigger; this.uniqueNames.Insert(num, spellName); this.abilityReady.Insert(num, true); this.abilityTriggers.Insert(num, trigger); this.abilityTriggerCount.Insert(num, 0); this.abilityCost.Insert(num, cost); this.abilityRows.Insert(num, abilityRow); this.abilityEquipped.Insert(num, 0); this.canCastSpells = true; this.character.portrait.skillBag.SetTrinketGrid(true); this.character.portrait.skillBag.SetSpellbookGrid(); this.UpdateAbilityTriggers(); } } // Token: 0x06000A83 RID: 2691 RVA: 0x000D24C8 File Offset: 0x000D06C8 public void RemoveSpell(string spellName) { int num = this.uniqueNames.IndexOf(spellName); if (num > -1) { this.abilities.RemoveAt(num); this.abilityLevels.RemoveAt(num); this.abilityNames.RemoveAt(num); this.uniqueNames.RemoveAt(num); this.abilityReady.RemoveAt(num); this.abilityTriggers.RemoveAt(num); this.abilityTriggerCount.RemoveAt(num); this.abilityCost.RemoveAt(num); this.abilityRows.RemoveAt(num); this.abilityEquipped.RemoveAt(num); this.character.portrait.skillBag.SetSpellbookGrid(); } this.CheckFavoriteSpells(); } // Token: 0x06000A84 RID: 2692 RVA: 0x000D257C File Offset: 0x000D077C public int CheckJobNumber(string job) { int num = 0; int count = this.abilityRows.Count; for (int i = 0; i < count; i++) { if (this.abilityRows[i]._MainSkill == job) { num++; } } return num; } // Token: 0x06000A85 RID: 2693 RVA: 0x000D25C4 File Offset: 0x000D07C4 public bool GetWordsOfPower() { int count = this.effects.Count; if (this.wordCount > 0) { this.words.Clear(); } if (count > 0) { for (int i = 0; i < count; i++) { if (this.effects[i].effect._Name.Contains("Word")) { this.words.Add(this.effects[i].effect._Name); } } } if (this.words.Count > 0) { this.wordCount = this.words.Count; return true; } return false; } // Token: 0x06000A86 RID: 2694 RVA: 0x000D2668 File Offset: 0x000D0868 public void DoWordOfPower(string originalWord, string abilityName) { Effects effects = this.character.gameObject.AddComponent(); Links.x.cellar.AddEffects(effects); effects.gameObject.SetActive(true); effects.source = this.character; effects.target = this.character; effects.fromLoad = false; effects.effectName = abilityName + "Word"; effects.sourceLevel = 0f; effects.Inflicted(false); this.str.Clear(); this.str.Append(Links.x.gameFeed.GetPartyColorText(this.character)); this.str.Append(this.GetName()); this.str.Append(""); this.str.Append(" shouted word of power: "); this.str.Append(originalWord); Links.x.gameFeed.AddFeed(this.str.ToString()); } // Token: 0x06000A87 RID: 2695 RVA: 0x000D276D File Offset: 0x000D096D public bool HasAbility(string abilityName) { return this.abilityNames.Contains(abilityName); } // Token: 0x06000A88 RID: 2696 RVA: 0x000D277B File Offset: 0x000D097B public Vector4 GetAbilityLevel(int index) { return this.abilityLevels[index]; } // Token: 0x06000A89 RID: 2697 RVA: 0x000D2789 File Offset: 0x000D0989 public string GetAbilitySpellName(int index) { return this.uniqueNames[index]; } // Token: 0x06000A8A RID: 2698 RVA: 0x000D2798 File Offset: 0x000D0998 public void CheckForAbilityBooleans() { this.hasHealingSongs = false; this.hasDefenseAbilities = false; this.hasUndeadAbilities = false; this.hasBuffAbilities = false; this.hasUtilityAbilities = false; if (this.GetSkill(23) >= 50f || this.GetSkill(24) >= 50f || this.GetSkill(25) >= 50f) { this.canCharm = true; return; } this.canCharm = false; } // Token: 0x06000A8B RID: 2699 RVA: 0x000D2804 File Offset: 0x000D0A04 public void UsedAbility(string s) { } // Token: 0x06000A8C RID: 2700 RVA: 0x000D2806 File Offset: 0x000D0A06 public bool IsFavoriteSpell(string n) { return this.favoriteSpells.IndexOf(n) > -1; } // Token: 0x06000A8D RID: 2701 RVA: 0x000D281A File Offset: 0x000D0A1A public void AddFavoriteSpell(string n) { if (this.favoriteSpells.IndexOf(n) == -1) { this.favoriteSpells.Add(n); } } // Token: 0x06000A8E RID: 2702 RVA: 0x000D2837 File Offset: 0x000D0A37 public void RemoveFavoriteSpell(string n) { if (this.favoriteSpells.IndexOf(n) > -1) { this.favoriteSpells.Remove(n); } } // Token: 0x06000A8F RID: 2703 RVA: 0x000D2858 File Offset: 0x000D0A58 public void CheckFavoriteSpells() { bool flag = false; for (int i = 0; i < this.favoriteSpells.Count; i++) { if (this.uniqueNames.IndexOf(this.favoriteSpells[i]) == -1) { this.favoriteSpells[i] = null; flag = true; } } if (flag) { this.favoriteSpells.RemoveAll((string item) => item == null); } } // Token: 0x06000A90 RID: 2704 RVA: 0x000D28D4 File Offset: 0x000D0AD4 public void CheckForSongsAndWords(string trigger, out int multiTargets) { multiTargets = 0; if (Records.x.miniGame) { return; } int count = this.abilityNames.Count; for (int i = 0; i < count; i++) { int num = multiTargets; if (this.abilityReady[i] && this.abilityEquipped[i] == 1 && this.abilityTriggers[i] == trigger) { int x = this.abilityRows[i]._X; if (x > 1) { List list = this.abilityTriggerCount; int num2 = i; int num3 = list[num2]; list[num2] = num3 + 1; if (this.character.portrait) { this.character.portrait.skillBag.SongProcs(); } } if ((this.abilityTriggerCount[i] >= x || x <= 1) && this.character.actions) { this.character.actions.SongWordTriggered(this.uniqueNames[i], trigger, this.abilityRows[i], out multiTargets); if (num > multiTargets) { multiTargets = num; } this.abilityTriggerCount[i] = 0; if (this.character.portrait) { this.character.portrait.skillBag.SongProcs(); } } } } } // Token: 0x06000A91 RID: 2705 RVA: 0x000D2A32 File Offset: 0x000D0C32 public void EnchantJewelryEffects(int index, bool intercessionsOnly) { if (this) { base.StartCoroutine(this.CheckJewelry(index, intercessionsOnly)); } } // Token: 0x06000A92 RID: 2706 RVA: 0x000D2A4B File Offset: 0x000D0C4B private IEnumerator CheckJewelry(int index, bool intercessionsOnly) { Vector3 spellInfo = this.character.GetSocketNum(index); Vector3 spellInfo2 = this.character.GetSocketNum(index + 1); int originalIndex = index; index /= 2; bool debugJewelry = false; if (debugJewelry) { Debug.Log(string.Concat(new string[] { "CHECKING JEWELRY ", (this != null) ? this.ToString() : null, " ", index.ToString(), " ", spellInfo.x.ToString(), " ", this.character.GetDurabilityNum(index).x.ToString(), " ", intercessionsOnly.ToString() })); } yield return new WaitForSecondsRealtime(0.1f); if (!intercessionsOnly) { bool flag = false; int num = this.effects.Count; Effects effects = null; for (int i = 0; i < num; i++) { if (this.effects[i] && this.effects[i].jewelrySlot == index) { effects = this.effects[i]; flag = true; break; } } if (flag && effects) { effects.Healed(false, true); if (debugJewelry) { Debug.Log(string.Concat(new string[] { "Found existing, healing ", (this != null) ? this.ToString() : null, " ", spellInfo.x.ToString(), " ", index.ToString() })); } } flag = false; num = this.effects.Count; effects = null; for (int j = 0; j < num; j++) { if (this.effects[j] && this.effects[j].jewelrySlot == index) { effects = this.effects[j]; flag = true; break; } } if (flag && effects) { effects.Healed(false, true); if (debugJewelry) { Debug.Log(string.Concat(new string[] { "Found existing, healing ", (this != null) ? this.ToString() : null, " ", spellInfo.x.ToString(), " ", index.ToString() })); } } } if (spellInfo.x > 0f) { Library.Pagan paganRowByID = Links.x.library.GetPaganRowByID((float)((int)spellInfo.x)); if (paganRowByID != null) { bool flag2 = false; int count = this.effects.Count; Effects effects2 = null; for (int k = 0; k < this.effects.Count; k++) { if (this.effects[k].jewelrySlot == index && this.effects[k].effect._Name == paganRowByID._ID) { effects2 = this.effects[k]; flag2 = true; break; } } if (flag2 && effects2) { effects2.Healed(false, true); if (debugJewelry) { Debug.Log(string.Concat(new string[] { "Found existing, healing ", (this != null) ? this.ToString() : null, " ", spellInfo.x.ToString(), " ", index.ToString() })); } } if (this.CanWearEnchantedItem(spellInfo2.z) && paganRowByID != null) { if (debugJewelry) { Debug.Log("Updating enchanted jewelry " + index.ToString() + " " + paganRowByID._ID); } float num2 = 0f; for (int l = 0; l < 3; l++) { string text = paganRowByID._Slider1; float num3 = spellInfo.y; if (l == 1) { text = paganRowByID._Slider2; num3 = spellInfo.z; } if (l == 2) { text = paganRowByID._Slider3; num3 = spellInfo2.x; } if (text != "" && (text.Contains("Potency") || text.Contains("Reduction"))) { num2 = num3; } } Effects effects3 = base.gameObject.AddComponent(); Links.x.cellar.AddEffects(effects3); effects3.gameObject.SetActive(true); effects3.source = this.character; effects3.target = this.character; effects3.fromLoad = false; effects3.effectName = paganRowByID._ID; effects3.jewelrySlot = index; effects3.sourceLevel = num2; effects3.Inflicted(false); } } } if (!intercessionsOnly) { this.JewelryEffects(originalIndex, debugJewelry); } yield break; } // Token: 0x06000A93 RID: 2707 RVA: 0x000D2A68 File Offset: 0x000D0C68 public void JewelryEffects(int index, bool debugJewelry) { Library.Inventory invRowByIndex = Links.x.library.GetInvRowByIndex(this.character.GetInvNum(index)); if (invRowByIndex != null && invRowByIndex._Effect != "" && !invRowByIndex._Effect.Contains("Cure")) { bool flag = false; Effects effects = null; if (flag && effects) { effects.Healed(false, true); } if (debugJewelry) { Debug.Log("Updating jewelry " + index.ToString() + " " + invRowByIndex._Effect); } Effects effects2 = base.gameObject.AddComponent(); Links.x.cellar.AddEffects(effects2); effects2.gameObject.SetActive(true); effects2.source = this.character; effects2.target = this.character; effects2.fromLoad = false; effects2.effectName = invRowByIndex._Effect; effects2.jewelrySlot = index / 2; effects2.sourceLevel = invRowByIndex._Level; effects2.Inflicted(false); } if (Links.x.characterSheet.open) { Links.x.characterSheet.GetStats(); } } // Token: 0x06000A94 RID: 2708 RVA: 0x000D2B8C File Offset: 0x000D0D8C public bool WeaponRequired(int i) { string weaponReq = this.abilityRows[i]._WeaponReq; bool flag = false; if (weaponReq == "Any") { flag = true; } else if (weaponReq == "Melee") { if (this.character.invRow1 != null && this.character.invRow1._MeleeRangeEnd < 5f) { flag = true; } } else if (weaponReq == "Range") { if (this.character.invRow1 != null && this.character.invRow1._MeleeRangeEnd >= 5f) { flag = true; } } else if (weaponReq == "Two") { int num = 0; if (this.character.invRow1 != null && this.character.invRow1._ID > 1) { num++; } if (this.character.invRow2 != null && this.character.invRow2._ID > 1 && this.character.invRow2._EquipSlotID == 0) { num++; } if (num == 2) { flag = true; } } else if (weaponReq == "Shield") { if (this.character.invRow2 != null && this.character.invRow2._WeaponType == weaponReq) { flag = true; } } else if (weaponReq == "None") { int num2 = 0; if (this.character.invRow1 != null && this.character.invRow1._ID > 1) { num2++; } if (this.character.invRow2 != null && this.character.invRow2._ID > 1 && this.character.invRow2._EquipSlotID == 0) { num2++; } if (this.character.invRow3 != null && this.character.invRow3._ID > 1) { num2++; } if (this.character.invRow4 != null && this.character.invRow4._ID > 1) { num2++; } if (num2 == 0) { flag = true; } } else if (this.character.invRow1 != null && this.character.invRow1._WeaponType == weaponReq) { flag = true; } return flag; } // Token: 0x06000A95 RID: 2709 RVA: 0x000D2DD8 File Offset: 0x000D0FD8 public bool HasPowerDraw() { int count = this.abilityNames.Count; for (int i = 0; i < count; i++) { if (this.abilityRows[i]._AddsToAttack && this.abilityRows[i]._AINotes.Contains("Distance") && this.abilityRows[i]._WeaponReq == this.character.invRow1._WeaponType) { return true; } } return false; } // Token: 0x06000A96 RID: 2710 RVA: 0x000D2E58 File Offset: 0x000D1058 public void CheckTerrainAbilities(string currentTerrain) { int count = this.effects.Count; for (int i = 0; i < count; i++) { if (this.effects[i] && this.effects[i].terrainDependent) { Library.Effects effect = this.effects[i].effect; bool flag = false; if (currentTerrain == effect._TerrainReq) { flag = true; } if (this.effects[i].effectIsActive != flag) { if (flag) { this.effects[i].Set(false); } else { this.effects[i].Set(true); } this.effects[i].effectIsActive = flag; if (Records.x.editor) { Debug.Log("Switching terrain effect " + this.effects[i].effect._Name); } } } } } // Token: 0x06000A97 RID: 2711 RVA: 0x000D2F58 File Offset: 0x000D1158 public bool HasSpellbook() { if (this.magicPointsBase > 0) { if (!this.character.party) { return true; } if (this.character.HasBook(Links.x.library.spellbookIndex) > -1) { this.canCastSpells = true; return true; } } this.canCastSpells = false; return false; } // Token: 0x06000A98 RID: 2712 RVA: 0x000D2FAB File Offset: 0x000D11AB public bool HasSongbook() { return !this.character.party || this.character.HasBook(Links.x.library.songbookIndex) > -1; } // Token: 0x06000A99 RID: 2713 RVA: 0x000D2FDC File Offset: 0x000D11DC public void UpdateAbilityTriggers() { bool flag = this.HasSongbook(); bool flag2 = false; bool flag3 = false; bool flag4 = false; if (flag) { if (this.character.HasInstrumentType("Flute")) { flag2 = true; } if (this.character.HasInstrumentType("Horn")) { flag3 = true; } if (this.character.HasInstrumentType("Pipe")) { flag4 = true; } } int count = this.abilityNames.Count; for (int i = 0; i < count; i++) { if (this.abilityEquipped[i] == 1) { if (this.abilityRows[i]._IsSong) { if (flag) { if ((this.abilityRows[i]._WeaponReq == "Flute" && flag2) || (this.abilityRows[i]._WeaponReq == "Horn" && flag3) || (this.abilityRows[i]._WeaponReq == "Pipe" && flag4)) { this.abilityReady[i] = true; } else { this.abilityReady[i] = false; } } else { this.abilityReady[i] = false; } } else { this.abilityReady[i] = this.WeaponRequired(i); } } else if (this.abilityRows[i]._IsSpell) { this.hasSpells = true; if (this.HasSpellbook()) { if (this.HasPaganCostForSpell(this.uniqueNames[i])) { if (this.character.sailing) { if (this.abilityRows[i]._UseOnBoat) { this.abilityReady[i] = true; } else { this.abilityReady[i] = false; } } else { this.abilityReady[i] = true; } } else { this.abilityReady[i] = false; } } else { this.abilityReady[i] = false; } } } if (this.character.party && this.character.portrait) { this.character.portrait.skillBag.UpdateAbilityTriggers(); } } // Token: 0x06000A9A RID: 2714 RVA: 0x000D321C File Offset: 0x000D141C public void CombatStartSpells() { this.spellDifficulties.Clear(); int count = this.abilityRows.Count; for (int i = 0; i < count; i++) { if (this.abilityRows[i]._IsSpell) { float num; this.spellDifficulties.Add((int)this.SpellDifficulty(this.uniqueNames[i], out num)); } else { this.spellDifficulties.Add(0); } } } // Token: 0x06000A9B RID: 2715 RVA: 0x000D3290 File Offset: 0x000D1490 public Library.Abilities GetAbilityRow(string n) { int count = this.abilityRows.Count; for (int i = 0; i < count; i++) { if (n == this.uniqueNames[i]) { return this.abilityRows[i]; } } return null; } // Token: 0x06000A9C RID: 2716 RVA: 0x000D32D7 File Offset: 0x000D14D7 public bool GetAbilityReadyState(int index) { return this.abilityReady[index]; } // Token: 0x06000A9D RID: 2717 RVA: 0x000D32E5 File Offset: 0x000D14E5 public int GetAbilityTriggerCount(int index) { return this.abilityTriggerCount[index]; } // Token: 0x06000A9E RID: 2718 RVA: 0x000D32F4 File Offset: 0x000D14F4 public string GetAbilityTrigger(int index, bool plural) { string text = this.abilityTriggers[index]; return this.TriggerName(text, plural); } // Token: 0x06000A9F RID: 2719 RVA: 0x000D3318 File Offset: 0x000D1518 public string TriggerName(string s, bool plural) { if (s == "CombatStart") { return "combat start"; } if (s == "Attack" || s == "PreAttack") { if (plural) { return "successful attacks"; } return "successful attack"; } else if (s == "OnBlock") { if (plural) { return "successful blocks"; } return "successful block"; } else if (s == "OnHit") { if (plural) { return "hits taken"; } return "hit taken"; } else if (s == "OnKill") { if (plural) { return "enemy deaths"; } return "enemy death"; } else if (s == "OnPartyKill") { if (plural) { return "enemy deaths from party"; } return "enemy death from party"; } else if (s == "OnEvade") { if (plural) { return "dodges/evasions"; } return "dodge/evasion"; } else { if (!(s == "OnFriendDown")) { return s; } if (plural) { return "friends down"; } return "friend down"; } } // Token: 0x06000AA0 RID: 2720 RVA: 0x000D340A File Offset: 0x000D160A public int GetAbilityTriggerGoal(int index) { return this.abilityRows[index]._X; } // Token: 0x06000AA1 RID: 2721 RVA: 0x000D341D File Offset: 0x000D161D public bool GetAbilityStatus(int index) { return this.abilityReady[index]; } // Token: 0x06000AA2 RID: 2722 RVA: 0x000D342C File Offset: 0x000D162C public int GetAbilityIndex(string s) { int count = this.abilityNames.Count; for (int i = 0; i < count; i++) { if (s == this.abilityNames[i]) { return i; } } return -1; } // Token: 0x06000AA3 RID: 2723 RVA: 0x000D3468 File Offset: 0x000D1668 public int GetIndex(string s, int c) { for (int i = 0; i < c; i++) { if (s == this.abilities[i]) { return i; } } return -1; } // Token: 0x06000AA4 RID: 2724 RVA: 0x000D3498 File Offset: 0x000D1698 public int GetAbilityNumber(string s) { int count = this.abilityNames.Count; for (int i = 0; i < count; i++) { if (s == this.abilityNames[i]) { return (int)this.abilityLevels[i].x; } } return 0; } // Token: 0x06000AA5 RID: 2725 RVA: 0x000D34E5 File Offset: 0x000D16E5 public bool HasSpellName(string s) { return this.abilityNames.Contains(s); } // Token: 0x06000AA6 RID: 2726 RVA: 0x000D34F8 File Offset: 0x000D16F8 public bool IsTargetAnEnemy(uint num) { return num != 0U && (this.enemy1 == num || this.enemy2 == num || this.enemy3 == num || this.enemy4 == num || this.enemy5 == num || this.enemy6 == num || this.enemy7 == num || this.enemy8 == num || this.enemy9 == num); } // Token: 0x06000AA7 RID: 2727 RVA: 0x000D3570 File Offset: 0x000D1770 public void RemovedCompanionSave() { this.saveFile = new ES3File(string.Concat(new string[] { Records.x.openBook, "/Creatures_", this.originalMap, "_", this.creaturesName, ".es3" })); new List().Add("Normal"); new List().Add(this.currLife); new List().Add(Links.x.diorama.sceneName); new List().Add(this.character.tr.position); this.saveFile.Sync(); } // Token: 0x06000AA8 RID: 2728 RVA: 0x000D3628 File Offset: 0x000D1828 public void CharacterSave() { string text = Records.x.openBook + "/Party_" + this.partyID.ToString() + ".es3"; this.saveFile = new ES3File(text); this.saveFile.Save("Strength", this.strength); this.saveFile.Save("Aura", this.aura); this.saveFile.Save("Dexterity", this.dexterity); this.saveFile.Save("Pagan", this.pagan); this.saveFile.Save("Sensory", this.sensory); this.saveFile.Save("Agility", this.agility); this.saveFile.Save("MoveRadius", this.maxStaminaAdd); this.saveFile.Save("CurrLife", this.currLife); this.saveFile.Save("LifeBase", this.lifeBase); this.saveFile.Save("WeightBase", this.weightBase); this.saveFile.Save("SightRadiusBase", this.sightRadiusBase); this.saveFile.Save("HearingRadiusBase", this.hearingRadiusBase); this.saveFile.Save("Sex", this.sex); this.saveFile.Save("SkinTexture", this.skinTexture); this.saveFile.Save("HairTexture", this.hairTexture); this.RemoveNullAilments(); this.effectsNamesFromSave.Clear(); this.effectsTimesFromSave.Clear(); this.effectsVar2FromSave.Clear(); for (int i = 0; i < this.effects.Count; i++) { if (this.effects[i]) { this.effectsNamesFromSave.Add(this.effects[i].effectName); this.effectsTimesFromSave.Add(this.effects[i].effectStartTime); this.effectsVar2FromSave.Add(this.effects[i].sourceLevel); } } this.saveFile.Save>("EffectsTimes", this.effectsTimesFromSave); this.saveFile.Save>("EffectsName", this.effectsNamesFromSave); this.saveFile.Save>("EffectsVar2", this.effectsVar2FromSave); this.saveFile.Save("XP", this.XP); this.saveFile.Save("DisplayName", this.displayName); this.saveFile.Save("DialogueFile", this.dialogueFile); this.saveFile.Save("Model", this.model); this.saveFile.Save("HeadModel", this.headModel); this.saveFile.Save("Indoor Scene", this.character.indoorID); this.saveFile.Save("Indoor Scene Door", this.character.doorID); this.saveFile.Save("Graph", this.character.desiredGraph); this.saveFile.Save("TimeOfDeath", this.character.timeOfDeath); this.saveFile.Save("Stunned", this.character.stunned); this.saveFile.Save("LevelUps", this.levelUps); this.saveFile.Save("KillCount", this.killCount); this.saveFile.Save("Level", this.level); if (this.character) { this.saveFile.Save("Position", this.character.tr.position); this.saveFile.Save("Rotation", this.character.tr.rotation); this.saveFile.Save("Selected", this.character.selected); this.saveFile.Save("MainSelected", this.character.mainSelected); this.bagToSave.Clear(); this.bagStacksToSave.Clear(); this.bag = this.character.bag; for (int j = 0; j < this.bag.Count; j++) { if (j % 2 == 0) { if (this.bag[j] == 0) { this.bagToSave.Add("Empty"); } if (this.bag[j] == 1) { this.bagToSave.Add("Fist"); } if (this.bag[j] > 1) { Library.Inventory invRowByIndex = Links.x.library.GetInvRowByIndex(this.bag[j]); this.bagToSave.Add(invRowByIndex._Name); } } else { this.bagStacksToSave.Add(this.bag[j]); } } this.saveFile.Save>("Bag", this.bagToSave); this.saveFile.Save>("Sockets", this.character.sockets); this.saveFile.Save>("BagPositions", this.character.bagPositions); this.saveFile.Save>("Durability", this.character.durability); this.saveFile.Save>("BagStacks", this.bagStacksToSave); } this.saveFile.Save("MajorStat1", this.majorStat1); this.saveFile.Save("MajorStat2", this.majorStat2); this.saveFile.Save("MinorStat3", this.minorStat3); this.saveFile.Save("MajorSkill1", this.majorSkill1); this.saveFile.Save("MajorSkill2", this.majorSkill2); this.saveFile.Save("MinorSkill3", this.minorSkill3); this.saveFile.Save("TopStartingSkill1", this.topStartingSkill1); this.saveFile.Save("TopStartingSkill2", this.topStartingSkill2); this.saveFile.Save("TopStartingSkill3", this.topStartingSkill3); this.saveFile.Save("OriginalMap", this.originalMap); this.saveFile.Save("Protagonist", this.protagonist); this.saveFile.Save("Race", this.race); this.saveFile.Save("RaceTrait", this.raceTrait); this.saveFile.Save("PartyColorID", this.character.partyColorID); this.saveFile.Save("MagicTactics", this.magicTactics); this.saveFile.Save("UseAI", this.companionAI); this.saveFile.Save>("PaganKnowledge", this.knowledge); this.saveFile.Save>("Abilities", this.uniqueNames); this.saveFile.Save>("AbilityLevels", this.abilityLevels); this.saveFile.Save>("AbilityCost", this.abilityCost); this.saveFile.Save>("AbilityNames", this.abilityNames); this.equippedAbilities = ""; string text2 = ""; foreach (string text3 in this.equippedSongList) { this.equippedAbilities += text3; this.equippedAbilities += ","; int num = this.uniqueNames.IndexOf(text3); if (num > -1) { text2 += this.abilityTriggerCount[num].ToString(); text2 += ","; } else { text2 += " ,"; } } this.saveFile.Save("EquippedAbilities", this.equippedAbilities); this.saveFile.Save("EquippedAbilityCount", text2); this.saveFile.Save>("FavoriteSpells", this.favoriteSpells); this.saveFile.Save>("Skills", this.skills); this.saveFile.Save>("SkillsProgress", this.skillsProgress); this.saveFile.Save("RallyBase", this.rallyBase); this.saveFile.Save("MagicPoints", this.magicPoints); this.saveFile.Save("MagicPointsBase", this.magicPointsBase); this.saveFile.Save("Formation", this.formationGroup); this.saveFile.Save("SelectedAmmo", this.character.selectedAmmoIndex); this.saveFile.Save("SelectedWpnIndex", this.character.selectedWpnIndex); this.saveFile.Save("PartyID", this.partyID); this.saveFile.Save("UseItems", this.useItemsAI); this.saveFile.Save("AutoCastAI", this.autoCastAI); this.saveFile.Save("AutoCrit", this.autoCritsAI); this.saveFile.Save("AutoBuff", this.autoBuffsAI); this.saveFile.Save("IsLeader", this.isLeader); if (this.character.portrait) { this.modalWindowsOpen = this.character.portrait.skillBag.modalWindowsOpen; } this.saveFile.Save("ModalWindowsOpen", this.modalWindowsOpen); this.saveFile.Save("RallyBoost", Links.x.fellowship.rallyBoost); if (Records.x.demo) { this.saveFile.Save("GameVersionForThisScene", Records.x.gameVersionDemo); } else { this.saveFile.Save("GameVersionForThisScene", Records.x.gameVersion); } this.saveFile.Sync(); } // Token: 0x06000AA9 RID: 2729 RVA: 0x000D4080 File Offset: 0x000D2280 public void CharacterLoad() { string text = Records.x.openBook + "/Party_" + this.partyID.ToString() + ".es3"; int num = 0; if (ES3.FileExists(text)) { this.saveFile = new ES3File(text); this.strength = this.saveFile.Load("Strength"); this.aura = this.saveFile.Load("Aura"); this.dexterity = this.saveFile.Load("Dexterity"); this.pagan = this.saveFile.Load("Pagan"); this.sensory = this.saveFile.Load("Sensory"); this.agility = this.saveFile.Load("Agility"); this.maxStaminaAdd = this.saveFile.Load("MoveRadius"); this.currLife = this.saveFile.Load("CurrLife"); this.lifeBase = this.saveFile.Load("LifeBase"); this.weightBase = this.saveFile.Load("WeightBase"); this.sightRadiusBase = this.saveFile.Load("SightRadiusBase"); this.hearingRadiusBase = this.saveFile.Load("HearingRadiusBase"); this.sex = this.saveFile.Load("Sex"); this.skinTexture = this.saveFile.Load("SkinTexture"); this.hairTexture = this.saveFile.Load("HairTexture"); this.effectsNamesFromSave.Clear(); this.effectsTimesFromSave.Clear(); this.effectsVar2FromSave.Clear(); this.effectsTimesFromSave = this.saveFile.Load>("EffectsTimes"); this.effectsNamesFromSave = this.saveFile.Load>("EffectsName"); this.effectsVar2FromSave = this.saveFile.Load>("EffectsVar2"); this.XP = this.saveFile.Load("XP"); this.displayName = this.saveFile.Load("DisplayName"); this.dialogueFile = this.saveFile.Load("DialogueFile"); this.model = this.saveFile.Load("Model"); this.headModel = this.saveFile.Load("HeadModel"); this.character.doorID = this.saveFile.Load("Indoor Scene Door"); this.character.indoorID = this.saveFile.Load("Indoor Scene"); this.character.desiredGraph = this.saveFile.Load("Graph"); this.character.timeOfDeath = this.saveFile.Load("TimeOfDeath"); this.character.stunned = this.saveFile.Load("Stunned"); this.levelUps = this.saveFile.Load("LevelUps"); this.killCount = this.saveFile.Load("KillCount"); this.level = this.saveFile.Load("Level"); Vector3 vector = this.saveFile.Load("Position"); Quaternion quaternion = this.saveFile.Load("Rotation"); bool flag = this.saveFile.Load("Selected"); bool flag2 = this.saveFile.Load("MainSelected"); this.bag = this.character.bag; this.bagPositions = this.character.bagPositions; this.sockets = this.character.sockets; this.durability = this.character.durability; this.savedStatsBag.Clear(); this.savedStatsBag = this.saveFile.Load>("Bag"); this.bagStacksToSave.Clear(); this.bagStacksToSave = this.saveFile.Load>("BagStacks"); this.savedStatsSockets = this.saveFile.Load>("Sockets"); this.savedStatsBagPositions = this.saveFile.Load>("BagPositions"); this.savedStatsDurability = this.saveFile.Load>("Durability"); this.majorStat1 = this.saveFile.Load("MajorStat1"); this.majorStat2 = this.saveFile.Load("MajorStat2"); this.minorStat3 = this.saveFile.Load("MinorStat3"); this.majorSkill1 = this.saveFile.Load("MajorSkill1"); this.majorSkill2 = this.saveFile.Load("MajorSkill2"); this.minorSkill3 = this.saveFile.Load("MinorSkill3"); this.topStartingSkill1 = this.saveFile.Load("TopStartingSkill1"); this.topStartingSkill2 = this.saveFile.Load("TopStartingSkill2"); this.topStartingSkill3 = this.saveFile.Load("TopStartingSkill3"); this.bag.Clear(); for (int i = 0; i < this.savedStatsBag.Count; i++) { if (this.savedStatsBag[i] == "Empty") { this.bag.Add(0); this.bag.Add(0); } else if (this.savedStatsBag[i] == "Fist") { this.bag.Add(1); this.bag.Add(0); } else { int invRowID = Links.x.library.GetInvRowID(this.savedStatsBag[i]); this.bag.Add(invRowID); this.bag.Add(0); } } int num2 = 0; for (int j = 0; j < this.bag.Count; j++) { if (j % 2 != 0) { this.bag[j] = this.bagStacksToSave[num2]; num2++; } } for (int k = 0; k < this.sockets.Count; k++) { if (k < this.savedStatsSockets.Count) { this.sockets[k] = this.savedStatsSockets[k]; } } for (int l = 0; l < this.bagPositions.Count; l++) { if (l < this.savedStatsBagPositions.Count) { this.bagPositions[l] = this.savedStatsBagPositions[l]; } } for (int m = 0; m < this.durability.Count; m++) { if (m < this.savedStatsDurability.Count) { this.durability[m] = this.savedStatsDurability[m]; } } this.originalMap = this.saveFile.Load("OriginalMap"); this.protagonist = this.saveFile.Load("Protagonist"); this.race = this.saveFile.Load("Race"); if (this.race == "Yeti") { this.character.animationPrefix = "_VollingYeti"; } this.raceTrait = this.saveFile.Load("RaceTrait"); Links.x.ReturnPartyColor(this.character.partyColorID); this.character.partyColorID = this.saveFile.Load("PartyColorID"); this.character.portrait.UpdateBar(); Links.x.GetOpenPartyColorFromSave(this.character.partyColorID); this.character.UpdateArrowColor(); this.character.CircleAnimation(""); this.magicTactics = this.saveFile.Load("MagicTactics"); this.companionAI = this.saveFile.Load("UseAI"); this.autoCastAI = this.saveFile.Load("AutoCastAI"); if (this.saveFile.KeyExists("UseItems")) { this.useItemsAI = this.saveFile.Load("UseItems"); this.autoBuffsAI = this.saveFile.Load("AutoBuff"); this.autoCritsAI = this.saveFile.Load("AutoCrit"); } this.isLeader = this.saveFile.Load("IsLeader"); this.knowledge = this.saveFile.Load>("PaganKnowledge"); this.abilities = this.saveFile.Load>("AbilityNames"); this.abilityLevelsTemp = this.saveFile.Load>("AbilityLevels"); this.spellNamesTemp = this.saveFile.Load>("Abilities"); this.abilityCostTemp = this.saveFile.Load>("AbilityCost"); this.equippedAbilities = this.saveFile.Load("EquippedAbilities"); for (int n = 0; n < this.abilityEquipped.Count; n++) { this.abilityEquipped[n] = 0; } this.equippedCounts = this.saveFile.Load("EquippedAbilityCount"); this.skills.Clear(); this.skillsProgress.Clear(); this.skills = this.saveFile.Load>("Skills"); this.skillsProgress = this.saveFile.Load>("SkillsProgress"); this.modalWindowsOpen = this.saveFile.Load("ModalWindowsOpen"); this.rallyBase = this.saveFile.Load("RallyBase"); this.magicPoints = this.saveFile.Load("MagicPoints"); this.magicPointsBase = this.saveFile.Load("MagicPointsBase"); this.formationGroup = this.saveFile.Load("Formation"); this.character.selectedAmmoIndex = this.saveFile.Load("SelectedAmmo"); this.character.selectedWpnIndex = this.saveFile.Load("SelectedWpnIndex"); this.partyID = this.saveFile.Load("PartyID"); num = this.character.selectedWpnIndex; if (this.saveFile.KeyExists("GameVersionForThisScene")) { this.lastVersionForThisScene = this.saveFile.Load("GameVersionForThisScene"); } else { this.lastVersionForThisScene = 1.29f; } if (this.saveFile.KeyExists("FavoriteSpells")) { this.favoriteSpells = this.saveFile.Load>("FavoriteSpells"); } if (this.saveFile.KeyExists("RallyBoost")) { Links.x.fellowship.rallyBoost = (float)((int)this.saveFile.Load("RallyBoost")); } this.character.SetPosition(vector, null); this.character.SetRotation(quaternion, false, true); this.character.FirstPosition(null); if (flag) { this.character.AddToSelected(false, false); } else { this.character.RemoveFromSelected(true); } if (flag2) { this.character.SetAsLeader(); } this.character.portrait.SetSelection(); this.character.characterSheetPortrait.SetSelection(); this.character.portrait.skillBag.SetSelectedAmmoIndex(this.character.selectedAmmoIndex); Library.Inventory invRow = Links.x.library.GetInvRow(this.bag[18]); if (invRow != null) { if (this.bag[18] <= 1 || invRow._ArmorID == -1) { this.character.SetupBody(); } } else { this.character.SetupBody(); } if (this.character.stunned) { this.character.Stunned(true); } this.SetupAbilities(false); } else if (Records.x.banquetIsle) { Links.x.main.SetAsLeader(); } this.UpdateStats(); this.FormationTactics(); this.SetVoiceID(false); this.character.protagonist = this.protagonist; if (this.protagonist) { Links.x.protagonist = this.character; } this.character.portrait.skillBag.SetTrinketGrid(true); this.character.portrait.skillBag.SetSpellbookGrid(); this.character.portrait.skillBag.SetSongGrid(); this.character.portrait.UpdateMP(); this.SpawnEffects(); this.character.SetupPartyAfterLoadedVariables(); this.UpdateRallyCount(false, 0f); Links.x.hudControl.SetRallyBars(); this.character.portrait.skillBag.SetSelectedWpnIndex(num); base.StartCoroutine(this.WaitForAnimator()); } // Token: 0x06000AAA RID: 2730 RVA: 0x000D4D48 File Offset: 0x000D2F48 private IEnumerator WaitForAnimator() { float timeToLerp = 1f; float percentage = 0f; float startTime = Time.realtimeSinceStartup; while (percentage < 1f) { percentage = (Time.realtimeSinceStartup - startTime) / timeToLerp; if (this.character.animator) { this.character.animator.enabled = false; } yield return null; } if (this.character.animator) { this.character.animator.Rebind(); this.character.animator.Update(0f); this.character.animator.enabled = true; } yield break; } // Token: 0x06000AAB RID: 2731 RVA: 0x000D4D57 File Offset: 0x000D2F57 public int SongPointsMax() { return 4; } // Token: 0x06000AAC RID: 2732 RVA: 0x000D4D5C File Offset: 0x000D2F5C public void UpdateEquippedSongList(string n) { bool flag = false; for (int i = 0; i < this.equippedSongList.Count; i++) { if (this.equippedSongList[i] == n && !flag) { int num = this.uniqueNames.IndexOf(n); if (num > -1) { flag = true; this.equippedSongList.RemoveAt(i); this.songPoints += this.abilityRows[num]._SongCost; this.abilityEquipped[num] = 0; } } } if (!flag) { int num2 = this.uniqueNames.IndexOf(n); if (num2 > -1 && this.abilityRows[num2]._SongCost <= this.songPoints) { this.equippedSongList.Add(n); this.songPoints -= this.abilityRows[num2]._SongCost; this.abilityEquipped[num2] = 1; } } if (this.character.portrait) { this.character.portrait.skillBag.SetSongGrid(); } } // Token: 0x06000AAD RID: 2733 RVA: 0x000D4E6D File Offset: 0x000D306D public float GetSynergyNeeded(int x) { if (x == 1) { return this.synergy1; } return this.synergy2; } // Token: 0x06000AAE RID: 2734 RVA: 0x000D4E80 File Offset: 0x000D3080 public void UpdateRallyCount(bool add, float amt) { if (!this.character.party) { return; } if (add) { amt = 1.25f + this.rallyBase / 5f; amt *= Mathf.Clamp(Links.x.fellowship.rallySpeed, 1f, 1000000f); Links.x.hudControl.UpdateRally(amt); } } // Token: 0x06000AAF RID: 2735 RVA: 0x000D4EE4 File Offset: 0x000D30E4 public void UsedSynergy() { } // Token: 0x06000AB0 RID: 2736 RVA: 0x000D4EE6 File Offset: 0x000D30E6 public void ClearSynergies() { this.synergyAttackCount = 0f; this.UpdateRallyCount(false, 0f); } // Token: 0x06000AB1 RID: 2737 RVA: 0x000D4F00 File Offset: 0x000D3100 public void FormationTactics() { this.defendMainInCombat = false; if (this.formationGroup == 0 || this.formationGroup == 1 || this.formationGroup == 2 || this.formationGroup == 3) { this.kiteInCombat = false; if (this.character.npc && this.character.creatures) { this.defendMainInCombat = false; this.defendingCharacter = null; if (this.character.creatures.creatures.hasLeader) { this.defendingCharacter = this.character.creatures.GetLeader(); if (this.defendingCharacter) { this.defendMainInCombat = true; } } else if (this.character.creatures.creatures.pickOneLeader) { this.defendingCharacter = this.character.creatures.GetFirstAsLeader(this.character); if (this.defendingCharacter) { this.defendMainInCombat = true; } else { this.defendMainInCombat = false; } } } } else { this.kiteInCombat = true; } if (this.character.party) { if (false) { this.defendingCharacter = Links.x.SharingFormation(this.character, this.formationGroup); if (this.defendingCharacter && !this.character.summoned) { this.defendMainInCombat = true; } } else { this.defendMainInCombat = false; this.defendingCharacter = null; } } if (this.formationGroup == 1 || this.formationGroup == 4 || this.formationGroup == 7) { this.useUtilityAbilities = true; return; } this.useUtilityAbilities = false; } // Token: 0x06000AB2 RID: 2738 RVA: 0x000D5098 File Offset: 0x000D3298 public void AddSkillProgress(int skillIndex, float difficulty, Character target) { if (this.character.npc || this.character.summoned) { return; } if (target && target.ghost) { return; } float num = Records.x.GetSkillWeight(skillIndex) + difficulty; if (num < 0.5f) { num = 0.5f; } List list = this.skillsProgress; list[skillIndex] += num; this.CheckProgress(skillIndex); } // Token: 0x06000AB3 RID: 2739 RVA: 0x000D510D File Offset: 0x000D330D public void CheckProgress(int skillIndex) { } // Token: 0x06000AB4 RID: 2740 RVA: 0x000D510F File Offset: 0x000D330F public void FinishLevelUp() { } // Token: 0x06000AB5 RID: 2741 RVA: 0x000D5114 File Offset: 0x000D3314 public void IncreaseSkill(int skillIndex, int amount) { List list = this.skills; list[skillIndex] += (float)amount; } // Token: 0x06000AB6 RID: 2742 RVA: 0x000D513B File Offset: 0x000D333B public void SetSkill(int skillIndex, int amount) { this.skills[skillIndex] = (float)amount; } // Token: 0x06000AB7 RID: 2743 RVA: 0x000D514B File Offset: 0x000D334B public float GetSkill(int skillIndex) { return this.skills[skillIndex] + this.allSkillAdd; } // Token: 0x06000AB8 RID: 2744 RVA: 0x000D5160 File Offset: 0x000D3360 public float GetSkillProgress(int skillIndex) { float num = 0f; int count = this.skillsProgress.Count; for (int i = 0; i < count; i++) { num += this.skillsProgress[i]; } if (num == 0f) { return 0f; } return this.skillsProgress[skillIndex] / num; } // Token: 0x06000AB9 RID: 2745 RVA: 0x000D51B6 File Offset: 0x000D33B6 public int HasFamilyBackground(int index) { return this.familyBackgrounds[index]; } // Token: 0x06000ABA RID: 2746 RVA: 0x000D51C0 File Offset: 0x000D33C0 public int HasFamilyBackgroundFromName(string n) { int num = 0; if (n == "Merchant") { int num2 = 0; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } num2 = 7; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } num2 = 13; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } num2 = 19; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Farmer") { int num2 = 1; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } num2 = 9; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } num2 = 14; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Cleric") { int num2 = 2; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } num2 = 22; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } num2 = 10; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Brewer") { int num2 = 3; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Sailor") { int num2 = 4; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Entertainer") { int num2 = 6; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Servant") { int num2 = 5; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Artisan") { int num2 = 8; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } num2 = 25; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Rider") { int num2 = 11; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Herder") { int num2 = 12; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Expeditioner") { int num2 = 15; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Miner") { int num2 = 1164; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Hunter") { int num2 = 17; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Weaver") { int num2 = 18; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Gardener") { int num2 = 20; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Hunter") { int num2 = 21; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Justice") { int num2 = 23; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Politician") { int num2 = 24; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Pine") { int num2 = 26; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Maple") { int num2 = 27; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Willow") { int num2 = 28; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Birch") { int num2 = 29; num = this.familyBackgrounds[num2]; if (num > 0) { return num; } } if (n == "Date") { int num2 = 30; return this.familyBackgrounds[num2]; } return num; } // Token: 0x06000ABB RID: 2747 RVA: 0x000D5528 File Offset: 0x000D3728 public void SetFamilyBackground(string rank, string race) { int num = 0; if (race == "Ameythevian") { if (rank == "Merchant") { num = 0; } if (rank == "Farmer") { num = 1; } if (rank == "Cleric") { num = 2; } if (rank == "Brewer") { num = 3; } if (rank == "Sailor") { num = 4; } if (rank == "Servant") { num = 5; } if (rank == "Entertainer") { num = 6; } } if (race == "Taratorith") { if (rank == "Merchant") { num = 7; } if (rank == "Artisan") { num = 8; } if (rank == "Farmer") { num = 9; } if (rank == "Cleric") { num = 10; } if (rank == "Rider") { num = 11; } if (rank == "Herder") { num = 12; } } if (race == "Varuchov") { if (rank == "Merchant") { num = 13; } if (rank == "Farmer") { num = 14; } if (rank == "Expeditioner") { num = 15; } if (rank == "Miner") { num = 16; } if (rank == "Hunter") { num = 17; } if (rank == "Weaver") { num = 18; } } if (race == "Pasaaren") { if (rank == "Merchant") { num = 19; } if (rank == "Gardener") { num = 20; } if (rank == "Hunter") { num = 21; } if (rank == "Cleric") { num = 22; } if (rank == "Justice") { num = 23; } if (rank == "Politician") { num = 24; } if (rank == "Artisan") { num = 25; } } if (race == "Yeti") { if (rank == "Pine") { num = 26; } if (rank == "Maple") { num = 27; } if (rank == "Willow") { num = 28; } if (rank == "Birch") { num = 29; } if (rank == "Date") { num = 30; } } for (int i = 0; i < 30; i++) { if (i == num) { this.familyBackgrounds[i] = 1; } else { this.familyBackgrounds[i] = 0; } } this.familyBackground = rank; } // Token: 0x06000ABC RID: 2748 RVA: 0x000D578C File Offset: 0x000D398C public void SetMajorsMinors(string setMajorStat1, string setMajorStat2, string setMinorStat3, string setMajorSkill1, string setMajorSkill2, string setMinorSkill3, bool setChangedArchetype) { this.majorStat1 = setMajorStat1; this.majorStat2 = setMajorStat2; this.minorStat3 = setMinorStat3; this.majorSkill1 = setMajorSkill1; this.majorSkill2 = setMajorSkill2; this.minorSkill3 = setMinorSkill3; this.changedArchetype = setChangedArchetype; int num = -1; int num2 = -1; int num3 = -1; float skillAmount = this.GetSkillAmount(this.majorSkill1, out num); float skillAmount2 = this.GetSkillAmount(this.majorSkill2, out num2); this.GetSkillAmount(this.minorSkill3, out num3); if (skillAmount > skillAmount2) { this.topStartingSkill1 = num; this.topStartingSkill2 = num2; } else { this.topStartingSkill2 = num; this.topStartingSkill1 = num2; } this.topStartingSkill3 = num3; } // Token: 0x06000ABD RID: 2749 RVA: 0x000D5828 File Offset: 0x000D3A28 public float GetSkillAmount(string n, out int skillIndex) { skillIndex = -1; if (n == "Robes") { skillIndex = 0; return this.GetSkill(0); } if (n == "Pearl") { skillIndex = 1; return this.GetSkill(1); } if (n == "Crimscale") { skillIndex = 2; return this.GetSkill(2); } if (n == "Stonewood") { skillIndex = 3; return this.GetSkill(3); } if (n == "ShortSword") { skillIndex = 4; return this.GetSkill(4); } if (n == "LongSword") { skillIndex = 5; return this.GetSkill(5); } if (n == "Scepter") { skillIndex = 6; return this.GetSkill(6); } if (n == "Ax") { skillIndex = 7; return this.GetSkill(7); } if (n == "Pole") { skillIndex = 8; return this.GetSkill(8); } if (n == "Multi-Hand") { skillIndex = 9; return this.GetSkill(9); } if (n == "Bow") { skillIndex = 10; return this.GetSkill(10); } if (n == "Sling") { skillIndex = 11; return this.GetSkill(11); } if (n == "Elixir") { skillIndex = 12; return this.GetSkill(12); } if (n == "Hand-to-Hand") { skillIndex = 13; return this.GetSkill(13); } if (n == "LargeShield") { skillIndex = 14; return this.GetSkill(14); } if (n == "SmallShield") { skillIndex = 15; return this.GetSkill(15); } if (n == "Bindings") { skillIndex = 16; return this.GetSkill(16); } if (n == "Fauna") { skillIndex = 17; return this.GetSkill(17); } if (n == "Vines") { skillIndex = 18; return this.GetSkill(18); } if (n == "Spores") { skillIndex = 19; return this.GetSkill(19); } if (n == "Lockpick") { skillIndex = 20; return this.GetSkill(20); } if (n == "Sneaking") { skillIndex = 21; return this.GetSkill(21); } if (n == "Bartering") { skillIndex = 22; return this.GetSkill(22); } if (n == "Fish") { skillIndex = 23; return this.GetSkill(23); } if (n == "Forest") { skillIndex = 24; return this.GetSkill(24); } if (n == "Shroom") { skillIndex = 25; return this.GetSkill(25); } if (n == "Flute") { skillIndex = 26; return this.GetSkill(26); } if (n == "Horn") { skillIndex = 27; return this.GetSkill(27); } if (n == "Drum") { skillIndex = 28; return this.GetSkill(28); } if (n == "Pipe") { skillIndex = 29; return this.GetSkill(29); } if (n == "Melee") { skillIndex = 30; return this.GetSkill(30); } if (n == "Range") { skillIndex = 31; return this.GetSkill(31); } if (n == "Defense") { skillIndex = 32; return this.GetSkill(32); } if (n == "Whip") { skillIndex = 35; return this.GetSkill(35); } return 0f; } // Token: 0x06000ABE RID: 2750 RVA: 0x000D5BA0 File Offset: 0x000D3DA0 public string GetMajorsMinors(int index) { if (index == 0) { return this.majorStat1; } if (index == 1) { return this.majorStat2; } if (index == 2) { return this.minorStat3; } if (index == 3) { return this.majorSkill1; } if (index == 4) { return this.majorSkill2; } if (index == 5) { return this.minorSkill3; } return ""; } // Token: 0x06000ABF RID: 2751 RVA: 0x000D5BF3 File Offset: 0x000D3DF3 public bool GetChangeArchetype() { return this.changedArchetype; } // Token: 0x06000AC0 RID: 2752 RVA: 0x000D5BFC File Offset: 0x000D3DFC public bool IsGoodWeaponMatch(Character c, global::Item item) { string mainSkill = item.invRow._MainSkill; int combatSkillID = this.GetCombatSkillID(mainSkill); return c.stats.GetSkill(combatSkillID) > 100f; } // Token: 0x06000AC1 RID: 2753 RVA: 0x000D5C34 File Offset: 0x000D3E34 public bool IsGoodArmorMatch(Character c, global::Item item) { string mainSkill = item.invRow._MainSkill; int armorSkillID = this.GetArmorSkillID(mainSkill); return c.stats.GetSkill(armorSkillID) > 50f; } // Token: 0x06000AC2 RID: 2754 RVA: 0x000D5C6C File Offset: 0x000D3E6C public bool IsGoodShieldMatch(Character c, global::Item item) { string mainSkill = item.invRow._MainSkill; int combatSkillID = this.GetCombatSkillID(mainSkill); return c.stats.GetSkill(combatSkillID) > 50f; } // Token: 0x06000AC3 RID: 2755 RVA: 0x000D5CA4 File Offset: 0x000D3EA4 public bool IsGoodAmmoMatch(Character c, global::Item item) { for (int i = 0; i < 2; i++) { Library.Inventory inventory = null; if (i == 0) { Links.x.library.GetInvRowByIndex(c.GetInvNum(0)); } else { Links.x.library.GetInvRowByIndex(c.GetInvNum(32)); } if (inventory._Ammo1 != "") { if (inventory._MainSkill == "Bow" && item.invRow._Ammo1 == "Bow") { if (item.ID >= Links.x.library.arrowsMin && item.ID <= Links.x.library.arrowsMax) { return true; } } else if (inventory._MainSkill == "Sling" && item.invRow._Ammo1 == "Dart") { if (item.ID >= Links.x.library.dartsMin && item.ID <= Links.x.library.dartsMax) { return true; } } else if (inventory._MainSkill.Contains("Elixir") || item.invRow._MainSkill.Contains("Elixir")) { if (item.ID >= Links.x.library.vialsMin && item.ID <= Links.x.library.vialsMax) { return true; } } else if (inventory._Name == item.invRow._Ammo1) { return true; } } } return false; } // Token: 0x06000AC4 RID: 2756 RVA: 0x000D5E40 File Offset: 0x000D4040 public string GetBestSkill(string type, out float highestSkill) { float num = 0f; string text = ""; string text2 = ""; highestSkill = 0f; for (int i = 0; i < 10; i++) { int num2 = 0; if (i == 0) { num2 = 35; text2 = "whips"; } if (i == 1) { num2 = 8; text2 = "polearms"; } if (i == 2) { num2 = 6; text2 = "scepters"; } if (i == 3) { num2 = 5; text2 = "swords"; } if (i == 4) { num2 = 4; text2 = "short swords"; } if (i == 5) { num2 = 11; text2 = "slings"; } if (i == 6) { num2 = 7; text2 = "axes"; } if (i == 7) { num2 = 10; text2 = "bows"; } if (i == 8) { num2 = 12; text2 = "elixir throwing"; } if (i == 9) { num2 = 13; text2 = "hand-to-hand fighting"; } float skill = this.GetSkill(num2); if (skill > num) { num = skill; text = text2; } } highestSkill = num; return text; } // Token: 0x06000AC5 RID: 2757 RVA: 0x000D5F1C File Offset: 0x000D411C public int MatchBestSkillToDialogueName(string n) { if (n == "whips") { return 35; } if (n == "polearms") { return 8; } if (n == "scepters") { return 6; } if (n == "swords") { return 5; } if (n == "short swords") { return 4; } if (n == "slins") { return 11; } if (n == "axes") { return 7; } if (n == "bows") { return 10; } if (n == "elixir throwing") { return 12; } if (n == "hand-to-hand fighting") { return 13; } if (n == "slings") { return 11; } return -1; } // Token: 0x06000AC6 RID: 2758 RVA: 0x000D5FD8 File Offset: 0x000D41D8 public float HighestMusicSkill() { float skill = this.GetSkill(26); float skill2 = this.GetSkill(27); float skill3 = this.GetSkill(29); if (skill > skill2 && skill > skill3) { return skill; } if (skill2 > skill && skill2 > skill3) { return skill2; } if (skill3 > skill && skill3 > skill2) { return skill3; } return skill; } // Token: 0x04000E65 RID: 3685 [Header("INFO")] public Character character; // Token: 0x04000E66 RID: 3686 public Library.Characters characterRow; // Token: 0x04000E67 RID: 3687 public string xmlName; // Token: 0x04000E68 RID: 3688 public string displayName; // Token: 0x04000E69 RID: 3689 public string creaturesName; // Token: 0x04000E6A RID: 3690 public string dialogueFile; // Token: 0x04000E6B RID: 3691 public string model; // Token: 0x04000E6C RID: 3692 public string headModel; // Token: 0x04000E6D RID: 3693 public string originalMap; // Token: 0x04000E6E RID: 3694 public string state; // Token: 0x04000E6F RID: 3695 public int initiateDialogue; // Token: 0x04000E70 RID: 3696 public int partyID; // Token: 0x04000E71 RID: 3697 public int voiceID; // Token: 0x04000E72 RID: 3698 public bool dead; // Token: 0x04000E73 RID: 3699 public bool stunned; // Token: 0x04000E74 RID: 3700 public float leaveTime; // Token: 0x04000E75 RID: 3701 public float lastVersionForThisScene; // Token: 0x04000E76 RID: 3702 [Header("EFFECTS")] public string savedEffects = ""; // Token: 0x04000E77 RID: 3703 private List effectsNamesFromSave = new List(); // Token: 0x04000E78 RID: 3704 public List effects = new List(); // Token: 0x04000E79 RID: 3705 private List effectsTimesFromSave = new List(); // Token: 0x04000E7A RID: 3706 private List effectsVar2FromSave = new List(); // Token: 0x04000E7B RID: 3707 private List temp = new List(); // Token: 0x04000E7C RID: 3708 [Header("ABILITIES and SPELLS")] public List abilityNames = new List(); // Token: 0x04000E7D RID: 3709 public List abilityReady = new List(); // Token: 0x04000E7E RID: 3710 public List abilityTriggers = new List(); // Token: 0x04000E7F RID: 3711 public List abilityTriggerCount = new List(); // Token: 0x04000E80 RID: 3712 public List abilityCost = new List(); // Token: 0x04000E81 RID: 3713 public List abilityRows = new List(); // Token: 0x04000E82 RID: 3714 public List abilityEquipped = new List(); // Token: 0x04000E83 RID: 3715 public List abilityLevels = new List(); // Token: 0x04000E84 RID: 3716 public List knowledge = new List(); // Token: 0x04000E85 RID: 3717 public List uniqueNames = new List(); // Token: 0x04000E86 RID: 3718 public List skillsProgress = new List(); // Token: 0x04000E87 RID: 3719 public List skills = new List(); // Token: 0x04000E88 RID: 3720 public List spellDifficulties = new List(); // Token: 0x04000E89 RID: 3721 public string equippedAbilities = ""; // Token: 0x04000E8A RID: 3722 private string equippedCounts = ""; // Token: 0x04000E8B RID: 3723 public string[] equippedWordList = new string[3]; // Token: 0x04000E8C RID: 3724 public List equippedSongList = new List(); // Token: 0x04000E8D RID: 3725 public List favoriteSpells = new List(); // Token: 0x04000E8E RID: 3726 public float synergyAttackCount; // Token: 0x04000E8F RID: 3727 public bool flying; // Token: 0x04000E90 RID: 3728 public bool canCastSpells; // Token: 0x04000E91 RID: 3729 private List abilityLevelsTemp; // Token: 0x04000E92 RID: 3730 private List spellNamesTemp; // Token: 0x04000E93 RID: 3731 private List abilityCostTemp; // Token: 0x04000E94 RID: 3732 private List abilities; // Token: 0x04000E95 RID: 3733 private StringFast str = new StringFast(64); // Token: 0x04000E96 RID: 3734 private StringFast str2 = new StringFast(64); // Token: 0x04000E97 RID: 3735 [Header("STATS")] public float moveSpeed = 0.5f; // Token: 0x04000E98 RID: 3736 public float moveSpeedMod; // Token: 0x04000E99 RID: 3737 public float sex; // Token: 0x04000E9A RID: 3738 public float skin; // Token: 0x04000E9B RID: 3739 public float hair; // Token: 0x04000E9C RID: 3740 public float hairColor; // Token: 0x04000E9D RID: 3741 public string skinTexture; // Token: 0x04000E9E RID: 3742 public string hairTexture; // Token: 0x04000E9F RID: 3743 public string archetype; // Token: 0x04000EA0 RID: 3744 public string majorStat1; // Token: 0x04000EA1 RID: 3745 public string majorStat2; // Token: 0x04000EA2 RID: 3746 public string minorStat3; // Token: 0x04000EA3 RID: 3747 public string majorSkill1; // Token: 0x04000EA4 RID: 3748 public string majorSkill2; // Token: 0x04000EA5 RID: 3749 public string minorSkill3; // Token: 0x04000EA6 RID: 3750 public int topStartingSkill1; // Token: 0x04000EA7 RID: 3751 public int topStartingSkill2; // Token: 0x04000EA8 RID: 3752 public int topStartingSkill3; // Token: 0x04000EA9 RID: 3753 private bool changedArchetype; // Token: 0x04000EAA RID: 3754 public float sightRadiusBase; // Token: 0x04000EAB RID: 3755 public float hearingRadiusBase; // Token: 0x04000EAC RID: 3756 public float naturalArmorBase; // Token: 0x04000EAD RID: 3757 public int lifeBase; // Token: 0x04000EAE RID: 3758 public int magicPointsBase; // Token: 0x04000EAF RID: 3759 public int weightBase; // Token: 0x04000EB0 RID: 3760 public int maxHealthAdd; // Token: 0x04000EB1 RID: 3761 public int currLife; // Token: 0x04000EB2 RID: 3762 public int magicPoints; // Token: 0x04000EB3 RID: 3763 public float rallyBase; // Token: 0x04000EB4 RID: 3764 public bool animal; // Token: 0x04000EB5 RID: 3765 public bool protagonist; // Token: 0x04000EB6 RID: 3766 public bool canJump; // Token: 0x04000EB7 RID: 3767 public int soundID; // Token: 0x04000EB8 RID: 3768 public string race; // Token: 0x04000EB9 RID: 3769 public string raceTrait; // Token: 0x04000EBA RID: 3770 public bool canTalk; // Token: 0x04000EBB RID: 3771 public bool hasEnemies; // Token: 0x04000EBC RID: 3772 public int nextXP; // Token: 0x04000EBD RID: 3773 public int XP; // Token: 0x04000EBE RID: 3774 private List enemies; // Token: 0x04000EBF RID: 3775 private uint enemy1; // Token: 0x04000EC0 RID: 3776 private uint enemy2; // Token: 0x04000EC1 RID: 3777 private uint enemy3; // Token: 0x04000EC2 RID: 3778 private uint enemy4; // Token: 0x04000EC3 RID: 3779 private uint enemy5; // Token: 0x04000EC4 RID: 3780 private uint enemy6; // Token: 0x04000EC5 RID: 3781 private uint enemy7; // Token: 0x04000EC6 RID: 3782 private uint enemy8; // Token: 0x04000EC7 RID: 3783 private uint enemy9; // Token: 0x04000EC8 RID: 3784 public uint allegiance; // Token: 0x04000EC9 RID: 3785 public int level = 1; // Token: 0x04000ECA RID: 3786 public float strength; // Token: 0x04000ECB RID: 3787 public float strengthModFlat; // Token: 0x04000ECC RID: 3788 public float agility; // Token: 0x04000ECD RID: 3789 public float agilityModFlat; // Token: 0x04000ECE RID: 3790 public float dexterity; // Token: 0x04000ECF RID: 3791 public float dexterityModFlat; // Token: 0x04000ED0 RID: 3792 public float aura; // Token: 0x04000ED1 RID: 3793 public float auraModFlat; // Token: 0x04000ED2 RID: 3794 public float pagan; // Token: 0x04000ED3 RID: 3795 public float paganModFlat; // Token: 0x04000ED4 RID: 3796 public float sensory; // Token: 0x04000ED5 RID: 3797 public float sensoryModFlat; // Token: 0x04000ED6 RID: 3798 public float severityModFlat; // Token: 0x04000ED7 RID: 3799 public float paganSeverityModFlat; // Token: 0x04000ED8 RID: 3800 public float hitModFlat; // Token: 0x04000ED9 RID: 3801 public float paganHitModFlat; // Token: 0x04000EDA RID: 3802 public float evadeModFlat; // Token: 0x04000EDB RID: 3803 public float balance; // Token: 0x04000EDC RID: 3804 public float blockModFlat; // Token: 0x04000EDD RID: 3805 public string levelUps = ""; // Token: 0x04000EDE RID: 3806 public List diceCountMods = new List(); // Token: 0x04000EDF RID: 3807 public List diceSideMods = new List(); // Token: 0x04000EE0 RID: 3808 public List diceTypeMods = new List(); // Token: 0x04000EE1 RID: 3809 public List savedBag = new List(); // Token: 0x04000EE2 RID: 3810 public List savedDur = new List(); // Token: 0x04000EE3 RID: 3811 private List bagToSave = new List(); // Token: 0x04000EE4 RID: 3812 public bool canUseTwoWeapons; // Token: 0x04000EE5 RID: 3813 public bool knowsNames; // Token: 0x04000EE6 RID: 3814 public string savedMerchantList = ""; // Token: 0x04000EE7 RID: 3815 public int savedMerchantTime; // Token: 0x04000EE8 RID: 3816 public string savedMerchantHistory = ""; // Token: 0x04000EE9 RID: 3817 public bool modalWindowsOpen; // Token: 0x04000EEA RID: 3818 public bool hasCustomIdle; // Token: 0x04000EEB RID: 3819 public int currentHand; // Token: 0x04000EEC RID: 3820 public string familyBackground; // Token: 0x04000EED RID: 3821 private int[] familyBackgrounds = new int[31]; // Token: 0x04000EEE RID: 3822 private IEnumerator levelUpCorout; // Token: 0x04000EEF RID: 3823 public int killCount; // Token: 0x04000EF0 RID: 3824 public int attackCount; // Token: 0x04000EF1 RID: 3825 public int hitCount; // Token: 0x04000EF2 RID: 3826 public int songPoints; // Token: 0x04000EF3 RID: 3827 public bool semizenMagic; // Token: 0x04000EF4 RID: 3828 public float lastActionModifier; // Token: 0x04000EF5 RID: 3829 public float stamina; // Token: 0x04000EF6 RID: 3830 public float maxStamina; // Token: 0x04000EF7 RID: 3831 public float maxStaminaAdd; // Token: 0x04000EF8 RID: 3832 public float staminaRegenMod; // Token: 0x04000EF9 RID: 3833 public float staminaReductionMultiplier; // Token: 0x04000EFA RID: 3834 public Vector3 savedIntercessionA; // Token: 0x04000EFB RID: 3835 public Vector3 savedIntercessionB; // Token: 0x04000EFC RID: 3836 public int savedIntercesion; // Token: 0x04000EFD RID: 3837 [Header("EFFECTS")] public int stun; // Token: 0x04000EFE RID: 3838 public int confuse; // Token: 0x04000EFF RID: 3839 public int floating; // Token: 0x04000F00 RID: 3840 public int flee; // Token: 0x04000F01 RID: 3841 public int attackAllies; // Token: 0x04000F02 RID: 3842 public int silent; // Token: 0x04000F03 RID: 3843 public int invisible; // Token: 0x04000F04 RID: 3844 public int stuck; // Token: 0x04000F05 RID: 3845 public int charming; // Token: 0x04000F06 RID: 3846 public int artistry; // Token: 0x04000F07 RID: 3847 public int nimbleFingers; // Token: 0x04000F08 RID: 3848 public int stagger; // Token: 0x04000F09 RID: 3849 public int onlyLightAtks; // Token: 0x04000F0A RID: 3850 public float actionTimeMod; // Token: 0x04000F0B RID: 3851 public float rallySpeed; // Token: 0x04000F0C RID: 3852 public float spiritAbsorption; // Token: 0x04000F0D RID: 3853 public float allSkillAdd; // Token: 0x04000F0E RID: 3854 public float deaf; // Token: 0x04000F0F RID: 3855 public float blind; // Token: 0x04000F10 RID: 3856 public float armorReduction; // Token: 0x04000F11 RID: 3857 public float eqArmorReduction; // Token: 0x04000F12 RID: 3858 public float reduceStun; // Token: 0x04000F13 RID: 3859 public float musicResistMod; // Token: 0x04000F14 RID: 3860 public Vector3 paganResist; // Token: 0x04000F15 RID: 3861 public bool pinned; // Token: 0x04000F16 RID: 3862 public bool pinning; // Token: 0x04000F17 RID: 3863 public int pinHitCount; // Token: 0x04000F18 RID: 3864 private ES3File saveFile; // Token: 0x04000F19 RID: 3865 private List savedStatsBag = new List(); // Token: 0x04000F1A RID: 3866 private List savedStatsBagPositions = new List(); // Token: 0x04000F1B RID: 3867 private List savedStatsSockets = new List(); // Token: 0x04000F1C RID: 3868 private List savedStatsDurability = new List(); // Token: 0x04000F1D RID: 3869 private List bagStacksToSave = new List(); // Token: 0x04000F1E RID: 3870 private List bag; // Token: 0x04000F1F RID: 3871 private List bagPositions; // Token: 0x04000F20 RID: 3872 private List durability; // Token: 0x04000F21 RID: 3873 private List sockets; // Token: 0x04000F22 RID: 3874 public List words = new List(); // Token: 0x04000F23 RID: 3875 private int wordCount; // Token: 0x04000F24 RID: 3876 public bool hasWordsOfPower; // Token: 0x04000F25 RID: 3877 public bool hasSpells; // Token: 0x04000F26 RID: 3878 private float lastGhostRoll; // Token: 0x04000F27 RID: 3879 public bool hasCircleAnims; // Token: 0x04000F28 RID: 3880 [Header("COMPANION AI")] public int magicTactics; // Token: 0x04000F29 RID: 3881 public bool kiteInCombat; // Token: 0x04000F2A RID: 3882 public bool defendMainInCombat; // Token: 0x04000F2B RID: 3883 public bool stayNearPatrol; // Token: 0x04000F2C RID: 3884 public Character defendingCharacter; // Token: 0x04000F2D RID: 3885 public GraphNode stayNearPoint; // Token: 0x04000F2E RID: 3886 public bool useUtilityAbilities; // Token: 0x04000F2F RID: 3887 public bool hasBuffItem; // Token: 0x04000F30 RID: 3888 public bool hasDefenseAbilities; // Token: 0x04000F31 RID: 3889 public bool hasHealingSongs; // Token: 0x04000F32 RID: 3890 public bool hasUndeadAbilities; // Token: 0x04000F33 RID: 3891 public bool hasBuffAbilities; // Token: 0x04000F34 RID: 3892 public bool hasUtilityAbilities; // Token: 0x04000F35 RID: 3893 public bool canCharm; // Token: 0x04000F36 RID: 3894 public bool merchant; // Token: 0x04000F37 RID: 3895 public int companionAI; // Token: 0x04000F38 RID: 3896 public int formationGroup = 5; // Token: 0x04000F39 RID: 3897 public bool isGuard; // Token: 0x04000F3A RID: 3898 public bool isHouseGuard; // Token: 0x04000F3B RID: 3899 public bool isLazureGuard; // Token: 0x04000F3C RID: 3900 public int useItemsAI; // Token: 0x04000F3D RID: 3901 public int autoBuffsAI; // Token: 0x04000F3E RID: 3902 public int autoCritsAI; // Token: 0x04000F3F RID: 3903 public bool isLeader; // Token: 0x04000F40 RID: 3904 public bool autoCastAI; // Token: 0x04000F41 RID: 3905 public float synergy1 = 10f; // Token: 0x04000F42 RID: 3906 public float synergy2 = 20f; // Token: 0x04000F43 RID: 3907 public bool isFishMonster; // Token: 0x04000F44 RID: 3908 public bool hasHitAI; // Token: 0x04000F45 RID: 3909 public bool hasNonCombatAI; // Token: 0x04000F46 RID: 3910 public bool hasCustomAI; // Token: 0x04000F47 RID: 3911 public bool hasEveryAttackAI; // Token: 0x04000F48 RID: 3912 public bool canJumpEvade; // Token: 0x04000F49 RID: 3913 public bool leaveBehindTiles; // Token: 0x04000F4A RID: 3914 public bool canCharge; // Token: 0x04000F4B RID: 3915 public bool canPin; // Token: 0x04000F4C RID: 3916 public bool canAggressionGroup; // Token: 0x04000F4D RID: 3917 public bool canSecretGroup; // Token: 0x04000F4E RID: 3918 public bool canRecoverGroup; // Token: 0x04000F4F RID: 3919 public bool needsDefending; // Token: 0x04000F50 RID: 3920 public string customAI; // Token: 0x04000F51 RID: 3921 public string everyAttackAI; // Token: 0x04000F52 RID: 3922 public string nonCombatAI; // Token: 0x04000F53 RID: 3923 public bool boro; // Token: 0x04000F54 RID: 3924 private float summonSpeed; }