public float moveFour() { float temp = Random.Range(1, 10); if (temp > 7) { if (mng.currentEnemy.name == "yog") { yog script = yog.GetComponent <yog>(); script.stunned = true; script.stunCounter = 3; } else { azathoth script = azathoth.GetComponent <azathoth>(); script.stunned = true; script.stunCounter = 3; } mng.playerStatus = "Nyaralathotep uses Concussed Staff. The enemy is stunned"; concussedStaff.Play(); } else { mng.playerStatus = "Nyaralathotep uses Concussed Staff. The enemy avoids being stunned"; concussedStaff.Play(); } return(5 * Random.Range(1, 2) * multiplier); }
public float moveThree() { mng.playerStatus = "Hastur uses Yellow Sigil to poison the enemy"; yellowSigil.Play(); if (mng.currentEnemy.name == "yog") { yog script = mng.currentEnemy.GetComponent <yog>(); script.poisoned = true; script.poisonDamage = 7 * Random.Range(1, 2) * multiplier; } else { azathoth script = mng.currentEnemy.GetComponent <azathoth>(); script.poisoned = true; script.poisonDamage = 7 * Random.Range(1, 2) * multiplier; } Debug.Log("poisoned"); return(0); }
// Start is called before the first frame update void Start() { enemyHeal = 0.0f; playerDmg.enabled = false; enemyDmg.enabled = false; cthulu.GetComponent <cthulu>().minion.transform.position = new Vector3(300, 300, 0); transit.enabled = false; statusBox.SetActive(false); yogScript = GameObject.Find("yog").GetComponent <yog>(); //cthulu = GameObject.Find("cthulu"); yogScript.health = 100; azathothScript = azathoth.GetComponent <azathoth>(); endGame.transform.Find("cthuluWin").gameObject.SetActive(false); endGame.transform.Find("hasturWin").gameObject.SetActive(false); endGame.transform.Find("nyarWin").gameObject.SetActive(false); endGame.transform.Find("lost").gameObject.SetActive(false); characterSelect.transform.Find("cthInfo").gameObject.SetActive(false); characterSelect.transform.Find("hasturInfo").gameObject.SetActive(false); characterSelect.transform.Find("nyarInfo").gameObject.SetActive(false); lastMove = 0; indi1.GetComponent <indicator>().setIndicators(1); indi2.GetComponent <indicator>().setIndicators(1); indi3.GetComponent <indicator>().setIndicators(1); indi4.GetComponent <indicator>().setIndicators(1); title.enabled = true; if (title) { title.enabled = true; info.enabled = false; } else { characterSelect.enabled = true; } endGame.enabled = false; }