// Token: 0x0600373E RID: 14142 RVA: 0x0002B41A File Offset: 0x0002961A public static void getEvent(int ID) { RandomizerBonus.CollectPickup(); if (Randomizer.ColorShift) { Randomizer.changeColor(); } RandomizerSwitch.GivePickup((RandomizerAction)Randomizer.Table[ID * 4], ID * 4, true); }
public static void ExpOrbPickup(int Value) { PickupMessage(Value.ToString() + " experience"); if (Randomizer.ZeroXP) { return; } Characters.Sein.Level.GainExperience(RandomizerBonus.ExpWithBonuses(Value, true)); }
// Token: 0x0600107D RID: 4221 public void UpdateDashing() { PlatformMovement platformMovement = this.m_sein.PlatformBehaviour.PlatformMovement; UI.Cameras.Current.ChaseTarget.CameraSpeedMultiplier.x = Mathf.Clamp01(this.m_stateCurrentTime / this.DashTime); float velocity = this.DashSpeedOverTime.Evaluate(this.m_stateCurrentTime); velocity *= 1.0f + .2f * RandomizerBonus.Velocity(); if ((RandomizerBonus.GravitySuit() && Characters.Sein.Abilities.Swimming.IsSwimming)) { Vector2 newSpeed = new Vector2(velocity, 0f); platformMovement.LocalSpeed = newSpeed.Rotate(this.m_sein.Abilities.Swimming.SwimAngle); } else { platformMovement.LocalSpeedX = (float)((!this.m_faceLeft) ? 1 : -1) * velocity; } this.m_sein.FaceLeft = this.m_faceLeft; if (this.AgainstWall()) { platformMovement.LocalSpeed = Vector2.zero; } this.SpriteRotation = Mathf.Lerp(this.SpriteRotation, this.m_sein.PlatformBehaviour.PlatformMovement.GroundAngle, 0.2f); if (this.m_sein.IsOnGround) { if (Core.Input.Horizontal > 0f && this.m_faceLeft) { this.StopDashing(); } if (Core.Input.Horizontal < 0f && !this.m_faceLeft) { this.StopDashing(); } } if (this.m_stateCurrentTime > this.DashTime) { if (platformMovement.IsOnGround && Core.Input.Horizontal == 0f) { platformMovement.LocalSpeedX = 0f; } this.ChangeState(SeinDashAttack.State.Normal); } if (Core.Input.Jump.OnPressed || Core.Input.Glide.OnPressed) { platformMovement.LocalSpeedX = ((!this.m_faceLeft) ? this.OffGroundSpeed : (-this.OffGroundSpeed)); this.m_sein.PlatformBehaviour.AirNoDeceleration.NoDeceleration = this.m_allowNoDecelerationForThisDash; this.m_stopAnimation = true; this.ChangeState(SeinDashAttack.State.Normal); this.m_timeWhenDashJumpHappened = Time.time; } if (this.RaycastTest() && this.m_isOnGround) { this.StickOntoGround(); return; } this.m_isOnGround = false; }
// Token: 0x0600107F RID: 4223 public void UpdateChargeDashing() { PlatformMovement platformMovement = this.m_sein.PlatformBehaviour.PlatformMovement; this.AttackNearbyEnemies(); this.m_sein.Mortality.DamageReciever.MakeInvincibleToEnemies(1f); float velocity = this.ChargeDashSpeedOverTime.Evaluate(this.m_stateCurrentTime); velocity *= 1.0f + .2f * RandomizerBonus.Velocity(); if (this.m_chargeDashAtTarget) { platformMovement.LocalSpeed = this.m_chargeDashDirection * velocity; } else { platformMovement.LocalSpeedX = (float)((!this.m_faceLeft) ? 1 : -1) * velocity; } if (this.m_hasHitAttackable) { platformMovement.LocalSpeed *= 0.33f; } this.m_sein.FaceLeft = this.m_faceLeft; this.SpriteRotation = Mathf.Lerp(this.SpriteRotation, this.m_sein.PlatformBehaviour.PlatformMovement.GroundAngle, 0.3f); if (this.AgainstWall()) { platformMovement.LocalSpeed = Vector2.zero; } if (this.m_sein.IsOnGround) { if (Core.Input.Horizontal > 0f && this.m_faceLeft) { this.StopDashing(); } if (Core.Input.Horizontal < 0f && !this.m_faceLeft) { this.StopDashing(); } } if (this.m_stateCurrentTime > this.ChargeDashTime) { this.ChangeState(SeinDashAttack.State.Normal); } if (Core.Input.Jump.OnPressed || Core.Input.Glide.OnPressed) { platformMovement.LocalSpeedX = ((!this.m_faceLeft) ? this.OffGroundSpeed : (-this.OffGroundSpeed)); this.m_sein.PlatformBehaviour.AirNoDeceleration.NoDeceleration = true; this.m_stopAnimation = true; this.ChangeState(SeinDashAttack.State.Normal); } if (this.RaycastTest() && this.m_isOnGround && !this.m_chargeDashAtTarget) { this.StickOntoGround(); return; } this.m_isOnGround = false; }
// Token: 0x0600051A RID: 1306 public void OnMenuItemPressed() { if (this.CurrentSkillItem == null) { return; } if (this.CurrentSkillItem.HasSkillItem) { if (this.OnAlreadyEarnedAbility) { this.RequirementsLineAShake.Restart(); this.OnAlreadyEarnedAbility.Perform(null); } return; } if (this.CurrentSkillItem.CanEarnSkill) { this.CurrentSkillItem.HasSkillItem = true; Characters.Sein.PlayerAbilities.SetAbility(this.CurrentSkillItem.Ability, true); Characters.Sein.PlayerAbilities.GainAbilityAction = this.CurrentSkillItem.GainSkillSequence; InstantiateUtility.Instantiate(this.GainSkillEffect, this.CurrentSkillItem.transform.position, Quaternion.identity); RandomizerBonus.SpentAP(this.CurrentSkillItem.ActualRequiredSkillPoints); BingoController.OnGainAbility(this.CurrentSkillItem.Ability); Characters.Sein.Level.SkillPoints -= this.CurrentSkillItem.ActualRequiredSkillPoints; if (this.OnGainAbility) { this.OnGainAbility.Perform(null); } SeinLevel.HasSpentSkillPoint = true; AchievementsController.AwardAchievement(this.SpentFirstSkillPointAchievement); GameController.Instance.CreateCheckpoint(); RandomizerStatsManager.OnSave(false); GameController.Instance.SaveGameController.PerformSave(); this.UpdateRequirementsText(); return; } if (!this.CurrentSkillItem.SoulRequirementMet) { if (this.CurrentSkillItem.RequiresAbilitiesOrItems) { this.RequirementsLineAShake.Restart(); } else { this.RequirementsLineAShake.Restart(); } } if (!this.CurrentSkillItem.AbilitiesRequirementMet) { this.RequirementsLineAShake.Restart(); } if (this.OnCantEarnSkill) { this.OnCantEarnSkill.Perform(null); } }
// Token: 0x06003746 RID: 14150 RVA: 0x000E08C4 File Offset: 0x000DEAC4 public static void getMapStone() { if (!Randomizer.ProgressiveMapStones) { Randomizer.getPickup(); return; } Characters.Sein.Inventory.SkillPointsCollected += 8388608; RandomizerSwitch.GivePickup((RandomizerAction)Randomizer.Table[20 + RandomizerBonus.MapStoneProgression() * 4]); }
public static void GivePickup(RandomizerAction Action, int coords, bool found_locally = true) { if (found_locally && Randomizer.Sync) { RandomizerSyncManager.FoundPickup(Action, coords); } switch (Action.Action) { case "AC": SkillPointPickup(); break; case "EC": MaxEnergyContainerPickup(); break; case "EX": ExpOrbPickup((int)Action.Value); break; case "KS": KeystonePickup(); break; case "HC": MaxHealthContainerPickup(); break; case "MS": MapStonePickup(); break; case "SK": AbilityPickup((int)Action.Value); break; case "EV": EventPickup((int)Action.Value); break; case "RB": RandomizerBonus.UpgradeID((int)Action.Value); break; case "TP": TeleportPickup((string)Action.Value); break; case "NO": Randomizer.showHint("Nothing"); return; } }
// Token: 0x06003784 RID: 14212 RVA: 0x000E314C File Offset: 0x000E134C public static void DamageDealt(float damage) { if (Characters.Sein) { if (damage > 20f) { damage = 20f; } Characters.Sein.Mortality.Health.GainHealth((float)RandomizerBonus.Lifesteal() * 0.8f * damage); Characters.Sein.Energy.Gain((float)RandomizerBonus.Manavamp() * 0.2f * damage); } }
// Token: 0x06000CD9 RID: 3289 public Damage(float amount, Vector2 force, Vector3 position, DamageType type, GameObject sender) { this.m_amount = amount; this.m_force = force; this.m_position = position; this.m_type = type; this.m_sender = sender; if (type == DamageType.SpiritFlame) { this.m_amount += (float)RandomizerBonus.SpiritFlameLevel(); } }
// Token: 0x060037BE RID: 14270 RVA: 0x000E472C File Offset: 0x000E292C public static string GetClues() { string text = ""; string text2 = ""; string text3 = ""; string[] array = new string[] { "????", "????", "????" }; if (Keys.GinsoTree) { array[0] = RandomizerClues.Clues[RandomizerClues.RevealOrder[0] - 1]; text = "*"; } if (Keys.ForlornRuins) { array[1] = RandomizerClues.Clues[RandomizerClues.RevealOrder[1] - 1]; text2 = "#"; } if (Keys.MountHoru) { array[2] = RandomizerClues.Clues[RandomizerClues.RevealOrder[2] - 1]; text3 = "@"; } for (int i = 0; i < 3; i++) { if (RandomizerBonus.SkillTreeProgression() >= RandomizerClues.RevealOrder[i] * 3) { array[i] = RandomizerClues.Clues[RandomizerClues.RevealOrder[i] - 1]; } } return(string.Concat(new string[] { text, "WV: ", array[0], text, " ", text2, "GS: ", array[1], text2, " ", text3, "SS: ", array[2], text3 })); }
// Token: 0x060037D1 RID: 14289 public static string GetClues() { string blue = ""; string yellow = ""; string red = ""; string[] revealedClues = new string[] { "????", "????", "????" }; if (Keys.GinsoTree) { revealedClues[0] = RandomizerClues.Clues[RandomizerClues.RevealOrder[0] - 1]; blue = "*"; } if (Keys.ForlornRuins) { revealedClues[1] = RandomizerClues.Clues[RandomizerClues.RevealOrder[1] - 1]; yellow = "#"; } if (Keys.MountHoru) { revealedClues[2] = RandomizerClues.Clues[RandomizerClues.RevealOrder[2] - 1]; red = "@"; } for (int i = 0; i < 3; i++) { if (RandomizerBonus.SkillTreeProgression() >= RandomizerClues.RevealOrder[i] * 3) { revealedClues[i] = RandomizerClues.Clues[RandomizerClues.RevealOrder[i] - 1]; } } return(string.Concat(new string[] { blue, "Water Vein: ", revealedClues[0], blue, "\n", yellow, "Gumon Seal: ", revealedClues[1], yellow, " ", red, "Sunstone: ", revealedClues[2], red })); }
// Token: 0x06001069 RID: 4201 private void PerformDash(TextureAnimationWithTransitions dashAnimation, SoundProvider dashSound) { this.m_sein.Mortality.DamageReciever.ResetInviciblity(); this.m_hasDashed = true; if (RandomizerBonus.DoubleAirDash() && !RandomizerBonus.DoubleAirDashUsed) { this.m_hasDashed = false; RandomizerBonus.DoubleAirDashUsed = true; } this.m_isOnGround = this.m_sein.IsOnGround; this.m_lastDashTime = Time.time; this.m_lastPressTime = 0f; this.SpriteRotation = this.m_sein.PlatformBehaviour.PlatformMovement.GroundAngle; this.m_allowNoDecelerationForThisDash = true; if (this.m_chargeDashAtTarget) { this.m_faceLeft = (this.m_chargeDashDirection.x < 0f); } else if (this.m_sein.PlatformBehaviour.PlatformMovement.HasWallLeft) { this.m_faceLeft = false; } else if (this.m_sein.PlatformBehaviour.PlatformMovement.HasWallRight) { this.m_faceLeft = true; } else if (this.m_sein.Input.NormalizedHorizontal != 0) { this.m_faceLeft = (this.m_sein.Input.NormalizedHorizontal < 0); } else if (!Mathf.Approximately(this.m_sein.Speed.x, 0f)) { this.m_faceLeft = (this.m_sein.Speed.x < 0f); } else { this.m_faceLeft = this.m_sein.FaceLeft; this.m_allowNoDecelerationForThisDash = false; } this.m_sein.FaceLeft = this.m_faceLeft; this.m_stopAnimation = false; if (dashSound) { Sound.Play(dashSound.GetSound(null), this.m_sein.Position, null); } this.m_sein.Animation.Play(dashAnimation, 154, new Func <bool>(this.KeepDashAnimationPlaying)); if (SeinDashAttack.RainbowDashActivated) { ((GameObject)InstantiateUtility.Instantiate(this.DashFollowRainbowEffect, this.m_sein.Position, Quaternion.identity)).transform.parent = this.m_sein.Transform; } this.m_sein.PlatformBehaviour.PlatformMovement.LocalSpeedY = -this.DashDownwardSpeed; }
// Token: 0x06003783 RID: 14211 RVA: 0x000E3050 File Offset: 0x000E1250 public static void Update() { Characters.Sein.Mortality.Health.GainHealth((float)(RandomizerBonus.HealthRegeneration() + ((!Characters.Sein.PlayerAbilities.HealthMarkers.HasAbility) ? 0 : 2)) * 0.00112f); if (RandomizerBonus.Bleeding() > 0) { Characters.Sein.Mortality.Health.LoseHealth((float)RandomizerBonus.Bleeding() * 0.00112f); } if (RandomizerBonus.Bleeding() > 0 && Characters.Sein.Mortality.Health.Amount <= 0f) { Characters.Sein.Mortality.DamageReciever.OnRecieveDamage(new Damage(1f, default(Vector2), default(Vector3), DamageType.Water, null)); } Characters.Sein.Energy.Gain((float)(RandomizerBonus.EnergyRegeneration() + ((!Characters.Sein.PlayerAbilities.EnergyMarkers.HasAbility) ? 0 : 2)) * 0.00028f); RandomizerBonusSkill.Update(); }
public static void GivePickup(RandomizerAction Action) { switch (Action.Action) { case "AC": SkillPointPickup(); break; case "EC": MaxEnergyContainerPickup(); break; case "EX": ExpOrbPickup((int)Action.Value); break; case "KS": KeystonePickup(); break; case "HC": MaxHealthContainerPickup(); break; case "MS": MapStonePickup(); break; case "SK": AbilityPickup((int)Action.Value); break; case "EV": EventPickup((int)Action.Value); break; case "RB": RandomizerBonus.UpgradeID((int)Action.Value); break; case "TP": TeleportPickup((string)Action.Value); break; case "NO": Randomizer.showHint("Nothing"); return; } }
public static void ExpOrbPickup(int Value) { Randomizer.showHint(Value.ToString() + " experience"); if (Randomizer.ZeroXP) { return; } int num = Value * ((!Characters.Sein.PlayerAbilities.SoulEfficiency.HasAbility) ? 1 : 2); if (RandomizerBonus.ExpEfficiency()) { num *= 2; } Characters.Sein.Level.GainExperience(num); }
public static void getMapStone() { if (!Randomizer.ProgressiveMapStones) { Randomizer.getPickup(); return; } RandomizerBonus.CollectMapstone(); RandomizerStatsManager.FoundMapstone(); if (Randomizer.ColorShift) { Randomizer.changeColor(); } RandomizerSwitch.GivePickup((RandomizerAction)Randomizer.Table[20 + RandomizerBonus.MapStoneProgression() * 4], 20 + RandomizerBonus.MapStoneProgression() * 4, true); }
// Token: 0x06003325 RID: 13093 public void OnCollectExpOrbPickup(ExpOrbPickup expOrbPickup) { int num = RandomizerBonus.ExpWithBonuses(expOrbPickup.Amount, false); if (expOrbPickup.MessageType == ExpOrbPickup.ExpOrbMessageType.None) { expOrbPickup.Collected(); if (Randomizer.IgnoreEnemyExp) { return; } RandomizerBonus.ExpWithBonuses(expOrbPickup.Amount, true); this.Sein.Level.GainExperience(num); if (this.m_expText && this.m_expText.gameObject.activeInHierarchy) { this.m_expText.Amount += num; } else { this.m_expText = Orbs.OrbDisplayText.Create(Characters.Sein.Transform, Vector3.up, num); } UI.SeinUI.ShakeExperienceBar(); if (GameWorld.Instance.CurrentArea != null) { GameWorld.Instance.CurrentArea.DirtyCompletionAmount(); } return; } else { int repeatable = Randomizer.RepeatableCheck(expOrbPickup.Bounds.center); if (repeatable != 1) { Randomizer.getPickup(expOrbPickup.Bounds.center); } if (repeatable > 0) { return; } if (GameWorld.Instance.CurrentArea != null) { GameWorld.Instance.CurrentArea.DirtyCompletionAmount(); } expOrbPickup.Collected(); return; } }
// Token: 0x0600374A RID: 14154 RVA: 0x000E127C File Offset: 0x000DF47C public static void showProgress() { string text = ""; if (RandomizerBonus.SkillTreeProgression() < 10) { text = text + "Trees (" + RandomizerBonus.SkillTreeProgression().ToString() + "/10) "; } else { text += "$Trees (10/10)$ "; } text = text + "Maps (" + RandomizerBonus.MapStoneProgression().ToString() + "/9) "; text = text + "Total (" + RandomizerBonus.GetPickupCount().ToString() + "/248)\n"; if (Randomizer.CluesMode) { text += RandomizerClues.GetClues(); } else { if (Keys.GinsoTree) { text += "*WV (3/3)* "; } else { text = text + " *WV* (" + RandomizerBonus.WaterVeinShards().ToString() + "/3) "; } if (Keys.ForlornRuins) { text += "#GS (3/3)# "; } else { text = text + "#GS# (" + RandomizerBonus.GumonSealShards().ToString() + "/3) "; } if (Keys.MountHoru) { text += "@SS (3/3)@"; } else { text = text + " @SS@ (" + RandomizerBonus.SunstoneShards().ToString() + "/3)"; } } Randomizer.MessageQueue.Enqueue(text); }
// Token: 0x0600384D RID: 14413 public static void UpdateColors() { if (Randomizer.HotCold || Characters.Sein.PlayerAbilities.Sense.HasAbility) { float scale = 64f; float distance = 100f; if (Characters.Ori.InsideMapstone) { int currentMap = 20 + RandomizerBonus.MapStoneProgression() * 4; using (List <int> .Enumerator enumerator = Randomizer.HotColdMaps.GetEnumerator()) { while (enumerator.MoveNext()) { int map = enumerator.Current; if (map > currentMap) { distance = (float)(map - currentMap - 4) * 2f; break; } } } } else { distance = Vector3.Distance(RandomizerColorManager.HotColdTarget, Characters.Sein.Position); } if (distance >= scale) { Characters.Sein.PlatformBehaviour.Visuals.SpriteRenderer.material.color = RandomizerSettings.ColdColor; return; } Characters.Sein.PlatformBehaviour.Visuals.SpriteRenderer.material.color = new Color(RandomizerSettings.HotColor.r + (RandomizerSettings.ColdColor.r - RandomizerSettings.HotColor.r) * (distance / scale), RandomizerSettings.HotColor.g + (RandomizerSettings.ColdColor.g - RandomizerSettings.HotColor.g) * (distance / scale), RandomizerSettings.HotColor.b + (RandomizerSettings.ColdColor.b - RandomizerSettings.HotColor.b) * (distance / scale), RandomizerSettings.HotColor.a + (RandomizerSettings.ColdColor.a - RandomizerSettings.HotColor.a) * (distance / scale)); return; } if (RandomizerColorManager.customRotation) { RandomizerColorManager.colorIndex %= RandomizerColorManager.colors.Count; Characters.Sein.PlatformBehaviour.Visuals.SpriteRenderer.material.color = RandomizerColorManager.colors[RandomizerColorManager.colorIndex++]; return; } if (RandomizerColorManager.customColor) { Characters.Sein.PlatformBehaviour.Visuals.SpriteRenderer.material.color = RandomizerColorManager.colors[0]; } }
public static void TeleportPickup(string Value) { int shardCount = -1; char colorChar = ' '; string shardPart = ""; if (Value == "Ginso") { Characters.Sein.Inventory.SetRandomizerItem(1024, 1); shardCount = RandomizerBonus.WaterVeinShards(); shardPart = "Water Vein"; colorChar = '*'; } if (Value == "Forlorn") { Characters.Sein.Inventory.SetRandomizerItem(1025, 1); shardCount = RandomizerBonus.GumonSealShards(); shardPart = "Gumon Seal"; colorChar = '#'; } if (Value == "Horu") { Characters.Sein.Inventory.SetRandomizerItem(1026, 1); shardCount = RandomizerBonus.SunstoneShards(); shardPart = "Sunstone"; colorChar = '@'; } if (Randomizer.Shards && shardCount >= 0 && shardCount < 2) { if (shardCount == 1) { shardPart = "1 more " + shardPart + " shard to activate"; } else { shardPart = "2 " + shardPart + " shards to activate"; } PickupMessage(colorChar + "Broken " + Value + " teleporter\nCollect " + shardPart + colorChar, 300); return; } TeleporterController.Activate(Randomizer.TeleportTable[Value].ToString(), false); PickupMessage(colorChar + Value + " teleporter activated" + colorChar); }
// Token: 0x06000FA9 RID: 4009 RVA: 0x0005F470 File Offset: 0x0005D670 public void JumpOffTarget(float angle) { if (GameController.Instance) { GameController.Instance.ResumeGameplay(); } Vector2 vector = Quaternion.Euler(0f, 0f, angle) * Vector2.up; Vector2 vector2 = vector * (this.BashVelocity + this.BashVelocity * .10f * RandomizerBonus.Velocity()); this.PlatformMovement.WorldSpeed = vector2; this.AirNoDeceleration.NoDeceleration = true; this.Sein.ResetAirLimits(); this.m_frictionTimeRemaining = this.FrictionDuration; this.ApplyFrictionToSpeed.SpeedToSlowDown = this.PlatformMovement.LocalSpeed; this.MovePlayerToTargetAndCreateEffect(); Component component = this.Target as Component; Vector3 position = (!InstantiateUtility.IsDestroyed(component)) ? component.transform.position : this.Sein.Position; GameObject gameObject = (GameObject)InstantiateUtility.Instantiate(this.BashOffFx); gameObject.transform.position = position; Vector3 localScale = gameObject.transform.localScale; localScale.x = vector2.magnitude * 0.1f; gameObject.transform.localScale = localScale; gameObject.transform.localRotation = Quaternion.Euler(0f, 0f, MoonMath.Angle.AngleFromVector(vector)); if (this.BashReleaseEffect) { ((GameObject)InstantiateUtility.Instantiate(this.BashReleaseEffect)).transform.position = position; } SeinBashAttack.OnBashAttackEvent(vector2); this.m_timeRemainingTillNextBash = this.DelayTillNextBash; CharacterAnimationSystem.CharacterAnimationState characterAnimationState = this.Sein.PlatformBehaviour.Visuals.Animation.Play(this.BashJumpAnimation, 10, new Func <bool>(this.ShouldBashJumpAnimationKeepPlaying)); characterAnimationState.OnStartPlaying = new Action(this.OnAnimationStart); characterAnimationState.OnStopPlaying = new Action(this.OnAnimationEnd); this.Sein.PlatformBehaviour.Visuals.SpriteMirror.FaceLeft = (vector2.x > 0f); if (this.Sein.Abilities.Swimming) { this.Sein.Abilities.Swimming.OnBash(angle); } }
// Token: 0x06003747 RID: 14151 RVA: 0x000E091C File Offset: 0x000DEB1C public static void showProgress() { string text = ""; if (RandomizerBonus.SkillTreeProgression() < 10) { text += "Trees (" + RandomizerBonus.SkillTreeProgression().ToString() + "/10) "; } else { text += "#Trees (10/10)# "; } if (Keys.GinsoTree) { text += " #Water Vein (3/3)#\n"; } else { text += " Water Vein (" + RandomizerBonus.WaterVeinShards().ToString() + "/3)\n"; } if (Keys.ForlornRuins) { text += "#Gumon Seal (3/3)# "; } else { text += "Gumon Seal (" + RandomizerBonus.GumonSealShards().ToString() + "/3) "; } if (Keys.MountHoru) { text += " #Sunstone (3/3)#"; } else { text += " Sunstone (" + RandomizerBonus.SunstoneShards().ToString() + "/3)"; } Randomizer.MessageProvider.SetMessage(text); UI.Hints.Show(Randomizer.MessageProvider, HintLayer.GameSaved, 3f); }
// Token: 0x0600379B RID: 14235 public static void RetryOnFail(object sender, DownloadStringCompletedEventArgs e) { try { if (SendingPickup == null) { Randomizer.log("Error: no sending pickup found!"); return; } if (e.Cancelled || e.Error != null) { if (e.Error.GetType().Name == "WebException") { HttpStatusCode statusCode = ((HttpWebResponse)((WebException)e.Error).Response).StatusCode; if (statusCode == HttpStatusCode.Gone) { if (SendingPickup.type == "RB") { RandomizerBonus.UpgradeID(-int.Parse(SendingPickup.id)); } } else if (statusCode != HttpStatusCode.NotAcceptable) { webClient.DownloadStringAsync(SendingPickup.GetURL()); return; } SendingPickup = null; return; } if (e.Error != null) { Randomizer.log("RetryOnFail got non-web excpetion: " + e.Error.ToString()); } } SendingPickup = null; } catch (Exception ee) { Randomizer.LogError("RetryOnFail: " + ee.Message); } }
// Token: 0x06003745 RID: 14149 RVA: 0x000E0D70 File Offset: 0x000DEF70 public static void getPickup(Vector3 position) { RandomizerBonus.CollectPickup(); if (Randomizer.ColorShift) { Randomizer.changeColor(); } int num = (int)(Math.Floor((double)((int)position.x) / Randomizer.GridFactor) * Randomizer.GridFactor) * 10000 + (int)(Math.Floor((double)((int)position.y) / Randomizer.GridFactor) * Randomizer.GridFactor); if (Randomizer.Table.ContainsKey(num)) { RandomizerSwitch.GivePickup((RandomizerAction)Randomizer.Table[num], num, true); return; } for (int i = -1; i <= 1; i++) { for (int j = -1; j <= 1; j++) { if (Randomizer.Table.ContainsKey(num + (int)Randomizer.GridFactor * (10000 * i + j))) { RandomizerSwitch.GivePickup((RandomizerAction)Randomizer.Table[num + (int)Randomizer.GridFactor * (10000 * i + j)], num + (int)Randomizer.GridFactor * (10000 * i + j), true); return; } } } for (int k = -2; k <= 2; k += 4) { for (int l = -1; l <= 1; l++) { if (Randomizer.Table.ContainsKey(num + (int)Randomizer.GridFactor * (10000 * k + l))) { RandomizerSwitch.GivePickup((RandomizerAction)Randomizer.Table[num + (int)Randomizer.GridFactor * (10000 * k + l)], num + (int)Randomizer.GridFactor * (10000 * k + l), true); return; } } } Randomizer.showHint("Error finding pickup at " + ((int)position.x).ToString() + ", " + ((int)position.y).ToString()); }
// Token: 0x06001242 RID: 4674 RVA: 0x00069768 File Offset: 0x00067968 public void UpdateJumpingState() { float adjustedDrag = this.HorizontalDrag - this.HorizontalDrag * .10f * RandomizerBonus.Velocity(); this.PlatformMovement.LocalSpeedX = this.PlatformMovement.LocalSpeedX * (1f - adjustedDrag); this.PlatformMovement.LocalSpeedY = this.PlatformMovement.LocalSpeedY * (1f - adjustedDrag); if (this.m_stateCurrentTime > (this.AntiGravityDuration + this.AntiGravityDuration * .10f * RandomizerBonus.Velocity())) { this.ChangeState(SeinWallChargeJump.State.Normal); return; } this.m_sein.PlatformBehaviour.Visuals.SpriteRotater.CenterAngle = this.m_angleDirection; this.m_sein.PlatformBehaviour.Visuals.SpriteRotater.UpdateRotation(); for (int i = 0; i < Targets.Attackables.Count; i++) { IAttackable attackable = Targets.Attackables[i]; if (!this.m_attackablesIgnore.Contains(attackable)) { if (attackable.CanBeStomped()) { Vector3 vector = attackable.Position - this.m_sein.PlatformBehaviour.PlatformMovement.Position; float magnitude = vector.magnitude; if (magnitude < 4f && Vector2.Dot(vector.normalized, this.PlatformMovement.LocalSpeed.normalized) > 0f) { this.m_attackablesIgnore.Add(attackable); Damage damage = new Damage((float)this.Damage, this.PlatformMovement.WorldSpeed.normalized * 3f, this.m_sein.Position, DamageType.Stomp, base.gameObject); damage.DealToComponents(((Component)attackable).gameObject); if (this.ExplosionEffect) { InstantiateUtility.Instantiate(this.ExplosionEffect, Vector3.Lerp(base.transform.position, attackable.Position, 0.5f), Quaternion.identity); } break; } } } } }
// Token: 0x06003325 RID: 13093 public void OnCollectExpOrbPickup(ExpOrbPickup expOrbPickup) { int num = expOrbPickup.Amount * ((!this.Sein.PlayerAbilities.SoulEfficiency.HasAbility) ? 1 : 2); if (RandomizerBonus.ExpEfficiency()) { num *= 2; } expOrbPickup.Collected(); if (expOrbPickup.MessageType != ExpOrbPickup.ExpOrbMessageType.None) { Randomizer.getPickup(expOrbPickup.Bounds.center); if (GameWorld.Instance.CurrentArea != null) { GameWorld.Instance.CurrentArea.DirtyCompletionAmount(); } return; } if (Randomizer.ZeroXP) { this.Sein.Mortality.DamageReciever.OnRecieveDamage(new Damage(9999f, default(Vector2), default(Vector3), DamageType.Water, null)); } this.Sein.Level.GainExperience(num); if (this.m_expText && this.m_expText.gameObject.activeInHierarchy) { this.m_expText.Amount += num; } else { this.m_expText = Orbs.OrbDisplayText.Create(Characters.Sein.Transform, Vector3.up, num); } UI.SeinUI.ShakeExperienceBar(); if (GameWorld.Instance.CurrentArea != null) { GameWorld.Instance.CurrentArea.DirtyCompletionAmount(); } }
// Token: 0x060000C7 RID: 199 public void DealDamage() { Vector3 position = base.transform.position; IAttackable[] array = Targets.Attackables.ToArray(); for (int i = 0; i < array.Length; i++) { IAttackable attackable = array[i]; if (!InstantiateUtility.IsDestroyed(attackable as Component) && !this.m_damageAttackables.Contains(attackable) && attackable.CanBeChargeFlamed()) { Vector3 position2 = attackable.Position; Vector3 vector = position2 - position; if (vector.magnitude <= this.BurstRadius) { this.m_damageAttackables.Add(attackable); GameObject gameObject = ((Component)attackable).gameObject; new Damage(RandomizerBonus.ExplosionPower() ? (this.DamageAmount * 2f) : this.DamageAmount, vector.normalized * 3f, position, DamageType.ChargeFlame, base.gameObject).DealToComponents(gameObject); bool expr_D8 = attackable.IsDead(); if (!expr_D8) { GameObject expr_F2 = (GameObject)InstantiateUtility.Instantiate(this.BurstImpactEffectPrefab, position2, Quaternion.identity); expr_F2.transform.eulerAngles = new Vector3(0f, 0f, MoonMath.Angle.AngleFromVector(vector.normalized)); expr_F2.GetComponent <FollowPositionRotation>().SetTarget(gameObject.transform); } if (expr_D8 && attackable is IChargeFlameAttackable && ((IChargeFlameAttackable)attackable).CountsTowardsPowerOfLightAchievement()) { this.m_simultaneousEnemies++; } } } } if (this.m_simultaneousEnemies >= 4) { AchievementsController.AwardAchievement(Characters.Sein.Abilities.ChargeFlame.KillEnemiesSimultaneouslyAchievement); } this.m_waitDelay = 0.1f; }
// Token: 0x0600379B RID: 14235 public static void RetryOnFail(object sender, DownloadStringCompletedEventArgs e) { if (e.Cancelled || e.Error != null) { if (e.Error.GetType().Name == "WebException") { HttpStatusCode statusCode = ((HttpWebResponse)((WebException)e.Error).Response).StatusCode; if (statusCode == HttpStatusCode.NotAcceptable) { RandomizerSyncManager.SendingUri = null; return; } if (statusCode == HttpStatusCode.Gone) { string[] array = RandomizerSyncManager.SendingUri.ToString().Split(new char[] { '/' }); int num = array.Length; if (array[num - 2] == "RB") { RandomizerBonus.UpgradeID(-int.Parse(array[num - 1])); } RandomizerSyncManager.SendingUri = null; } } RandomizerSyncManager.webClient.DownloadStringAsync(RandomizerSyncManager.SendingUri); return; } if (e.Result.ToString().StartsWith("GC|")) { Randomizer.SyncId = e.Result.ToString().Substring(3); return; } RandomizerSyncManager.SendingUri = null; }
public static void UpgradeID(int ID) { switch (ID) { case 0: Characters.Sein.Mortality.Health.SetAmount((float)(Characters.Sein.Mortality.Health.MaxHealth + 20)); Randomizer.showHint("$Mega Health$"); break; case 1: Characters.Sein.Energy.SetCurrent(Characters.Sein.Energy.Max + 5f); Randomizer.showHint("*Mega Energy*"); break; case 6: Randomizer.showHint("Spirit Flame Upgrade"); break; case 8: Randomizer.showHint("Explosion Power Upgrade"); break; case 9: Randomizer.showHint("Spirit Light Efficiency"); break; case 10: Randomizer.showHint("Extra Air Dash"); break; case 11: Randomizer.showHint("Charge Dash Efficiency"); break; case 12: Randomizer.showHint("Extra Double Jump"); break; case 13: Randomizer.showHint("Health Regeneration"); break; case 15: Randomizer.showHint("Energy Regeneration"); break; case 17: if (RandomizerBonus.WaterVeinShards() >= 3) { Randomizer.showHint("#Water Vein Shard# (extra)"); } else { Characters.Sein.Inventory.SkillPointsCollected += 1 << ID; if (RandomizerBonus.WaterVeinShards() == 3) { Keys.GinsoTree = true; Randomizer.showHint("#Water Vein Shard (3/3)#"); } else { Randomizer.showHint("#Water Vein Shard# (" + RandomizerBonus.WaterVeinShards().ToString() + "/3)"); } } break; case 19: if (RandomizerBonus.GumonSealShards() >= 3) { Randomizer.showHint("#Gumon Seal Shard# (extra)"); } else { Characters.Sein.Inventory.SkillPointsCollected += 1 << ID; if (RandomizerBonus.GumonSealShards() == 3) { Keys.ForlornRuins = true; Randomizer.showHint("#Gumon Seal Shard (3/3)#"); } else { Randomizer.showHint("#Gumon Seal Shard# (" + RandomizerBonus.GumonSealShards().ToString() + "/3)"); } } break; case 21: if (RandomizerBonus.SunstoneShards() >= 3) { Randomizer.showHint("#Sunstone Shard# (extra)"); } else { Characters.Sein.Inventory.SkillPointsCollected += 1 << ID; if (RandomizerBonus.SunstoneShards() == 3) { Keys.MountHoru = true; Randomizer.showHint("#Sunstone Shard (3/3)#"); } else { Randomizer.showHint("#Sunstone Shard# (" + RandomizerBonus.SunstoneShards().ToString() + "/3)"); } } break; } if (ID > 1 && ID < 17) { Characters.Sein.Inventory.SkillPointsCollected += 1 << ID; } }
// Token: 0x06003793 RID: 14227 public static void Initialize() { RandomizerSyncManager.Countdown = 60 * RandomizerSyncManager.PERIOD; RandomizerSyncManager.webClient = new WebClient(); RandomizerSyncManager.webClient.DownloadStringCompleted += RandomizerSyncManager.RetryOnFail; RandomizerSyncManager.getClient = new WebClient(); RandomizerSyncManager.getClient.DownloadStringCompleted += RandomizerSyncManager.CheckPickups; RandomizerSyncManager.SendingUri = null; if (RandomizerSyncManager.UnsavedPickups == null) { RandomizerSyncManager.UnsavedPickups = new List<RandomizerSyncManager.Pickup>(); } if (RandomizerSyncManager.UriQueue == null) { RandomizerSyncManager.UriQueue = new Queue<Uri>(); } RandomizerSyncManager.flags = new Dictionary<string, bool>(); RandomizerSyncManager.flags.Add("seedSent", false); RandomizerSyncManager.LoseOnDeath = new HashSet<string>(); RandomizerSyncManager.SkillInfos = new List<RandomizerSyncManager.SkillInfoLine>(); RandomizerSyncManager.EventInfos = new List<RandomizerSyncManager.EventInfoLine>(); RandomizerSyncManager.UpgradeInfos = new List<RandomizerSyncManager.UpgradeInfoLine>(); RandomizerSyncManager.TeleportInfos = new List<RandomizerSyncManager.TeleportInfoLine>(); RandomizerSyncManager.TeleportInfos.Add(new RandomizerSyncManager.TeleportInfoLine("Grove", 0)); RandomizerSyncManager.TeleportInfos.Add(new RandomizerSyncManager.TeleportInfoLine("Swamp", 1)); RandomizerSyncManager.TeleportInfos.Add(new RandomizerSyncManager.TeleportInfoLine("Grotto", 2)); RandomizerSyncManager.TeleportInfos.Add(new RandomizerSyncManager.TeleportInfoLine("Valley", 3)); RandomizerSyncManager.TeleportInfos.Add(new RandomizerSyncManager.TeleportInfoLine("Forlorn", 4)); RandomizerSyncManager.TeleportInfos.Add(new RandomizerSyncManager.TeleportInfoLine("Sorrow", 5)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(0, 0, AbilityType.Bash)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(2, 1, AbilityType.ChargeFlame)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(3, 2, AbilityType.WallJump)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(4, 3, AbilityType.Stomp)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(5, 4, AbilityType.DoubleJump)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(8, 5, AbilityType.ChargeJump)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(12, 6, AbilityType.Climb)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(14, 7, AbilityType.Glide)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(50, 8, AbilityType.Dash)); RandomizerSyncManager.SkillInfos.Add(new RandomizerSyncManager.SkillInfoLine(51, 9, AbilityType.Grenade)); RandomizerSyncManager.EventInfos.Add(new RandomizerSyncManager.EventInfoLine(0, 0, () => Keys.GinsoTree)); RandomizerSyncManager.EventInfos.Add(new RandomizerSyncManager.EventInfoLine(1, 1, () => Sein.World.Events.WaterPurified)); RandomizerSyncManager.EventInfos.Add(new RandomizerSyncManager.EventInfoLine(2, 2, () => Keys.ForlornRuins)); RandomizerSyncManager.EventInfos.Add(new RandomizerSyncManager.EventInfoLine(3, 3, () => Sein.World.Events.WindRestored)); RandomizerSyncManager.EventInfos.Add(new RandomizerSyncManager.EventInfoLine(4, 4, () => Keys.MountHoru)); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(17, 0, true, () => RandomizerBonus.WaterVeinShards())); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(19, 1, true, () => RandomizerBonus.GumonSealShards())); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(21, 2, true, () => RandomizerBonus.SunstoneShards())); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(6, 3, true, () => RandomizerBonus.SpiritFlameLevel())); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(13, 4, true, () => RandomizerBonus.HealthRegeneration())); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(15, 5, true, () => RandomizerBonus.EnergyRegeneration())); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(8, 12, false, delegate { if (!RandomizerBonus.ExplosionPower()) { return 0; } return 1; })); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(9, 13, false, delegate { if (!RandomizerBonus.ExpEfficiency()) { return 0; } return 1; })); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(10, 14, false, delegate { if (!RandomizerBonus.DoubleAirDash()) { return 0; } return 1; })); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(11, 15, false, delegate { if (!RandomizerBonus.ChargeDashEfficiency()) { return 0; } return 1; })); RandomizerSyncManager.UpgradeInfos.Add(new RandomizerSyncManager.UpgradeInfoLine(12, 16, false, delegate { if (!RandomizerBonus.DoubleJumpUpgrade()) { return 0; } return 1; })); }