示例#1
0
    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;
    }
示例#2
0
    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;
    }
示例#3
0
    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;
    }
示例#4
0
    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;
    }
示例#5
0
//	public class WeaponSkillActivation {
//	}

    public virtual IEnumerator PerformWeaponSkill(GameBoard gameBoard, Battle battle, List <Tile> match, GameBoard.Swap swap)
    {
        yield break;
    }