virtual bool onPhaseChange(ServerPlayer *guanyu) const{
        if (guanyu->getPhase() == Player::Start) {
            Room *room = guanyu->getRoom();

            if (guanyu->askForSkillInvoke("xiansheng")) {
                guanyu->throwAllHandCardsAndEquips();
                room->changeHero(guanyu, "shenguanyu", true);
                room->drawCards(guanyu, 3);
            }
        }
        return false;
    }
Exemplo n.º 2
0
    virtual bool onPhaseChange(ServerPlayer *guanyu) const{
        if(guanyu->getPhase() == Player::Start){
            Room *room = guanyu->getRoom();

            if(guanyu->askForSkillInvoke("xiansheng")){
                room->playLightbox(guanyu, objectName(), "3000", 3000);
                guanyu->throwAllEquips();
                guanyu->throwAllHandCards();

                room->transfigure(guanyu, "shenguanyu", true);
                room->drawCards(guanyu, 3);
            }
        }

        return false;
    }
Exemplo n.º 3
0
    bool onPhaseChange(ServerPlayer *player) const
    {
        Room *room = player->getRoom();
        foreach (ServerPlayer *const &p, room->getOtherPlayers(player)) {
            if (!TriggerSkill::triggerable(p) || p->getHandcardNum() != player->getHandcardNum())
                continue;

            if (p->askForSkillInvoke(objectName(), QVariant::fromValue(player))) {
                QList<ServerPlayer *> l;
                l << p << player;
                room->sortByActionOrder(l);
                room->drawCards(l, 1, objectName());
            }
        }

        return false;
    }