Commit 0fce3399 authored by argon.sun's avatar argon.sun

fix

parent 85c603c7
...@@ -182,104 +182,6 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -182,104 +182,6 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
FilterCards(); FilterCards();
break; break;
} }
case BUTTON_RESULT_FILTER: {
filter_type = mainGame->cbCardType->getSelected();
filter_type2 = mainGame->cbCardType2->getItemData(mainGame->cbCardType2->getSelected());
filter_lm = mainGame->cbLimit->getSelected();
if(filter_type > 1) {
FilterCardsFromResult();
break;
}
filter_attrib = mainGame->cbAttribute->getItemData(mainGame->cbAttribute->getSelected());
filter_race = mainGame->cbRace->getItemData(mainGame->cbRace->getSelected());
const wchar_t* pstr = mainGame->ebAttack->getText();
if(*pstr == 0) filter_atktype = 0;
else {
if(*pstr == L'=') {
filter_atktype = 1;
filter_atk = BufferIO::GetVal(pstr + 1);
} else if(*pstr >= L'0' && *pstr <= L'9') {
filter_atktype = 1;
filter_atk = BufferIO::GetVal(pstr);
} else if(*pstr == L'>') {
if(*(pstr + 1) == L'=') {
filter_atktype = 2;
filter_atk = BufferIO::GetVal(pstr + 2);
} else {
filter_atktype = 3;
filter_atk = BufferIO::GetVal(pstr + 1);
}
} else if(*pstr == L'<') {
if(*(pstr + 1) == L'=') {
filter_atktype = 4;
filter_atk = BufferIO::GetVal(pstr + 2);
} else {
filter_atktype = 5;
filter_atk = BufferIO::GetVal(pstr + 1);
}
} else if(*pstr == L'?') {
filter_atktype = 6;
} else filter_atktype = 0;
}
pstr = mainGame->ebDefence->getText();
if(*pstr == 0) filter_deftype = 0;
else {
if(*pstr == L'=') {
filter_deftype = 1;
filter_def = BufferIO::GetVal(pstr + 1);
} else if(*pstr >= L'0' && *pstr <= L'9') {
filter_deftype = 1;
filter_def = BufferIO::GetVal(pstr);
} else if(*pstr == L'>') {
if(*(pstr + 1) == L'=') {
filter_deftype = 2;
filter_def = BufferIO::GetVal(pstr + 2);
} else {
filter_deftype = 3;
filter_def = BufferIO::GetVal(pstr + 1);
}
} else if(*pstr == L'<') {
if(*(pstr + 1) == L'=') {
filter_deftype = 4;
filter_def = BufferIO::GetVal(pstr + 2);
} else {
filter_deftype = 5;
filter_def = BufferIO::GetVal(pstr + 1);
}
} else if(*pstr == L'?') {
filter_deftype = 6;
} else filter_deftype = 0;
}
pstr = mainGame->ebStar->getText();
if(*pstr == 0) filter_lvtype = 0;
else {
if(*pstr == L'=') {
filter_lvtype = 1;
filter_lv = BufferIO::GetVal(pstr + 1);
} else if(*pstr >= L'0' && *pstr <= L'9') {
filter_lvtype = 1;
filter_lv = BufferIO::GetVal(pstr);
} else if(*pstr == L'>') {
if(*(pstr + 1) == L'=') {
filter_lvtype = 2;
filter_lv = BufferIO::GetVal(pstr + 2);
} else {
filter_lvtype = 3;
filter_lv = BufferIO::GetVal(pstr + 1);
}
} else if(*pstr == L'<') {
if(*(pstr + 1) == L'=') {
filter_lvtype = 4;
filter_lv = BufferIO::GetVal(pstr + 2);
} else {
filter_lvtype = 5;
filter_lv = BufferIO::GetVal(pstr + 1);
}
} else filter_lvtype = 0;
}
FilterCardsFromResult();
break;
}
case BUTTON_CATEGORY_OK: { case BUTTON_CATEGORY_OK: {
filter_effect = 0; filter_effect = 0;
long long filter = 0x1; long long filter = 0x1;
...@@ -771,113 +673,19 @@ void DeckBuilder::FilterCards() { ...@@ -771,113 +673,19 @@ void DeckBuilder::FilterCards() {
if(filter_effect && !(data.category & filter_effect)) if(filter_effect && !(data.category & filter_effect))
continue; continue;
if(filter_lm) { if(filter_lm) {
if(!filterList->count(ptr->first) || (*filterList)[ptr->first] != filter_lm - 1) if(filter_lm <= 3 && (!filterList->count(ptr->first) || (*filterList)[ptr->first] != filter_lm - 1))
continue;
}
if(pstr) {
if(wcsstr(text.name, pstr) == 0 && wcsstr(text.text, pstr) == 0)
continue;
}
results.push_back(ptr);
}
myswprintf(result_string, L"%d", results.size());
if(results.size() > 7) {
mainGame->scrFilter->setVisible(true);
mainGame->scrFilter->setMax(results.size() - 7);
mainGame->scrFilter->setPos(0);
} else {
mainGame->scrFilter->setVisible(false);
mainGame->scrFilter->setPos(0);
}
std::sort(results.begin(), results.end(), ClientCard::deck_sort_lv);
mainGame->cbAttribute->setSelected(0);
mainGame->cbRace->setSelected(0);
mainGame->cbLimit->setSelected(0);
mainGame->ebAttack->setText(L"");
mainGame->ebDefence->setText(L"");
mainGame->ebStar->setText(L"");
filter_effect = 0;
for(int i = 0; i < 32; ++i)
mainGame->chkCategory[i]->setChecked(false);
}
void DeckBuilder::FilterCardsFromResult() {
int offset = 0;
const wchar_t* pstr = mainGame->ebCardName->getText();
int trycode = BufferIO::GetVal(pstr);
if(dataManager.GetData(trycode, 0)) {
results.clear();
auto ptr = dataManager.GetCodePointer(trycode);
results.push_back(ptr);
mainGame->scrFilter->setVisible(false);
mainGame->scrFilter->setPos(0);
myswprintf(result_string, L"%d", results.size());
return;
}
if(pstr[0] == 0)
pstr = 0;
for(int i = 0; i < results.size(); ++i) {
CardDataC& data = results[i]->second;
if(data.type & TYPE_TOKEN)
continue;
switch(filter_type) {
case 1: {
int type2 = data.type & 0xe03ef1;
if(!(data.type & TYPE_MONSTER) || (filter_type2 == 0x21 && type2 != 0x21) || (data.type & filter_type2) != filter_type2)
continue;
if(filter_race && data.race != filter_race)
continue;
if(filter_attrib && data.attribute != filter_attrib)
continue;
if(filter_atktype) {
if((filter_atktype == 1 && data.attack != filter_atk) || (filter_atktype == 2 && data.attack < filter_atk)
|| (filter_atktype == 3 && data.attack <= filter_atk) || (filter_atktype == 4 && (data.attack > filter_atk || data.attack < 0))
|| (filter_atktype == 5 && (data.attack >= filter_atk || data.attack < 0)) || (filter_atktype == 6 && data.attack != -2))
continue;
}
if(filter_deftype) {
if((filter_deftype == 1 && data.defence != filter_def) || (filter_deftype == 2 && data.defence < filter_def)
|| (filter_deftype == 3 && data.defence <= filter_def) || (filter_deftype == 4 && (data.defence > filter_def || data.defence < 0))
|| (filter_deftype == 5 && (data.defence >= filter_def || data.defence < 0)) || (filter_deftype == 6 && data.defence != -2))
continue;
}
if(filter_lvtype) {
if((filter_lvtype == 1 && data.level != filter_lv) || (filter_lvtype == 2 && data.level < filter_lv)
|| (filter_lvtype == 3 && data.level <= filter_lv) || (filter_lvtype == 4 && data.level > filter_lv)
|| (filter_lvtype == 5 && data.level >= filter_lv))
continue;
}
break;
}
case 2: {
if(!(data.type & TYPE_SPELL))
continue; continue;
if(filter_type2 && data.type != filter_type2) if(filter_lm == 4 && data.ot != 1)
continue; continue;
break; if(filter_lm == 5 && data.ot != 2)
}
case 3: {
if(!(data.type & TYPE_TRAP))
continue;
if(filter_type2 && data.type != filter_type2)
continue;
break;
}
}
if(filter_lm) {
if(!filterList->count(results[i]->first) || (*filterList)[results[i]->first] != filter_lm - 1)
continue; continue;
} }
if(filter_effect && !(data.category & filter_effect))
continue;
if(pstr) { if(pstr) {
CardString& text = dataManager._strings[data.code];
if(wcsstr(text.name, pstr) == 0 && wcsstr(text.text, pstr) == 0) if(wcsstr(text.name, pstr) == 0 && wcsstr(text.text, pstr) == 0)
continue; continue;
} }
results[offset] = results[i]; results.push_back(ptr);
offset++;
} }
results.resize(offset);
myswprintf(result_string, L"%d", results.size()); myswprintf(result_string, L"%d", results.size());
if(results.size() > 7) { if(results.size() > 7) {
mainGame->scrFilter->setVisible(true); mainGame->scrFilter->setVisible(true);
...@@ -887,6 +695,7 @@ void DeckBuilder::FilterCardsFromResult() { ...@@ -887,6 +695,7 @@ void DeckBuilder::FilterCardsFromResult() {
mainGame->scrFilter->setVisible(false); mainGame->scrFilter->setVisible(false);
mainGame->scrFilter->setPos(0); mainGame->scrFilter->setPos(0);
} }
std::sort(results.begin(), results.end(), ClientCard::deck_sort_lv);
mainGame->cbAttribute->setSelected(0); mainGame->cbAttribute->setSelected(0);
mainGame->cbRace->setSelected(0); mainGame->cbRace->setSelected(0);
mainGame->cbLimit->setSelected(0); mainGame->cbLimit->setSelected(0);
...@@ -897,4 +706,5 @@ void DeckBuilder::FilterCardsFromResult() { ...@@ -897,4 +706,5 @@ void DeckBuilder::FilterCardsFromResult() {
for(int i = 0; i < 32; ++i) for(int i = 0; i < 32; ++i)
mainGame->chkCategory[i]->setChecked(false); mainGame->chkCategory[i]->setChecked(false);
} }
} }
...@@ -12,7 +12,6 @@ class DeckBuilder: public irr::IEventReceiver { ...@@ -12,7 +12,6 @@ class DeckBuilder: public irr::IEventReceiver {
public: public:
virtual bool OnEvent(const irr::SEvent& event); virtual bool OnEvent(const irr::SEvent& event);
void FilterCards(); void FilterCards();
void FilterCardsFromResult();
long long filter_effect; long long filter_effect;
int filter_type; int filter_type;
......
...@@ -64,14 +64,14 @@ bool Game::Initialize() { ...@@ -64,14 +64,14 @@ bool Game::Initialize() {
//main menu //main menu
wchar_t strbuf[256]; wchar_t strbuf[256];
myswprintf(strbuf, L"YGOPro Version:%X.0%X.%X)", PRO_VERSION >> 12, (PRO_VERSION >> 4) & 0xff, PRO_VERSION & 0xf); myswprintf(strbuf, L"YGOPro Version:%X.0%X.%X)", PRO_VERSION >> 12, (PRO_VERSION >> 4) & 0xff, PRO_VERSION & 0xf);
wMainMenu = env->addWindow(rect<s32>(370, 200, 650, 450), false, strbuf); wMainMenu = env->addWindow(rect<s32>(370, 200, 650, 415), false, strbuf);
wMainMenu->getCloseButton()->setVisible(false); wMainMenu->getCloseButton()->setVisible(false);
btnLanMode = env->addButton(rect<s32>(10, 30, 270, 60), wMainMenu, BUTTON_LAN_MODE, dataManager.GetSysString(1200)); btnLanMode = env->addButton(rect<s32>(10, 30, 270, 60), wMainMenu, BUTTON_LAN_MODE, dataManager.GetSysString(1200));
btnServerMode = env->addButton(rect<s32>(10, 65, 270, 95), wMainMenu, BUTTON_SINGLE_MODE, dataManager.GetSysString(1201)); btnServerMode = env->addButton(rect<s32>(10, 65, 270, 95), wMainMenu, BUTTON_SINGLE_MODE, dataManager.GetSysString(1201));
btnReplayMode = env->addButton(rect<s32>(10, 100, 270, 130), wMainMenu, BUTTON_REPLAY_MODE, dataManager.GetSysString(1202)); btnReplayMode = env->addButton(rect<s32>(10, 100, 270, 130), wMainMenu, BUTTON_REPLAY_MODE, dataManager.GetSysString(1202));
btnTestMode = env->addButton(rect<s32>(10, 135, 270, 165), wMainMenu, BUTTON_TEST_MODE, dataManager.GetSysString(1203)); // btnTestMode = env->addButton(rect<s32>(10, 135, 270, 165), wMainMenu, BUTTON_TEST_MODE, dataManager.GetSysString(1203));
btnDeckEdit = env->addButton(rect<s32>(10, 170, 270, 200), wMainMenu, BUTTON_DECK_EDIT, dataManager.GetSysString(1204)); btnDeckEdit = env->addButton(rect<s32>(10, 135, 270, 165), wMainMenu, BUTTON_DECK_EDIT, dataManager.GetSysString(1204));
btnModeExit = env->addButton(rect<s32>(10, 205, 270, 235), wMainMenu, BUTTON_MODE_EXIT, dataManager.GetSysString(1210)); btnModeExit = env->addButton(rect<s32>(10, 170, 270, 200), wMainMenu, BUTTON_MODE_EXIT, dataManager.GetSysString(1210));
//lan mode //lan mode
wLanWindow = env->addWindow(rect<s32>(220, 100, 800, 520), false, dataManager.GetSysString(1200)); wLanWindow = env->addWindow(rect<s32>(220, 100, 800, 520), false, dataManager.GetSysString(1200));
wLanWindow->getCloseButton()->setVisible(false); wLanWindow->getCloseButton()->setVisible(false);
...@@ -384,6 +384,8 @@ bool Game::Initialize() { ...@@ -384,6 +384,8 @@ bool Game::Initialize() {
cbLimit->addItem(dataManager.GetSysString(1316)); cbLimit->addItem(dataManager.GetSysString(1316));
cbLimit->addItem(dataManager.GetSysString(1317)); cbLimit->addItem(dataManager.GetSysString(1317));
cbLimit->addItem(dataManager.GetSysString(1318)); cbLimit->addItem(dataManager.GetSysString(1318));
cbLimit->addItem(dataManager.GetSysString(1240));
cbLimit->addItem(dataManager.GetSysString(1241));
env->addStaticText(dataManager.GetSysString(1319), rect<s32>(10, 28, 70, 48), false, false, wFilter); env->addStaticText(dataManager.GetSysString(1319), rect<s32>(10, 28, 70, 48), false, false, wFilter);
cbAttribute = env->addComboBox(rect<s32>(60, 26, 190, 46), wFilter, -1); cbAttribute = env->addComboBox(rect<s32>(60, 26, 190, 46), wFilter, -1);
cbAttribute->addItem(dataManager.GetSysString(1310), 0); cbAttribute->addItem(dataManager.GetSysString(1310), 0);
...@@ -407,8 +409,7 @@ bool Game::Initialize() { ...@@ -407,8 +409,7 @@ bool Game::Initialize() {
ebCardName = env->addEditBox(L"", rect<s32>(260, 72, 390, 92), true, wFilter, SCROLL_KEYWORD); ebCardName = env->addEditBox(L"", rect<s32>(260, 72, 390, 92), true, wFilter, SCROLL_KEYWORD);
ebCardName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebCardName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
btnEffectFilter = env->addButton(rect<s32>(345, 28, 390, 69), wFilter, BUTTON_EFFECT_FILTER, dataManager.GetSysString(1326)); btnEffectFilter = env->addButton(rect<s32>(345, 28, 390, 69), wFilter, BUTTON_EFFECT_FILTER, dataManager.GetSysString(1326));
btnStartFilter = env->addButton(rect<s32>(165, 96, 270, 118), wFilter, BUTTON_START_FILTER, dataManager.GetSysString(1327)); btnStartFilter = env->addButton(rect<s32>(210, 96, 390, 118), wFilter, BUTTON_START_FILTER, dataManager.GetSysString(1327));
btnResultFilter = env->addButton(rect<s32>(285, 96, 390, 118), wFilter, BUTTON_RESULT_FILTER, dataManager.GetSysString(1328));
wCategories = env->addWindow(rect<s32>(630, 60, 1000, 270), false, dataManager.strBuffer); wCategories = env->addWindow(rect<s32>(630, 60, 1000, 270), false, dataManager.strBuffer);
wCategories->getCloseButton()->setVisible(false); wCategories->getCloseButton()->setVisible(false);
wCategories->setDrawTitlebar(false); wCategories->setDrawTitlebar(false);
......
...@@ -330,7 +330,6 @@ public: ...@@ -330,7 +330,6 @@ public:
irr::gui::IGUIEditBox* ebCardName; irr::gui::IGUIEditBox* ebCardName;
irr::gui::IGUIButton* btnEffectFilter; irr::gui::IGUIButton* btnEffectFilter;
irr::gui::IGUIButton* btnStartFilter; irr::gui::IGUIButton* btnStartFilter;
irr::gui::IGUIButton* btnResultFilter;
irr::gui::IGUIWindow* wCategories; irr::gui::IGUIWindow* wCategories;
irr::gui::IGUICheckBox* chkCategory[32]; irr::gui::IGUICheckBox* chkCategory[32];
irr::gui::IGUIButton* btnCategoryOK; irr::gui::IGUIButton* btnCategoryOK;
...@@ -445,7 +444,6 @@ extern Game* mainGame; ...@@ -445,7 +444,6 @@ extern Game* mainGame;
#define COMBOBOX_MAINTYPE 310 #define COMBOBOX_MAINTYPE 310
#define BUTTON_EFFECT_FILTER 311 #define BUTTON_EFFECT_FILTER 311
#define BUTTON_START_FILTER 312 #define BUTTON_START_FILTER 312
#define BUTTON_RESULT_FILTER 313
#define SCROLL_FILTER 314 #define SCROLL_FILTER 314
#define SCROLL_KEYWORD 315 #define SCROLL_KEYWORD 315
#define BUTTON_REPLAY_START 320 #define BUTTON_REPLAY_START 320
......
#[2012.3.1][2011.9.1] #[2012.9.1][2012.3.1][2011.9.1]
!2012.9.1
#forbidden
20663556 0 --イレカエル
44910027 0 --ヴィクトリー・ドラゴン
82301904 0 --混沌帝龍 -終焉の使者-
08131171 0 --キラー・スネーク
78010363 0 --黒き森のウィッチ
67441435 0 --グローアップ·バルブ
07391448 0 --ゴヨウ·ガーディアン
40737112 0 --混沌の黒魔術師
34124316 0 --サイバーポッド
63519819 0 --サウザンド·アイズ·サクリファイス
21593977 0 --処刑人-マキュラ
31560081 0 --聖なる魔術師
32646477 0 --ダーク·ダイブ·ボンバー
56570271 0 --DHERO ディスクガイ
69015963 0 --デビル·フランケン
33184167 0 --同族感染ウィルス
52687916 0 --氷結界の龍 トリシューラ
50321796 0 --氷結界の龍 ブリューナク
78706415 0 --ファイバーポッド
93369354 0 --フィッシュボーグ-ガンナー
34206604 0 --魔導サイエンティスト
96782886 0 --メンタルマスター
03078576 0 --八汰烏
14878871 0 --レスキューキャット
41482598 0 --悪夢の蜃気楼
44763025 0 --いたずら好きな双子悪魔
29762407 0 --王家の神殿
17375316 0 --押収
74191942 0 --苦渋の選択
42829885 0 --強引な番兵
45986603 0 --強奪
55144522 0 --強欲な壺
04031928 0 --心変わり
12580477 0 --サンダー·ボルト
23557835 0 --次元融合
57953380 0 --生還の宝札
87910978 0 --洗脳-ブレインコントロール
60682203 0 --大寒波
69243953 0 --蝶の短剣-エルマ
79571449 0 --天使の施し
42703248 0 --ハリケーン
18144506 0 --ハーピィの羽根帚
70828912 0 --早すぎた埋葬
34906152 0 --マスドライバー
77565204 0 --未来融合-フューチャー·フュージョン
46411259 0 --突然変異
85602018 0 --遺言状
61740673 0 --王宮の勅命
93016201 0 --王宮の弾圧
17484499 0 --現世と冥界の逆転
57728570 0 --死のデッキ破壊ウイルス
03280747 0 --第六感
64697231 0 --ダスト·シュート
35316708 0 --刻の封印
83555666 0 --破壊輪
28566710 0 --ラストバトル!
#limit
45222299 1 --イビリチュア·ガストクラーケ
68184115 1 --甲虫装機 ダンセル
69207766 1 --甲虫装機 ホーネット
40044918 1 --E·HERO エアーマン
37742478 1 --オネスト
09596126 1 --カオス·ソーサラー
72989439 1 --カオス·ソルジャー -開闢の使者-
41470137 1 --剣闘獣ベストロウリィ
26202165 1 --クリッター
29981921 1 --真六武衆-シエン
11747708 1 --スポーア
81122844 1 --発条空母ゼンマイティ
33420078 1 --ゾンビキャリア
65192027 1 --ダーク·アームド·ドラゴン
15341821 1 --ダンディライオン
01315120 1 --TG ストライカー
90953320 1 --TG ハイパー·ライブラリアン
34853266 1 --月読命
16226786 1 --深淵の暗殺者
80344569 1 --N·グラン·モール
28297833 1 --ネクロフェイス
33396948 1 --封印されしエクゾディア
07902349 1 --封印されし者の左腕
70903634 1 --封印されし者の右腕
44519536 1 --封印されし者の左足
08124921 1 --封印されし者の右足
50091196 1 --フォーミュラ·シンクロン
02009101 1 --BF-疾風のゲイル
44330098 1 --冥府の使者ゴーズ
92826944 1 --馬頭鬼
33508719 1 --メタモルポット
88264978 1 --レッドアイズ·ダークネスメタルドラゴン
48686504 1 --ローンファイア·ブロッサム
48976825 1 --異次元からの埋葬
66957584 1 --インフェルニティガン
23701465 1 --原初の種
81439173 1 --おろかな埋葬
19613556 1 --大嵐
91351370 1 --黒い旋風
46052429 1 --高等儀式術
83764718 1 --死者蘇生
73915051 1 --スケープ·ゴート
37520316 1 --精神操作
32807846 1 --増援
67169062 1 --貪欲な壺
14087893 1 --月の書
72892473 1 --手札抹殺
94886282 1 --光の援軍
53129443 1 --ブラック·ホール
43040603 1 --モンスターゲート
01475311 1 --闇の誘惑
23171610 1 --リミッター解除
27970830 1 --六武の門
02295440 1 --ワン·フォー·ワン
27174286 1 --異次元からの帰還
41420027 1 --神の宣告
80604091 1 --血の代償
36468556 1 --停戦協定
46652477 1 --転生の予言
17078030 1 --光の護封壁
32723153 1 --マジカル·エクスプロージョン
#semi limit
85087012 2 --カードガンナー
91188343 2 --神秘の代行者 アース
00423585 2 --召喚僧サモンプリースト
59509952 2 --大天使クリスティア
14943837 2 --デブリ·ドラゴン
09411399 2 --DHERO ディアボリックガイ
98777036 2 --トラゴエディア
70583986 2 --氷結界の虎王ドゥローレン
85215458 2 --BF-月影のカルート
95503687 2 --ライトロード·サモナー ルミナス
85138716 2 --レスキューラビット
10028593 2 --Reborn Tengu
10802915 2 --Tour Guide From the Underworld
00213326 2 --E-エマージェンシーコール
72405967 2 --王家の生け贄
98645731 2 --強欲で謙虚な壺
54031490 2 --紫炎の狼煙
25377819 2 --召集の聖刻印
08949584 2 --ヒーローアライブ
98494543 2 --魔法石の採掘
58577036 2 --名推理
91623717 2 --連鎖爆撃
29843091 2 --おジャマトリオ
84749824 2 --神の警告
53582587 2 --激流葬
44095762 2 --聖なるバリア-ミラーフォース-
29401950 2 --奈落の落とし穴
15800838 2 --マインドクラッシュ
!2012.3.1 !2012.3.1
#forbidden #forbidden
20663556 0 --イレカエル 20663556 0 --イレカエル
......
...@@ -2394,9 +2394,12 @@ int32 scriptlib::duel_hint_selection(lua_State *L) { ...@@ -2394,9 +2394,12 @@ int32 scriptlib::duel_hint_selection(lua_State *L) {
group* pgroup = *(group**) lua_touserdata(L, 1); group* pgroup = *(group**) lua_touserdata(L, 1);
duel* pduel = pgroup->pduel; duel* pduel = pgroup->pduel;
for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) { for(auto cit = pgroup->container.begin(); cit != pgroup->container.end(); ++cit) {
card* pcard = *cit;
if(pcard->current.location & 0x30)
pduel->game_field->move_card(pcard->current.controler, pcard, pcard->current.location, 0);
pduel->write_buffer8(MSG_BECOME_TARGET); pduel->write_buffer8(MSG_BECOME_TARGET);
pduel->write_buffer8(1); pduel->write_buffer8(1);
pduel->write_buffer32((*cit)->get_info_location()); pduel->write_buffer32(pcard->get_info_location());
} }
return 0; return 0;
} }
......
...@@ -2553,7 +2553,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3 ...@@ -2553,7 +2553,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
} }
} }
if((s1 != d1) && (s1 > 0)) { if((s1 != d1) && (s1 > 0)) {
card* ptop = player[0].list_main[s0]; card* ptop = player[1].list_main[s0];
if(core.deck_reversed || (ptop->current.position == POS_FACEUP_DEFENCE)) { if(core.deck_reversed || (ptop->current.position == POS_FACEUP_DEFENCE)) {
pduel->write_buffer8(MSG_DECK_TOP); pduel->write_buffer8(MSG_DECK_TOP);
pduel->write_buffer8(1); pduel->write_buffer8(1);
......
...@@ -682,7 +682,7 @@ int32 field::process() { ...@@ -682,7 +682,7 @@ int32 field::process() {
tg->container.insert(core.select_cards[returns.bvalue[i + 1]]); tg->container.insert(core.select_cards[returns.bvalue[i + 1]]);
pret->container.insert(core.select_cards[returns.bvalue[i + 1]]); pret->container.insert(core.select_cards[returns.bvalue[i + 1]]);
} }
if(returns.bvalue[0] > 0 && peffect->flag & EFFECT_FLAG_CARD_TARGET) { if((returns.bvalue[0] > 0) && (peffect->flag & EFFECT_FLAG_CARD_TARGET)) {
for(int32 i = 0; i < returns.bvalue[0]; ++i) { for(int32 i = 0; i < returns.bvalue[0]; ++i) {
card* pcard = core.select_cards[returns.bvalue[i + 1]]; card* pcard = core.select_cards[returns.bvalue[i + 1]];
if(pcard->current.location & 0x30) if(pcard->current.location & 0x30)
......
...@@ -74,6 +74,7 @@ function c33981008.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,6 +74,7 @@ function c33981008.spop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c33981008.ctfilter,tp,LOCATION_GRAVE,0,nil) local ct=Duel.GetMatchingGroupCount(c33981008.ctfilter,tp,LOCATION_GRAVE,0,nil)
local g=Duel.SelectMatchingCard(tp,c33981008.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,ct) local g=Duel.SelectMatchingCard(tp,c33981008.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,ct)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -29,11 +29,13 @@ function c52687916.remop(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,11 +29,13 @@ function c52687916.remop(e,tp,eg,ep,ev,re,r,rp)
if g1:GetCount()>0 and ((g2:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(52687916,1))) then if g1:GetCount()>0 and ((g2:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(52687916,1))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg1=g1:Select(tp,1,1,nil) local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
sg:Merge(sg1) sg:Merge(sg1)
end end
if g2:GetCount()>0 and ((sg:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(52687916,2))) then if g2:GetCount()>0 and ((sg:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(52687916,2))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg2=g2:Select(tp,1,1,nil) local sg2=g2:Select(tp,1,1,nil)
Duel.HintSelection(sg2)
sg:Merge(sg2) sg:Merge(sg2)
end end
if g3:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(52687916,3))) then if g3:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(52687916,3))) then
......
...@@ -41,7 +41,9 @@ function c7165085.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +41,9 @@ function c7165085.activate(e,tp,eg,ep,ev,re,r,rp)
e:SetProperty(te:GetProperty()) e:SetProperty(te:GetProperty())
Duel.Hint(HINT_CARD,0,tc:GetOriginalCode()) Duel.Hint(HINT_CARD,0,tc:GetOriginalCode())
Duel.ChangePosition(tc,POS_FACEUP) Duel.ChangePosition(tc,POS_FACEUP)
tc:CancelToGrave(false) if tc:GetType()==TYPE_TYPE then
tc:CancelToGrave(false)
end
tc:CreateEffectRelation(te) tc:CreateEffectRelation(te)
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
if target then target(te,tep,eg,ep,ev,re,r,rp,1) end if target then target(te,tep,eg,ep,ev,re,r,rp,1) end
......
...@@ -40,7 +40,7 @@ function c78371393.initial_effect(c) ...@@ -40,7 +40,7 @@ function c78371393.initial_effect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON) e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_DESTROY) e5:SetCode(EVENT_DESTROYED)
e5:SetCondition(c78371393.spcon) e5:SetCondition(c78371393.spcon)
e5:SetTarget(c78371393.sptg) e5:SetTarget(c78371393.sptg)
e5:SetOperation(c78371393.spop) e5:SetOperation(c78371393.spop)
......
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