bool WuxinCard::targetFilter(const QList<const Player *> &targets, const Player *to_select, const Player *Self) const{
    foreach(int id, Self->getPile("skysoldier")){
        if (Sanguosha->getCard(id)->isBlack()){
            Slash *theslash = new Slash(Card::SuitToBeDecided, -1);
            theslash->setSkillName("wuxin");
            theslash->addSubcard(id);
            theslash->deleteLater();
            bool can_slash = theslash->isAvailable(Self) && theslash->targetFilter(targets, to_select, Self) && !Sanguosha->isProhibited(Self, to_select, theslash);
            if (can_slash)
                return true;
        }
    }
    return false;
}
示例#2
0
bool JijiangCard::targetFilter(const QList<const Player *> &targets, const Player *to_select, const Player *Self) const{
    Slash *slash = new Slash(NoSuit, 0);
    slash->deleteLater();
    return slash->targetFilter(targets, to_select, Self);
}