public override IEnumerator PerformWeaponSkill(GameBoard gameBoard, Battle battle, List <Tile> match, GameBoard.Swap swap) { float rand = UnityEngine.Random.Range(0f, 1f); if (match.Count == 3 && rand <= ThreeTileActivationPercentage || match.Count >= 4 && rand <= FourTileActivationPercentage) { battle.ApplyStun(TurnsStunned); int numReplaced = UnityEngine.Random.Range(3, 5); gameBoard.ClearNRandomTiles(numReplaced, delegate(Tile tile) { return(!match.Contains(tile)); }); } yield break; }
public override IEnumerator PerformWeaponSkill(GameBoard gameBoard, Battle battle, List <Tile> match, GameBoard.Swap swap) { float rand = UnityEngine.Random.Range(0f, 1f); if (match.Count == 3 && rand <= ThreeTileActivationPercentage || match.Count >= 4 && rand <= FourTileActivationPercentage) { BaseTileData matchedTileData = match[0].TileData; gameBoard.ReplaceNRandomTiles(3, matchedTileData, delegate(Tile tile) { return(tile.TileType == matchedTileData.Type && !match.Contains(tile)); } ); } yield break; }
public override IEnumerator PerformWeaponSkill(GameBoard gameBoard, Battle battle, List <Tile> match, GameBoard.Swap swap) { float rand = UnityEngine.Random.Range(0f, 1f); if (match.Count == 3 && rand <= ThreeTileActivationPercentage || match.Count >= 4 && rand <= FourTileActivationPercentage) { // tell the gameboard to clear an obs if (gameBoard.IsObstructionsOnGameBoard()) { gameBoard.DestroyRandomObstruction(); } gameBoard.ClearAdjacentTiles(swap.SelectedTile, delegate(Tile tile) { return(!match.Contains(tile)); } ); } //yield return new WaitForSeconds( 3.0f ); yield break; }
public override IEnumerator PerformWeaponSkill(GameBoard gameBoard, Battle battle, List <Tile> match, GameBoard.Swap swap) { float rand = UnityEngine.Random.Range(0f, 1f); if (match.Count == 3 && rand <= ThreeTileActivationPercentage || match.Count >= 4 && rand <= FourTileActivationPercentage) { gameBoard.ExtendMatch(match); } yield break; }
// public class WeaponSkillActivation { // } public virtual IEnumerator PerformWeaponSkill(GameBoard gameBoard, Battle battle, List <Tile> match, GameBoard.Swap swap) { yield break; }