virtual const Card *viewAs(CardItem *card_item) const{ const Card *card = card_item->getCard(); Card *acard = new FireSlash(card->getSuit(), card->getNumber()); acard->addSubcard(card->getId()); acard->setSkillName(objectName()); return acard; }
virtual const Card *viewAs(const Card *originalCard) const { Card *acard = new FireSlash(originalCard->getSuit(), originalCard->getNumber()); acard->addSubcard(originalCard->getId()); acard->setSkillName(objectName()); return acard; }
virtual bool trigger(TriggerEvent , Room* room, ServerPlayer *player, QVariant &data) const{ CardUseStruct use = data.value<CardUseStruct>(); if(use.card->objectName() != "slash" || (!use.card->getSkillName().isEmpty() && use.card->getSubcards().length() > 0)) return false; if(player->getRoom()->askForSkillInvoke(player, objectName(), data)){ Card *card = Sanguosha->cloneCard("fire_slash", use.card->getSuit(), use.card->getNumber()); card->addSubcard(use.card); card->setSkillName(objectName()); use.card = card; room->setEmotion(player, QString("weapon/%1").arg(objectName())); data = QVariant::fromValue(use); } return false; }
const Card *viewAs(const Card *originalCard) const { Card *card = new NeoFanjianCard; card->addSubcard(originalCard); return card; }
virtual const Card *viewAs(CardItem *card_item) const{ Card *card = new DujiCard; card->addSubcard(card_item->getFilteredCard()); return card; }