protected override IEnumerator UsePowerOnOpponent(GridScript gridScript, Grid grid, PowerUseParams param) { // Pick your poison var shittyBlock = BlockDefinitionBank.Instance.GetNormalBlocks() .OrderByDescending(b => b.minLevel) .First(); // Add to the grid yield return(SpawnBlock(gridScript, grid, 4, new[] { shittyBlock }, 0.2f)); yield return(null); EndPowerOnOpponent(gridScript, grid); }
protected override IEnumerator UsePowerOnOpponent(GridScript gridScript, Grid grid, PowerUseParams param) { // Wow wow wow. // It's going to be fun. // Take the blocks below // And hide them. // Easy? // But it scrolls. HA // F**k // What a shitty power idea. for (int x = 0; x < grid.width; x++) { for (int y = -grid.previewLines; y < 2; y++) { var bs = gridScript.Get(x, y); if (bs != null && bs.block.IsEmpty == false && bs.block.Definition.isGarbage == false) { bs.Hide(3.5f); yield return(new WaitForEndOfFrame()); } } } EndPowerOnOpponent(gridScript, grid); }
protected override IEnumerator UsePowerOnOpponent(GridScript gridScript, Grid grid, PowerUseParams param) { // yield return SpawnBlock(gridScript, grid, param.defs.Length, param.defs, 0.05f); yield return(null); EndPowerOnOpponent(gridScript, grid); }
protected override IEnumerator UsePowerOnOpponent(GridScript gridScript, Grid grid, PowerUseParams param) { EndPowerOnOpponent(gridScript, grid); yield return(null); // // Wait for effect // yield return new WaitForSeconds(0.5f); // // gridScript.SpeedBonus = 2f; // yield return new WaitForSeconds(5f); // gridScript.SpeedBonus = 1f; // EndPowerOnOpponent(gridScript, grid); }
protected override IEnumerator UsePowerOnOpponent(GridScript gridScript, Grid grid, PowerUseParams param) { // // Wait for effect // yield return new WaitForSeconds(0.75f); // // List<BlockScript> nonEmptyBlocks = new List<BlockScript>(); // for (int x = 0; x < grid.width; x++) // { // for (int y = 0; y < grid.height; y++) // { // var bs = gridScript.Get(x, y); // if (bs != null) // { // var b = bs.block; // if (b != null && b.IsEmpty == false && b.IsBeingRemoved == false) // { // nonEmptyBlocks.Add(bs); // } // } // } // } // // // Mess a % of the grid // int blocksToMess = Mathf.FloorToInt(nonEmptyBlocks.Count / 3.5f); // nonEmptyBlocks = nonEmptyBlocks.OrderBy(b => Random.Range(0f, 1f)).Take(blocksToMess).ToList(); // // foreach (var bs in nonEmptyBlocks) // { // bs.block.ConvertTo(0, 0, // BlockDefinitionBank.Instance.GetRandomNormal(1, grid.width, false, // new List<BlockDefinition>() {bs.block.Definition})); // // gridScript.PlayEffectAndSetColor("Explosion", // bs.transform.position, new Vector3(0.5f, 0.5f), // Color.black); // } EndPowerOnOpponent(gridScript, grid); yield return(null); }
protected override IEnumerator UsePowerOnOpponent(GridScript gridScript, Grid grid, PowerUseParams param) { EndPowerOnOpponent(gridScript, grid); yield return(null); }