Beispiel #1
0
    public void AddAttackCardDamage(CardTag putCard, ShapeTag putShape)
    {
        if (putCard == CardTag.N2)
        {
            IsAttackTurn      = true;
            SaveAttackDamage += 2;
        }

        else if (putCard == CardTag.A)
        {
            if (putShape == ShapeTag.Spade)
            {
                SaveAttackDamage += 5;
            }
            else
            {
                SaveAttackDamage += 3;
            }

            IsAttackTurn = true;
        }

        else if (putCard == CardTag.Joker)
        {
            IsAttackTurn      = true;
            SaveAttackDamage += 5;
        }

        else if (putCard == CardTag.JokerR)
        {
            IsAttackTurn      = true;
            SaveAttackDamage += 7;
        }
    }
Beispiel #2
0
    private bool CheckAttackTurn(CardTag deckCard, ShapeTag deckShape, CardTag putCard, ShapeTag putShape)
    {
        if (!IsAttackTurn)
        {
            return(true);
        }

        if (deckCard == CardTag.A)
        {
            if (CheckPutCardRule(putCard, CardTag.Joker, putShape, ShapeTag.Club, ShapeTag.Spade) ||
                CheckPutCardRule(putCard, CardTag.JokerR, putShape, ShapeTag.Heart, ShapeTag.Diamond))
            {
                return(true);
            }

            if (putCard == CardTag.A)
            {
                return(true);
            }

            return(false);
        }


        if (deckCard == CardTag.N2)
        {
            if (putCard == CardTag.N2)
            {
                return(true);
            }

            if (putCard == CardTag.A && deckShape == putShape)
            {
                return(true);
            }

            if (CheckPutCardRule(putCard, CardTag.Joker, putShape, ShapeTag.Club, ShapeTag.Spade) ||
                CheckPutCardRule(putCard, CardTag.JokerR, putShape, ShapeTag.Heart, ShapeTag.Diamond))
            {
                return(true);
            }

            return(false);
        }

        if (deckCard == CardTag.Joker || deckCard == CardTag.JokerR)
        {
            if (putCard == CardTag.Joker || putCard == CardTag.JokerR)
            {
                return(true);
            }

            return(false);
        }

        return(true);
    }
Beispiel #3
0
 public void AddAlerts(CardTag cardIndex, ShapeTag shapeIndex)
 {
     for (int i = 0; i < Alerts.Count; i++)
     {
         if (Alerts[i].AlertCardTag == cardIndex &&
             Alerts[i].AlertShapeTag == shapeIndex)
         {
             ActiveAlerts.Add(Alerts[i]);
             Alerts[i].gameObject.SetActive(true);
             RepositionAlerts();
             break;
         }
     }
 }
Beispiel #4
0
    private bool CheckPutCardRule(CardTag putCard, CardTag ruleCard, ShapeTag putCardShape, ShapeTag ruleShape1, ShapeTag ruleShape2)
    {
        if (!IsAttackTurn)
        {
            if (putCard == ruleCard)
            {
                if (putCardShape == ruleShape1 || putCardShape == ruleShape2)
                {
                    return(true);
                }
            }
        }

        return(false);
    }
Beispiel #5
0
 public static ValueTask <Completion> WriteToAsync(List <FilterArgument> argumentsList, TextWriter writer, TextEncoder encoder, TemplateContext context)
 {
     argumentsList.Add(_typeArgument);
     return(ShapeTag.WriteToAsync(argumentsList, writer, encoder, context));
 }