Commit 38bbf2fc authored by DailyShana's avatar DailyShana

Merge remote-tracking branch 'refs/remotes/Fluorohydride/master' into setname

parents de331654 8ff8d42a
## ygopro
A script engine for "yu-gi-oh!" and sample gui
[中文说明](https://github.com/Fluorohydride/ygopro/wiki/%E4%B8%AD%E6%96%87%E8%AF%B4%E6%98%8E)
###Keys:
* ESC: Minimize the window.
* A: Holding down this button will let the system stop at every timing.
* S: Holding down this button will let the system skip every timing.
* R: Fix the font error.
* F1~F4: Show the cards in your grave, banished zone, extra deck, xyz materials.
* F5~F8: Show the cards in your opponent's grave, banished zone, extra deck, xyz materials.
###Color:
* Background:
* White = your card, Grey = your opponent's card
* Text:
* Black = default, Blue = the owner of the xyz material is different from its controller
###Sequence:
* Monster Zone: 1~5, starting from the left hand side.
* Spell & Trap Zone: 1~5, starting from the left hand side.
* Field Zone: 6
* Pendulum Zone: 7~8, starting from the left hand side.
* The others: 1~n, starting from the bottom.
###Deck edit page:
* All numeric textboxs: They support >, =, <, >=, <= signs.
* Card name: Search card names and texts by default, and $foo will only search foo in card names.
### Command-line options:
* -j: Join the host in system.conf file.
* -d: Enter the deck edit page.
* -r: Enter the replay mode page.
* -s: Enter the single mode page.
* -efoo: Load foo as the extra database.
### Directories:
* pics: .jpg card images(177*254).
* pics\thumbnail: .jpg thumbnail images(44*64).
* script: .lua script files.
* textures: Other image files.
* deck: .ydk deck files.
* replay: .yrp replay files.
* expansions: *.cdb will be loaded as extra databases.
This diff is collapsed.
......@@ -85,19 +85,19 @@ bool DataManager::LoadStrings(const char* file) {
continue;
sscanf(linebuf, "!%s", strbuf);
if(!strcmp(strbuf, "system")) {
sscanf(&linebuf[7], "%d %s", &value, strbuf);
sscanf(&linebuf[7], "%d %240[^\n]", &value, strbuf);
int len = BufferIO::DecodeUTF8(strbuf, strBuffer);
wchar_t* pbuf = new wchar_t[len + 1];
wcscpy(pbuf, strBuffer);
_sysStrings[value] = pbuf;
} else if(!strcmp(strbuf, "victory")) {
sscanf(&linebuf[8], "%x %s", &value, strbuf);
sscanf(&linebuf[8], "%x %240[^\n]", &value, strbuf);
int len = BufferIO::DecodeUTF8(strbuf, strBuffer);
wchar_t* pbuf = new wchar_t[len + 1];
wcscpy(pbuf, strBuffer);
_victoryStrings[value] = pbuf;
} else if(!strcmp(strbuf, "counter")) {
sscanf(&linebuf[8], "%x %s", &value, strbuf);
sscanf(&linebuf[8], "%x %240[^\n]", &value, strbuf);
int len = BufferIO::DecodeUTF8(strbuf, strBuffer);
wchar_t* pbuf = new wchar_t[len + 1];
wcscpy(pbuf, strBuffer);
......
......@@ -336,6 +336,8 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
dragx = event.MouseInput.X;
dragy = event.MouseInput.Y;
draging_pointer = dataManager.GetCodePointer(hovered_code);
if(draging_pointer == dataManager._datas.end())
break;
unsigned int limitcode = draging_pointer->second.alias ? draging_pointer->second.alias : draging_pointer->first;
if(hovered_pos == 4) {
int limit = 3;
......@@ -438,6 +440,8 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
if(hovered_pos == 0 || hovered_seq == -1)
break;
draging_pointer = dataManager.GetCodePointer(hovered_code);
if(draging_pointer == dataManager._datas.end())
break;
if(hovered_pos == 1) {
if(deckManager.current_deck.side.size() < 20) {
deckManager.current_deck.main.erase(deckManager.current_deck.main.begin() + hovered_seq);
......@@ -464,8 +468,11 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break;
if(hovered_pos == 0 || hovered_seq == -1)
break;
if(!is_draging)
if(!is_draging) {
draging_pointer = dataManager.GetCodePointer(hovered_code);
if(draging_pointer == dataManager._datas.end())
break;
}
if(hovered_pos == 1) {
if(!is_draging)
deckManager.current_deck.main.erase(deckManager.current_deck.main.begin() + hovered_seq);
......@@ -621,12 +628,13 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case irr::EET_KEY_INPUT_EVENT: {
switch(event.KeyInput.Key) {
case irr::KEY_KEY_R: {
if(!event.KeyInput.PressedDown)
if(!event.KeyInput.PressedDown && !mainGame->HasFocus(EGUIET_EDIT_BOX))
mainGame->textFont->setTransparency(true);
break;
}
case irr::KEY_ESCAPE: {
mainGame->device->minimizeWindow();
if(!mainGame->HasFocus(EGUIET_EDIT_BOX))
mainGame->device->minimizeWindow();
break;
}
default: break;
......@@ -642,7 +650,7 @@ void DeckBuilder::FilterCards() {
const wchar_t* pstr = mainGame->ebCardName->getText();
int trycode = BufferIO::GetVal(pstr);
if(dataManager.GetData(trycode, 0)) {
auto ptr = dataManager.GetCodePointer(trycode);
auto ptr = dataManager.GetCodePointer(trycode); // verified by GetData()
results.push_back(ptr);
mainGame->scrFilter->setVisible(false);
mainGame->scrFilter->setPos(0);
......
......@@ -128,7 +128,7 @@ void DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec) {
if(cd.type & TYPE_TOKEN)
continue;
else if(cd.type & 0x802040 && deck.extra.size() < 15) {
deck.extra.push_back(dataManager.GetCodePointer(code));
deck.extra.push_back(dataManager.GetCodePointer(code)); //verified by GetData()
} else if(deck.main.size() < 60) {
deck.main.push_back(dataManager.GetCodePointer(code));
}
......@@ -140,7 +140,7 @@ void DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec) {
if(cd.type & TYPE_TOKEN)
continue;
if(deck.side.size() < 15)
deck.side.push_back(dataManager.GetCodePointer(code));
deck.side.push_back(dataManager.GetCodePointer(code)); //verified by GetData()
}
}
bool DeckManager::LoadSide(Deck& deck, int* dbuf, int mainc, int sidec) {
......
......@@ -920,10 +920,12 @@ void Game::DrawDeckBd() {
driver->draw2DRectangle(0x80000000, recti(806, 164 + i * 66, 1019, 230 + i * 66));
DrawThumb(ptr, position2di(810, 165 + i * 66), deckBuilder.filterList);
if(ptr->second.type & TYPE_MONSTER) {
int form = 0x2605;
if(ptr->second.type & TYPE_XYZ) ++form;
myswprintf(textBuffer, L"%ls", dataManager.GetName(ptr->first));
textFont->draw(textBuffer, recti(859, 164 + i * 66, 955, 185 + i * 66), 0xff000000, false, false);
textFont->draw(textBuffer, recti(860, 165 + i * 66, 955, 185 + i * 66), 0xffffffff, false, false);
myswprintf(textBuffer, L"%ls/%ls \x2605%d", dataManager.FormatAttribute(ptr->second.attribute), dataManager.FormatRace(ptr->second.race), ptr->second.level);
myswprintf(textBuffer, L"%ls/%ls %c%d", dataManager.FormatAttribute(ptr->second.attribute), dataManager.FormatRace(ptr->second.race), form, ptr->second.level);
textFont->draw(textBuffer, recti(859, 186 + i * 66, 955, 207 + i * 66), 0xff000000, false, false);
textFont->draw(textBuffer, recti(860, 187 + i * 66, 955, 207 + i * 66), 0xffffffff, false, false);
if(ptr->second.attack < 0 && ptr->second.defence < 0)
......@@ -942,6 +944,8 @@ void Game::DrawDeckBd() {
wcscat(textBuffer, L" [OCG]");
else if((ptr->second.ot & 0x3) == 2)
wcscat(textBuffer, L" [TCG]");
else if((ptr->second.ot & 0x7) == 4)
wcscat(textBuffer, L" [Custom]");
textFont->draw(textBuffer, recti(859, 208 + i * 66, 955, 229 + i * 66), 0xff000000, false, false);
textFont->draw(textBuffer, recti(860, 209 + i * 66, 955, 229 + i * 66), 0xffffffff, false, false);
} else {
......@@ -956,6 +960,8 @@ void Game::DrawDeckBd() {
wcscat(textBuffer, L"[OCG]");
else if((ptr->second.ot & 0x3) == 2)
wcscat(textBuffer, L"[TCG]");
else if((ptr->second.ot & 0x7) == 4)
wcscat(textBuffer, L"[Custom]");
textFont->draw(textBuffer, recti(859, 208 + i * 66, 955, 229 + i * 66), 0xff000000, false, false);
textFont->draw(textBuffer, recti(860, 209 + i * 66, 955, 229 + i * 66), 0xffffffff, false, false);
}
......
......@@ -681,6 +681,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->gMutex.Unlock();
mainGame->WaitFrameSignal(11);
}
if(mainGame->wOptions->isVisible()) {
mainGame->gMutex.Lock();
mainGame->HideElement(mainGame->wOptions);
mainGame->gMutex.Unlock();
mainGame->WaitFrameSignal(11);
}
}
if(mainGame->dInfo.time_player == 1)
mainGame->dInfo.time_player = 2;
......@@ -916,7 +922,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard->cmdFlag |= COMMAND_ACTIVATE;
if (pcard->location == LOCATION_GRAVE)
mainGame->dField.grave_act = true;
if (pcard->location == LOCATION_REMOVED)
else if (pcard->location == LOCATION_REMOVED)
mainGame->dField.remove_act = true;
}
mainGame->dField.attackable_cards.clear();
......@@ -974,13 +980,13 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard->SetCode(code);
mainGame->dField.deck_act = true;
}
if (pcard->location == LOCATION_GRAVE)
else if (pcard->location == LOCATION_GRAVE)
mainGame->dField.grave_act = true;
if (pcard->location == LOCATION_REMOVED)
else if (pcard->location == LOCATION_REMOVED)
mainGame->dField.remove_act = true;
if (pcard->location == LOCATION_EXTRA)
else if (pcard->location == LOCATION_EXTRA)
mainGame->dField.extra_act = true;
if (pcard->location == LOCATION_SZONE && pcard->sequence == 6)
else if (pcard->location == LOCATION_SZONE && pcard->sequence == 6)
mainGame->dField.pzone_act[pcard->controler] = true;
}
mainGame->dField.reposable_cards.clear();
......@@ -1031,7 +1037,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard->cmdFlag |= COMMAND_ACTIVATE;
if (pcard->location == LOCATION_GRAVE)
mainGame->dField.grave_act = true;
if (pcard->location == LOCATION_REMOVED)
else if (pcard->location == LOCATION_REMOVED)
mainGame->dField.remove_act = true;
}
if(BufferIO::ReadInt8(pbuf)) {
......@@ -1062,8 +1068,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
if (pcard->code != code)
pcard->SetCode(code);
BufferIO::ReadInt8(pbuf);
pcard->is_highlighting = true;
mainGame->dField.highlighting_card = pcard;
if(l != LOCATION_DECK) {
pcard->is_highlighting = true;
mainGame->dField.highlighting_card = pcard;
}
myswprintf(textBuffer, dataManager.GetSysString(200), dataManager.FormatLocation(l, s), dataManager.GetName(code));
mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stQMessage, 310, mainGame->textFont, textBuffer);
......@@ -1190,11 +1198,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard->cmdFlag |= COMMAND_ACTIVATE;
if(l == LOCATION_GRAVE)
mainGame->dField.grave_act = true;
if(l == LOCATION_REMOVED)
else if(l == LOCATION_REMOVED)
mainGame->dField.remove_act = true;
if(l == LOCATION_EXTRA)
else if(l == LOCATION_EXTRA)
mainGame->dField.extra_act = true;
if(l == LOCATION_OVERLAY)
else if(l == LOCATION_OVERLAY)
panelmode = true;
}
}
......@@ -2373,7 +2381,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
} else
mainGame->WaitFrameSignal(30);
myswprintf(textBuffer, dataManager.GetSysString(1610), dataManager.GetName(pcard->code), dataManager.FormatLocation(l, s), s);
myswprintf(textBuffer, dataManager.GetSysString(1610), dataManager.GetName(pcard->code), dataManager.FormatLocation(l, s), s + 1);
mainGame->lstLog->addItem(textBuffer);
mainGame->logParam.push_back(pcard->code);
pcard->is_highlighting = false;
......@@ -3083,28 +3091,34 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->dField.AddCard(ccard, p, LOCATION_DECK, seq);
mainGame->dField.GetCardLocation(ccard, &ccard->curPos, &ccard->curRot, true);
}
val = BufferIO::ReadInt8(pbuf);
for(int seq = 0; seq < val; ++seq) {
ClientCard* ccard = new ClientCard;
mainGame->dField.AddCard(ccard, p, LOCATION_HAND, seq);
}
// Use another loop to refresh the hand locations to prevent incorrect positioning
for (int seq = 0; seq < val; ++seq) {
ClientCard* ccard = mainGame->dField.hand[p][seq];
mainGame->dField.GetCardLocation(ccard, &ccard->curPos, &ccard->curRot, true);
}
val = BufferIO::ReadInt8(pbuf);
for(int seq = 0; seq < val; ++seq) {
ClientCard* ccard = new ClientCard;
mainGame->dField.AddCard(ccard, p, LOCATION_EXTRA, seq);
mainGame->dField.AddCard(ccard, p, LOCATION_GRAVE, seq);
mainGame->dField.GetCardLocation(ccard, &ccard->curPos, &ccard->curRot, true);
}
val = BufferIO::ReadInt8(pbuf);
for(int seq = 0; seq < val; ++seq) {
ClientCard* ccard = new ClientCard;
mainGame->dField.AddCard(ccard, p, LOCATION_GRAVE, seq);
mainGame->dField.AddCard(ccard, p, LOCATION_REMOVED, seq);
mainGame->dField.GetCardLocation(ccard, &ccard->curPos, &ccard->curRot, true);
}
val = BufferIO::ReadInt8(pbuf);
for(int seq = 0; seq < val; ++seq) {
ClientCard* ccard = new ClientCard;
mainGame->dField.AddCard(ccard, p, LOCATION_REMOVED, seq);
mainGame->dField.AddCard(ccard, p, LOCATION_EXTRA, seq);
mainGame->dField.GetCardLocation(ccard, &ccard->curPos, &ccard->curRot, true);
}
val = BufferIO::ReadInt8(pbuf);
......
This diff is collapsed.
#ifndef EVENT_HANDLER_H
#define EVENT_HANDLER_H
//special cards
#define CARD_MARINE_DOLPHIN 78734254
#define CARD_TWINKLE_MOSS 13857930
#include "config.h"
#include "game.h"
#include "client_card.h"
......
......@@ -16,7 +16,7 @@
#include <dirent.h>
#endif
const unsigned short PRO_VERSION = 0x1336;
const unsigned short PRO_VERSION = 0x1337;
namespace ygo {
......@@ -335,7 +335,7 @@ bool Game::Initialize() {
wCardSelect->getCloseButton()->setVisible(false);
wCardSelect->setVisible(false);
for(int i = 0; i < 5; ++i) {
stCardPos[i] = env->addStaticText(L"", rect<s32>(40 + 125 * i, 30, 139 + 125 * i, 50), true, false, wCardSelect, -1, true);
stCardPos[i] = env->addStaticText(L"", rect<s32>(30 + 125 * i, 30, 150 + 125 * i, 50), true, false, wCardSelect, -1, true);
stCardPos[i]->setBackgroundColor(0xffffffff);
stCardPos[i]->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
btnCardSelect[i] = irr::gui::CGUIImageButton::addImageButton(env, rect<s32>(30 + 125 * i, 55, 150 + 125 * i, 225), wCardSelect, BUTTON_CARD_0 + i);
......@@ -348,7 +348,7 @@ bool Game::Initialize() {
wCardDisplay->getCloseButton()->setVisible(false);
wCardDisplay->setVisible(false);
for(int i = 0; i < 5; ++i) {
stDisplayPos[i] = env->addStaticText(L"", rect<s32>(40 + 125 * i, 30, 139 + 125 * i, 50), true, false, wCardDisplay, -1, true);
stDisplayPos[i] = env->addStaticText(L"", rect<s32>(30 + 125 * i, 30, 150 + 125 * i, 50), true, false, wCardDisplay, -1, true);
stDisplayPos[i]->setBackgroundColor(0xffffffff);
stDisplayPos[i]->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
btnCardDisplay[i] = irr::gui::CGUIImageButton::addImageButton(env, rect<s32>(30 + 125 * i, 55, 150 + 125 * i, 225), wCardDisplay, BUTTON_DISPLAY_0 + i);
......@@ -804,7 +804,7 @@ void Game::LoadConfig() {
int fsize = ftell(fp);
fseek(fp, 0, SEEK_SET);
while(ftell(fp) < fsize) {
fgets(linebuf, 250, fp);
fgets(linebuf, 256, fp);
sscanf(linebuf, "%s = %s", strbuf, valbuf);
if(!strcmp(strbuf, "antialias")) {
gameConf.antialias = atoi(valbuf);
......@@ -812,15 +812,6 @@ void Game::LoadConfig() {
gameConf.use_d3d = atoi(valbuf) > 0;
} else if(!strcmp(strbuf, "errorlog")) {
enable_log = atoi(valbuf);
} else if(!strcmp(strbuf, "nickname")) {
BufferIO::DecodeUTF8(valbuf, wstr);
BufferIO::CopyWStr(wstr, gameConf.nickname, 20);
} else if(!strcmp(strbuf, "gamename")) {
BufferIO::DecodeUTF8(valbuf, wstr);
BufferIO::CopyWStr(wstr, gameConf.gamename, 20);
} else if(!strcmp(strbuf, "lastdeck")) {
BufferIO::DecodeUTF8(valbuf, wstr);
BufferIO::CopyWStr(wstr, gameConf.lastdeck, 64);
} else if(!strcmp(strbuf, "textfont")) {
BufferIO::DecodeUTF8(valbuf, wstr);
int textfontsize;
......@@ -841,6 +832,21 @@ void Game::LoadConfig() {
} else if(!strcmp(strbuf, "roompass")) {
BufferIO::DecodeUTF8(valbuf, wstr);
BufferIO::CopyWStr(wstr, gameConf.roompass, 20);
} else {
// options allowing multiple words
sscanf(linebuf, "%s = %240[^\n]", strbuf, valbuf);
if (!strcmp(strbuf, "nickname")) {
BufferIO::DecodeUTF8(valbuf, wstr);
BufferIO::CopyWStr(wstr, gameConf.nickname, 20);
}
else if (!strcmp(strbuf, "gamename")) {
BufferIO::DecodeUTF8(valbuf, wstr);
BufferIO::CopyWStr(wstr, gameConf.gamename, 20);
}
else if (!strcmp(strbuf, "lastdeck")) {
BufferIO::DecodeUTF8(valbuf, wstr);
BufferIO::CopyWStr(wstr, gameConf.lastdeck, 64);
}
}
}
fclose(fp);
......@@ -897,19 +903,19 @@ void Game::ShowCardInfo(int code) {
if(cd.type & TYPE_MONSTER) {
myswprintf(formatBuffer, L"[%ls] %ls/%ls", dataManager.FormatType(cd.type), dataManager.FormatRace(cd.race), dataManager.FormatAttribute(cd.attribute));
stInfo->setText(formatBuffer);
formatBuffer[0] = L'[';
for(unsigned int i = 1; i <= cd.level; ++i)
formatBuffer[i] = 0x2605;
formatBuffer[cd.level + 1] = L']';
formatBuffer[cd.level + 2] = L' ';
int form = 0x2605;
if(cd.type & TYPE_XYZ) ++form ;
myswprintf(formatBuffer, L"[%c%d] ",form,cd.level);
wchar_t adBuffer[16];
if(cd.attack < 0 && cd.defence < 0)
myswprintf(&formatBuffer[cd.level + 3], L"?/?");
myswprintf(adBuffer, L"?/?");
else if(cd.attack < 0)
myswprintf(&formatBuffer[cd.level + 3], L"?/%d", cd.defence);
myswprintf(adBuffer, L"?/%d", cd.defence);
else if(cd.defence < 0)
myswprintf(&formatBuffer[cd.level + 3], L"%d/?", cd.attack);
myswprintf(adBuffer, L"%d/?", cd.attack);
else
myswprintf(&formatBuffer[cd.level + 3], L"%d/%d", cd.attack, cd.defence);
myswprintf(adBuffer, L"%d/%d", cd.attack, cd.defence);
wcscat(formatBuffer, adBuffer);
if(cd.type & TYPE_PENDULUM) {
wchar_t scaleBuffer[16];
myswprintf(scaleBuffer, L" %d/%d", cd.lscale, cd.rscale);
......
......@@ -54,7 +54,6 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
inet_ntop(AF_INET, &(((struct sockaddr_in *)servinfo->ai_addr)->sin_addr), ip, 20);
freeaddrinfo(servinfo);
#else
//int status;
char hostname[100];
char ip[20];
const wchar_t* pstr = mainGame->ebJoinIP->getText();
......@@ -307,7 +306,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
break;
}
BufferIO::CopyWStr(mainGame->cbDeckSelect->getItem(mainGame->cbDeckSelect->getSelected()),
mainGame->gameConf.lastdeck, 20);
mainGame->gameConf.lastdeck, 64);
char deckbuf[1024];
char* pdeck = deckbuf;
BufferIO::WriteInt32(pdeck, deckManager.current_deck.main.size() + deckManager.current_deck.extra.size());
......@@ -364,12 +363,13 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
case irr::EET_KEY_INPUT_EVENT: {
switch(event.KeyInput.Key) {
case irr::KEY_KEY_R: {
if(!event.KeyInput.PressedDown)
if(!event.KeyInput.PressedDown && !mainGame->HasFocus(EGUIET_EDIT_BOX))
mainGame->textFont->setTransparency(true);
break;
}
case irr::KEY_ESCAPE: {
mainGame->device->minimizeWindow();
if(!mainGame->HasFocus(EGUIET_EDIT_BOX))
mainGame->device->minimizeWindow();
break;
}
default: break;
......
......@@ -86,25 +86,25 @@ int ReplayMode::ReplayThread(void* param) {
if(!(opt & DUEL_TAG_MODE)) {
int main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_DECK, 0, 0);
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
int extra = cur_replay.ReadInt32();
for(int i = 0; i < extra; ++i)
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_EXTRA, 0, 0);
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
mainGame->dField.Initial(0, main, extra);
main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_DECK, 0, 0);
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
extra = cur_replay.ReadInt32();
for(int i = 0; i < extra; ++i)
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_EXTRA, 0, 0);
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
mainGame->dField.Initial(1, main, extra);
} else {
int main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_DECK, 0, 0);
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
int extra = cur_replay.ReadInt32();
for(int i = 0; i < extra; ++i)
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_EXTRA, 0, 0);
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
mainGame->dField.Initial(0, main, extra);
main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
......@@ -114,10 +114,10 @@ int ReplayMode::ReplayThread(void* param) {
new_tag_card(pduel, cur_replay.ReadInt32(), 0, LOCATION_EXTRA);
main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_DECK, 0, 0);
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
extra = cur_replay.ReadInt32();
for(int i = 0; i < extra; ++i)
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_EXTRA, 0, 0);
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
mainGame->dField.Initial(1, main, extra);
main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
......
......@@ -421,22 +421,22 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
last_replay.Flush();
last_replay.WriteInt32(pdeck[0].main.size(), false);
for(int32 i = (int32)pdeck[0].main.size() - 1; i >= 0; --i) {
new_card(pduel, pdeck[0].main[i]->first, 0, 0, LOCATION_DECK, 0, 0);
new_card(pduel, pdeck[0].main[i]->first, 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
last_replay.WriteInt32(pdeck[0].main[i]->first, false);
}
last_replay.WriteInt32(pdeck[0].extra.size(), false);
for(int32 i = (int32)pdeck[0].extra.size() - 1; i >= 0; --i) {
new_card(pduel, pdeck[0].extra[i]->first, 0, 0, LOCATION_EXTRA, 0, 0);
new_card(pduel, pdeck[0].extra[i]->first, 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
last_replay.WriteInt32(pdeck[0].extra[i]->first, false);
}
last_replay.WriteInt32(pdeck[1].main.size(), false);
for(int32 i = (int32)pdeck[1].main.size() - 1; i >= 0; --i) {
new_card(pduel, pdeck[1].main[i]->first, 1, 1, LOCATION_DECK, 0, 0);
new_card(pduel, pdeck[1].main[i]->first, 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
last_replay.WriteInt32(pdeck[1].main[i]->first, false);
}
last_replay.WriteInt32(pdeck[1].extra.size(), false);
for(int32 i = (int32)pdeck[1].extra.size() - 1; i >= 0; --i) {
new_card(pduel, pdeck[1].extra[i]->first, 1, 1, LOCATION_EXTRA, 0, 0);
new_card(pduel, pdeck[1].extra[i]->first, 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
last_replay.WriteInt32(pdeck[1].extra[i]->first, false);
}
last_replay.Flush();
......
......@@ -393,12 +393,12 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
//
last_replay.WriteInt32(pdeck[0].main.size(), false);
for(int32 i = (int32)pdeck[0].main.size() - 1; i >= 0; --i) {
new_card(pduel, pdeck[0].main[i]->first, 0, 0, LOCATION_DECK, 0, 0);
new_card(pduel, pdeck[0].main[i]->first, 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
last_replay.WriteInt32(pdeck[0].main[i]->first, false);
}
last_replay.WriteInt32(pdeck[0].extra.size(), false);
for(int32 i = (int32)pdeck[0].extra.size() - 1; i >= 0; --i) {
new_card(pduel, pdeck[0].extra[i]->first, 0, 0, LOCATION_EXTRA, 0, 0);
new_card(pduel, pdeck[0].extra[i]->first, 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
last_replay.WriteInt32(pdeck[0].extra[i]->first, false);
}
//
......@@ -415,12 +415,12 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
//
last_replay.WriteInt32(pdeck[3].main.size(), false);
for(int32 i = (int32)pdeck[3].main.size() - 1; i >= 0; --i) {
new_card(pduel, pdeck[3].main[i]->first, 1, 1, LOCATION_DECK, 0, 0);
new_card(pduel, pdeck[3].main[i]->first, 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
last_replay.WriteInt32(pdeck[3].main[i]->first, false);
}
last_replay.WriteInt32(pdeck[3].extra.size(), false);
for(int32 i = (int32)pdeck[3].extra.size() - 1; i >= 0; --i) {
new_card(pduel, pdeck[3].extra[i]->first, 1, 1, LOCATION_EXTRA, 0, 0);
new_card(pduel, pdeck[3].extra[i]->first, 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
last_replay.WriteInt32(pdeck[3].extra[i]->first, false);
}
//
......
#[2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2015.7 TCG][2015.4 TCG][2015.1 TCG][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1]
#[2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2015.11 TCG][2015.7 TCG][2015.4 TCG][2015.1 TCG][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1]
!2015.10
#forbidden
20663556 0 --イレカエル
......@@ -1215,6 +1215,168 @@
53582587 2 --激流葬
29401950 2 --奈落の落とし穴
!2015.11 TCG
#forbidden
27279764 0 --アポクリフォート・キラー
20663556 0 --イレカエル
40044918 0 --E·HERO エアーマン
20366274 0 --エルシャドール・ネフィリム
53804307 0 --焔征竜-ブラスター
44910027 0 --ヴィクトリー・ドラゴン
82301904 0 --混沌帝龍 -終焉の使者-
79106360 0 --カオスポッド
90411554 0 --巌征竜-レドックス
08903700 0 --儀式魔人リリーサー
26202165 0 --クリッター
78010363 0 --黒き森のウィッチ
40737112 0 --混沌の黒魔術師
34124316 0 --サイバーポッド
63519819 0 --サウザンド·アイズ·サクリファイス
81122844 0 --発条空母ゼンマイティ
21593977 0 --処刑人-マキュラ
56570271 0 --DHERO ディスクガイ
69015963 0 --デビル·フランケン
33184167 0 --同族感染ウィルス
54719828 0 --No.16 色の支配者ショック·ルーラー
90307777 0 --影霊衣の術士 シュリット
26400609 0 --瀑征竜-タイダル
50321796 0 --氷結界の龍 ブリューナク
78706415 0 --ファイバーポッド
93369354 0 --フィッシュボーグ-ガンナー
34206604 0 --魔導サイエンティスト
33508719 0 --メタモルポット
96782886 0 --メンタルマスター
03078576 0 --八汰烏
89399912 0 --嵐征竜-テンペスト
34086406 0 --ラヴァルバル·チェイン
46772449 0 --励輝士 ヴェルズビュート
14878871 0 --レスキューキャット
41482598 0 --悪夢の蜃気楼
44763025 0 --いたずら好きな双子悪魔
19613556 0 --大嵐
17375316 0 --押収
74191942 0 --苦渋の選択
42829885 0 --強引な番兵
45986603 0 --強奪
55144522 0 --強欲な壺
04031928 0 --心変わり
23557835 0 --次元融合
83764718 0 --死者蘇生
57953380 0 --生還の宝札
87910978 0 --洗脳-ブレインコントロール
60682203 0 --大寒波
48130397 0 --超融合
67169062 0 --貪欲な壺
27770341 0 --超再生能力
69243953 0 --蝶の短剣-エルマ
72892473 0 --手札抹殺
79571449 0 --天使の施し
42703248 0 --ハリケーン
18144506 0 --ハーピィの羽根帚
70828912 0 --早すぎた埋葬
34906152 0 --マスドライバー
46448938 0 --魔導書の神判
77565204 0 --未来融合-フューチャー·フュージョン
27970830 0 --六武の門
46411259 0 --突然変異
85602018 0 --遺言状
27174286 0 --異次元からの帰還
61740673 0 --王宮の勅命
93016201 0 --王宮の弾圧
41420027 0 --神の宣告
57585212 0 --自爆スイッチ
03280747 0 --第六感
64697231 0 --ダスト·シュート
35316708 0 --刻の封印
80604091 0 --血の代償
28566710 0 --ラストバトル!
#limit
85103922 1 --アーティファクト-モラルタ
64034255 1 --A·ジェネクス·バードマン
45222299 1 --イビリチュア·ガストクラーケ
11877465 1 --イビリチュア·マインドオーガス
99177923 1 --インフェルニティ·デーモン
68184115 1 --甲虫装機 ダンセル
69207766 1 --甲虫装機 ホーネット
72989439 1 --カオス·ソルジャー -開闢の使者-
65518099 1 --クリフォート・ツール
12580477 1 --サンダー·ボルト
78868119 1 --深海のディーヴァ
48063985 1 --聖霊獣騎 カンナホーク
59297550 1 --ゼンマイマジシャン
65192027 1 --ダーク·アームド·ドラゴン
15341821 1 --ダンディライオン
90953320 1 --TG ハイパー·ライブラリアン
14943837 1 --デブリ·ドラゴン
16226786 1 --深淵の暗殺者
80344569 1 --N·グラン·モール
20758643 1 --彼岸の悪鬼 グラバースニッチ
70583986 1 --氷結界の虎王ドゥローレン
52687916 1 --氷結界の龍 トリシューラ
33396948 1 --封印されしエクゾディア
07902349 1 --封印されし者の左腕
70903634 1 --封印されし者の右腕
44519536 1 --封印されし者の左足
08124921 1 --封印されし者の右足
26674724 1 --ブリューナクの影霊衣
10802915 1 --魔界発現世行きデスガイド
41386308 1 --マスマティシャン
89463537 1 --ユニコールの影霊衣
71564252 1 --ライオウ
85138716 1 --レスキューラビット
88264978 1 --レッドアイズ·ダークネスメタルドラゴン
48976825 1 --異次元からの埋葬
33782437 1 --一時休戦
66957584 1 --インフェルニティガン
06417578 1 --神の写し身との接触
72405967 1 --王家の生け贄
81439173 1 --おろかな埋葬
96729612 1 --儀式の準備
45305419 1 --継承の印
17639150 1 --機殻の生贄
95308449 1 --終焉のカウントダウン
74845897 1 --真炎の爆発
37520316 1 --精神操作
32807846 1 --増援
54447022 1 --ソウル・チャージ
14087893 1 --月の書
81674782 1 --次元の裂け目
75500286 1 --封印の黄金櫃
15854426 1 --霞の谷の神風
43040603 1 --モンスターゲート
01475311 1 --闇の誘惑
23171610 1 --リミッター解除
02295440 1 --ワン·フォー·ワン
09059700 1 --インフェルニティ・バリア
05851097 1 --虚無空間
84749824 1 --神の警告
94192409 1 --強制脱出装置
53582587 1 --激流葬
57728570 1 --死のデッキ破壊ウイルス
82732705 1 --スキルドレイン
73599290 1 --ソウルドレイン
29401950 1 --奈落の落とし穴
83555666 1 --破壊輪
17078030 1 --光の護封壁
30241314 1 --マクロコスモス
32723153 1 --マジカル·エクスプロージョン
54974237 1 --闇のデッキ破壊ウイルス
#semi limit
37742478 2 --オネスト
85087012 2 --カードガンナー
74311226 2 --海皇の竜騎隊
00423585 2 --召喚僧サモンプリースト
98777036 2 --トラゴエディア
57143342 2 --彼岸の悪鬼 ガトルホッグ
28297833 2 --ネクロフェイス
46052429 2 --高等儀式術
94886282 2 --光の援軍
53129443 2 --ブラック·ホール
62265044 2 --竜の渓谷
91623717 2 --連鎖爆撃
29843091 2 --おジャマトリオ
36468556 2 --停戦協定
!2015.7 TCG
#forbidden
48130397 0 --超融合
......
Subproject commit f7089e78827fea0aebc245639b27f59f76f5f35f
Subproject commit fe058086b9ce41711d0d2c40cddc80e6e4d690c9
Subproject commit 741b50f028be514a8a9ab950836e3cbf74c5875e
Subproject commit 1e3138027a38b1234d1f039b5d4a72fc2f33b42d
......@@ -75,13 +75,13 @@
!system 510 请选择要盖放的卡
!system 511 请选择融合召唤的素材
!system 512 请选择同调召唤的素材
!system 513 请选择超召唤的素材
!system 513 请选择超召唤的素材
!system 514 请选择表侧表示的卡
!system 515 请选择里侧表示的卡
!system 516 请选择攻击表示的怪兽
!system 517 请选择守备表示的怪兽
!system 518 请选择要装备的卡
!system 519 请选择要取除的超素材
!system 519 请选择要取除的超素材
!system 520 请选择要改变控制权的怪兽
!system 521 请选择要代替破坏的卡
!system 522 请选择表侧攻击表示的怪兽
......@@ -94,7 +94,7 @@
!system 529 请选择自己的卡
!system 530 请选择对方的卡
!system 531 请选择上级召唤用需要解放的怪兽:
!system 532 请选择要取除超素材的怪兽
!system 532 请选择要取除超素材的怪兽
!system 550 请选择要发动的效果
!system 551 请选择效果的对象
!system 552 请选择硬币的正反面
......@@ -173,7 +173,7 @@
!system 1070 反击
!system 1071 反转
!system 1072 卡通
!system 1073
!system 1073
!system 1074 灵摆
!system 1080 (N/A)
#GUI
......@@ -207,7 +207,7 @@
!system 1127 幸运
!system 1128 融合相关
!system 1129 同调相关
!system 1130相关
!system 1130相关
!system 1131 效果无效
#actions
!system 1150 发动
......
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