Commit eda5e7d5 authored by argon.sun's avatar argon.sun

new ver.

parent 30f57cac
...@@ -522,6 +522,68 @@ void Game::DrawSpec() { ...@@ -522,6 +522,68 @@ void Game::DrawSpec() {
showcard = 0; showcard = 0;
break; break;
} }
case 101: {
const wchar_t* lstr;
switch(showcardcode) {
case 1:
lstr = L"You Win!";
break;
case 2:
lstr = L"You Lose!";
break;
case 3:
lstr = L"Draw Game";
break;
case 4:
lstr = L"Draw Phase";
break;
case 5:
lstr = L"Standby Phase";
break;
case 6:
lstr = L"Main Phase 1";
break;
case 7:
lstr = L"Battle Phase";
break;
case 8:
lstr = L"Main Phase 2";
break;
case 9:
lstr = L"End Phase";
break;
case 10:
lstr = L"Next Players Turn";
break;
case 11:
lstr = L"Duel Start";
break;
case 12:
lstr = L"Duel1 Start";
break;
case 13:
lstr = L"Duel2 Start";
break;
case 14:
lstr = L"Duel3 Start";
break;
}
auto pos = lpcFont->getDimension(lstr);
if(showcardp < 10) {
int alpha = (showcardp * 25) << 24;
lpcFont->draw(lstr, recti(671 - pos.Width / 2 - (9 - showcardp) * 40, 271, 970, 350), alpha);
lpcFont->draw(lstr, recti(670 - pos.Width / 2 - (9 - showcardp) * 40, 270, 970, 350), alpha | 0xffffff);
} else if(showcardp < showcarddif) {
lpcFont->draw(lstr, recti(671 - pos.Width / 2, 271, 970, 350), 0xff000000);
lpcFont->draw(lstr, recti(670 - pos.Width / 2, 270, 970, 350), 0xffffffff);
} else if(showcardp < showcarddif + 10) {
int alpha = ((showcarddif + 10 - showcardp) * 25) << 24;
lpcFont->draw(lstr, recti(671 - pos.Width / 2 + (showcardp - showcarddif) * 40, 271, 970, 350), alpha);
lpcFont->draw(lstr, recti(670 - pos.Width / 2 + (showcardp - showcarddif) * 40, 270, 970, 350), alpha | 0xffffff);
}
showcardp++;
break;
}
} }
} }
if(is_attacking) { if(is_attacking) {
......
...@@ -505,31 +505,16 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -505,31 +505,16 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
case MSG_WIN: { case MSG_WIN: {
int player = BufferIO::ReadInt8(pbuf); int player = BufferIO::ReadInt8(pbuf);
int type = BufferIO::ReadInt8(pbuf); int type = BufferIO::ReadInt8(pbuf);
mainGame->showcarddif = 110;
mainGame->showcard = 101;
mainGame->showcardp = 0;
if(player == 2) if(player == 2)
myswprintf(textBuffer, L"Draw Game.\n(%ls)", dataManager.GetVictoryString(type)); mainGame->showcardcode = 3;
else if(mainGame->LocalPlayer(player) == 0) { else if(mainGame->LocalPlayer(player) == 0) {
if(!mainGame->dInfo.isReplay) { mainGame->showcardcode = 1;
if(type == 1 || type == 2)
myswprintf(textBuffer, L"You Win!\n(%ls%ls)", mainGame->LocalName(1), dataManager.GetVictoryString(type));
else myswprintf(textBuffer, L"You Win!\n(%ls)", dataManager.GetVictoryString(type));
} else {
if(type == 1 || type == 2)
myswprintf(textBuffer, L"%ls Win!\n(%ls%ls)", mainGame->LocalName(0), mainGame->LocalName(1), dataManager.GetVictoryString(type));
else myswprintf(textBuffer, L"%ls Win!\n(%ls)", mainGame->LocalName(0), dataManager.GetVictoryString(type));
}
} else { } else {
if(!mainGame->dInfo.isReplay) { mainGame->showcardcode = 2;
if(type == 1 || type == 2)
myswprintf(textBuffer, L"You Lose!\n(%ls%ls)", mainGame->LocalName(0), dataManager.GetVictoryString(type));
else myswprintf(textBuffer, L"You Lose!\n(%ls)", dataManager.GetVictoryString(type));
} else {
if(type == 1 || type == 2)
myswprintf(textBuffer, L"%ls Win!\n(%ls%ls)", mainGame->LocalName(1), mainGame->LocalName(0), dataManager.GetVictoryString(type));
else myswprintf(textBuffer, L"%ls Win!\n(%ls)", mainGame->LocalName(1), dataManager.GetVictoryString(type));
}
} }
mainGame->stACMessage->setText(textBuffer);
mainGame->PopupElement(mainGame->wACMessage, 100);
mainGame->WaitFrameSignal(120); mainGame->WaitFrameSignal(120);
break; break;
} }
...@@ -542,6 +527,12 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -542,6 +527,12 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
return true; return true;
} }
case MSG_START: { case MSG_START: {
mainGame->showcardcode = 11;
mainGame->showcarddif = 30;
mainGame->showcardp = 0;
mainGame->showcard = 101;
mainGame->WaitFrameSignal(40);
mainGame->showcard = 0;
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
int playertype = BufferIO::ReadInt8(pbuf); int playertype = BufferIO::ReadInt8(pbuf);
mainGame->dInfo.isFirst = (playertype & 0xf) ? false : true; mainGame->dInfo.isFirst = (playertype & 0xf) ? false : true;
...@@ -1269,7 +1260,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1269,7 +1260,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int count = BufferIO::ReadInt8(pbuf); int count = BufferIO::ReadInt8(pbuf);
mainGame->WaitFrameSignal(5); mainGame->WaitFrameSignal(5);
if(player == 1) { if(player == 1 && !mainGame->dInfo.isReplay) {
bool flip = false; bool flip = false;
for (auto cit = mainGame->dField.hand[player].begin(); cit != mainGame->dField.hand[player].end(); ++cit) for (auto cit = mainGame->dField.hand[player].begin(); cit != mainGame->dField.hand[player].end(); ++cit)
if((*cit)->code) { if((*cit)->code) {
...@@ -1290,7 +1281,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1290,7 +1281,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
(*cit)->is_hovered = false; (*cit)->is_hovered = false;
(*cit)->aniFrame = 5; (*cit)->aniFrame = 5;
} }
mainGame->WaitFrameSignal(20); mainGame->WaitFrameSignal(10);
for (auto cit = mainGame->dField.hand[player].begin(); cit != mainGame->dField.hand[player].end(); ++cit) for (auto cit = mainGame->dField.hand[player].begin(); cit != mainGame->dField.hand[player].end(); ++cit)
(*cit)->SetCode(BufferIO::ReadInt32(pbuf)); (*cit)->SetCode(BufferIO::ReadInt32(pbuf));
for (auto cit = mainGame->dField.hand[player].begin(); cit != mainGame->dField.hand[player].end(); ++cit) { for (auto cit = mainGame->dField.hand[player].begin(); cit != mainGame->dField.hand[player].end(); ++cit) {
...@@ -1365,12 +1356,12 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1365,12 +1356,12 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
mainGame->dInfo.turn++; mainGame->dInfo.turn++;
myswprintf(mainGame->dInfo.strTurn, L"Turn:%d", mainGame->dInfo.turn); myswprintf(mainGame->dInfo.strTurn, L"Turn:%d", mainGame->dInfo.turn);
myswprintf(textBuffer, L"%ls的回合", mainGame->LocalName(player)); mainGame->showcardcode = 10;
mainGame->gMutex.Lock(); mainGame->showcarddif = 30;
mainGame->stACMessage->setText(textBuffer); mainGame->showcardp = 0;
mainGame->PopupElement(mainGame->wACMessage, 20); mainGame->showcard = 101;
mainGame->gMutex.Unlock();
mainGame->WaitFrameSignal(40); mainGame->WaitFrameSignal(40);
mainGame->showcard = 0;
return true; return true;
} }
case MSG_NEW_PHASE: { case MSG_NEW_PHASE: {
...@@ -1382,42 +1373,44 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1382,42 +1373,44 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
mainGame->btnBP->setVisible(false); mainGame->btnBP->setVisible(false);
mainGame->btnM2->setVisible(false); mainGame->btnM2->setVisible(false);
mainGame->btnEP->setVisible(false); mainGame->btnEP->setVisible(false);
mainGame->gMutex.Unlock();
mainGame->showcarddif = 30;
mainGame->showcardp = 0;
switch (phase) { switch (phase) {
case PHASE_DRAW: case PHASE_DRAW:
mainGame->btnDP->setVisible(true); mainGame->btnDP->setVisible(true);
myswprintf(textBuffer, L"进入【抽卡阶段】"); mainGame->showcardcode = 4;
break; break;
case PHASE_STANDBY: case PHASE_STANDBY:
mainGame->btnSP->setVisible(true); mainGame->btnSP->setVisible(true);
myswprintf(textBuffer, L"进入【准备阶段】"); mainGame->showcardcode = 5;
break; break;
case PHASE_MAIN1: case PHASE_MAIN1:
mainGame->btnM1->setVisible(true); mainGame->btnM1->setVisible(true);
myswprintf(textBuffer, L"进入【主要阶段1】"); mainGame->showcardcode = 6;
break; break;
case PHASE_BATTLE: case PHASE_BATTLE:
mainGame->btnBP->setVisible(true); mainGame->btnBP->setVisible(true);
mainGame->btnBP->setPressed(true); mainGame->btnBP->setPressed(true);
mainGame->btnBP->setEnabled(false); mainGame->btnBP->setEnabled(false);
myswprintf(textBuffer, L"进入【战斗阶段】"); mainGame->showcardcode = 7;
break; break;
case PHASE_MAIN2: case PHASE_MAIN2:
mainGame->btnM2->setVisible(true); mainGame->btnM2->setVisible(true);
mainGame->btnM2->setPressed(true); mainGame->btnM2->setPressed(true);
mainGame->btnM2->setEnabled(false); mainGame->btnM2->setEnabled(false);
myswprintf(textBuffer, L"进入【主要阶段2】"); mainGame->showcardcode = 8;
break; break;
case PHASE_END: case PHASE_END:
mainGame->btnEP->setVisible(true); mainGame->btnEP->setVisible(true);
mainGame->btnEP->setPressed(true); mainGame->btnEP->setPressed(true);
mainGame->btnEP->setEnabled(false); mainGame->btnEP->setEnabled(false);
myswprintf(textBuffer, L"进入【结束阶段】"); mainGame->showcardcode = 9;
break; break;
} }
mainGame->stACMessage->setText(textBuffer); mainGame->showcard = 101;
mainGame->PopupElement(mainGame->wACMessage, 20);
mainGame->gMutex.Unlock();
mainGame->WaitFrameSignal(40); mainGame->WaitFrameSignal(40);
mainGame->showcard = 0;
return true; return true;
} }
case MSG_MOVE: { case MSG_MOVE: {
...@@ -1466,6 +1459,8 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1466,6 +1459,8 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
pcard->counters.clear(); pcard->counters.clear();
if(cl != pl) if(cl != pl)
pcard->ClearTarget(); pcard->ClearTarget();
pcard->is_showequip = false;
pcard->is_showtarget = false;
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->dField.RemoveCard(pc, pl, ps); mainGame->dField.RemoveCard(pc, pl, ps);
pcard->position = cp; pcard->position = cp;
...@@ -1584,7 +1579,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1584,7 +1579,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
if (code != 0 && pcard->code != code) if (code != 0 && pcard->code != code)
pcard->SetCode(code); pcard->SetCode(code);
pcard->position = cp; pcard->position = cp;
myswprintf(event_string, L"卡片改变了表示形式"); myswprintf(event_string, dataManager.GetSysString(1600));
mainGame->dField.MoveCard(pcard, 10); mainGame->dField.MoveCard(pcard, 10);
mainGame->WaitFrameSignal(10); mainGame->WaitFrameSignal(10);
return true; return true;
...@@ -1595,7 +1590,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1595,7 +1590,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
int cl = BufferIO::ReadInt8(pbuf); int cl = BufferIO::ReadInt8(pbuf);
int cs = BufferIO::ReadInt8(pbuf); int cs = BufferIO::ReadInt8(pbuf);
int cp = BufferIO::ReadInt8(pbuf); int cp = BufferIO::ReadInt8(pbuf);
myswprintf(event_string, L"放置了卡片"); myswprintf(event_string, dataManager.GetSysString(1601));
return true; return true;
} }
case MSG_SWAP: { case MSG_SWAP: {
...@@ -1609,7 +1604,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1609,7 +1604,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
int l2 = BufferIO::ReadInt8(pbuf); int l2 = BufferIO::ReadInt8(pbuf);
int s2 = BufferIO::ReadInt8(pbuf); int s2 = BufferIO::ReadInt8(pbuf);
int p2 = BufferIO::ReadInt8(pbuf); int p2 = BufferIO::ReadInt8(pbuf);
myswprintf(event_string, L"卡的控制权改变了"); myswprintf(event_string, dataManager.GetSysString(1602));
ClientCard* pc1 = mainGame->dField.GetCard(c1, l1, s1); ClientCard* pc1 = mainGame->dField.GetCard(c1, l1, s1);
ClientCard* pc2 = mainGame->dField.GetCard(c2, l2, s2); ClientCard* pc2 = mainGame->dField.GetCard(c2, l2, s2);
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
...@@ -1640,7 +1635,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1640,7 +1635,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
int cl = BufferIO::ReadInt8(pbuf); int cl = BufferIO::ReadInt8(pbuf);
int cs = BufferIO::ReadInt8(pbuf); int cs = BufferIO::ReadInt8(pbuf);
int cp = BufferIO::ReadInt8(pbuf); int cp = BufferIO::ReadInt8(pbuf);
myswprintf(event_string, L"[%ls]召唤中...", dataManager.GetName(code)); myswprintf(event_string, dataManager.GetSysString(1603), dataManager.GetName(code));
mainGame->showcardcode = code; mainGame->showcardcode = code;
mainGame->showcarddif = 0; mainGame->showcarddif = 0;
mainGame->showcard = 4; mainGame->showcard = 4;
...@@ -1650,7 +1645,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1650,7 +1645,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
return true; return true;
} }
case MSG_SUMMONED: { case MSG_SUMMONED: {
myswprintf(event_string, L"怪兽召唤成功"); myswprintf(event_string, dataManager.GetSysString(1604));
return true; return true;
} }
case MSG_SPSUMMONING: { case MSG_SPSUMMONING: {
...@@ -1659,7 +1654,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1659,7 +1654,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
int cl = BufferIO::ReadInt8(pbuf); int cl = BufferIO::ReadInt8(pbuf);
int cs = BufferIO::ReadInt8(pbuf); int cs = BufferIO::ReadInt8(pbuf);
int cp = BufferIO::ReadInt8(pbuf); int cp = BufferIO::ReadInt8(pbuf);
myswprintf(event_string, L"[%ls]特殊召唤中...", dataManager.GetName(code)); myswprintf(event_string, dataManager.GetSysString(1605), dataManager.GetName(code));
mainGame->showcardcode = code; mainGame->showcardcode = code;
mainGame->showcarddif = 1; mainGame->showcarddif = 1;
mainGame->showcard = 5; mainGame->showcard = 5;
...@@ -1669,7 +1664,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1669,7 +1664,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
return true; return true;
} }
case MSG_SPSUMMONED: { case MSG_SPSUMMONED: {
myswprintf(event_string, L"怪兽特殊召唤成功"); myswprintf(event_string, dataManager.GetSysString(1606));
return true; return true;
} }
case MSG_FLIPSUMMONING: { case MSG_FLIPSUMMONING: {
...@@ -1681,7 +1676,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1681,7 +1676,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
ClientCard* pcard = mainGame->dField.GetCard(cc, cl, cs); ClientCard* pcard = mainGame->dField.GetCard(cc, cl, cs);
pcard->SetCode(code); pcard->SetCode(code);
pcard->position = cp; pcard->position = cp;
myswprintf(event_string, L"[%ls]反转召唤中...", dataManager.GetName(code)); myswprintf(event_string, dataManager.GetSysString(1607), dataManager.GetName(code));
mainGame->dField.MoveCard(pcard, 10); mainGame->dField.MoveCard(pcard, 10);
mainGame->WaitFrameSignal(10); mainGame->WaitFrameSignal(10);
mainGame->showcardcode = code; mainGame->showcardcode = code;
...@@ -1693,7 +1688,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1693,7 +1688,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
return true; return true;
} }
case MSG_FLIPSUMMONED: { case MSG_FLIPSUMMONED: {
myswprintf(event_string, L"怪兽反转召唤成功"); myswprintf(event_string, dataManager.GetSysString(1608));
return true; return true;
} }
case MSG_CHAINING: { case MSG_CHAINING: {
...@@ -1740,7 +1735,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1740,7 +1735,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
} }
case MSG_CHAINED: { case MSG_CHAINED: {
int ct = BufferIO::ReadInt8(pbuf); int ct = BufferIO::ReadInt8(pbuf);
myswprintf(event_string, L"[%ls]的效果发动", dataManager.GetName(mainGame->dField.current_chain.code)); myswprintf(event_string, dataManager.GetSysString(1609), dataManager.GetName(mainGame->dField.current_chain.code));
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->dField.chains.push_back(mainGame->dField.current_chain); mainGame->dField.chains.push_back(mainGame->dField.current_chain);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
...@@ -1824,7 +1819,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1824,7 +1819,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
} }
} else } else
mainGame->WaitFrameSignal(30); mainGame->WaitFrameSignal(30);
myswprintf(textBuffer, L"[%ls](%ls,%d)成为对象", dataManager.GetName(pcard->code), dataManager.FormatLocation(l), s); myswprintf(textBuffer, dataManager.GetSysString(1610), dataManager.GetName(pcard->code), dataManager.FormatLocation(l), s);
mainGame->lstLog->addItem(textBuffer); mainGame->lstLog->addItem(textBuffer);
mainGame->logParam.push_back(pcard->code); mainGame->logParam.push_back(pcard->code);
pcard->is_highlighting = false; pcard->is_highlighting = false;
...@@ -1848,8 +1843,8 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1848,8 +1843,8 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
mainGame->WaitFrameSignal(5); mainGame->WaitFrameSignal(5);
} }
if (player == 0) if (player == 0)
myswprintf(event_string, L"我方抽了%d张卡", count); myswprintf(event_string, dataManager.GetSysString(1611), count);
else myswprintf(event_string, L"对手抽了%d张卡", count); else myswprintf(event_string, dataManager.GetSysString(1612), count);
return true; return true;
} }
case MSG_DAMAGE: { case MSG_DAMAGE: {
...@@ -1860,9 +1855,9 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1860,9 +1855,9 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
final = 0; final = 0;
mainGame->lpd = (mainGame->dInfo.lp[player] - final) / 10; mainGame->lpd = (mainGame->dInfo.lp[player] - final) / 10;
if (player == 0) if (player == 0)
myswprintf(event_string, L"我方受到%d伤害", val); myswprintf(event_string, dataManager.GetSysString(1613), val);
else else
myswprintf(event_string, L"对方受到%d伤害", val); myswprintf(event_string, dataManager.GetSysString(1614), val);
mainGame->lpccolor = 0xffff0000; mainGame->lpccolor = 0xffff0000;
mainGame->lpplayer = player; mainGame->lpplayer = player;
myswprintf(textBuffer, L"-%d", val); myswprintf(textBuffer, L"-%d", val);
...@@ -1883,9 +1878,9 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -1883,9 +1878,9 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
int final = mainGame->dInfo.lp[player] + val; int final = mainGame->dInfo.lp[player] + val;
mainGame->lpd = (mainGame->dInfo.lp[player] - final) / 10; mainGame->lpd = (mainGame->dInfo.lp[player] - final) / 10;
if (player == 0) if (player == 0)
myswprintf(event_string, L"我方回复%dLP", val); myswprintf(event_string, dataManager.GetSysString(1615), val);
else else
myswprintf(event_string, L"对方回复%dLP", val); myswprintf(event_string, dataManager.GetSysString(1616), val);
mainGame->lpccolor = 0xff00ff00; mainGame->lpccolor = 0xff00ff00;
mainGame->lpplayer = player; mainGame->lpplayer = player;
myswprintf(textBuffer, L"+%d", val); myswprintf(textBuffer, L"+%d", val);
...@@ -2023,7 +2018,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -2023,7 +2018,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
if (pc->counters.count(type)) if (pc->counters.count(type))
pc->counters[type] += count; pc->counters[type] += count;
else pc->counters[type] = count; else pc->counters[type] = count;
myswprintf(textBuffer, L"[%ls]放置了%d个[%ls]", dataManager.GetName(pc->code), count, dataManager.GetCounterName(type)); myswprintf(textBuffer, dataManager.GetSysString(1617), dataManager.GetName(pc->code), count, dataManager.GetCounterName(type));
pc->is_highlighting = true; pc->is_highlighting = true;
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->stACMessage->setText(textBuffer); mainGame->stACMessage->setText(textBuffer);
...@@ -2043,7 +2038,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -2043,7 +2038,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
pc->counters[type] -= count; pc->counters[type] -= count;
if (pc->counters[type] <= 0) if (pc->counters[type] <= 0)
pc->counters.erase(type); pc->counters.erase(type);
myswprintf(textBuffer, L"[%ls]移除了%d个[%ls]", dataManager.GetName(pc->code), count, dataManager.GetCounterName(type)); myswprintf(textBuffer, dataManager.GetSysString(1618), dataManager.GetName(pc->code), count, dataManager.GetCounterName(type));
pc->is_highlighting = true; pc->is_highlighting = true;
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->stACMessage->setText(textBuffer); mainGame->stACMessage->setText(textBuffer);
...@@ -2066,7 +2061,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -2066,7 +2061,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
float sy; float sy;
if (ld != 0) { if (ld != 0) {
mainGame->dField.attack_target = mainGame->dField.GetCard(cd, ld, sd); mainGame->dField.attack_target = mainGame->dField.GetCard(cd, ld, sd);
myswprintf(event_string, L"[%ls]攻击[%ls]", dataManager.GetName(mainGame->dField.attacker->code), myswprintf(event_string, dataManager.GetSysString(1619), dataManager.GetName(mainGame->dField.attacker->code),
dataManager.GetName(mainGame->dField.attack_target->code)); dataManager.GetName(mainGame->dField.attack_target->code));
float xa = mainGame->dField.attacker->curPos.X; float xa = mainGame->dField.attacker->curPos.X;
float ya = mainGame->dField.attacker->curPos.Y; float ya = mainGame->dField.attacker->curPos.Y;
...@@ -2079,7 +2074,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -2079,7 +2074,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
else else
mainGame->atk_r = vector3df(0, 0, 3.1415926 - atan((xd - xa) / (yd - ya))); mainGame->atk_r = vector3df(0, 0, 3.1415926 - atan((xd - xa) / (yd - ya)));
} else { } else {
myswprintf(event_string, L"[%ls]直接攻击", dataManager.GetName(mainGame->dField.attacker->code)); myswprintf(event_string, dataManager.GetSysString(1620), dataManager.GetName(mainGame->dField.attacker->code));
float xa = mainGame->dField.attacker->curPos.X; float xa = mainGame->dField.attacker->curPos.X;
float ya = mainGame->dField.attacker->curPos.Y; float ya = mainGame->dField.attacker->curPos.Y;
float xd = 3.95f; float xd = 3.95f;
...@@ -2116,7 +2111,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -2116,7 +2111,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
return true; return true;
} }
case MSG_ATTACK_DISABLED: { case MSG_ATTACK_DISABLED: {
myswprintf(event_string, L"攻击被无效", dataManager.GetName(mainGame->dField.attacker->code)); myswprintf(event_string, dataManager.GetSysString(1621), dataManager.GetName(mainGame->dField.attacker->code));
return true; return true;
} }
case MSG_DAMAGE_STEP_START: { case MSG_DAMAGE_STEP_START: {
...@@ -2128,7 +2123,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -2128,7 +2123,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
case MSG_MISSED_EFFECT: { case MSG_MISSED_EFFECT: {
BufferIO::ReadInt32(pbuf); BufferIO::ReadInt32(pbuf);
int code = BufferIO::ReadInt32(pbuf); int code = BufferIO::ReadInt32(pbuf);
myswprintf(textBuffer, L"[%ls]错过时点", dataManager.GetName(code)); myswprintf(textBuffer, dataManager.GetSysString(1622), dataManager.GetName(code));
mainGame->lstLog->addItem(textBuffer); mainGame->lstLog->addItem(textBuffer);
mainGame->logParam.push_back(code); mainGame->logParam.push_back(code);
return true; return true;
...@@ -2136,12 +2131,15 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -2136,12 +2131,15 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
case MSG_TOSS_COIN: { case MSG_TOSS_COIN: {
int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int count = BufferIO::ReadInt8(pbuf); int count = BufferIO::ReadInt8(pbuf);
textBuffer[0] = 0; wchar_t* pwbuf = textBuffer;
wcscat(textBuffer, L"投掷硬币结果:"); BufferIO::CopyWStrRef(dataManager.GetSysString(1623), pwbuf, 256);
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
int res = BufferIO::ReadInt8(pbuf); int res = BufferIO::ReadInt8(pbuf);
wcscat(textBuffer, res ? L"[正面]" : L"[反面]"); *pwbuf++ = L'[';
BufferIO::CopyWStrRef(dataManager.GetSysString(res ? 60 : 61), pwbuf, 256);
*pwbuf++ = L']';
} }
*pwbuf = 0;
mainGame->lstLog->addItem(textBuffer); mainGame->lstLog->addItem(textBuffer);
mainGame->logParam.push_back(0); mainGame->logParam.push_back(0);
mainGame->stACMessage->setText(textBuffer); mainGame->stACMessage->setText(textBuffer);
...@@ -2152,16 +2150,15 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -2152,16 +2150,15 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
case MSG_TOSS_DICE: { case MSG_TOSS_DICE: {
int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int count = BufferIO::ReadInt8(pbuf); int count = BufferIO::ReadInt8(pbuf);
textBuffer[0] = 0; wchar_t* pwbuf = textBuffer;
wcscat(textBuffer, L"投掷骰子结果:"); BufferIO::CopyWStrRef(dataManager.GetSysString(1624), pwbuf, 256);
wchar_t* p = &textBuffer[7];
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
int res = BufferIO::ReadInt8(pbuf); int res = BufferIO::ReadInt8(pbuf);
*p++ = L'['; *pwbuf++ = L'[';
*p++ = L'0' + res; *pwbuf++ = L'0' + res;
*p++ = L']'; *pwbuf++ = L']';
} }
*p = 0; *pwbuf = 0;
mainGame->lstLog->addItem(textBuffer); mainGame->lstLog->addItem(textBuffer);
mainGame->logParam.push_back(0); mainGame->logParam.push_back(0);
mainGame->stACMessage->setText(textBuffer); mainGame->stACMessage->setText(textBuffer);
......
...@@ -265,7 +265,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -265,7 +265,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break; break;
} }
} }
mainGame->wCardSelect->setText(L"请选择要发动效果的卡:"); mainGame->wCardSelect->setText(dataManager.GetSysString(566));
list_command = COMMAND_ACTIVATE; list_command = COMMAND_ACTIVATE;
ShowSelectCard(); ShowSelectCard();
} }
...@@ -321,7 +321,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -321,7 +321,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
} }
} }
list_command = COMMAND_SPSUMMON; list_command = COMMAND_SPSUMMON;
mainGame->wCardSelect->setText(L"请选择要特殊召唤的怪兽:"); mainGame->wCardSelect->setText(dataManager.GetSysString(509));
ShowSelectCard(); ShowSelectCard();
} }
break; break;
...@@ -386,28 +386,28 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -386,28 +386,28 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
ClientCard* pcard = mzone[command_controler][command_sequence]; ClientCard* pcard = mzone[command_controler][command_sequence];
for(int i = 0; i < pcard->overlayed.size(); ++i) for(int i = 0; i < pcard->overlayed.size(); ++i)
selectable_cards.push_back(pcard->overlayed[i]); selectable_cards.push_back(pcard->overlayed[i]);
myswprintf(formatBuffer, L"查看叠放卡:(%d)", pcard->overlayed.size()); myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1007), pcard->overlayed.size());
mainGame->wCardSelect->setText(formatBuffer); mainGame->wCardSelect->setText(formatBuffer);
break; break;
} }
case LOCATION_GRAVE: { case LOCATION_GRAVE: {
for(int i = grave[command_controler].size() - 1; i >= 0 ; --i) for(int i = grave[command_controler].size() - 1; i >= 0 ; --i)
selectable_cards.push_back(grave[command_controler][i]); selectable_cards.push_back(grave[command_controler][i]);
myswprintf(formatBuffer, L"查看墓地:(%d)", grave[command_controler].size()); myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1004), grave[command_controler].size());
mainGame->wCardSelect->setText(formatBuffer); mainGame->wCardSelect->setText(formatBuffer);
break; break;
} }
case LOCATION_REMOVED: { case LOCATION_REMOVED: {
for(int i = remove[command_controler].size() - 1; i >= 0 ; --i) for(int i = remove[command_controler].size() - 1; i >= 0 ; --i)
selectable_cards.push_back(remove[command_controler][i]); selectable_cards.push_back(remove[command_controler][i]);
myswprintf(formatBuffer, L"查看除外:(%d)", remove[command_controler].size()); myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1005), remove[command_controler].size());
mainGame->wCardSelect->setText(formatBuffer); mainGame->wCardSelect->setText(formatBuffer);
break; break;
} }
case LOCATION_EXTRA: { case LOCATION_EXTRA: {
for(int i = extra[command_controler].size() - 1; i >= 0 ; --i) for(int i = extra[command_controler].size() - 1; i >= 0 ; --i)
selectable_cards.push_back(extra[command_controler][i]); selectable_cards.push_back(extra[command_controler][i]);
myswprintf(formatBuffer, L"查看额外:(%d)", extra[command_controler].size()); myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1006), extra[command_controler].size());
mainGame->wCardSelect->setText(formatBuffer); mainGame->wCardSelect->setText(formatBuffer);
break; break;
} }
...@@ -966,7 +966,11 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -966,7 +966,11 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
} else { } else {
select_ready = true; select_ready = true;
if(mainGame->dInfo.curMsg == MSG_SELECT_TRIBUTE) { if(mainGame->dInfo.curMsg == MSG_SELECT_TRIBUTE) {
mainGame->stQMessage->setText(L"当前所选的卡已满足选择条件\n是否要继续选择?"); wchar_t wbuf[256], *pwbuf = wbuf;
BufferIO::CopyWStrRef(dataManager.GetSysString(209), pwbuf, 256);
*pwbuf++ = L'\n';
BufferIO::CopyWStrRef(dataManager.GetSysString(210), pwbuf, 256);
mainGame->stQMessage->setText(wbuf);
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
} }
} }
...@@ -990,7 +994,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -990,7 +994,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
DuelClient::SetResponseB(respbuf, selectable_cards.size()); DuelClient::SetResponseB(respbuf, selectable_cards.size());
mainGame->localAction.Set(); mainGame->localAction.Set();
} else { } else {
myswprintf(formatBuffer, L"请移除%d个[%ls]:", select_counter_count, dataManager.GetCounterName(select_counter_type)); myswprintf(formatBuffer, dataManager.GetSysString(204), select_counter_count, dataManager.GetCounterName(select_counter_type));
mainGame->stHintMsg->setText(formatBuffer); mainGame->stHintMsg->setText(formatBuffer);
} }
break; break;
...@@ -1015,7 +1019,11 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -1015,7 +1019,11 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->localAction.Set(); mainGame->localAction.Set();
} else { } else {
select_ready = true; select_ready = true;
mainGame->stQMessage->setText(L"当前所选的卡已选择条件\n是否要继续选择?"); wchar_t wbuf[256], *pwbuf = wbuf;
BufferIO::CopyWStrRef(dataManager.GetSysString(209), pwbuf, 256);
*pwbuf++ = L'\n';
BufferIO::CopyWStrRef(dataManager.GetSysString(210), pwbuf, 256);
mainGame->stQMessage->setText(wbuf);
mainGame->PopupElement(mainGame->wQuery); mainGame->PopupElement(mainGame->wQuery);
} }
} else } else
...@@ -1206,7 +1214,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -1206,7 +1214,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
} }
} }
if(mcard->turnCounter && (mcard->location & LOCATION_ONFIELD)) { if(mcard->turnCounter && (mcard->location & LOCATION_ONFIELD)) {
myswprintf(formatBuffer, L"\n回合计数:%d", mcard->turnCounter); myswprintf(formatBuffer, L"\n%ls%d", dataManager.GetSysString(211), mcard->turnCounter);
str.append(formatBuffer); str.append(formatBuffer);
} }
} else { } else {
...@@ -1223,7 +1231,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -1223,7 +1231,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
} }
} }
if(mcard->turnCounter && (mcard->location & LOCATION_ONFIELD)) { if(mcard->turnCounter && (mcard->location & LOCATION_ONFIELD)) {
myswprintf(formatBuffer, L"\n回合计数:%d", mcard->turnCounter); myswprintf(formatBuffer, L"\n%ls%d", dataManager.GetSysString(211), mcard->turnCounter);
str.append(formatBuffer); str.append(formatBuffer);
} }
} }
......
...@@ -108,7 +108,7 @@ bool Game::Initialize() { ...@@ -108,7 +108,7 @@ bool Game::Initialize() {
env->addStaticText(dataManager.GetSysString(1227), rect<s32>(20, 90, 220, 110), false, false, wCreateHost); env->addStaticText(dataManager.GetSysString(1227), rect<s32>(20, 90, 220, 110), false, false, wCreateHost);
cbMatchMode = env->addComboBox(rect<s32>(140, 85, 300, 110), wCreateHost); cbMatchMode = env->addComboBox(rect<s32>(140, 85, 300, 110), wCreateHost);
cbMatchMode->addItem(dataManager.GetSysString(1244)); cbMatchMode->addItem(dataManager.GetSysString(1244));
cbMatchMode->addItem(dataManager.GetSysString(1245)); //cbMatchMode->addItem(dataManager.GetSysString(1245));
chkEnablePriority = env->addCheckBox(false, rect<s32>(20, 150, 360, 170), wCreateHost, -1, dataManager.GetSysString(1236)); chkEnablePriority = env->addCheckBox(false, rect<s32>(20, 150, 360, 170), wCreateHost, -1, dataManager.GetSysString(1236));
env->addStaticText(dataManager.GetSysString(1228), rect<s32>(20, 120, 320, 140), false, false, wCreateHost); env->addStaticText(dataManager.GetSysString(1228), rect<s32>(20, 120, 320, 140), false, false, wCreateHost);
chkNoCheckDeck = env->addCheckBox(false, rect<s32>(20, 180, 170, 200), wCreateHost, -1, dataManager.GetSysString(1229)); chkNoCheckDeck = env->addCheckBox(false, rect<s32>(20, 180, 170, 200), wCreateHost, -1, dataManager.GetSysString(1229));
......
...@@ -130,6 +130,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -130,6 +130,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame->btnReplayStart->setVisible(false); mainGame->btnReplayStart->setVisible(false);
mainGame->btnReplayPause->setVisible(true); mainGame->btnReplayPause->setVisible(true);
mainGame->btnReplayStep->setVisible(false); mainGame->btnReplayStep->setVisible(false);
mainGame->wPhase->setVisible(true);
mainGame->dField.panel = 0; mainGame->dField.panel = 0;
mainGame->dField.hovered_card = 0; mainGame->dField.hovered_card = 0;
mainGame->dField.clicked_card = 0; mainGame->dField.clicked_card = 0;
......
...@@ -2571,6 +2571,7 @@ int32 field::process_battle_command(uint16 step) { ...@@ -2571,6 +2571,7 @@ int32 field::process_battle_command(uint16 step) {
core.attacker->set_status(STATUS_ATTACK_CANCELED, TRUE); core.attacker->set_status(STATUS_ATTACK_CANCELED, TRUE);
} }
if(is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_BP)) { if(is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_BP)) {
reset_phase(PHASE_DAMAGE);
if(core.attacker->fieldid == afid) { if(core.attacker->fieldid == afid) {
if(!atk_disabled) { if(!atk_disabled) {
if(core.attack_target) if(core.attack_target)
......
...@@ -41,11 +41,14 @@ ...@@ -41,11 +41,14 @@
!system 201 此时没有可以发动的效果 !system 201 此时没有可以发动的效果
!system 202 是否要确认场上的情况? !system 202 是否要确认场上的情况?
!system 203 是否要进行连锁? !system 203 是否要进行连锁?
!system 204 请移除%d个[%ls]: !system 204 请移除%d个[%ls]
!system 205 请选择排列顺序 !system 205 请选择排列顺序
!system 206 请选择连锁顺序 !system 206 请选择连锁顺序
!system 207 翻开卡组上方%d张卡: !system 207 翻开卡组上方%d张卡:
!system 208 确认%d张卡: !system 208 确认%d张卡:
!system 209 当前所选的卡已满足选择条件
!system 210 是否要继续选择?
!system 211 回合计数:
!system 500 请选择要解放的卡 !system 500 请选择要解放的卡
!system 501 请选择要丢弃的手牌 !system 501 请选择要丢弃的手牌
!system 502 请选择要破坏的卡 !system 502 请选择要破坏的卡
...@@ -90,6 +93,7 @@ ...@@ -90,6 +93,7 @@
!system 563 请选择要宣言的种族 !system 563 请选择要宣言的种族
!system 564 请宣言一个卡名 !system 564 请宣言一个卡名
!system 565 请选择一个数字 !system 565 请选择一个数字
!system 566 请选择要发动效果的卡
!system 1000 卡组 !system 1000 卡组
!system 1001 手牌 !system 1001 手牌
!system 1002 怪兽区 !system 1002 怪兽区
...@@ -301,6 +305,31 @@ ...@@ -301,6 +305,31 @@
!system 1510 对方选择了:[%ls] !system 1510 对方选择了:[%ls]
!system 1511 对方宣言了:[%ls] !system 1511 对方宣言了:[%ls]
!system 1512 对方选择了:[%d] !system 1512 对方选择了:[%d]
!system 1600 卡片改变了表示形式
!system 1601 放置了卡片
!system 1602 卡的控制权改变了
!system 1603 [%ls]召唤中...
!system 1604 怪兽召唤成功
!system 1605 [%ls]特殊召唤中...
!system 1606 怪兽特殊召唤成功
!system 1607 [%ls]反转召唤中...
!system 1608 怪兽反转召唤成功
!system 1609 [%ls]的效果发动
!system 1610 [%ls](%ls,%d)成为对象
!system 1611 我方抽了%d张卡
!system 1612 对手抽了%d张卡
!system 1613 我方受到%d伤害
!system 1614 对方受到%d伤害
!system 1615 我方回复%dLP
!system 1616 对方回复%dLP
!system 1617 [%ls]放置了%d个[%ls]
!system 1618 [%ls]移除了%d个[%ls]
!system 1619 [%ls]攻击[%ls]
!system 1620 [%ls]直接攻击
!system 1621 攻击被无效
!system 1622 [%ls]错过时点
!system 1623 投掷硬币结果:
!system 1624 投掷骰子结果:
#vistory reason #vistory reason
!victory 0x1 LP变成0 !victory 0x1 LP变成0
!victory 0x2 没有卡可抽 !victory 0x2 没有卡可抽
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment