Exemplo n.º 1
0
    public override WingStats ModifyOnStats(StationWing wing, Card self)
    {
        WingStats stats = new WingStats();

        int  ent     = 0;
        bool isFirst = false;

        foreach (Card c in wing.cards)
        {
            if (c.info.isModifier && c.info.cardName == self.info.cardName)
            {
                if (c == self)
                {
                    isFirst = true;
                }
                else if (!isFirst)
                {
                    Debug.Log("Found other spice card.");
                    return(stats);
                }
            }
            else if (c.IsEntertainment())
            {
                ent += c.info.entertainment;
            }
        }

        stats.entertainment = ent;

        return(stats);
    }
Exemplo n.º 2
0
    public override WingStats ModifyOnStats(StationWing wing, Card self)
    {
        WingStats stats = new WingStats();

        foreach (Card c in wing.cards)
        {
            if (c.info.isModifier && c.info.cardName == self.info.cardName)
            {
                if (c == self)
                {
                    Debug.Log(c.gameObject.GetInstanceID() + ": Found self, setting size to 1");
                    stats.size = 1;
                    break;
                }
                else
                {
                    Debug.Log(self.gameObject.GetInstanceID() + ": Found " + c.gameObject.GetInstanceID() + ", leaving");
                    stats.size = 0;
                    break;
                }
            }
        }

        return(stats);
    }
Exemplo n.º 3
0
    public override WingStats ModifyOnStats(StationWing wing, Card self)
    {
        WingStats stats = new WingStats();

        foreach (Card c in wing.cards)
        {
            if (c.IsFood())
            {
                stats.food += c.info.food;
            }
        }
        return(stats);
    }
Exemplo n.º 4
0
    public override WingStats ModifyOnStats(StationWing wing, Card self)
    {
        WingStats stats = new WingStats();

        int foodReq = 0;

        foreach (Card c in wing.cards)
        {
            if (c.info.food < 0)
            {
                foodReq -= c.info.food;
            }
        }

        stats.food += foodReq / 2;
        return(stats);
    }
Exemplo n.º 5
0
    public override WingStats ModifyOnStats(StationWing wing, Card self)
    {
        WingStats stats = new WingStats();

        int pop = 0;

        foreach (Card c in wing.cards)
        {
            if (c.IsPopulation() && c.info.size < 0)
            {
                pop += c.info.population;
            }
        }

        stats.size = pop / 2;

        return(stats);
    }
Exemplo n.º 6
0
    public void AssignCards(StationWing wing)
    {
        int idx = 0;

        while (hand.selected.Count > idx)
        {
            Card c = hand.selected[idx];

            AssignResult res = wing.CanAssignCard(c);
            Debug.Log(res);
            if (res == AssignResult.Success)
            {
                wing.AddCard(hand.RemoveCard(c));
            }
            else
            {
                ++idx;
            }
        }
    }
Exemplo n.º 7
0
    public virtual WingStats ModifyOnStats(StationWing wing, Card self)
    {
        WingStats stats = new WingStats();

        return(stats);
    }