Commit efb63a41 authored by mercury233's avatar mercury233

Merge https://github.com/Fluorohydride/ygopro into server

Conflicts:
	lflist.conf
parents 7d931cc2 23e24241
......@@ -483,6 +483,58 @@ void ClientField::ShowChainCard() {
else mainGame->btnSelectOK->setVisible(false);
mainGame->PopupElement(mainGame->wCardSelect);
}
void ClientField::ShowLocationCard() {
if(display_cards.size() <= 5) {
int startpos = 30 + 125 * (5 - display_cards.size()) / 2;
for(size_t i = 0; i < display_cards.size(); ++i) {
if(display_cards[i]->code)
mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardDisplay[i], display_cards[i]->code));
else
mainGame->btnCardDisplay[i]->setImage(imageManager.tCover);
mainGame->btnCardDisplay[i]->setRelativePosition(rect<s32>(startpos + i * 125, 55, startpos + 120 + i * 125, 225));
mainGame->btnCardDisplay[i]->setPressed(false);
mainGame->btnCardDisplay[i]->setVisible(true);
myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(display_cards[i]->location, display_cards[i]->sequence),
display_cards[i]->sequence + 1);
mainGame->stDisplayPos[i]->setText(formatBuffer);
mainGame->stDisplayPos[i]->setVisible(true);
if(display_cards[i]->controler)
mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
mainGame->stDisplayPos[i]->setRelativePosition(rect<s32>(startpos + 10 + i * 125, 30, startpos + 109 + i * 125, 50));
}
for(int i = display_cards.size(); i < 5; ++i) {
mainGame->btnCardDisplay[i]->setVisible(false);
mainGame->stDisplayPos[i]->setVisible(false);
}
mainGame->scrDisplayList->setPos(0);
mainGame->scrDisplayList->setVisible(false);
} else {
for(int i = 0; i < 5; ++i) {
if(display_cards[i]->code)
mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardDisplay[i], display_cards[i]->code));
else
mainGame->btnCardDisplay[i]->setImage(imageManager.tCover);
mainGame->btnCardDisplay[i]->setRelativePosition(rect<s32>(30 + i * 125, 55, 30 + 120 + i * 125, 225));
mainGame->btnCardDisplay[i]->setPressed(false);
mainGame->btnCardDisplay[i]->setVisible(true);
myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(display_cards[i]->location, display_cards[i]->sequence),
display_cards[i]->sequence + 1);
mainGame->stDisplayPos[i]->setText(formatBuffer);
mainGame->stDisplayPos[i]->setVisible(true);
if(display_cards[i]->controler)
mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
mainGame->stDisplayPos[i]->setRelativePosition(rect<s32>(40 + i * 125, 30, 139 + i * 125, 50));
}
mainGame->scrDisplayList->setVisible(true);
mainGame->scrDisplayList->setMin(0);
mainGame->scrDisplayList->setMax((display_cards.size() - 5) * 10 + 9);
mainGame->scrDisplayList->setPos(0);
}
mainGame->btnDisplayOK->setVisible(true);
mainGame->PopupElement(mainGame->wCardDisplay);
}
void ClientField::ReplaySwap() {
std::swap(deck[0], deck[1]);
std::swap(hand[0], hand[1]);
......
......@@ -61,6 +61,7 @@ public:
std::vector<ClientCard*> selected_cards;
std::set<ClientCard*> selectsum_cards;
std::vector<ClientCard*> selectsum_all;
std::vector<ClientCard*> display_cards;
std::vector<int> sort_list;
bool grave_act;
bool remove_act;
......@@ -85,6 +86,7 @@ public:
void ClearChainSelect();
void ShowSelectCard(bool buttonok = false, bool chain = false);
void ShowChainCard();
void ShowLocationCard();
void ReplaySwap();
void RefreshAllCards();
......
......@@ -495,6 +495,10 @@ void Game::DrawGUI() {
for(int i = 0; i < 5; ++i)
btnCardSelect[i]->setDrawImage(true);
}
if(fu.guiFading == wCardDisplay) {
for(int i = 0; i < 5; ++i)
btnCardDisplay[i]->setDrawImage(true);
}
env->setFocus(fu.guiFading);
} else
fu.guiFading->setRelativePosition(irr::core::recti(fu.fadingUL, fu.fadingLR));
......@@ -522,6 +526,10 @@ void Game::DrawGUI() {
for(int i = 0; i < 5; ++i)
btnCardSelect[i]->setDrawImage(true);
}
if(fu.guiFading == wCardDisplay) {
for(int i = 0; i < 5; ++i)
btnCardDisplay[i]->setDrawImage(true);
}
} else
fu.guiFading->setRelativePosition(irr::core::recti(fu.fadingUL, fu.fadingLR));
}
......@@ -761,6 +769,10 @@ void Game::ShowElement(irr::gui::IGUIElement * win, int autoframe) {
for(int i = 0; i < 5; ++i)
btnCardSelect[i]->setDrawImage(false);
}
if(win == wCardDisplay) {
for(int i = 0; i < 5; ++i)
btnCardDisplay[i]->setDrawImage(false);
}
win->setRelativePosition(irr::core::recti(center.X, center.Y, 0, 0));
fadingList.push_back(fu);
}
......@@ -789,6 +801,10 @@ void Game::HideElement(irr::gui::IGUIElement * win, bool set_action) {
for(int i = 0; i < 5; ++i)
btnCardSelect[i]->setDrawImage(false);
}
if(win == wCardDisplay) {
for(int i = 0; i < 5; ++i)
btnCardDisplay[i]->setDrawImage(false);
}
fadingList.push_back(fu);
}
void Game::PopupElement(irr::gui::IGUIElement * element, int hideframe) {
......
......@@ -432,7 +432,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
selectable_cards.clear();
switch(command_location) {
case LOCATION_DECK: {
for(int32 i = (int32)deck[hovered_controler].size() - 1; i >= 0 ; --i)
for(int32 i = (int32)deck[command_controler].size() - 1; i >= 0 ; --i)
selectable_cards.push_back(deck[command_controler][i]);
myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1000), deck[command_controler].size());
mainGame->wCardSelect->setText(formatBuffer);
......@@ -659,6 +659,10 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
break;
}
case BUTTON_CARD_DISP_OK: {
mainGame->HideElement(mainGame->wCardDisplay);
break;
}
}
break;
}
......@@ -748,6 +752,23 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
break;
}
case SCROLL_CARD_DISPLAY: {
int pos = mainGame->scrDisplayList->getPos() / 10;
for(int i = 0; i < 5; ++i) {
if(display_cards[i + pos]->code)
mainGame->btnCardDisplay[i]->setImage(imageManager.GetTexture(display_cards[i + pos]->code));
else
mainGame->btnCardDisplay[i]->setImage(imageManager.tCover);
mainGame->btnCardDisplay[i]->setRelativePosition(rect<s32>(30 + i * 125, 55, 30 + 120 + i * 125, 225));
myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(display_cards[i + pos]->location, display_cards[i + pos]->sequence),
display_cards[i + pos]->sequence + 1);
mainGame->stDisplayPos[i]->setText(formatBuffer);
if(display_cards[i + pos]->controler)
mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
}
break;
}
case SCROLL_CARDTEXT: {
u32 pos = mainGame->scrCardText->getPos();
mainGame->SetStaticText(mainGame->stText, mainGame->stText->getRelativePosition().getWidth()-25, mainGame->textFont, mainGame->showingtext, pos);
......@@ -861,6 +882,20 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->scrCardText->setVisible(false);
}
}
if(id >= BUTTON_DISPLAY_0 && id <= BUTTON_DISPLAY_4) {
int pos = mainGame->scrDisplayList->getPos() / 10;
ClientCard* mcard = display_cards[id - BUTTON_DISPLAY_0 + pos];
if(mcard->code) {
mainGame->ShowCardInfo(mcard->code);
} else {
mainGame->imgCard->setImage(imageManager.tCover);
mainGame->stName->setText(L"");
mainGame->stInfo->setText(L"");
mainGame->stDataInfo->setText(L"");
mainGame->stText->setText(L"");
mainGame->scrCardText->setVisible(false);
}
}
break;
}
default:
......@@ -884,6 +919,9 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if(panel && panel->isVisible())
break;
GetHoverField(x, y);
if(hovered_location & 0xe)
clicked_card = GetCard(hovered_controler, hovered_location, hovered_sequence);
else clicked_card = 0;
if(mainGame->dInfo.isReplay) {
if(mainGame->wCardSelect->isVisible())
break;
......@@ -897,10 +935,9 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break;
}
case LOCATION_MZONE: {
ClientCard* pcard = deck[hovered_controler][hovered_sequence];
for(int32 i = 0; i < (int32)pcard->overlayed.size(); ++i)
selectable_cards.push_back(pcard->overlayed[i]);
myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1007), pcard->overlayed.size());
for(int32 i = 0; i < (int32)clicked_card->overlayed.size(); ++i)
selectable_cards.push_back(clicked_card->overlayed[i]);
myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(1007), clicked_card->overlayed.size());
mainGame->wCardSelect->setText(formatBuffer);
break;
}
......@@ -947,9 +984,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
ShowSelectCard(true);
break;
}
if(hovered_location & 0xe)
clicked_card = GetCard(hovered_controler, hovered_location, hovered_sequence);
else clicked_card = 0;
command_controler = hovered_controler;
command_location = hovered_location;
command_sequence = hovered_sequence;
......@@ -1547,6 +1581,56 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->textFont->setTransparency(true);
break;
}
case irr::KEY_F1:
case irr::KEY_F2:
case irr::KEY_F3:
case irr::KEY_F5:
case irr::KEY_F6:
case irr::KEY_F7: {
if(!event.KeyInput.PressedDown && !mainGame->dInfo.isReplay && mainGame->dInfo.player_type != 7 && mainGame->dInfo.isStarted
&& !mainGame->wCardDisplay->isVisible()) {
int loc_id = 0;
display_cards.clear();
switch(event.KeyInput.Key) {
case irr::KEY_F1:
loc_id = 1004;
for(int32 i = (int32)grave[0].size() - 1; i >= 0 ; --i)
display_cards.push_back(grave[0][i]);
break;
case irr::KEY_F2:
loc_id = 1005;
for(int32 i = (int32)remove[0].size() - 1; i >= 0 ; --i)
display_cards.push_back(remove[0][i]);
break;
case irr::KEY_F3:
loc_id = 1006;
for(int32 i = (int32)extra[0].size() - 1; i >= 0 ; --i)
display_cards.push_back(extra[0][i]);
break;
case irr::KEY_F5:
loc_id = 1004;
for(int32 i = (int32)grave[1].size() - 1; i >= 0 ; --i)
display_cards.push_back(grave[1][i]);
break;
case irr::KEY_F6:
loc_id = 1005;
for(int32 i = (int32)remove[1].size() - 1; i >= 0 ; --i)
display_cards.push_back(remove[1][i]);
break;
case irr::KEY_F7:
loc_id = 1006;
for(int32 i = (int32)extra[1].size() - 1; i >= 0 ; --i)
display_cards.push_back(extra[1][i]);
break;
}
if(display_cards.size()) {
myswprintf(formatBuffer, L"%ls(%d)", dataManager.GetSysString(loc_id), display_cards.size());
mainGame->wCardDisplay->setText(formatBuffer);
ShowLocationCard();
}
}
break;
}
case irr::KEY_ESCAPE: {
mainGame->device->minimizeWindow();
break;
......
......@@ -389,6 +389,19 @@ bool Game::Initialize() {
}
scrCardList = env->addScrollBar(true, rect<s32>(30, 235, 650, 255), wCardSelect, SCROLL_CARD_SELECT);
btnSelectOK = env->addButton(rect<s32>(300, 265, 380, 290), wCardSelect, BUTTON_CARD_SEL_OK, dataManager.GetSysString(1211));
//card display
wCardDisplay = env->addWindow(rect<s32>(320, 100, 1000, 400), false, L"");
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]->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);
btnCardDisplay[i]->setImageScale(core::vector2df(0.6f, 0.6f));
}
scrDisplayList = env->addScrollBar(true, rect<s32>(30, 235, 650, 255), wCardDisplay, SCROLL_CARD_DISPLAY);
btnDisplayOK = env->addButton(rect<s32>(300, 265, 380, 290), wCardDisplay, BUTTON_CARD_DISP_OK, dataManager.GetSysString(1211));
//announce number
wANNumber = env->addWindow(rect<s32>(550, 200, 780, 295), false, L"");
wANNumber->getCloseButton()->setVisible(false);
......@@ -996,11 +1009,10 @@ void Game::ClearTextures() {
mainGame->imgCard->setImage(0);
mainGame->btnPSAU->setImage();
mainGame->btnPSDU->setImage();
mainGame->btnCardSelect[0]->setImage();
mainGame->btnCardSelect[1]->setImage();
mainGame->btnCardSelect[2]->setImage();
mainGame->btnCardSelect[3]->setImage();
mainGame->btnCardSelect[4]->setImage();
for(int i=0; i<=4; ++i) {
mainGame->btnCardSelect[i]->setImage();
mainGame->btnCardDisplay[i]->setImage();
}
imageManager.ClearTexture();
}
void Game::CloseDuelWindow() {
......@@ -1015,6 +1027,7 @@ void Game::CloseDuelWindow() {
wANRace->setVisible(false);
wCardImg->setVisible(false);
wCardSelect->setVisible(false);
wCardDisplay->setVisible(false);
wCmdMenu->setVisible(false);
wFTSelect->setVisible(false);
wHand->setVisible(false);
......
......@@ -274,6 +274,12 @@ public:
irr::gui::IGUIStaticText *stCardPos[5];
irr::gui::IGUIScrollBar *scrCardList;
irr::gui::IGUIButton* btnSelectOK;
//card display
irr::gui::IGUIWindow* wCardDisplay;
irr::gui::CGUIImageButton* btnCardDisplay[5];
irr::gui::IGUIStaticText *stDisplayPos[5];
irr::gui::IGUIScrollBar *scrDisplayList;
irr::gui::IGUIButton* btnDisplayOK;
//announce number
irr::gui::IGUIWindow* wANNumber;
irr::gui::IGUIComboBox* cbANNumber;
......@@ -454,6 +460,13 @@ extern unsigned char draw_count;
#define BUTTON_CLEAR_LOG 270
#define LISTBOX_LOG 271
#define SCROLL_CARDTEXT 280
#define BUTTON_DISPLAY_0 290
#define BUTTON_DISPLAY_1 291
#define BUTTON_DISPLAY_2 292
#define BUTTON_DISPLAY_3 293
#define BUTTON_DISPLAY_4 294
#define SCROLL_CARD_DISPLAY 295
#define BUTTON_CARD_DISP_OK 296
#define BUTTON_CATEGORY_OK 300
#define COMBOBOX_DBLFLIST 301
#define COMBOBOX_DBDECKS 302
......
#[2015.4][2015.10][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.4
#[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
#forbidden
20663556 0 --イレカエル
44910027 0 --ヴィクトリー・ドラゴン
......@@ -7,7 +7,6 @@
53804307 0 --焔征竜-ブラスター
90411554 0 --巌征竜-レドックス
26202165 0 --クリッター
67441435 0 --グローアップ·バルブ
78010363 0 --黒き森のウィッチ
07391448 0 --ゴヨウ·ガーディアン
34124316 0 --サイバーポッド
......@@ -57,16 +56,14 @@
80604091 0 --血の代償
35316708 0 --刻の封印
28566710 0 --ラストバトル!
17412721 0 --旧神ノーデン
18326736 0 --星守の騎士 プトレマイオス
#limit
85103922 1 --アーティファクト-モラルタ
64034255 1 --A·ジェネクス·バードマン
45222299 1 --イビリチュア·ガストクラーケ
68184115 1 --甲虫装機 ダンセル
40044918 1 --E·HERO エアーマン
82301904 1 --混沌帝龍 -終焉の使者-
72989439 1 --カオス·ソルジャー -開闢の使者-
16404809 1 --クリバンデット
40737112 1 --混沌の黒魔術師
06602300 1 --重爆撃禽 ボム・フェネクス
28985331 1 --終末の騎士
00423585 1 --召喚僧サモンプリースト
......@@ -83,14 +80,12 @@
08124921 1 --封印されし者の右足
26674724 1 --ブリューナクの影霊衣
91110378 1 --光天使スローネ
22446869 1 --水精鱗-ディニクアビス
41386308 1 --マスマティシャン
33508719 1 --メタモルポット
89463537 1 --ユニコールの影霊衣
88264978 1 --レッドアイズ·ダークネスメタルドラゴン
48976825 1 --異次元からの埋葬
33782437 1 --一時休戦
01845204 1 --簡易融合
66957584 1 --インフェルニティガン
06417578 1 --神の写し身との接触
81439173 1 --おろかな埋葬
......@@ -99,54 +94,53 @@
45305419 1 --継承の印
17639150 1 --機殻の生贄
83764718 1 --死者蘇生
37520316 1 --精神操作
32807846 1 --増援
54447022 1 --ソウル・チャージ
27770341 1 --超再生能力
48130397 1 --超融合
14087893 1 --月の書
72892473 1 --手札抹殺
67169062 1 --貪欲な壺
97211663 1 --影霊衣の反魂術
18144506 1 --ハーピィの羽根帚
94886282 1 --光の援軍
75500286 1 --封印の黄金櫃
53129443 1 --ブラック·ホール
15854426 1 --霞の谷の神風
01475311 1 --闇の誘惑
23171610 1 --リミッター解除
62265044 1 --竜の渓谷
41620959 1 --竜の霊廟
27970830 1 --六武の門
02295440 1 --ワン·フォー·ワン
05851097 1 --虚無空間
77505534 1 --堕ち影の蠢き
84749824 1 --神の警告
41420027 1 --神の宣告
57728570 1 --死のデッキ破壊ウイルス
36468556 1 --停戦協定
46652477 1 --転生の予言
83555666 1 --破壊輪
17078030 1 --光の護封壁
32723153 1 --マジカル·エクスプロージョン
78868119 1 --深海のディーヴァ
50720316 1 --E·HERO シャドー·ミスト
72714461 1 --慧眼の魔術師
90307777 1 --影霊衣の術士 シュリット
67441435 1 --グローアップ·バルブ
#semi limit
79979666 2 --E·HERO バブルマン
37742478 2 --オネスト
74311226 2 --海皇の竜騎隊
65518099 2 --クリフォート・ツール
81122844 2 --発条空母ゼンマイティ
09411399 2 --DHERO ディアボリックガイ
70583986 2 --氷結界の虎王ドゥローレン
50091196 2 --フォーミュラ·シンクロン
02009101 2 --BF-疾風のゲイル
95492061 2 --マンジュ・ゴッド
92826944 2 --馬頭鬼
10028593 2 --輪廻天狗
91623717 2 --連鎖爆撃
98494543 2 --魔法石の採掘
29401950 2 --奈落の落とし穴
16404809 2 --クリバンデット
22446869 2 --水精鱗-ディニクアビス
37520316 2 --精神操作
14087893 2 --月の書
94886282 2 --光の援軍
75500286 2 --封印の黄金櫃
01475311 2 --闇の誘惑
41620959 2 --竜の霊廟
77505534 2 --堕ち影の蠢き
57728570 2 --死のデッキ破壊ウイルス
45222299 2 --イビリチュア·ガストクラーケ
27970830 2 --六武の門
!2015.10
!2015.4
#forbidden
20663556 0 --イレカエル
44910027 0 --ヴィクトリー・ドラゴン
......@@ -154,6 +148,7 @@
53804307 0 --焔征竜-ブラスター
90411554 0 --巌征竜-レドックス
26202165 0 --クリッター
67441435 0 --グローアップ·バルブ
78010363 0 --黒き森のウィッチ
07391448 0 --ゴヨウ·ガーディアン
34124316 0 --サイバーポッド
......@@ -203,14 +198,16 @@
80604091 0 --血の代償
35316708 0 --刻の封印
28566710 0 --ラストバトル!
17412721 0 --旧神ノーデン
18326736 0 --星守の騎士 プトレマイオス
#limit
85103922 1 --アーティファクト-モラルタ
64034255 1 --A·ジェネクス·バードマン
45222299 1 --イビリチュア·ガストクラーケ
68184115 1 --甲虫装機 ダンセル
40044918 1 --E·HERO エアーマン
82301904 1 --混沌帝龍 -終焉の使者-
72989439 1 --カオス·ソルジャー -開闢の使者-
16404809 1 --クリバンデット
40737112 1 --混沌の黒魔術師
06602300 1 --重爆撃禽 ボム・フェネクス
28985331 1 --終末の騎士
00423585 1 --召喚僧サモンプリースト
......@@ -227,12 +224,14 @@
08124921 1 --封印されし者の右足
26674724 1 --ブリューナクの影霊衣
91110378 1 --光天使スローネ
22446869 1 --水精鱗-ディニクアビス
41386308 1 --マスマティシャン
33508719 1 --メタモルポット
89463537 1 --ユニコールの影霊衣
88264978 1 --レッドアイズ·ダークネスメタルドラゴン
48976825 1 --異次元からの埋葬
33782437 1 --一時休戦
01845204 1 --簡易融合
66957584 1 --インフェルニティガン
06417578 1 --神の写し身との接触
81439173 1 --おろかな埋葬
......@@ -241,51 +240,52 @@
45305419 1 --継承の印
17639150 1 --機殻の生贄
83764718 1 --死者蘇生
37520316 1 --精神操作
32807846 1 --増援
54447022 1 --ソウル・チャージ
27770341 1 --超再生能力
48130397 1 --超融合
14087893 1 --月の書
72892473 1 --手札抹殺
67169062 1 --貪欲な壺
97211663 1 --影霊衣の反魂術
18144506 1 --ハーピィの羽根帚
94886282 1 --光の援軍
75500286 1 --封印の黄金櫃
53129443 1 --ブラック·ホール
15854426 1 --霞の谷の神風
01475311 1 --闇の誘惑
23171610 1 --リミッター解除
62265044 1 --竜の渓谷
41620959 1 --竜の霊廟
27970830 1 --六武の門
02295440 1 --ワン·フォー·ワン
05851097 1 --虚無空間
77505534 1 --堕ち影の蠢き
84749824 1 --神の警告
41420027 1 --神の宣告
57728570 1 --死のデッキ破壊ウイルス
36468556 1 --停戦協定
46652477 1 --転生の予言
83555666 1 --破壊輪
17078030 1 --光の護封壁
32723153 1 --マジカル·エクスプロージョン
78868119 1 --深海のディーヴァ
50720316 1 --E·HERO シャドー·ミスト
72714461 1 --慧眼の魔術師
90307777 1 --影霊衣の術士 シュリット
67441435 1 --グローアップ·バルブ
#semi limit
79979666 2 --E·HERO バブルマン
37742478 2 --オネスト
74311226 2 --海皇の竜騎隊
65518099 2 --クリフォート・ツール
81122844 2 --発条空母ゼンマイティ
09411399 2 --DHERO ディアボリックガイ
70583986 2 --氷結界の虎王ドゥローレン
50091196 2 --フォーミュラ·シンクロン
02009101 2 --BF-疾風のゲイル
95492061 2 --マンジュ・ゴッド
92826944 2 --馬頭鬼
10028593 2 --輪廻天狗
91623717 2 --連鎖爆撃
16404809 2 --クリバンデット
22446869 2 --水精鱗-ディニクアビス
37520316 2 --精神操作
14087893 2 --月の書
94886282 2 --光の援軍
75500286 2 --封印の黄金櫃
01475311 2 --闇の誘惑
41620959 2 --竜の霊廟
77505534 2 --堕ち影の蠢き
57728570 2 --死のデッキ破壊ウイルス
45222299 2 --イビリチュア·ガストクラーケ
27970830 2 --六武の門
98494543 2 --魔法石の採掘
29401950 2 --奈落の落とし穴
!2015.1
#forbidden
......
......@@ -448,20 +448,20 @@ void card::calc_attack_defence(int32 *patk, int32 *pdef) {
uint32 base_atk = get_base_attack();
uint32 base_def = get_base_defence();
temp.base_attack = base_atk;
temp.attack = base_atk;
temp.base_defence = base_def;
temp.defence = base_def;
int32 up_atk = 0, upc_atk = 0;
int32 up_def = 0, upc_def = 0;
effect_set eset;
filter_effect(EFFECT_SWAP_AD, &eset, FALSE);
int32 swap = eset.size();
if(swap || patk) {
temp.attack = base_atk;
filter_effect(EFFECT_UPDATE_ATTACK, &eset, FALSE);
filter_effect(EFFECT_SET_ATTACK, &eset, FALSE);
filter_effect(EFFECT_SET_ATTACK_FINAL, &eset, FALSE);
}
if(swap || pdef) {
temp.defence = base_def;
filter_effect(EFFECT_UPDATE_DEFENCE, &eset, FALSE);
filter_effect(EFFECT_SET_DEFENCE, &eset, FALSE);
filter_effect(EFFECT_SET_DEFENCE_FINAL, &eset, FALSE);
......@@ -527,11 +527,15 @@ void card::calc_attack_defence(int32 *patk, int32 *pdef) {
break;
}
if (!rev) {
temp.attack = base_atk + up_atk + upc_atk;
temp.defence = base_def + up_def + upc_def;
if (temp.attack != -1)
temp.attack = base_atk + up_atk + upc_atk;
if (temp.defence != -1)
temp.defence = base_def + up_def + upc_def;
} else {
temp.attack = base_atk - up_atk - upc_atk;
temp.defence = base_def - up_def - upc_def;
if (temp.attack != -1)
temp.attack = base_atk - up_atk - upc_atk;
if (temp.defence != -1)
temp.defence = base_def - up_def - upc_def;
}
}
if (swap_final) {
......
--고신 크투그아
--古神クトグア
function c12948099.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
......
--로켓핸드
--ロケットハンド
function c13317419.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -86,6 +86,7 @@ function c13317419.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0
and ec and ec:IsFaceup() and ec:IsLocation(LOCATION_MZONE) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
......
--P・M 캡처
--P・M・キャプチャー
function c13760677.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......
......@@ -7,7 +7,7 @@ function c14094090.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,14094090)
e1:SetCondition(c14094090.spcon)
e1:SetCondition(aux.exccon)
e1:SetCost(c14094090.spcost)
e1:SetTarget(c14094090.sptg)
e1:SetOperation(c14094090.spop)
......@@ -19,9 +19,6 @@ end
function c14094090.cfilter(c,att)
return c:IsAttribute(att) and c:IsAbleToRemoveAsCost()
end
function c14094090.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c14094090.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c14094090.cfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT)
......
--Typhoon
--タイフーン
function c14883228.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--Mischief of the Gnomes
--小人のいたずら
function c164710.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -23,7 +23,7 @@ function c164710.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c164710.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND):Filter(Card.IsLevelAbove,nil,1)
local hg=Duel.GetMatchingGroup(Card.IsLevelAbove,tp,LOCATION_HAND,LOCATION_HAND,nil,1)
local tc=hg:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
......
--U.A. Rival Rebounder
--U.A.コリバルリバウンダー
function c17264592.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
......
--큐분
--キューブン
function c17530001.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
......@@ -30,11 +30,8 @@ function c17530001.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_MSET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e3)
end
function c17530001.tglimit(e,c)
return c:GetLevel()==e:GetLabel()
......
......@@ -50,6 +50,7 @@ function c18239909.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
......
--Dante, Pilgrim of the Burning Abyss
--彼岸の巡礼者 ダンテ
function c18386170.initial_effect(c)
c:EnableReviveLimit()
--fusion material
......@@ -76,8 +76,10 @@ function c18386170.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1)
end
function c18386170.hdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1)
Duel.SendtoGrave(g,REASON_EFFECT)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()==0 then return end
local sg=g:RandomSelect(tp,1)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
function c18386170.fscon(e,g,gc,chkf)
if g==nil then return true end
......
......@@ -6,15 +6,12 @@ function c18803791.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c18803791.thcon)
e1:SetCondition(aux.exccon)
e1:SetCost(c18803791.thcost)
e1:SetTarget(c18803791.thtg)
e1:SetOperation(c18803791.thop)
c:RegisterEffect(e1)
end
function c18803791.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c18803791.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
--Moon Mirror Shield
--月鏡の盾
function c19508728.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--U.A. Stadium
--U.A.スタジアム
function c19814508.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -11,7 +11,7 @@ function c19814508.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c19814508.target)
e2:SetOperation(c19814508.operation)
......@@ -23,7 +23,7 @@ function c19814508.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCondition(c19814508.atkcon)
e3:SetOperation(c19814508.atkop)
......
--The Traveler and the Burning Abyss
--旅人の到彼岸
function c20036055.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
......@@ -16,7 +16,7 @@ function c20036055.filter(c,e,tp,id)
return c:IsSetCard(0xb1) and c:GetTurnID()==id and not c:IsReason(REASON_RETURN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c20036055.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c20036055.filter(chkc,e,tp,Duel.GetTurnCount()) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c20036055.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,Duel.GetTurnCount()) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......
--Graff, Malebranche of the Burning Abyss
--彼岸の悪鬼 グラバースニッチ
function c20758643.initial_effect(c)
--self destroy
local e1=Effect.CreateEffect(c)
......@@ -49,7 +49,6 @@ function c20758643.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c20758643.ssop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c20758643.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
......
--Dragon Horn Hunter
--竜角の狩猟者
function c21970285.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......
--汎神の帝王
function c22842126.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22842126,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCost(c22842126.cost)
e1:SetTarget(c22842126.target)
e1:SetOperation(c22842126.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22842126,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,22842126)
e2:SetCost(c22842126.thcost)
e2:SetTarget(c22842126.thtg)
e2:SetOperation(c22842126.thop)
c:RegisterEffect(e2)
end
function c22842126.cfilter(c)
return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c22842126.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22842126.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c22842126.cfilter,1,1,REASON_COST,nil)
end
function c22842126.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c22842126.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local dr=Duel.Draw(p,d,REASON_EFFECT)
end
function c22842126.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c22842126.thfilter(c)
return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c22842126.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22842126.thfilter,tp,LOCATION_DECK,0,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22842126.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22842126.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>=3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,3,3,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local tg=sg:Select(1-tp,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
--冥帝エレボス
function c23064604.initial_effect(c)
--summon with 1 tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(23064604,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c23064604.otcon)
e1:SetOperation(c23064604.otop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(23064604,1))
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c23064604.tdcon)
e3:SetTarget(c23064604.tdtg)
e3:SetOperation(c23064604.tdop)
c:RegisterEffect(e3)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(23064604,2))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1)
e4:SetCondition(c23064604.thcon)
e4:SetCost(c23064604.thcost)
e4:SetTarget(c23064604.thtg)
e4:SetOperation(c23064604.thop)
c:RegisterEffect(e4)
end
function c23064604.otfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
end
function c23064604.otcon(e,c)
if c==nil then return true end
local mg=Duel.GetMatchingGroup(c23064604.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and Duel.GetTributeCount(c,mg)>0
end
function c23064604.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c23064604.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function c23064604.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE
end
function c23064604.tgfilter(c,tp)
return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
function c23064604.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c23064604.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
return g:GetClassCount(Card.GetCode)>1
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c23064604.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c23064604.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
if g:GetClassCount(Card.GetCode)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg1=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,tg1:GetFirst():GetCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg2=g:Select(tp,1,1,nil)
tg1:Merge(tg2)
if Duel.SendtoGrave(tg1,REASON_EFFECT)~=0 then
local tg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil)
if tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(23064604,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=tg:RandomSelect(tp,1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
end
if sg:GetCount()>0 then
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
end
function c23064604.thcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c23064604.cfilter(c)
return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDiscardable()
end
function c23064604.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c23064604.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c23064604.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c23064604.thfilter(c)
return c:IsAttackAbove(2400) and c:GetDefence()==1000 and c:IsAbleToHand()
end
function c23064604.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c23064604.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c23064604.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c23064604.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c23064604.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
......@@ -4,19 +4,13 @@ function c23297235.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(23297235,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c23297235.spcon)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(aux.bdogcon)
e1:SetTarget(c23297235.sptg)
e1:SetOperation(c23297235.spop)
c:RegisterEffect(e1)
end
function c23297235.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return eg:GetCount()==1 and tc:GetReasonCard()==e:GetHandler()
and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE)
end
function c23297235.filter(c,e,tp)
return c:IsDefenceBelow(200) and c:IsAttribute(ATTRIBUTE_FIRE) and c:GetCode()~=23297235
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
--Inspiration
--鼓舞
function c25005816.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--Master Craftsman Gamil
--名匠 ガミル
function c25727454.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
......
--드림랜드
--幻夢境
function c26920296.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -96,20 +96,23 @@ function c26920296.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c26920296.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,TYPE_XYZ)
and Duel.GetTurnPlayer()==tp
end
function c26920296.desfilter(c,lv)
return c:IsFaceup() and c:GetLevel()==lv and c:GetLevel()>0 and c:IsDestructable()
end
function c26920296.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g,lv=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetMaxGroup(Card.GetLevel)
local dg=Duel.GetMatchingGroup(c26920296.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,lv)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end
local mg,lv=g:GetMaxGroup(Card.GetLevel)
if lv==0 then return end
local dg=mg:Filter(Card.IsDestructable,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0)
end
function c26920296.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g,lv=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetMaxGroup(Card.GetLevel)
local dg=Duel.GetMatchingGroup(c26920296.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,lv)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end
local mg,lv=g:GetMaxGroup(Card.GetLevel)
if lv==0 then return end
local dg=mg:Filter(Card.IsDestructable,nil)
if dg:GetCount()>0 then
Duel.Destroy(dg,REASON_EFFECT)
end
......
--다이노소어잉
--ダイナソーイング
function c27143874.initial_effect(c)
--indes
local e1=Effect.CreateEffect(c)
......
--永遠の淑女 ベアトリーチェ
function c27552504.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,2,c27552504.ovfilter,aux.Stringid(27552504,0),2,c27552504.xyzop)
c:EnableReviveLimit()
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetCost(c27552504.tgcost)
e1:SetTarget(c27552504.tgtg)
e1:SetOperation(c27552504.tgop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c27552504.spcon)
e2:SetTarget(c27552504.sptg)
e2:SetOperation(c27552504.spop)
c:RegisterEffect(e2)
end
function c27552504.cfilter(c)
return c:IsSetCard(0xb1) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c27552504.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd5)
end
function c27552504.xyzop(e,tp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c27552504.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c27552504.cfilter,1,1,REASON_COST,nil)
e:GetHandler():RegisterFlagEffect(27552504,RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END,0,1)
end
function c27552504.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c27552504.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(27552504)==0
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,0,1,tp,LOCATION_DECK)
end
function c27552504.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
function c27552504.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousControler()==tp and rp~=tp and c:IsReason(REASON_DESTROY)
end
function c27552504.spfilter(c,e,tp)
return c:IsSetCard(0xb1) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c27552504.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c27552504.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c27552504.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c27552504.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
......@@ -16,7 +16,7 @@ function c29795530.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,0x1c0)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c29795530.lvcon)
e2:SetCondition(aux.exccon)
e2:SetCost(c29795530.lvcost)
e2:SetTarget(c29795530.lvtg)
e2:SetOperation(c29795530.lvop)
......@@ -41,9 +41,6 @@ function c29795530.activate(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext()
end
end
function c29795530.lvcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c29795530.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
......@@ -6,15 +6,12 @@ function c30392583.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c30392583.thcon)
e1:SetCondition(aux.exccon)
e1:SetCost(c30392583.thcost)
e1:SetTarget(c30392583.thtg)
e1:SetOperation(c30392583.thop)
c:RegisterEffect(e1)
end
function c30392583.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c30392583.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
......@@ -35,7 +35,8 @@ function c34086406.target1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,0,1,tp,LOCATION_DECK)
end
function c34086406.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_DECK,0,1,nil,TYPE_MONSTER) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_DECK,0,1,nil,TYPE_MONSTER)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 end
end
function c34086406.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......
--U.A. Blockbacker
--U.A.ストロングブロッカー
function c34614289.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
......
--업화의 중기사
--業火の重騎士
function c34761062.initial_effect(c)
aux.EnableDualAttribute(c)
--remove
......
--외신 아자토트
--外神アザトート
function c34945480.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,5,3,c34945480.ovfilter,aux.Stringid(34945480,1))
......
--Malacoda, Netherlord of the Burning Abyss
--彼岸の鬼神 ヘルレイカー
function c35330871.initial_effect(c)
c:EnableReviveLimit()
--special summon condition
......
--U.A. Powered Jersey
--U.A.パワードギプス
function c35884610.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--Fire Lake of the Burning Abyss
--彼岸の沈溺
function c36006208.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--Farfa, Malebranche of the Burning Abyss
--彼岸の悪鬼 ファーファレル
function c36553319.initial_effect(c)
--self destroy
local e1=Effect.CreateEffect(c)
......@@ -49,7 +49,6 @@ function c36553319.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c36553319.ssop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c36553319.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
......@@ -63,17 +62,22 @@ function c36553319.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c36553319.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT+REASON_TEMPORARY)~=0 then
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
tc:RegisterFlagEffect(36553319,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(c36553319.retcon)
e1:SetOperation(c36553319.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c36553319.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(36553319)~=0
end
function c36553319.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
......@@ -26,7 +26,7 @@ function c36970611.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(c36970611.thcon)
e3:SetCondition(aux.exccon)
e3:SetCost(c36970611.thcost)
e3:SetTarget(c36970611.thtg)
e3:SetOperation(c36970611.thop)
......@@ -71,9 +71,6 @@ function c36970611.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end
end
function c36970611.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c36970611.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
......@@ -12,7 +12,8 @@ function c37383714.initial_effect(c)
c:RegisterEffect(e1)
end
function c37383714.cfilter(c,tp)
return c:IsReason(REASON_DESTROY) and c:IsType(TYPE_MONSTER) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
return c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsType(TYPE_MONSTER)
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
end
function c37383714.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c37383714.cfilter,1,nil,tp)
......
......@@ -27,6 +27,7 @@ function c37745740.initial_effect(c)
end
function c37745740.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x9f) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x9f)
e:SetLabel(g:GetFirst():GetLevel()*100)
Duel.Release(g,REASON_COST)
......@@ -43,6 +44,7 @@ function c37745740.operation(e,tp,eg,ep,ev,re,r,rp)
end
function c37745740.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x9f) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x9f)
e:SetLabelObject(g:GetFirst())
Duel.Release(g,REASON_COST)
......
--U.A. Signing Deal
--U.A.フラッグシップ・ディール
function c43658697.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--The Terminus of the Burning Abyss
--旅人の結彼岸
function c44771289.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--당근인
--にん人
function c44928016.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
......
--Draghig, Malebranche of the Burning Abyss
--彼岸の悪鬼 ドラゴネル
function c45593826.initial_effect(c)
--self destroy
local e1=Effect.CreateEffect(c)
......@@ -48,7 +48,6 @@ function c45593826.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c45593826.ssop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c45593826.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -17,7 +17,7 @@ function c46008667.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,46008667)
e2:SetCondition(c46008667.spcon)
e2:SetCondition(aux.exccon)
e2:SetCost(c46008667.spcost)
e2:SetTarget(c46008667.sptg)
e2:SetOperation(c46008667.spop)
......@@ -56,9 +56,6 @@ function c46008667.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Equip(tp,c,tc)
end
end
function c46008667.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c46008667.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
--Lancephorhynchus
--ランスフォリンクス
function c48940337.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......
--금단의 트라페조헤드론
--禁断のトラペゾヘドロン
function c49033797.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--스피리츄얼 위스퍼
--スピリチューアル・ウィスパー
function c50155385.initial_effect(c)
--battle indes
local e1=Effect.CreateEffect(c)
......
--Swamp Mirrorer
--鏡像のスワンプマン
function c50277973.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--Ghosts From the Past
--恐撃
function c51099515.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -26,7 +26,7 @@ function c51099515.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(cg,POS_FACEUP,REASON_COST)
end
function c51099515.tfilter(c)
return c:IsFaceup() and c:GetAttack()>0
return c:IsPosition(POS_FACEUP_ATTACK) and c:GetAttack()>0
end
function c51099515.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c51099515.tfilter(chkc) end
......
......@@ -18,7 +18,7 @@ function c5133471.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,5133471)
e2:SetCondition(c5133471.descon)
e2:SetCondition(aux.exccon)
e2:SetCost(c5133471.descost)
e2:SetTarget(c5133471.destg)
e2:SetOperation(c5133471.activate)
......@@ -40,9 +40,6 @@ function c5133471.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c5133471.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetHandler():GetTurnID()
end
function c5133471.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
--Card Advance
--カード・アドバンス
function c52112003.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--Lightsworn Sanctuary
--ライトロードの神域
function c52665542.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
......@@ -56,12 +56,12 @@ function c52665542.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c52665542.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c52665542.tgfilter,tp,LOCATION_GRAVE,0,1,1,cc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,1,0,0)
end
function c52665542.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
......
--真源の帝王
function c54241725.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_ATTACK)
e1:SetTarget(c54241725.acttg)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(54241725,0))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCost(c54241725.drcost)
e2:SetTarget(c54241725.drtg)
e2:SetOperation(c54241725.drop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(54241725,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,54241725)
e3:SetCost(c54241725.spcost)
e3:SetTarget(c54241725.sptg)
e3:SetOperation(c54241725.spop)
c:RegisterEffect(e3)
end
function c54241725.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if c54241725.drcost(e,tp,eg,ep,ev,re,r,rp,0) and c54241725.drtg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,94) then
e:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetOperation(c54241725.drop)
c54241725.drcost(e,tp,eg,ep,ev,re,r,rp,1)
c54241725.drtg(e,tp,eg,ep,ev,re,r,rp,1)
e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,65)
else
e:SetCategory(0)
e:SetProperty(0)
e:SetOperation(nil)
end
end
function c54241725.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(54241725)==0 end
e:GetHandler():RegisterFlagEffect(54241725,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c54241725.tdfilter(c)
return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c54241725.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c54241725.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c54241725.tdfilter,tp,LOCATION_GRAVE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c54241725.tdfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c54241725.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()<=0 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
function c54241725.cfilter(c)
return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemoveAsCost()
end
function c54241725.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c54241725.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler())
and e:GetHandler():GetFlagEffect(54241725)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c54241725.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:GetHandler():RegisterFlagEffect(54241725,RESET_CHAIN,0,1)
end
function c54241725.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,54241725,0,0x11,5,1000,2400,RACE_FAIRY,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c54241725.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e)
and Duel.IsPlayerCanSpecialSummonMonster(tp,54241725,0,0x11,5,1000,2400,RACE_FAIRY,ATTRIBUTE_LIGHT) then
c:SetStatus(STATUS_NO_LEVEL,false)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_NORMAL+TYPE_MONSTER)
e1:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e1,true)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENCE)
end
end
--インフェルニティ・ビショップ
function c54320860.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,54320860)
e1:SetCondition(c54320860.spcon)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c54320860.reptg)
e2:SetValue(c54320860.repval)
e2:SetOperation(c54320860.repop)
c:RegisterEffect(e2)
end
function c54320860.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)==1
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c54320860.filter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:IsSetCard(0xb) and not c:IsReason(REASON_REPLACE)
end
function c54320860.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
and eg:IsExists(c54320860.filter,1,nil,tp) and e:GetHandler():IsAbleToRemove() end
return Duel.SelectYesNo(tp,aux.Stringid(54320860,0))
end
function c54320860.repval(e,c)
return c54320860.filter(c,e:GetHandlerPlayer())
end
function c54320860.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
--어버이 해마
--タツノオトシオヤ
function c54537489.initial_effect(c)
--spsummon condition
local e1=Effect.CreateEffect(c)
......@@ -22,7 +22,8 @@ function c54537489.splimit(e,se,sp,st)
return se:IsActiveType(TYPE_MONSTER) and se:GetHandler():IsRace(RACE_WYRM)
end
function c54537489.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return e:GetHandler():GetLevel()>1
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,54537490,0,0x4011,300,200,1,RACE_WYRM,ATTRIBUTE_WATER) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
......
--U.A. Mighty Slugger
--U.A.マイティースラッガー
function c56421754.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
......
--Cir, Malebranche of the Burning Abyss
--彼岸の悪鬼 ガトルホッグ
function c57143342.initial_effect(c)
--self destroy
local e1=Effect.CreateEffect(c)
......@@ -49,7 +49,6 @@ function c57143342.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c57143342.ssop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c57143342.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
......
--Doomstar Magician
--凶星の魔術師
function c58369990.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
......@@ -34,4 +34,4 @@ function c58369990.operation(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
end
--冥帝従騎エイドス
function c59463312.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(59463312,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c59463312.sumop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(59463312,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,59463312)
e3:SetCost(c59463312.cost)
e3:SetTarget(c59463312.target)
e3:SetOperation(c59463312.operation)
c:RegisterEffect(e3)
end
function c59463312.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,59463312)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetValue(0x1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_EXTRA_SET_COUNT)
Duel.RegisterEffect(e2,tp)
Duel.RegisterFlagEffect(tp,59463312,RESET_PHASE+PHASE_END,0,1)
end
function c59463312.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c59463312.filter(c,e,tp)
return c:GetAttack()==800 and c:GetDefence()==1000 and not c:IsCode(59463312) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c59463312.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c59463312.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c59463312.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c59463312.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c59463312.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c59463312.splimit)
Duel.RegisterEffect(e1,tp)
end
function c59463312.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
--Virgil, Rockstar of the Burning Abyss
--彼岸の詩人 ウェルギリウス
function c601193.initial_effect(c)
c:SetUniqueOnField(1,0,601193)
--synchro summon
......
--펜듈럼 모라토리엄
--ペンデュラム・モラトリアム
function c60434189.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--BOX복서
--BOXサー
function c61156777.initial_effect(c)
--Add counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(61156777,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c61156777.ctcon)
e1:SetCondition(aux.bdogcon)
e1:SetOperation(c61156777.ctop)
c:RegisterEffect(e1)
--spsummon
......@@ -28,11 +28,6 @@ function c61156777.initial_effect(c)
e3:SetOperation(c61156777.repop)
c:RegisterEffect(e3)
end
function c61156777.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER) and bc:IsLocation(LOCATION_GRAVE)
end
function c61156777.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
......
--U.A. Turnover Tactics
--U.A.ターンオーバー・タクティクス
function c61613388.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
......
--Good & Evil in the Burning Abyss
--善悪の彼岸
function c62835876.initial_effect(c)
aux.AddRitualProcGreater(c,aux.FilterBoolFunction(Card.IsCode,35330871))
--search
......@@ -7,15 +7,12 @@ function c62835876.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,62835876)
e1:SetCondition(c62835876.thcon)
e1:SetCondition(aux.exccon)
e1:SetCost(c62835876.thcost)
e1:SetTarget(c62835876.thtg)
e1:SetOperation(c62835876.thop)
c:RegisterEffect(e1)
end
function c62835876.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetHandler():GetTurnID() or e:GetHandler():IsReason(REASON_RETURN)
end
function c62835876.cfilter(c)
return c:IsSetCard(0xb1) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
......
--Libic, Malebranche of the Burning Abyss
--彼岸の悪鬼 リビオッコ
function c62957424.initial_effect(c)
--self destroy
local e1=Effect.CreateEffect(c)
......@@ -49,7 +49,6 @@ function c62957424.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c62957424.ssop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c62957424.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -18,7 +18,7 @@ function c63227401.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c63227401.condition)
e2:SetCondition(aux.exccon)
e2:SetCost(c63227401.cost)
e2:SetTarget(c63227401.target)
e2:SetOperation(c63227401.activate)
......@@ -54,9 +54,6 @@ end
function c63227401.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c63227401.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c63227401.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
......@@ -23,9 +23,10 @@ function c63323539.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=eg:FilterSelect(tp,c63323539.filter,1,1,nil,e,tp)
local tc=g:GetFirst()
if not tc then return end
local atk=tc:GetAttack()
if atk<0 or tc:IsFacedown() then atk=0 end
if tc and Duel.Destroy(tc,REASON_EFFECT)~=0 then
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
--U.A. Penalty Box
--U.A.ペナルティ
function c70043345.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--고신 하스톨
--古神ハストール
function c70913714.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
......
--U.A. Dreadnought Dunker
--U.A.ドレッドノートダンカー
function c71279983.initial_effect(c)
--special summon rule
local e1=Effect.CreateEffect(c)
......
......@@ -45,7 +45,7 @@ function c71408082.spfilter(c,e,tp)
return c:IsSetCard(0x3b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71408082.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c71408082.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
......
--U.A. Midfielder
--U.A.ファンタジスタ
function c72491806.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
......@@ -59,6 +59,7 @@ function c72491806.tsop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c72491806.spfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp,tc:GetCode())
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
......
--Calcab, Malebranche of the Burning Abyss
--彼岸の悪鬼 ハックルスパー
function c73213494.initial_effect(c)
--self destroy
local e1=Effect.CreateEffect(c)
......@@ -49,7 +49,6 @@ function c73213494.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c73213494.ssop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c73213494.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
......
--Rubic, Malebranche of the Burning Abyss
--彼岸の悪鬼 ラビキャント
function c734741.initial_effect(c)
--self destroy
local e1=Effect.CreateEffect(c)
......@@ -49,7 +49,6 @@ function c734741.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c734741.ssop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c734741.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -52,8 +52,7 @@ function c73694478.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c73694478.thcon(e,tp,eg,ep,ev,re,r,rp)
return (e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN))
and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
return aux.exccon(e) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c73694478.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
......@@ -49,8 +49,7 @@ function c73729209.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c73729209.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and (e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN))
and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
return aux.exccon(e) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end
function c73729209.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
--Dragoons of Draconia
--ドラコニアの獣竜騎兵
function c73779005.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......
--Fusion Substitute
--置換融合
function c74335036.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
......@@ -16,7 +16,7 @@ function c75214390.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c75214390.atkcon)
e2:SetCondition(aux.exccon)
e2:SetCost(c75214390.atkcost)
e2:SetTarget(c75214390.atktg)
e2:SetOperation(c75214390.atkop)
......@@ -31,9 +31,6 @@ function c75214390.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c75214390.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c75214390.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c75214390.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
--가부키 드래곤
--カブキ・ドラゴン
function c7541475.initial_effect(c)
--position
local e1=Effect.CreateEffect(c)
......
......@@ -9,7 +9,7 @@ function c7617062.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c7617062.ftarget)
c:RegisterEffect(e2)
......@@ -25,17 +25,25 @@ function c7617062.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DIRECT_ATTACK)
e4:SetRange(LOCATION_SZONE)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetTarget(c7617062.dirtg)
c:RegisterEffect(e4)
--pos
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetRange(LOCATION_SZONE)
e5:SetRange(LOCATION_FZONE)
e5:SetCode(EVENT_BATTLE_DAMAGE)
e5:SetOperation(c7617062.operation)
e5:SetOperation(c7617062.regop)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetRange(LOCATION_FZONE)
e6:SetCode(EVENT_DAMAGE_STEP_END)
e6:SetCondition(c7617062.poscon)
e6:SetOperation(c7617062.posop)
e6:SetLabelObject(e5)
c:RegisterEffect(e6)
end
function c7617062.bttg(e,c)
return c:IsFacedown()
......@@ -46,18 +54,20 @@ end
function c7617062.ftarget(e,c)
return not c:IsSetCard(0x8d)
end
function c7617062.operation(e,tp,eg,ep,ev,re,r,rp)
function c7617062.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:GetFirst()
if tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsCanTurnSet() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetOperation(c7617062.posop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e1)
end
c:RegisterFlagEffect(7617062,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE,0,1)
eg:GetFirst():RegisterFlagEffect(7617063,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE,0,1)
end
function c7617062.poscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(7617062)>0
end
function c7617062.filter(c)
return c:GetFlagEffect(7617063)>0
end
function c7617062.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangePosition(e:GetHandler(),POS_FACEDOWN_DEFENCE)
local g=Duel.GetMatchingGroup(c7617062.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if e:GetHandler():IsRelateToEffect(e) then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE)
end
end
......@@ -52,7 +52,7 @@ function c78474168.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c78474168.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and (e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN))
return aux.exccon(e) and Duel.GetTurnPlayer()==tp
end
function c78474168.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
--구신 누토스
--旧神ヌトス
function c80532587.initial_effect(c)
c:SetSPSummonOnce(80532587)
--fusion material
......
--마주사이의 전사
--魔サイの戦士
function c81035362.initial_effect(c)
--indes
local e1=Effect.CreateEffect(c)
......
......@@ -47,11 +47,11 @@ function c81907872.posop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c81907872.cfilter1(c,tp)
return c:IsControler(tp) and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY+REASON_EFFECT) and c:IsSetCard(0x8d) and c:IsType(TYPE_MONSTER)
and not c:IsPreviousLocation(LOCATION_SZONE)
return c:IsControler(tp) and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT)
and c:IsSetCard(0x8d) and c:IsType(TYPE_MONSTER) and not c:IsPreviousLocation(LOCATION_SZONE)
end
function c81907872.cfilter2(c)
return c:IsReason(REASON_BATTLE) and c:IsStatus(STATUS_OPPO_BATTLE) and c==Duel.GetAttackTarget()
return c:IsReason(REASON_BATTLE) and c:IsStatus(STATUS_OPPO_BATTLE) and c==Duel.GetAttackTarget()
end
function c81907872.spcon(e,tp,eg,ep,ev,re,r,rp)
return (rp~=tp and eg:IsExists(c81907872.cfilter1,1,nil,tp)) or eg:IsExists(c81907872.cfilter2,1,nil)
......
--Barbar, Malebranche of the Burning Abyss
--彼岸の悪鬼 バルバリッチャ
function c81992475.initial_effect(c)
--self destroy
local e1=Effect.CreateEffect(c)
......@@ -49,7 +49,6 @@ function c81992475.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c81992475.ssop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c81992475.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
......
--Sea Dragoons of Draconia
--ドラコニアの海竜騎兵
function c82114013.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......
--Dante, Traveler of the Burning Abyss
--彼岸の旅人 ダンテ
function c83531441.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,2)
......
--Scarm, Malebranche of the Burning Abyss
--彼岸の悪鬼 スカラマリオン
function c84764038.initial_effect(c)
--self destroy
local e1=Effect.CreateEffect(c)
......@@ -44,7 +44,6 @@ function c84764038.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c84764038.ssop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c84764038.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
......
--X-레이 피어스
--X-レイ・ピアース
function c86559484.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
......
--Quantum Cat
--量子猫
function c87772572.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
......@@ -17,7 +17,7 @@ function c88204302.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c88204302.thcon)
e2:SetCondition(aux.exccon)
e2:SetCost(c88204302.thcost)
e2:SetTarget(c88204302.thtg)
e2:SetOperation(c88204302.thop)
......@@ -40,9 +40,6 @@ function c88204302.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c88204302.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount() or e:GetHandler():IsReason(REASON_RETURN)
end
function c88204302.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
--Unbreakable Spirit
--不屈の闘志
function c88494120.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -14,12 +14,16 @@ function c88494120.initial_effect(c)
end
function c88494120.condition(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1
and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)==1
end
function c88494120.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()==0 then return false end
local mg,atk=g:GetMinGroup(Card.GetAttack)
return atk>0 and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end
......
--Bashing Shield
--シールドバッシュ
function c88610708.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--ゴゴゴアリステラ&デクシア
function c91718579.initial_effect(c)
--untargetable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetCondition(c91718579.tgcon)
e1:SetValue(c91718579.atlimit)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SELECT_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetTargetRange(0,0xff)
e2:SetValue(c91718579.tglimit)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCondition(c91718579.effcon)
e3:SetOperation(c91718579.effop)
c:RegisterEffect(e3)
end
function c91718579.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x59)
end
function c91718579.tgcon(e)
return Duel.IsExistingMatchingCard(c91718579.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler())
end
function c91718579.atlimit(e,c)
return c:IsFaceup() and c:IsSetCard(0x59)
end
function c91718579.tglimit(e,re,c)
return c:IsFaceup() and c:IsSetCard(0x59) and c:IsType(TYPE_MONSTER)
end
function c91718579.effcon(e,tp,eg,ep,ev,re,r,rp)
local mg=e:GetHandler():GetReasonCard():GetMaterial()
return r==REASON_XYZ and mg:IsExists(Card.IsSetCard,mg:GetCount(),nil,0x59)
end
function c91718579.effop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,91718579)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(91718579,0))
e1:SetCategory(CATEGORY_POSITION+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c91718579.poscon)
e1:SetTarget(c91718579.postg)
e1:SetOperation(c91718579.posop)
e1:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_TYPE)
e2:SetValue(TYPE_MONSTER+TYPE_EFFECT+TYPE_XYZ)
e2:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e2)
end
end
function c91718579.poscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end
function c91718579.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsPosition(POS_FACEUP_ATTACK) end
if chk==0 then return Duel.IsExistingTarget(Card.IsPosition,tp,0,LOCATION_MZONE,1,nil,POS_FACEUP_ATTACK) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,Card.IsPosition,tp,0,LOCATION_MZONE,1,1,nil,POS_FACEUP_ATTACK)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c91718579.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc or tc:IsDefencePos() or not tc:IsRelateToEffect(e) then return end
if Duel.ChangePosition(tc,POS_FACEUP_DEFENCE)==0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_DEFENCE_FINAL)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(0)
tc:RegisterEffect(e1)
end
--켄타우르스
--犬タウルス
function c91754175.initial_effect(c)
--atk up
local e1=Effect.CreateEffect(c)
......
--Cagna, Malebranche of the Burning Abyss
--彼岸の悪鬼 ハロウハウンド
function c9342162.initial_effect(c)
--self destroy
local e1=Effect.CreateEffect(c)
......@@ -49,7 +49,6 @@ function c9342162.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c9342162.ssop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c9342162.filter,tp,LOCATION_ONFIELD,0,1,nil) then return end
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
......
--U.A. Goalkeeper
--U.A.カストディアン
function c9485511.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
......
--天帝従騎イデア
function c95457011.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(95457012,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,95457011)
e1:SetTarget(c95457011.sptg)
e1:SetOperation(c95457011.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(95457012,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,95457012)
e3:SetCondition(c95457011.thcon)
e3:SetTarget(c95457011.thtg)
e3:SetOperation(c95457011.thop)
c:RegisterEffect(e3)
end
function c95457011.spfilter(c,e,tp)
return c:GetAttack()==800 and c:GetDefence()==1000 and not c:IsCode(95457011) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c95457011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c95457011.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c95457011.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c95457011.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c95457011.splimit)
Duel.RegisterEffect(e1,tp)
end
function c95457011.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function c95457011.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c95457011.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c95457011.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c95457011.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c95457011.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c95457011.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c95457011.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--天帝アイテール
function c96570609.initial_effect(c)
--summon with 1 tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(96570609,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c96570609.otcon)
e1:SetOperation(c96570609.otop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(96570609,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c96570609.spcon)
e3:SetTarget(c96570609.sptg)
e3:SetOperation(c96570609.spop)
c:RegisterEffect(e3)
--summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(96570609,2))
e4:SetCategory(CATEGORY_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_HAND)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1)
e4:SetCondition(c96570609.sumcon)
e4:SetCost(c96570609.sumcost)
e4:SetTarget(c96570609.sumtg)
e4:SetOperation(c96570609.sumop)
c:RegisterEffect(e4)
end
function c96570609.otfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
end
function c96570609.otcon(e,c)
if c==nil then return true end
local mg=Duel.GetMatchingGroup(c96570609.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and Duel.GetTributeCount(c,mg)>0
end
function c96570609.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c96570609.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function c96570609.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE
end
function c96570609.tgfilter(c,tp)
return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
function c96570609.spfilter(c,e,tp)
return c:IsAttackAbove(2400) and c:GetDefence()==1000 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c96570609.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c96570609.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
return g:GetClassCount(Card.GetCode)>1
and Duel.IsExistingMatchingCard(c96570609.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c96570609.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c96570609.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
if g:GetClassCount(Card.GetCode)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg1=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,tg1:GetFirst():GetCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg2=g:Select(tp,1,1,nil)
tg1:Merge(tg2)
if Duel.SendtoGrave(tg1,REASON_EFFECT)~=0 then
local g=Duel.SelectMatchingCard(tp,c96570609.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(c96570609.thop)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
end
end
end
function c96570609.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
function c96570609.sumcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c96570609.cfilter(c)
return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemoveAsCost()
end
function c96570609.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c96570609.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c96570609.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c96570609.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonable(true,nil,1) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0)
end
function c96570609.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSummonable(true,nil,1) then
Duel.Summon(tp,c,true,nil,1)
end
end
--U.A. Playmaker
--U.A.フィールドゼネラル
function c98229575.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
......@@ -35,20 +35,23 @@ function c98229575.spop(e,tp,eg,ep,ev,re,r,rp,c)
end
function c98229575.atkcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:IsSetCard(0xb2) and at:IsControler(tp) and at~=e:GetHandler()
return at:IsSetCard(0xb2) and at:IsControler(tp) and at~=e:GetHandler() and e:GetHandler():IsAttackAbove(800)
end
function c98229575.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local at=Duel.GetAttacker()
if c:IsFaceup() and c:IsRelateToEffect(e) and at:IsFaceup() and at:IsRelateToBattle() then
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsAttackAbove(800) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(-800)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetValue(800)
at:RegisterEffect(e2)
if at:IsFaceup() and at:IsRelateToBattle() then
local e2=e1:Clone()
e2:SetValue(800)
at:RegisterEffect(e2)
end
end
end
--Stegocyber
--盾航戦車ステゴサイバー
function c99733359.initial_effect(c)
--no damage
local e1=Effect.CreateEffect(c)
......
......@@ -1184,6 +1184,10 @@ end
function Auxiliary.nfbdncon(e)
return not e:GetHandler():IsForbidden()
end
--condition of "except the turn this card was sent to the Graveyard"
function Auxiliary.exccon(e)
return Duel.GetTurnCount()~=e:GetHandler():GetTurnID() or e:GetHandler():IsReason(REASON_RETURN)
end
--flag effect for spell counter
function Auxiliary.chainreg(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(1)==0 then
......
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