public void RerollAsOrc() { associatedAdventurer.Reroll(associatedAdventurer.advClass, AdventurerSpecies.Orc, associatedAdventurer.isElite, Adventurer.GetRandomStatPoint()); shell.Close(); }
public void RegenerateDataStore() { dataStore = new GameDataManager_DataStore(); RecalculateResourceMaximums(); DetermineNextPromoteUnlock(); for (int i = 0; i < dataStore.housingLevel; i++) { dataStore.houseAdventurers[i].Reroll(AdventurerClass.Warrior, AdventurerSpecies.Human, dataStore.housingUnitUpgrades[i], Adventurer.GetRandomStatPoint()); } dataStore.sovereignMugshot = (AdventurerMugshot)Random.Range((int)AdventurerMugshot.Sovereign0, (int)AdventurerMugshot.Sovereign7 + 1); dataStore.sovereignAdventurer.Reroll(AdventurerClass.Sovereign, AdventurerSpecies.Human, false, new int[] { 0, 0, 0, 0 }); saveExisted = false; }
public void RerollAsHuman() // yes there have to be three of these - ugly af but Unity can't invoke functions with args from UI buttons { associatedAdventurer.Reroll(associatedAdventurer.advClass, AdventurerSpecies.Human, associatedAdventurer.isElite, Adventurer.GetRandomStatPoint()); shell.Close(); }
void Update() { DebugBlob(); if (Time.time - lastSecondTimestamp >= 1.0f) { lastSecondTimestamp = Time.time; UpdateProcessing_ResourceGain(); if (HasFlag(ProgressionFlags.TaskmasterUnlock)) { UpdateProcessing_ResourceGain(); // output doubled in the quickest, laziest way possible } HandlePendingUpgrade(ref dataStore.pendingUpgradeTimer_Docks, ref dataStore.buildingLv_Docks, ref dataStore.pendingUpgrade_Docks, ref dataStore.pendingUpgradeTimer_Docks); // this is a hack HandlePendingUpgrade(ref dataStore.pendingUpgradeTimer_Mason, ref dataStore.buildingLv_Mason, ref dataStore.pendingUpgrade_Mason, ref dataStore.resBricks_maxUpgrades); HandlePendingUpgrade(ref dataStore.pendingUpgradeTimer_Sawmill, ref dataStore.buildingLv_Sawmill, ref dataStore.pendingUpgrade_Sawmill, ref dataStore.resPlanks_maxUpgrades); HandlePendingUpgrade(ref dataStore.pendingUpgradeTimer_Smith, ref dataStore.buildingLv_Smith, ref dataStore.pendingUpgrade_Smith, ref dataStore.resMetal_maxUpgrades); } for (int i = 0; i < dataStore.housingLevel; i++) { if (!dataStore.houseAdventurers[i].initialized) { dataStore.houseAdventurers[i].Reroll(AdventurerClass.Warrior, AdventurerSpecies.Human, dataStore.housingUnitUpgrades[i], Adventurer.GetRandomStatPoint()); } else if (dataStore.houseAdventurers[i].isDeceased) { dataStore.houseAdventurers[i].ReplaceDead(); } } if (dataStore.adventureLevel > 1 && (!HasFlag(ProgressionFlags.FaeUnlock) || !HasFlag(ProgressionFlags.OrcUnlock))) { SetFlag(ProgressionFlags.FaeUnlock); SetFlag(ProgressionFlags.OrcUnlock); } if (dataStore.adventureLevel > 2 && !HasFlag(ProgressionFlags.TowerUnlock)) { SetFlag(ProgressionFlags.TowerUnlock); } if (dataStore.sovWpn_Set == null) { dataStore.sovWpn_Knives = new SovereignWpn(0, WpnType.Knives); dataStore.sovWpn_Mace = new SovereignWpn(0, WpnType.Mace); dataStore.sovWpn_Staff = new SovereignWpn(0, WpnType.Staff); dataStore.sovereignEquippedWeaponType = WpnType.Mace; dataStore.sovereignAdventurer.PushWpnToSovereign(); } }