public override IEnumerator ExecutePlayerC() { var executionExists = DogeBossData.execution_spells.ContainsKey(bossID); if (executionExists) { DogeBoss dogeBoss = this; CustomExecution execution = DogeBossData.execution_spells[beingObj.beingID][UnityEngine.Random.Range(0, DogeBossData.execution_spells[beingObj.beingID].Count())]; yield return((object)new WaitForSeconds(0.2f)); dogeBoss.ResetAnimTriggers(); dogeBoss.transform.right = Vector3.left; yield return((object)new WaitForSeconds(0.4f)); dogeBoss.mov.MoveToTile(dogeBoss.ctrl.currentPlayer.TileLocal(execution.tile), true, false); yield return((object)new WaitWhile(new Func <bool>(() => dogeBoss.mov.state == State.Moving))); yield return((object)new WaitForSeconds(0.2f)); if (execution.preExecutionSpellID != null) { var preExecutionSpell = deCtrl.CreateSpellBase(execution.preExecutionSpellID, this, false); preExecutionSpell.StartCast(false, 0, false); } yield return((object)new WaitForSeconds(0.2f)); yield return((object)dogeBoss.StartCoroutine(dogeBoss._StartDialogue("Execution"))); if ((bool)(UnityEngine.Object)dogeBoss.ctrl.currentPlayer && dogeBoss.ctrl.currentPlayer.downed) { yield return((object)new WaitForSeconds(0.4f)); var executionSpell = deCtrl.CreateSpellBase(execution.spellID, this, false); if (execution.preExecutionSpellID == null) { anim.SetTrigger("spellCast"); } executionSpell.StartCast(false, 0, false); yield return((object)new WaitForSeconds(2f)); if ((bool)(UnityEngine.Object)dogeBoss.ctrl.currentPlayer && dogeBoss.ctrl.currentPlayer.downed) { dogeBoss.mov.MoveToTile(dogeBoss.ctrl.currentPlayer.TileLocal(execution.tile), true, false); yield return((object)new WaitWhile(new Func <bool>(() => dogeBoss.mov.state == State.Moving))); yield return((object)new WaitForSeconds(0.4f)); } } if (dogeBoss.ctrl.PlayersActive()) { dogeBoss.StartCoroutine(dogeBoss.StartLoopC()); } } else { Debug.Log("No execution spell found"); yield return(base.ExecutePlayerC()); } }
public override IEnumerator Executed() { DogeBoss boss = this; //Debug.Log("DogeBoss: Executed"); var doesnt_count = DogeBossData.kill_not_counted.Contains(beingObj.beingID); if (!doesnt_count) { boss.ctrl.IncrementStat("TotalExecutions"); } if (!doesnt_count) { boss.runCtrl.currentRun.RemoveAssist(beingObj); } SetCustomBossFate(false); boss.runCtrl.progressBar.SetBossFate(); if (boss.endGameOnExecute) { boss.ctrl.AddObstacle((Being)this); } boss.LastWord(); boss.ctrl.runCtrl.worldBar.Close(); boss.ctrl.idCtrl.HideOnwardButton(); boss.runCtrl.worldBar.available = false; foreach (Player currentPlayer in boss.ctrl.currentPlayers) { currentPlayer.RemoveStatus(Status.Poison); } yield return((object)new WaitForEndOfFrame()); boss.deCtrl.TriggerAllArtifacts(FTrigger.OnBossKill); //talkBubble.Fade(); //talkBubble.anim.SetTrigger("fade"); if (!doesnt_count) { ++boss.runCtrl.currentRun.bossExecutions; } boss.DeathEffects(false); S.I.StartCoroutine(boss._DeathFinalNoMEC()); }