Commit 8cc17e2b authored by mercury233's avatar mercury233

Merge branch 'master' of https://github.com/Fluorohydride/ygopro into link

parents 717bcf20 2446f792
......@@ -8,7 +8,7 @@ A script engine for "yu-gi-oh!" and sample gui
* 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.
* D: Holding down this button will let the system stop at available timing.
* R: Fix the font error.
* R: Fix the font glitch.
* 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.
......@@ -37,8 +37,8 @@ Xyz materials:
### Command-line options:
* `-e foo.cdb`: Load foo.cdb as the extra database.
* `-n nickname`: Set the nickname.
* `-h 192.168.0.2`: Set the h**ost to join in LAN mode.
* `-p 7911`: Set theport to join in LAN mode.
* `-h 192.168.0.2`: Set the host to join in LAN mode.
* `-p 7911`: Set the port to join in LAN mode.
* `-w abc`: Set the password to join in LAN mode.
* `-d`: Enter the deck edit page.
* `-d deck`: If used along with `-j` it mean select the deck, or it will open the deck to edit.
......@@ -52,7 +52,7 @@ Xyz materials:
#### Note:
* `-c` `-j` `-e` `-r` `-s` shoule be the last parameter, because any parameters after it will get ignored.
* `-d` `-c` `-j` `-e` `-r` `-s` will make YGOPro automatically exit when the duel or deck editing finished. This is useful for some launchers. If you want to keep it, add `-k` before them.
* `-d` `-c` `-j` `-e` `-r` `-s` will make YGOPro automatically exit when the duel or deck editing is finished. This is useful for some launchers. If you want to keep it, add `-k` before them.
* `-d` `-r` `-s` support full path of file, or just filename. But remember deck filename should NOT have extension when replay and single filename MUST have extension.
### Directories:
......
......@@ -285,6 +285,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->btnSideOK->setVisible(true);
if(mainGame->dInfo.player_type < 7)
mainGame->btnLeaveGame->setVisible(false);
mainGame->btnSpectatorSwap->setVisible(false);
mainGame->btnChainIgnore->setVisible(false);
mainGame->btnChainAlways->setVisible(false);
mainGame->btnChainWhenAvail->setVisible(false);
......@@ -382,6 +383,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->wChat->setVisible(true);
mainGame->gMutex.Unlock();
mainGame->dInfo.duel_rule = pkt->info.duel_rule;
watching = 0;
connect_state |= 0x4;
break;
}
......@@ -473,6 +475,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->dInfo.player_type = 7;
mainGame->btnLeaveGame->setText(dataManager.GetSysString(1350));
mainGame->btnLeaveGame->setVisible(true);
mainGame->btnSpectatorSwap->setVisible(true);
}
if(selftype != 1) {
BufferIO::CopyWStr(mainGame->stHostPrepDuelist[0]->getText(), mainGame->dInfo.hostname, 20);
......@@ -486,6 +489,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->dInfo.player_type = 7;
mainGame->btnLeaveGame->setText(dataManager.GetSysString(1350));
mainGame->btnLeaveGame->setVisible(true);
mainGame->btnSpectatorSwap->setVisible(true);
}
if(selftype > 1 && selftype < 4) {
BufferIO::CopyWStr(mainGame->stHostPrepDuelist[2]->getText(), mainGame->dInfo.hostname, 20);
......@@ -509,6 +513,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->gMutex.Lock();
if(mainGame->dInfo.player_type < 7)
mainGame->btnLeaveGame->setVisible(false);
mainGame->btnSpectatorSwap->setVisible(false);
mainGame->btnChainIgnore->setVisible(false);
mainGame->btnChainAlways->setVisible(false);
mainGame->btnChainWhenAvail->setVisible(false);
......@@ -1304,7 +1309,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
select_hint = 0;
mainGame->stHintMsg->setText(textBuffer);
mainGame->stHintMsg->setVisible(true);
if (mainGame->dInfo.curMsg == MSG_SELECT_PLACE && mainGame->chkAutoPos->isChecked()) {
if (mainGame->dInfo.curMsg == MSG_SELECT_PLACE && (
(mainGame->chkMAutoPos->isChecked() && mainGame->dField.selectable_field & 0x7f007f) ||
(mainGame->chkSTAutoPos->isChecked() && !(mainGame->dField.selectable_field & 0x7f007f)))) {
unsigned int filter;
if (mainGame->dField.selectable_field & 0x7f) {
respbuf[0] = mainGame->LocalPlayer(0);
......
......@@ -82,9 +82,10 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break;
}
case BUTTON_REPLAY_SWAP: {
if(!mainGame->dInfo.isReplay)
break;
ReplayMode::SwapField();
if(mainGame->dInfo.isReplay)
ReplayMode::SwapField();
else if (mainGame->dInfo.player_type == 7)
mainGame->dField.ReplaySwap();
break;
}
case BUTTON_REPLAY_UNDO: {
......@@ -121,6 +122,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->wInfos->setVisible(false);
mainGame->wPhase->setVisible(false);
mainGame->btnLeaveGame->setVisible(false);
mainGame->btnSpectatorSwap->setVisible(false);
mainGame->wChat->setVisible(false);
mainGame->btnCreateHost->setEnabled(true);
mainGame->btnJoinHost->setEnabled(true);
mainGame->btnJoinCancel->setEnabled(true);
......
......@@ -269,17 +269,19 @@ bool Game::Initialize() {
btnClearLog = env->addButton(rect<s32>(160, 300, 260, 325), tabLog, BUTTON_CLEAR_LOG, dataManager.GetSysString(1272));
//system
irr::gui::IGUITab* tabSystem = wInfos->addTab(dataManager.GetSysString(1273));
chkAutoPos = env->addCheckBox(false, rect<s32>(20, 20, 280, 45), tabSystem, -1, dataManager.GetSysString(1274));
chkAutoPos->setChecked(gameConf.chkAutoPos != 0);
chkRandomPos = env->addCheckBox(false, rect<s32>(40, 50, 300, 75), tabSystem, -1, dataManager.GetSysString(1275));
chkMAutoPos = env->addCheckBox(false, rect<s32>(20, 20, 280, 45), tabSystem, -1, dataManager.GetSysString(1274));
chkMAutoPos->setChecked(gameConf.chkMAutoPos != 0);
chkSTAutoPos = env->addCheckBox(false, rect<s32>(20, 50, 280, 75), tabSystem, -1, dataManager.GetSysString(1278));
chkSTAutoPos->setChecked(gameConf.chkSTAutoPos != 0);
chkRandomPos = env->addCheckBox(false, rect<s32>(40, 80, 300, 105), tabSystem, -1, dataManager.GetSysString(1275));
chkRandomPos->setChecked(gameConf.chkRandomPos != 0);
chkAutoChain = env->addCheckBox(false, rect<s32>(20, 80, 280, 105), tabSystem, -1, dataManager.GetSysString(1276));
chkAutoChain = env->addCheckBox(false, rect<s32>(20, 110, 280, 135), tabSystem, -1, dataManager.GetSysString(1276));
chkAutoChain->setChecked(gameConf.chkAutoChain != 0);
chkWaitChain = env->addCheckBox(false, rect<s32>(20, 110, 280, 135), tabSystem, -1, dataManager.GetSysString(1277));
chkWaitChain = env->addCheckBox(false, rect<s32>(20, 140, 280, 165), tabSystem, -1, dataManager.GetSysString(1277));
chkWaitChain->setChecked(gameConf.chkWaitChain != 0);
chkIgnore1 = env->addCheckBox(false, rect<s32>(20, 170, 280, 195), tabSystem, -1, dataManager.GetSysString(1290));
chkIgnore1 = env->addCheckBox(false, rect<s32>(20, 200, 280, 225), tabSystem, -1, dataManager.GetSysString(1290));
chkIgnore1->setChecked(gameConf.chkIgnore1 != 0);
chkIgnore2 = env->addCheckBox(false, rect<s32>(20, 200, 280, 225), tabSystem, -1, dataManager.GetSysString(1291));
chkIgnore2 = env->addCheckBox(false, rect<s32>(20, 230, 280, 255), tabSystem, -1, dataManager.GetSysString(1291));
chkIgnore2->setChecked(gameConf.chkIgnore2 != 0);
chkHideSetname = env->addCheckBox(false, rect<s32>(20, 260, 280, 285), tabSystem, -1, dataManager.GetSysString(1354));
chkHideSetname->setChecked(gameConf.chkHideSetname != 0);
......@@ -586,6 +588,9 @@ bool Game::Initialize() {
wChat->setDrawTitlebar(false);
wChat->setVisible(false);
ebChatInput = env->addEditBox(L"", rect<s32>(3, 2, 710, 22), true, wChat, EDITBOX_CHAT);
//swap
btnSpectatorSwap = env->addButton(rect<s32>(205, 100, 295, 135), 0, BUTTON_REPLAY_SWAP, dataManager.GetSysString(1346));
btnSpectatorSwap->setVisible(false);
//chain buttons
btnChainIgnore = env->addButton(rect<s32>(205, 100, 295, 135), 0, BUTTON_CHAIN_IGNORE, dataManager.GetSysString(1292));
btnChainAlways = env->addButton(rect<s32>(205, 140, 295, 175), 0, BUTTON_CHAIN_ALWAYS, dataManager.GetSysString(1293));
......@@ -917,7 +922,8 @@ void Game::LoadConfig() {
gameConf.lastport[0] = 0;
gameConf.roompass[0] = 0;
//settings
gameConf.chkAutoPos = 1;
gameConf.chkMAutoPos = 0;
gameConf.chkSTAutoPos = 1;
gameConf.chkRandomPos = 0;
gameConf.chkAutoChain = 0;
gameConf.chkWaitChain = 0;
......@@ -961,8 +967,10 @@ void Game::LoadConfig() {
} else if(!strcmp(strbuf, "roompass")) {
BufferIO::DecodeUTF8(valbuf, wstr);
BufferIO::CopyWStr(wstr, gameConf.roompass, 20);
} else if(!strcmp(strbuf, "autopos")) {
gameConf.chkAutoPos = atoi(valbuf);
} else if(!strcmp(strbuf, "automonsterpos")) {
gameConf.chkMAutoPos = atoi(valbuf);
} else if(!strcmp(strbuf, "autospellpos")) {
gameConf.chkSTAutoPos = atoi(valbuf);
} else if(!strcmp(strbuf, "randompos")) {
gameConf.chkRandomPos = atoi(valbuf);
} else if(!strcmp(strbuf, "autochain")) {
......@@ -1026,7 +1034,8 @@ void Game::SaveConfig() {
BufferIO::EncodeUTF8(gameConf.lastport, linebuf);
fprintf(fp, "lastport = %s\n", linebuf);
//settings
fprintf(fp, "autopos = %d\n", ((mainGame->chkAutoPos->isChecked()) ? 1 : 0));
fprintf(fp, "automonsterpos = %d\n", ((mainGame->chkMAutoPos->isChecked()) ? 1 : 0));
fprintf(fp, "autospellpos = %d\n", ((mainGame->chkSTAutoPos->isChecked()) ? 1 : 0));
fprintf(fp, "randompos = %d\n", ((mainGame->chkRandomPos->isChecked()) ? 1 : 0));
fprintf(fp, "autochain = %d\n", ((mainGame->chkAutoChain->isChecked()) ? 1 : 0));
fprintf(fp, "waitchain = %d\n", ((mainGame->chkWaitChain->isChecked()) ? 1 : 0));
......@@ -1217,6 +1226,7 @@ void Game::CloseDuelWindow() {
stHintMsg->setVisible(false);
btnSideOK->setVisible(false);
btnLeaveGame->setVisible(false);
btnSpectatorSwap->setVisible(false);
btnChainIgnore->setVisible(false);
btnChainAlways->setVisible(false);
btnChainWhenAvail->setVisible(false);
......
......@@ -25,7 +25,8 @@ struct Config {
wchar_t numfont[256];
wchar_t roompass[20];
//settings
int chkAutoPos;
int chkMAutoPos;
int chkSTAutoPos;
int chkRandomPos;
int chkAutoChain;
int chkWaitChain;
......@@ -201,7 +202,8 @@ public:
irr::gui::IGUIStaticText* stSetName;
irr::gui::IGUIStaticText* stText;
irr::gui::IGUIScrollBar* scrCardText;
irr::gui::IGUICheckBox* chkAutoPos;
irr::gui::IGUICheckBox* chkMAutoPos;
irr::gui::IGUICheckBox* chkSTAutoPos;
irr::gui::IGUICheckBox* chkRandomPos;
irr::gui::IGUICheckBox* chkAutoChain;
irr::gui::IGUICheckBox* chkWaitChain;
......@@ -408,6 +410,8 @@ public:
irr::gui::IGUIButton* btnReplaySwap;
//surrender/leave
irr::gui::IGUIButton* btnLeaveGame;
//swap
irr::gui::IGUIButton* btnSpectatorSwap;
//chain control
irr::gui::IGUIButton* btnChainIgnore;
irr::gui::IGUIButton* btnChainAlways;
......
#[2017.4][2017.1][2016.10][2016.7][2016.4][2016.1][2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2017.3 TCG][2016.8 TCG][2016.4 TCG][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]
#[2017.4][2017.6 TCG][2017.1][2016.10][2016.7][2016.4][2016.1][2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2017.3 TCG][2016.8 TCG][2016.4 TCG][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]
!2017.4
#forbidden
20663556 0 --イレカエル
......@@ -153,6 +153,186 @@
91623717 2 --連鎖爆撃
43040603 2 --モンスターゲート
!2017.6 TCG
#forbidden
27279764 0 --アポクリフォート・キラー
20663556 0 --イレカエル
44910027 0 --ヴィクトリー・ドラゴン
20366274 0 --エルシャドール・ネフィリム
40044918 0 --E·HERO エアーマン
53804307 0 --焔征竜-ブラスター
68819554 0 --Emダメージ・ジャグラー
07563579 0 --Emヒグルミ
17330916 0 --EMモンキーボード
82301904 0 --混沌帝龍 -終焉の使者-
79106360 0 --カオスポッド
90411554 0 --巌征竜-レドックス
08903700 0 --儀式魔人リリーサー
17412721 0 --旧神ノーデン
78010363 0 --黒き森のウィッチ
34124316 0 --サイバーポッド
88071625 0 --The tyrant NEPTUNE
21593977 0 --処刑人-マキュラ
81122844 0 --発条空母ゼンマイティ
56570271 0 --DHERO ディスクガイ
69015963 0 --デビル·フランケン
18326736 0 --星守の騎士 プトレマイオス
33184167 0 --同族感染ウィルス
90307777 0 --影霊衣の術士 シュリット
54719828 0 --No.16 色の支配者ショック·ルーラー
26400609 0 --瀑征竜-タイダル
78706415 0 --ファイバーポッド
93369354 0 --フィッシュボーグ-ガンナー
31178212 0 --マジェスペクター・ユニコーン
34206604 0 --魔導サイエンティスト
33508719 0 --メタモルポット
96782886 0 --メンタルマスター
03078576 0 --八汰烏
34086406 0 --ラヴァルバル·チェイン
89399912 0 --嵐征竜-テンペスト
46772449 0 --励輝士 ヴェルズビュート
41482598 0 --悪夢の蜃気楼
44763025 0 --いたずら好きな双子悪魔
19613556 0 --大嵐
17375316 0 --押収
35059553 0 --カイザーコロシアム
74191942 0 --苦渋の選択
42829885 0 --強引な番兵
45986603 0 --強奪
55144522 0 --強欲な壺
04031928 0 --心変わり
23557835 0 --次元融合
83764718 0 --死者蘇生
57953380 0 --生還の宝札
60682203 0 --大寒波
67616300 0 --チキンレース
48130397 0 --超融合
67169062 0 --貪欲な壺
27770341 0 --超再生能力
69243953 0 --蝶の短剣-エルマ
72892473 0 --手札抹殺
79571449 0 --天使の施し
42703248 0 --ハリケーン
18144506 0 --ハーピィの羽根帚
70828912 0 --早すぎた埋葬
34906152 0 --マスドライバー
46448938 0 --魔導書の神判
27970830 0 --六武の門
46411259 0 --突然変異
31222701 0 --揺れる眼差し
85602018 0 --遺言状
27174286 0 --異次元からの帰還
93016201 0 --王宮の弾圧
41420027 0 --神の宣告
05851097 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 --甲虫装機 ホーネット
27552504 1 --永遠の淑女 ベアトリーチェ
72989439 1 --カオス·ソルジャー -開闢の使者-
65518099 1 --クリフォート・ツール
55885348 1 --Kozmo-ダークシミター
12580477 1 --サンダー·ボルト
78868119 1 --深海のディーヴァ
81275020 1 --SRベイゴマックス
48063985 1 --聖霊獣騎 カンナホーク
23434538 1 --増殖するG
65192027 1 --ダーク·アームド·ドラゴン
15341821 1 --ダンディライオン
90953320 1 --TG ハイパー·ライブラリアン
96570609 1 --天帝アイテール
16226786 1 --深淵の暗殺者
80344569 1 --N·グラン·モール
18239909 1 --爆竜剣士イグニスターP
57143342 1 --彼岸の悪鬼 ガトルホッグ
20758643 1 --彼岸の悪鬼 グラバースニッチ
70583986 1 --氷結界の虎王ドゥローレン
52687916 1 --氷結界の龍 トリシューラ
50321796 1 --氷結界の龍 ブリューナク
33396948 1 --封印されしエクゾディア
07902349 1 --封印されし者の左腕
70903634 1 --封印されし者の右腕
44519536 1 --封印されし者の左足
08124921 1 --封印されし者の右足
26674724 1 --ブリューナクの影霊衣
10802915 1 --魔界発現世行きデスガイド
41386308 1 --マスマティシャン
89463537 1 --ユニコールの影霊衣
92746535 1 --竜剣士ラスターP
14878871 1 --レスキューキャット
85138716 1 --レスキューラビット
88264978 1 --レッドアイズ·ダークネスメタルドラゴン
48976825 1 --異次元からの埋葬
33782437 1 --一時休戦
66957584 1 --インフェルニティガン
06417578 1 --神の写し身との接触
72405967 1 --王家の生け贄
81439173 1 --おろかな埋葬
96729612 1 --儀式の準備
67723438 1 --緊急テレポート
45305419 1 --継承の印
17639150 1 --機殻の生贄
95308449 1 --終焉のカウントダウン
74845897 1 --真炎の爆発
37520316 1 --精神操作
87910978 1 --洗脳-ブレインコントロール
32807846 1 --増援
54447022 1 --ソウル・チャージ
14087893 1 --月の書
81674782 1 --次元の裂け目
79844764 1 --帝王の烈旋
11110587 1 --隣の芝刈り
70368879 1 --成金ゴブリン
22842126 1 --汎神の帝王
15854426 1 --霞の谷の神風
77565204 1 --未来融合-フューチャー·フュージョン
58577036 1 --名推理
43040603 1 --モンスターゲート
23171610 1 --リミッター解除
14733538 1 --竜呼相打つ
02295440 1 --ワン·フォー·ワン
09059700 1 --インフェルニティ・バリア
61740673 1 --王宮の勅命
84749824 1 --神の警告
94192409 1 --強制脱出装置
53582587 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 --海皇の竜騎隊
78872731 2 --十二獣モルモラット
00423585 2 --召喚僧サモンプリースト
59297550 2 --ゼンマイマジシャン
14943837 2 --デブリ·ドラゴン
28297833 2 --ネクロフェイス
71564252 2 --ライオウ
99330325 2 --妨げられた壊獣の眠り
94886282 2 --光の援軍
53129443 2 --ブラック·ホール
62265044 2 --竜の渓谷
91623717 2 --連鎖爆撃
29843091 2 --おジャマトリオ
36468556 2 --停戦協定
!2017.1
#forbidden
20663556 0 --イレカエル
......
......@@ -288,10 +288,11 @@
!system 1271 消息记录
!system 1272 清除记录
!system 1273 系统设定
!system 1274 自动选择卡片位置
!system 1274 自动选择怪兽卡片位置
!system 1275 ↑随机选择位置
!system 1276 自动排列连锁顺序
!system 1277 没有可连锁的卡时延迟回应
!system 1278 自动选择魔陷卡片位置
!system 1280 标准对战
!system 1281 自定义
!system 1290 忽略对方发言
......@@ -821,6 +822,6 @@
!setname 0xfa 幻煌龙 幻煌龍
!setname 0xfb 淘气仙星 トリックスター
!setname 0xfc 刚鬼 剛鬼
!setname 0xfd 星杯 星杯
!setname 0xfd 星杯
!setname 0xfe 星遗物 星遺物
!setname 0xff 幻透翼 クリアウィング
......@@ -12,6 +12,8 @@ serverport = 7911
lasthost = s1.ygo233.com
lastport = 233
autopos = 1
automonsterpos = 0
autospellpos = 1
randompos = 0
autochain = 0
waitchain = 0
......
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