Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix hongyan and manjuan.

  • Loading branch information...
commit d5c2b3a808c6f647666b385de540abf210df6533 1 parent da00cbf
@AgainstTheCurrent AgainstTheCurrent authored
View
4 skins/defaultSkin.layout.json
@@ -3,10 +3,10 @@
{
"cardNormalWidth": 93,
"cardNormalHeight": 130,
- "cardSuitArea": [0, 14, 28, 35],
+ "cardSuitArea": [0, 14, 28, 30],
"cardNumberArea": [0, 2, 28, 30],
"cardFootnoteArea": [0, 70, 93, 50],
- "cardFootnoteFont": ["SimSun", 20, 50, [255, 255, 255, 255], [20, 20, 20, 255]]
+ "cardFootnoteFont": ["SimSun", 9, 50, [255, 255, 255, 255], [20, 20, 20, 255]]
},
"room":
{
View
3  src/core/card.cpp
@@ -419,10 +419,11 @@ Card *Card::Clone(const Card *card){
const QMetaObject *meta = card->metaObject();
Card::Suit suit = card->getSuit();
int number = card->getNumber();
-
+
QObject *card_obj = meta->newInstance(Q_ARG(Card::Suit, suit), Q_ARG(int, number));
if(card_obj){
Card *new_card = qobject_cast<Card *>(card_obj);
+ new_card->setId(card->getId());
new_card->setObjectName(card->objectName());
new_card->addSubcard(card->getId());
return new_card;
View
2  src/package/bgm-package.cpp
@@ -297,7 +297,7 @@ class Manjuan: public TriggerSkill{
else if(event == CardDrawing){
if(room->getTag("FirstRound").toBool())
return false;
-
+ card_id = data.toInt();
const Card* card = Sanguosha->getCard(card_id);
room->moveCardTo(card, NULL, Player::DiscardPile, reason);
}
View
12 src/server/room.cpp
@@ -898,12 +898,7 @@ bool Room::_askForNullification(const TrickCard *trick, ServerPlayer *from, Serv
if (continuable) return _askForNullification(trick, from, to, positive, aiHelper);
else return false;
}
-
- CardUseStruct use;
- use.card = card;
- use.from = repliedPlayer;
- useCard(use);
-
+
LogMessage log;
log.type = "#NullificationDetails";
log.from = from;
@@ -914,6 +909,11 @@ bool Room::_askForNullification(const TrickCard *trick, ServerPlayer *from, Serv
broadcastInvoke("animate", QString("nullification:%1:%2")
.arg(repliedPlayer->objectName()).arg(to->objectName()));
+ CardUseStruct use;
+ use.card = card;
+ use.from = repliedPlayer;
+ useCard(use);
+
QVariant decisionData = QVariant::fromValue("Nullification:"+QString(trick->metaObject()->className())+":"+to->objectName()+":"+(positive?"true":"false"));
thread->trigger(ChoiceMade, this, repliedPlayer, decisionData);
setTag("NullifyingTimes",getTag("NullifyingTimes").toInt()+1);
View
1  src/ui/SkinBank.cpp
@@ -32,6 +32,7 @@ bool QSanRoomSkin::QSanTextFont::tryParse(Json::Value arg)
}
void QSanRoomSkin::QSanTextFont::paintText(QPainter* painter, QRect pos, Qt::AlignmentFlag align, const QString &text) const
{
+ painter->setFont(m_font);
if (m_drawShadow)
{
painter->setPen(m_backgroundPen);
View
2  src/ui/roomscene.cpp
@@ -1262,7 +1262,7 @@ QString RoomScene::_translateMovementReason(const CardMoveReason &reason)
.append(Sanguosha->translate(dstPhoto->getPlayer()->getGeneralName()));
else if (reason.m_targetId == Self->objectName())
targetName = QString("%1%2(%3)").arg(Sanguosha->translate("use upon"))
- .arg(Sanguosha->translate(Self->getGeneralName())).arg(Sanguosha->translate("(yourself)"));
+ .arg(Sanguosha->translate(Self->getGeneralName())).arg(Sanguosha->translate("yourself"));
QString result(playerName + targetName);
result.append(Sanguosha->translate(reason.m_eventName));
Please sign in to comment.
Something went wrong with that request. Please try again.