Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CardMoveReason "GIVE"6 #136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/package/yjcm2013-package.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ void RenxinCard::use(Room *room, ServerPlayer *player, QList<ServerPlayer *> &)
if (!who) return;

player->turnOver();
CardMoveReason reason(CardMoveReason::S_REASON_GIVE, player->objectName());
reason.m_playerId = who->objectName();
room->obtainCard(who, player->wholeHandCards(), reason, false);
CardMoveReason reason(CardMoveReason::S_REASON_GIVE, player->objectName(), who->objectName(), "renxin", QString());
room->moveCardTo(player->wholeHandCards(), player, who, Player::PlaceHand, reason);

RecoverStruct recover;
recover.who = player;
Expand Down Expand Up @@ -1127,13 +1126,13 @@ class Qiuyuan: public TriggerSkill {
if (target->getHandcardNum() > 1) {
card = room->askForCard(target, ".!", "@qiuyuan-give:" + player->objectName(), data, Card::MethodNone);
if (!card)
card = target->getHandcards().at(qrand() % target->getHandcardNum());
card = target->getRandomHandCard()
} else {
Q_ASSERT(target->getHandcardNum() == 1);
card = target->getHandcards().first();
}
player->obtainCard(card);
room->showCard(player, card->getEffectiveId());
CardMoveReason reason(CardMoveReason::S_REASON_GIVE, target->objectName(), player->objectName(), objectName(), QString());
room->moveCardTo(card, target, player, Player::PlaceHand, reason, true);
if (!card->isKindOf("Jink")) {
if (use.from->canSlash(target, use.card, false)) {
use.to.append(target);
Expand Down