private void addEasySkill(int index) { System.Random rand = new System.Random(getRandomSeedByFloor()); Func <bool> wtu = () => true; Func <ORB_VALUE, OrbSpawnRate> newSpawnRates; switch (index) { case 0: int numShuffles = rand.Next(1, 3); wtu = () => GameController.Instance.isTurnMod(numShuffles, RNG.Next(numShuffles)); skillList.Add(EnemyBoardSkill.ShuffleSkill(wtu, numShuffles * 5, 0.075f, skillTrans)); break; case 1: EnemyBoardSkill clearOneLine = null; clearOneLine = EnemyBoardSkill.MarkOrderSkill(wtu, () => getOneLine(clearOneLine), 0.1f, skillTrans); clearOneLine.addRmvSkill(0); skillList.Add(clearOneLine); break; case 2: bool healSelfOnly = RNG.Next(2) == 0; int percentHeal = rand.Next(1, 6); wtu = () => GameController.Instance.isTurnMod(percentHeal, RNG.Next(percentHeal)); Func <GameObject> getTarget = () => healSelfOnly ? gameObject : GameController.Instance.getCurrEnemies()[RNG.Next(GameController.Instance.getCurrEnemies().Count)].gameObject; Func <int> getDmg = () => getTarget().GetComponent <Enemy>().getState().maxHealth *percentHeal / 10; skillList.Add(EnemyAttack.Create(wtu, true, getTarget, getDmg, skillTrans)); break; case 3: EnemyBoardSkill setOneLineEmpty = null; setOneLineEmpty = EnemyBoardSkill.MarkOrderSkill(wtu, () => getOneLine(setOneLineEmpty), 0.1f, skillTrans, 1); setOneLineEmpty.addSetSkill(0.1f, (Orb o) => ORB_VALUE.EMPTY); skillList.Add(setOneLineEmpty); break; case 4: wtu = () => GameController.Instance.isTurnMod(3, RNG.Next(3)); EnemyBoardSkill clearFourLines = null; clearFourLines = EnemyBoardSkill.MarkOrderSkill(wtu, () => getFourLines(clearFourLines), 0.1f, skillTrans, 1); clearFourLines.addRmvSkill(0); skillList.Add(clearFourLines); break; case 5: wtu = () => GameController.Instance.isTurnMod(3, RNG.Next(3)); EnemyBoardSkill clearAllHeals = EnemyBoardSkill.MarkIfSkill(wtu, (Orb o) => o.getOrbValue() == ORB_VALUE.ZERO, 0.1f, skillTrans, 1); clearAllHeals.addRmvSkill(0); skillList.Add(clearAllHeals); break; case 6: newSpawnRates = (ORB_VALUE orbVal) => orbVal == ORB_VALUE.NULLIFY ? OrbSpawnRate.DECREASED : Board.getDefaultOrbSpawnRates()[(int)orbVal]; skillList.Add(EnemyOrbSkill.Create(wtu, newSpawnRates, -1, skillTrans)); break; case 7: newSpawnRates = (ORB_VALUE orbVal) => orbVal == (ORB_VALUE)rand.Next(1, 10) ? OrbSpawnRate.MAX : Board.getDefaultOrbSpawnRates()[(int)orbVal]; wtu = () => GameController.Instance.isTurnMod(3, RNG.Next(3)); skillList.Add(EnemyOrbSkill.Create(wtu, newSpawnRates, 1, skillTrans)); break; case 8: EnemyBuffs hpBuff = (EnemyBuffs)(rand.Next(3) + 1); Func <Enemy> getTarget2 = () => GameController.Instance.getCurrEnemies()[RNG.Next(GameController.Instance.getCurrEnemies().Count)]; skillList.Add(EnemyHPBuff.Create(() => GameController.Instance.isTurnMod(2, RNG.Next(2)), hpBuff, getTarget2, 1, skillTrans)); break; case 9: EnemyBoardSkill decOneLine = null; decOneLine = EnemyBoardSkill.MarkOrderSkill(wtu, () => getOneLine(decOneLine), 0.1f, skillTrans); decOneLine.addIncSkill(0.1f, (Orb o) => - 1); skillList.Add(decOneLine); break; } }