Пример #1
0
    /* 回合開始,被Battle manager呼叫 */
    public override void StartTurn(BattleContext mgr)
    {
        //重置 power
        this._power.Property += _jCharacterProperties.PowerAdd;
        if (this._power.Property > _jCharacterProperties.MaxPower)
        {
            this._power.Property = _jCharacterProperties.MaxPower;
        }

        // 抽卡
        Debug.Log("!!!!!!!!!!!!!!!!!!!!!!!!!drawing: " + DrawCount);
        HandheldSet.AddItems(CardDeck.Pop(DrawCount));
        Debug.Log("count: " + HandheldSet.GetCount());
        // 如果卡牌數量不足,把墓地的咭放重新放進卡牌庫
        if (HandheldSet.GetCount() < DrawCount)
        {
            CardDeck.AddItems(Graveyard.GetAll());
            Graveyard.Clear();
            HandheldSet.AddItems(CardDeck.Pop(DrawCount - HandheldSet.GetCount()));
        }

        base.StartTurn(mgr);
    }