private IEnumerator Start() { yield return(null); while (HeroController.instance == null) { yield return(null); } if (!PlayerData.instance.statueStateUumuu.usingAltVersion) { yield break; } Modding.Logger.Log("SUPERUUMUU"); ModHooks.Instance.TakeHealthHook += this.TookDamge; DamageHero[] componentsInChildren = base.gameObject.GetComponentsInChildren <DamageHero>(true); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].damageDealt *= 2; } foreach (Vector2 position in sawpositions) { GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(Uuwuu.PreloadedGameObjects["saw"]); gameObject.GetComponent <SpriteRenderer>().color = new Color(0.25f, 1.7f, 0.5f, 1.65f); //gameObject.GetComponent<SpriteRenderer>().sprite.texture.LoadImage(new byte[Assembly.GetExecutingAssembly().GetManifestResourceStream("Uuwuu.Resources.saw.png").Length]); gameObject.transform.SetPosition2D(position); gameObject.AddComponent <SawHandler>(); gameObject.SetActive(true); } base.gameObject.GetComponent <global::tk2dSprite>().color = new Color(1f, 2f, 1f, 1f); base.gameObject.GetComponent <global::tk2dSprite>().FlipX = true; base.gameObject.GetComponent <global::tk2dSprite>().FlipY = true; string s = "CustomJournal" + Uuwuu.Instance.jh.entrynumber; Modding.ReflectionHelper.SetAttr <EnemyDeathEffects, string>(GetComponent <EnemyDeathEffects>(), "playerDataName", s); base.gameObject.transform.SetScaleX(base.gameObject.transform.GetScaleX() + 0.07f); base.gameObject.transform.SetScaleY(base.gameObject.transform.GetScaleY() + 0.07f); box = base.gameObject.GetComponent <BoxCollider2D>().offset; circle = base.gameObject.GetComponent <CircleCollider2D>().offset; base.gameObject.GetComponent <BoxCollider2D>().offset += Vector2.up * -1.6f; base.gameObject.GetComponent <CircleCollider2D>().offset += Vector2.up * -1.6f; this._hm.hp = 3000; this.phase1 = true; this.phase2 = true; this.phase3 = true; this._trail = AddTrail(base.gameObject, 0f, Color.green); this._trail.Stop(); this._control.CopyState("Multizap", "Multizap2"); this._control.CopyState("Roar", "PhaseRoar"); this._control.CopyState("Roar", "PhaseRoar2"); this._control.CopyState("Zapping", "Attack21"); this._control.CopyState("Gen", "Attack22"); this._control.CopyState("First?", "Attack23"); this._control.CopyState("Zapping", "Attack31"); this._control.CopyState("Gen", "Attack32"); this._control.CopyState("First?", "Attack33"); this._control.ChangeTransition("Choice", "CHASE", "Pattern Choice"); this._control.ChangeTransition("Multizap", "FINISHED", "Zapping"); this._control.ChangeTransition("Gen", "END", "Multizap2"); this._control.ChangeTransition("Attack21", "FINISHED", "Attack22"); this._control.ChangeTransition("Attack22", "FINISHED", "Attack23"); this._control.ChangeTransition("Attack23", "FINISHED", "Attack21"); this._control.ChangeTransition("Attack31", "FINISHED", "Attack32"); this._control.ChangeTransition("Attack32", "FINISHED", "Attack33"); this._control.ChangeTransition("Attack33", "FINISHED", "Attack31"); if (!easymode) { this._control.GetAction <Wait>("Multizap", 2).time = 1f; this._control.GetAction <Wait>("Attack Recover", 4).time = 0.5f; this._control.GetAction <Wait>("Zapping", 0).time = 0.25f; this._control.GetAction <Wait>("First?", 4).time = 0.25f; this._control.GetAction <Wait>("Attack21", 0).time = 0.70f; this._control.GetAction <Wait>("Attack23", 4).time = 0.70f; this._control.GetAction <Wait>("Wounded", 2).time = 2.5f; } else { this._control.GetAction <Wait>("Multizap", 2).time = 1.25f; this._control.GetAction <Wait>("Attack Recover", 4).time = 0.75f; this._control.GetAction <Wait>("Zapping", 0).time = 0.5f; this._control.GetAction <Wait>("First?", 4).time = 0.5f; this._control.GetAction <Wait>("Attack21", 0).time = 1f; this._control.GetAction <Wait>("Attack23", 4).time = 1f; this._control.GetAction <Wait>("Wounded", 2).time = 3f; } this._control.GetAction <Wait>("PhaseRoar", 1).time = 2.5f; this._control.GetAction <Wait>("PhaseRoar2", 1).time = 2.5f; this._control.GetAction <IntCompare>("Gen", 1).integer2 = 12; this._control.InsertMethod("PhaseRoar", 10, new Action(fixhitbox2)); this._control.InsertMethod("PhaseRoar2", 10, new Action(fixhitbox2)); this._control.InsertMethod("Idle", 2, new Action(fixhitbox2)); FsmutilExt.RemoveAction(this._control, "PhaseRoar", 3); FsmutilExt.RemoveAction(this._control, "PhaseRoar2", 3); FsmutilExt.RemoveAction(this._control, "Attack22", 2); this._control.InsertMethod("Explode", 13, new Action(fixhitbox1)); this._control.InsertMethod("Attack22", 2, new Action(Placetargets)); this._control.AddAction("PhaseRoar", this._control.GetAction("Recover", 1)); this._control.AddAction("PhaseRoar", this._control.GetAction("Recover", 2)); this._control.AddAction("PhaseRoar", this._control.GetAction("Recover", 3)); this._control.AddAction("PhaseRoar", this._control.GetAction("Recover", 4)); this._control.AddAction("PhaseRoar", this._control.GetAction("Recover", 6)); this._control.AddAction("PhaseRoar", this._control.GetAction("Recover", 7)); this._control.AddAction("PhaseRoar2", this._control.GetAction("Recover", 1)); this._control.AddAction("PhaseRoar2", this._control.GetAction("Recover", 3)); this._control.AddAction("PhaseRoar2", this._control.GetAction("Recover", 4)); this._control.AddAction("PhaseRoar2", this._control.GetAction("Recover", 6)); this._control.AddAction("PhaseRoar2", this._control.GetAction("Recover", 7)); yield break; }
// Token: 0x06000092 RID: 146 RVA: 0x00003C24 File Offset: 0x00001E24 private void Update() { if (PlayerData.instance.statueStateUumuu.usingAltVersion) { MakeCanvas(); if (this._hm.hp < 2500 && this.phase1) { this.phase1 = false; this._control.SetState("PhaseRoar"); base.gameObject.GetComponent <global::tk2dSprite>().color = new Color(1f, 1.75f, 0f, 1.5f); this._control.ChangeTransition("Choice", "MULTIZAP", "Attack21"); if (!easymode) { if (hardmode) { this._control.AddAction("Idle", this._control.GetAction("Gen", 2)); } this._control.AddAction("Attack Antic", this._control.GetAction("Gen", 2)); this._control.GetAction <ChaseObjectV2>("Attack Antic", 3).speedMax = 5f; this._control.GetAction <ChaseObjectV2>("Idle", 0).speedMax = 6f; this._control.GetAction <ChaseObjectV2>("Wounded", 1).speedMax = 3f; } this._control.GetAction <ChaseObjectV2>("Wounded", 1).accelerationForce = -1.5f; this._control.GetAction <SetRecoilSpeed>("Wounded", 3).newRecoilSpeed = 20f; } if (this._hm.hp < 1800 && this.phase2) { this.phase2 = false; this._control.SetState("PhaseRoar2"); base.gameObject.GetComponent <global::tk2dSprite>().color = new Color(0f, 2f, 1f, 2f); this._control.ChangeTransition("Choice", "SPAWN", "Attack31"); this._control.ChangeTransition("Explode", "FINISHED", "Recover"); this._control.GetAction <SpawnObjectFromGlobalPool>("Attack32", 2).spawnPoint = base.gameObject; this._control.GetAction <IntCompare>("Attack32", 1).integer2 = 15; this._control.GetAction <Wait>("Attack31", 0).time = 0.1f; this._control.GetAction <Wait>("Attack33", 4).time = 0.2f; FsmutilExt.RemoveAction(this._control, "Explode", 7); FsmutilExt.RemoveAction(this._control, "Recover", 2); this._control.InsertMethod("Explode", 0, new Action(this.Retaliate)); this._control.InsertMethod("Attack32", 2, new Action(this.LargeAttack)); if (!easymode) { this._control.GetAction <ChaseObjectV2>("Idle", 0).speedMax = 10f; this._control.GetAction <ChaseObjectV2>("Idle", 0).accelerationForce = 5.5f; this._control.GetAction <ChaseObjectV2>("Attack Antic", 3).speedMax = 8f; this._control.GetAction <ChaseObjectV2>("Attack Antic", 3).accelerationForce = 4.5f; this._control.GetAction <WaitRandom>("Idle", 1).timeMin = 1.25f; this._control.GetAction <WaitRandom>("Idle", 1).timeMax = 1.75f; } else { this._control.GetAction <ChaseObjectV2>("Attack Antic", 3).speedMax = 5f; this._control.GetAction <ChaseObjectV2>("Idle", 0).speedMax = 6f; this._control.GetAction <SetRecoilSpeed>("Wounded", 3).newRecoilSpeed = 20f; } } if (_hm.hp < 1000 && this.phase3) { if (!easymode) { if (Uuwuu.Instance.customnums) { HeroController.instance.StartCoroutine(Countdown(this.hardmode ? Uuwuu.Instance.hardnum : Uuwuu.Instance.easynum)); } else { HeroController.instance.StartCoroutine(Countdown(this.hardmode ? 45 : 30)); } } else { if (Uuwuu.Instance.customnums) { HeroController.instance.StartCoroutine(Countdown(this.hardmode ? Uuwuu.Instance.hardnum - 25 : Uuwuu.Instance.easynum - 10)); } else { HeroController.instance.StartCoroutine(Countdown(20)); } } this.phase3 = false; this._control.SetState("PhaseRoar"); base.gameObject.GetComponent <global::tk2dSprite>().color = new Color(0f, 2f, 0f, 2f); this._trail.Play(); if (hardmode) { this._control.AddAction("Attack Antic", this._control.GetAction("Roar", 3)); } this._control.AddAction("Attack Antic", this._control.GetAction("Roar", 3)); if (!easymode) { this._control.GetAction <WaitRandom>("Idle", 1).timeMin = 1.1f; this._control.GetAction <WaitRandom>("Idle", 1).timeMax = 1.65f; this._control.GetAction <Wait>("Attack21", 0).time = 0.55f; this._control.GetAction <Wait>("Attack23", 4).time = 0.60f; this._control.GetAction <IntCompare>("Attack32", 1).integer2 = 20; this._control.GetAction <Wait>("Attack31", 0).time = 0.05f; this._control.GetAction <Wait>("Attack33", 4).time = 0.1f; } else { this._control.GetAction <WaitRandom>("Idle", 1).timeMin = 1.6f; this._control.GetAction <WaitRandom>("Idle", 1).timeMax = 1.8f; this._control.GetAction <Wait>("Attack21", 0).time = 0.60f; this._control.GetAction <Wait>("Attack23", 4).time = 0.70f; this._control.GetAction <IntCompare>("Attack32", 1).integer2 = 17; this._control.GetAction <Wait>("Attack31", 0).time = 0.10f; this._control.GetAction <Wait>("Attack33", 4).time = 0.2f; } if (TextObject == null) { MakeCanvas(); } } } }