Beispiel #1
0
    /// <summary>
    /// 横扫技能效果,中间卡牌收到的伤害作为旁边二张卡牌的攻击力
    /// </summary>
    public override void DoSkill()
    {
        if (card == null || card.IsDead || card.Attack <= 0)
        {
            return;
        }

        List <BaseFighter> targetList = card.owner.GetTargetByType(this, TargetType);

        if (targetList.Count == 0)
        {
            return;
        }

        if (targetList.Count == 1 && targetList[0] is PlayerFighter)
        {
            SkillFactory.GetAttackSkill(card).DoSkill();
            return;
        }

        List <int> cardIDs = GetTargetID(targetList);

        card.Actions.Add(SkillStartAction.GetAction(card.ID, skillID, cardIDs));

        BaseFighter fighter = targetList[0];
        int         damage  = fighter.OnAttackHurt(card, card.Attack);

        for (int i = 1; i < targetList.Count; i++)
        {
            fighter = targetList[i];
            fighter.OnAttackHurt(card, damage);
        }

        // card.Actions.Add(SkillEndAction.GetAction(card.ID, skillID));
    }
Beispiel #2
0
    public override void RemoveCard(CardFighter card)
    {
        base.RemoveCard(card);

        card.attackSkill = SkillFactory.GetAttackSkill(card);
    }