//Start the next level in the arena. //If the button wasn't null, it's because we started a new level by giving ourselves a penalty. internal void NextLevel(EndlessModifierButton button = null) { if (button != null) { Modifier += button.modifierChange; running.BoostStats(button); foreach (EndlessModifierButton item in buttons) { Destroy(item.gameObject); } } endlessState.changeState(playStatus.ArenaCombat); RemoveLimbs(); if (skipHeal) { monster.loadMonster(); skipHeal = false; return; } player.ResetPlayer(false); }
//Enemy is going to get stronger now. internal void BoostStats(EndlessModifierButton a_button) { maxNumber += 5; minAnswer += 4; maxAnswer += 9; parseModifier(a_button.modOne, a_button.modOneIntensity); parseModifier(a_button.modTwo, a_button.modTwoIntensity); }
internal void PlayerWon() { levels++; Score += (Modifier * m_playerAbilities.ReturnExpBoost()); fightsSinceBreak++; if (fightsSinceBreak < fightsBetweenBreaks) //Not picking a button or healing. We're just starting the next round now! { skipHeal = true; NextLevel(null); return; } else { fightsSinceBreak = 0; } int[] locked = new int[3]; for (int i = 0; i < 3; i++) //Run through the buttons, picking out three that aren't locked. { EndlessModifierButton button = null; while (button == null) { int rand = Random.Range(0, modifierButtons.Length); EndlessModifierButton modifierButton = modifierButtons[rand]; if (!modifierButton.locked) { button = modifierButtons[rand]; button.locked = true; locked[i] = rand; } } buttons[i] = Instantiate(button, spots[i].transform, false); buttons[i].transform.localScale = new Vector3(1, 1, 1); } for (int i = 0; i < 3; i++) //Unlock all buttons. { modifierButtons[locked[i]].locked = false; } DisplayScore(); }