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

recon

parent 5eac5d54
......@@ -29,6 +29,7 @@ struct CardDataC {
unsigned int race;
int attack;
int defence;
unsigned int ot;
unsigned int category;
};
struct CardString {
......
......@@ -25,6 +25,7 @@ bool DataManager::LoadDates(const char* file) {
return Error(pDB, pStmt);
else if(step == SQLITE_ROW) {
cd.code = sqlite3_column_int(pStmt, 0);
cd.ot = sqlite3_column_int(pStmt, 1);
cd.alias = sqlite3_column_int(pStmt, 2);
cd.setcode = sqlite3_column_int(pStmt, 3);
cd.type = sqlite3_column_int(pStmt, 4);
......
......@@ -609,8 +609,8 @@ void Game::DrawDeckBd() {
//main deck
driver->draw2DRectangle(recti(310, 137, 410, 157), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(recti(309, 136, 410, 157));
textFont->draw(L"主卡组:", recti(314, 136, 409, 156), 0xff000000, false, true);
textFont->draw(L"主卡组:", recti(315, 137, 410, 157), 0xffffffff, false, true);
textFont->draw(dataManager.GetSysString(1330), recti(314, 136, 409, 156), 0xff000000, false, true);
textFont->draw(dataManager.GetSysString(1330), recti(315, 137, 410, 157), 0xffffffff, false, true);
numFont->draw(dataManager.numStrings[deckManager.deckhost.main.size()], recti(379, 137, 439, 157), 0xff000000, false, true);
numFont->draw(dataManager.numStrings[deckManager.deckhost.main.size()], recti(380, 138, 440, 158), 0xffffffff, false, true);
driver->draw2DRectangle(recti(310, 160, 797, 436), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
......@@ -632,8 +632,8 @@ void Game::DrawDeckBd() {
//extra deck
driver->draw2DRectangle(recti(310, 440, 410, 460), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(recti(309, 439, 410, 460));
textFont->draw(L"额外卡组:", recti(314, 439, 409, 459), 0xff000000, false, true);
textFont->draw(L"额外卡组:", recti(315, 440, 410, 460), 0xffffffff, false, true);
textFont->draw(dataManager.GetSysString(1331), recti(314, 439, 409, 459), 0xff000000, false, true);
textFont->draw(dataManager.GetSysString(1331), recti(315, 440, 410, 460), 0xffffffff, false, true);
numFont->draw(dataManager.numStrings[deckManager.deckhost.extra.size()], recti(379, 440, 439, 460), 0xff000000, false, true);
numFont->draw(dataManager.numStrings[deckManager.deckhost.extra.size()], recti(380, 441, 440, 461), 0xffffffff, false, true);
driver->draw2DRectangle(recti(310, 463, 797, 533), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
......@@ -649,8 +649,8 @@ void Game::DrawDeckBd() {
//side deck
driver->draw2DRectangle(recti(310, 537, 410, 557), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(recti(309, 536, 410, 557));
textFont->draw(L"副卡组:", recti(314, 536, 409, 556), 0xff000000, false, true);
textFont->draw(L"副卡组:", recti(315, 537, 410, 557), 0xffffffff, false, true);
textFont->draw(dataManager.GetSysString(1332), recti(314, 536, 409, 556), 0xff000000, false, true);
textFont->draw(dataManager.GetSysString(1332), recti(315, 537, 410, 557), 0xffffffff, false, true);
numFont->draw(dataManager.numStrings[deckManager.deckhost.side.size()], recti(379, 537, 439, 557), 0xff000000, false, true);
numFont->draw(dataManager.numStrings[deckManager.deckhost.side.size()], recti(380, 538, 440, 558), 0xffffffff, false, true);
driver->draw2DRectangle(recti(310, 560, 797, 630), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
......@@ -665,8 +665,8 @@ void Game::DrawDeckBd() {
}
driver->draw2DRectangle(recti(805, 137, 915, 157), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(recti(804, 136, 915, 157));
textFont->draw(L"查找结果:", recti(809, 136, 914, 156), 0xff000000, false, true);
textFont->draw(L"查找结果:", recti(810, 137, 915, 157), 0xffffffff, false, true);
textFont->draw(dataManager.GetSysString(1333), recti(809, 136, 914, 156), 0xff000000, false, true);
textFont->draw(dataManager.GetSysString(1333), recti(810, 137, 915, 157), 0xffffffff, false, true);
numFont->draw(deckBuilder.result_string, recti(874, 136, 934, 156), 0xff000000, false, true);
numFont->draw(deckBuilder.result_string, recti(875, 137, 935, 157), 0xffffffff, false, true);
driver->draw2DRectangle(recti(805, 160, 1020, 630), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
......@@ -680,8 +680,7 @@ void Game::DrawDeckBd() {
myswprintf(textBuffer, L"%ls", dataManager.GetName(ptr->first));
textFont->draw(textBuffer, recti(859, 164 + i * 66, 955, 185 + i * 66), 0xff000000, false, false);
textFont->draw(textBuffer, recti(860, 165 + i * 66, 955, 185 + i * 66), 0xffffffff, false, false);
myswprintf(textBuffer, L"%ls/%ls ★%d", dataManager.FormatAttribute(ptr->second.attribute),
dataManager.FormatRace(ptr->second.race), ptr->second.level);
myswprintf(textBuffer, L"%ls/%ls ★%d", dataManager.FormatAttribute(ptr->second.attribute), dataManager.FormatRace(ptr->second.race), ptr->second.level);
textFont->draw(textBuffer, recti(859, 186 + i * 66, 955, 207 + i * 66), 0xff000000, false, false);
textFont->draw(textBuffer, recti(860, 187 + i * 66, 955, 207 + i * 66), 0xffffffff, false, false);
if(ptr->second.attack < 0 && ptr->second.defence < 0)
......@@ -691,6 +690,10 @@ void Game::DrawDeckBd() {
else if(ptr->second.defence < 0)
myswprintf(textBuffer, L"%d/?", ptr->second.attack);
else myswprintf(textBuffer, L"%d/%d", ptr->second.attack, ptr->second.defence);
if((ptr->second.ot & 0x3) == 1)
wcscat(textBuffer, L" [OCG]");
else if((ptr->second.ot & 0x3) == 2)
wcscat(textBuffer, L" [TCG]");
textFont->draw(textBuffer, recti(859, 208 + i * 66, 955, 229 + i * 66), 0xff000000, false, false);
textFont->draw(textBuffer, recti(860, 209 + i * 66, 955, 229 + i * 66), 0xffffffff, false, false);
} else {
......
......@@ -14,7 +14,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
switch(event.GUIEvent.EventType) {
case irr::gui::EGET_BUTTON_CLICKED: {
switch(id) {
case BUTTON_CLEAR_LOG: {
case BUTTON_CLEAR_LOG: {
mainGame->lstLog->clear();
mainGame->logParam.clear();
break;
......@@ -736,38 +736,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
int pos = mainGame->scrCardList->getPos() / 10;
ClientCard* mcard = selectable_cards[id - BUTTON_CARD_0 + pos];
if(mcard->code) {
CardData cd;
mainGame->dataManager.GetData(mcard->code, &cd);
mainGame->imgCard->setImage(mainGame->imageManager.GetTexture(mcard->code));
myswprintf(formatBuffer, L"%ls[%d]", mainGame->dataManager.GetName(mcard->code), mcard->code);
mainGame->stName->setText(formatBuffer);
if(cd.type & TYPE_MONSTER) {
myswprintf(formatBuffer, L"[%ls] %ls/%ls", mainGame->dataManager.FormatType(cd.type), mainGame->dataManager.FormatRace(cd.race), mainGame->dataManager.FormatAttribute(cd.attribute));
mainGame->stInfo->setText(formatBuffer);
formatBuffer[0] = L'[';
for(int i = 1; i <= cd.level; ++i)
formatBuffer[i] = L'★';
formatBuffer[cd.level + 1] = L']';
formatBuffer[cd.level + 2] = L' ';
if(cd.attack < 0 && cd.defence < 0)
myswprintf(&formatBuffer[cd.level + 3], L"?/?");
else if(cd.attack < 0)
myswprintf(&formatBuffer[cd.level + 3], L"?/%d", cd.defence);
else if(cd.defence < 0)
myswprintf(&formatBuffer[cd.level + 3], L"%d/?", cd.attack);
else
myswprintf(&formatBuffer[cd.level + 3], L"%d/%d", cd.attack, cd.defence);
mainGame->stDataInfo->setText(formatBuffer);
mainGame->stText->setRelativePosition(irr::core::position2di(15, 83));
} else {
myswprintf(formatBuffer, L"[%ls]", mainGame->dataManager.FormatType(cd.type));
mainGame->stInfo->setText(formatBuffer);
mainGame->stDataInfo->setText(L"");
mainGame->stText->setRelativePosition(irr::core::position2di(15, 60));
}
mainGame->SetStaticText(mainGame->stText, 270, mainGame->textFont, (wchar_t*)mainGame->dataManager.GetText(mcard->code));
mainGame->ShowCardInfo(mcard->code);
} else {
mainGame->stTip->setVisible(false);
mainGame->imgCard->setImage(mainGame->imageManager.tCover);
mainGame->stName->setText(L"");
mainGame->stInfo->setText(L"");
......
......@@ -96,28 +96,30 @@ bool Game::Initialize() {
cbRule->addItem(dataManager.GetSysString(1240));
cbRule->addItem(dataManager.GetSysString(1241));
cbRule->addItem(dataManager.GetSysString(1242));
cbRule->addItem(dataManager.GetSysString(1243));
env->addStaticText(dataManager.GetSysString(1226), rect<s32>(20, 60, 220, 80), false, false, wCreateHost);
cbLFlist = env->addComboBox(rect<s32>(140, 55, 300, 80), wCreateHost);
for(int i = 0; i < deckManager._lfList.size(); ++i)
cbLFlist->addItem(deckManager._lfList[i].listName);
env->addStaticText(dataManager.GetSysString(1227), rect<s32>(20, 90, 220, 110), false, false, wCreateHost);
cbMatchMode = env->addComboBox(rect<s32>(140, 85, 300, 110), wCreateHost);
cbMatchMode->addItem(dataManager.GetSysString(1243));
cbMatchMode->addItem(dataManager.GetSysString(1244));
env->addStaticText(dataManager.GetSysString(1228), rect<s32>(20, 120, 320, 140), false, false, wCreateHost);
chkNoCheckDeck = env->addCheckBox(false, rect<s32>(20, 150, 320, 170), wCreateHost, -1, dataManager.GetSysString(1229));
chkNoShuffleDeck = env->addCheckBox(false, rect<s32>(20, 180, 320, 200), wCreateHost, -1, dataManager.GetSysString(1230));
cbMatchMode->addItem(dataManager.GetSysString(1245));
chkEnablePriority = env->addCheckBox(false, rect<s32>(20, 120, 360, 140), wCreateHost, -1, dataManager.GetSysString(1236));
env->addStaticText(dataManager.GetSysString(1228), rect<s32>(20, 150, 320, 170), false, false, wCreateHost);
chkNoCheckDeck = env->addCheckBox(false, rect<s32>(20, 180, 170, 200), wCreateHost, -1, dataManager.GetSysString(1229));
chkNoShuffleDeck = env->addCheckBox(false, rect<s32>(180, 180, 360, 200), wCreateHost, -1, dataManager.GetSysString(1230));
env->addStaticText(dataManager.GetSysString(1231), rect<s32>(20, 210, 320, 230), false, false, wCreateHost);
myswprintf(dataManager.strBuffer, L"%d", 8000);
ebStartLP = env->addEditBox(dataManager.strBuffer, rect<s32>(140, 205, 220, 230), true, wCreateHost);
ebStartLP = env->addEditBox(dataManager.strBuffer, rect<s32>(140, 210, 220, 230), true, wCreateHost);
ebStartLP->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
env->addStaticText(dataManager.GetSysString(1232), rect<s32>(20, 240, 320, 260), false, false, wCreateHost);
myswprintf(dataManager.strBuffer, L"%d", 5);
ebStartHand = env->addEditBox(dataManager.strBuffer, rect<s32>(140, 235, 220, 260), true, wCreateHost);
ebStartHand = env->addEditBox(dataManager.strBuffer, rect<s32>(140, 240, 220, 260), true, wCreateHost);
ebStartHand->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
env->addStaticText(dataManager.GetSysString(1233), rect<s32>(20, 270, 320, 290), false, false, wCreateHost);
myswprintf(dataManager.strBuffer, L"%d", 1);
ebDrawCount = env->addEditBox(dataManager.strBuffer, rect<s32>(140, 265, 220, 290), true, wCreateHost);
ebDrawCount = env->addEditBox(dataManager.strBuffer, rect<s32>(140, 270, 220, 290), true, wCreateHost);
ebDrawCount->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
env->addStaticText(dataManager.GetSysString(1234), rect<s32>(10, 360, 220, 380), false, false, wCreateHost);
ebServerName = env->addEditBox(gameConf.gamename, rect<s32>(110, 355, 250, 380), true, wCreateHost);
......@@ -128,29 +130,27 @@ bool Game::Initialize() {
btnHostConfirm = env->addButton(rect<s32>(260, 355, 370, 380), wCreateHost, BUTTON_HOST_CONFIRM, dataManager.GetSysString(1211));
btnHostCancel = env->addButton(rect<s32>(260, 385, 370, 410), wCreateHost, BUTTON_HOST_CANCEL, dataManager.GetSysString(1212));
//host(single)
wHostSingle = env->addWindow(rect<s32>(220, 120, 800, 480), false, dataManager.GetSysString(1245));
wHostSingle = env->addWindow(rect<s32>(270, 120, 750, 420), false, dataManager.GetSysString(1250));
wHostSingle->getCloseButton()->setVisible(false);
wHostSingle->setVisible(false);
btnHostSingleDuelist = env->addButton(rect<s32>(10, 30, 110, 50), wHostSingle, BUTTON_HS_DUELIST, dataManager.GetSysString(1246));
stHostSingleDuelist[0] = env->addStaticText(L"", rect<s32>(140, 30, 340, 50), true, false, wHostSingle);
btnHostSingleKick[0] = env->addButton(rect<s32>(115, 30, 135, 50), wHostSingle, BUTTON_HS_KICK, L"X");
stHostSingleDuelist[1] = env->addStaticText(L"", rect<s32>(140, 55, 340, 75), true, false, wHostSingle);
btnHostSingleKick[1] = env->addButton(rect<s32>(115, 55, 135, 75), wHostSingle, BUTTON_HS_KICK, L"X");
chkHostSingleReady[0] = env->addCheckBox(false, rect<s32>(350, 30, 370, 50), wHostSingle, -1, L"");
btnHostSingleDuelist = env->addButton(rect<s32>(10, 30, 110, 55), wHostSingle, BUTTON_HS_DUELIST, dataManager.GetSysString(1251));
stHostSingleDuelist[0] = env->addStaticText(L"", rect<s32>(40, 65, 240, 85), true, false, wHostSingle);
btnHostSingleKick[0] = env->addButton(rect<s32>(10, 65, 30, 85), wHostSingle, BUTTON_HS_KICK, L"X");
chkHostSingleReady[0] = env->addCheckBox(false, rect<s32>(250, 65, 270, 85), wHostSingle, -1, L"");
chkHostSingleReady[0]->setEnabled(false);
chkHostSingleReady[1] = env->addCheckBox(false, rect<s32>(350, 55, 370, 75), wHostSingle, -1, L"");
stHostSingleDuelist[1] = env->addStaticText(L"", rect<s32>(40, 90, 240, 110), true, false, wHostSingle);
btnHostSingleKick[1] = env->addButton(rect<s32>(10, 90, 30, 110), wHostSingle, BUTTON_HS_KICK, L"X");
chkHostSingleReady[1] = env->addCheckBox(false, rect<s32>(250, 90, 270, 110), wHostSingle, -1, L"");
chkHostSingleReady[1]->setEnabled(false);
btnHostSingleOB = env->addButton(rect<s32>(10, 90, 110, 110), wHostSingle, BUTTON_HS_OBSERVER, dataManager.GetSysString(1247));
for(int i = 0; i < 8; ++i) {
stHostSingleOB[i] = env->addStaticText(L"", rect<s32>(140, 90 + 25 * i, 340, 110 + 25 * i), true, false, wHostSingle);
btnHostSingleKick[i + 2] = env->addButton(rect<s32>(115, 90 + 25 * i, 135, 110 + 25 * i), wHostSingle, BUTTON_HS_KICK, L"X");
}
stHostSingleRule = env->addStaticText(L"", rect<s32>(380, 30, 560, 330), false, true, wHostSingle);
env->addStaticText(dataManager.GetSysString(1248), rect<s32>(380, 190, 560, 210), false, false, wHostSingle);
cbDeckSelect = env->addComboBox(rect<s32>(380, 215, 560, 240), wHostSingle);
btnHostSingleReady = env->addButton(rect<s32>(450, 250, 560, 275), wHostSingle, BUTTON_HS_READY, dataManager.GetSysString(1249));
btnHostSingleStart = env->addButton(rect<s32>(330, 315, 440, 340), wHostSingle, BUTTON_HS_START, dataManager.GetSysString(1215));
btnHostSingleCancel = env->addButton(rect<s32>(450, 315, 560, 340), wHostSingle, BUTTON_HS_CANCEL, dataManager.GetSysString(1212));
btnHostSingleOB = env->addButton(rect<s32>(10, 120, 110, 145), wHostSingle, BUTTON_HS_OBSERVER, dataManager.GetSysString(1252));
myswprintf(dataManager.strBuffer, L"%ls%d", dataManager.GetSysString(1253), 0);
stHostSingleOB = env->addStaticText(dataManager.strBuffer, rect<s32>(10, 150, 270, 170), false, false, wHostSingle);
stHostSingleRule = env->addStaticText(L"", rect<s32>(280, 30, 460, 230), false, true, wHostSingle);
env->addStaticText(dataManager.GetSysString(1254), rect<s32>(10, 185, 110, 205), false, false, wHostSingle);
cbDeckSelect = env->addComboBox(rect<s32>(120, 180, 270, 205), wHostSingle);
btnHostSingleReady = env->addButton(rect<s32>(120, 215, 270, 240), wHostSingle, BUTTON_HS_START, dataManager.GetSysString(1255));
btnHostSingleStart = env->addButton(rect<s32>(230, 260, 340, 285), wHostSingle, BUTTON_HS_START, dataManager.GetSysString(1215));
btnHostSingleCancel = env->addButton(rect<s32>(350, 260, 460, 285), wHostSingle, BUTTON_HS_CANCEL, dataManager.GetSysString(1212));
//img
wCardImg = env->addStaticText(L"", rect<s32>(1, 1, 199, 273), true, false, 0, -1, true);
wCardImg->setBackgroundColor(0xc0c0c0c0);
......@@ -673,7 +673,9 @@ void Game::ShowCardInfo(int code) {
wchar_t formatBuffer[256];
dataManager.GetData(code, &cd);
imgCard->setImage(imageManager.GetTexture(code));
myswprintf(formatBuffer, L"%ls", dataManager.GetName(code));
if(cd.alias != 0 && (cd.alias - code < 10 || code - cd.alias < 10))
myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(cd.alias), cd.alias);
else myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code);
stName->setText(formatBuffer);
if(cd.type & TYPE_MONSTER) {
myswprintf(formatBuffer, L"[%ls] %ls/%ls", dataManager.FormatType(cd.type), dataManager.FormatRace(cd.race), dataManager.FormatAttribute(cd.attribute));
......
......@@ -236,6 +236,7 @@ public:
irr::gui::IGUIEditBox* ebDrawCount;
irr::gui::IGUIEditBox* ebServerName;
irr::gui::IGUIEditBox* ebServerPass;
irr::gui::IGUICheckBox* chkEnablePriority;
irr::gui::IGUICheckBox* chkNoCheckDeck;
irr::gui::IGUICheckBox* chkNoShuffleDeck;
irr::gui::IGUIButton* btnHostConfirm;
......@@ -245,11 +246,11 @@ public:
irr::gui::IGUIButton* btnHostSingleDuelist;
irr::gui::IGUIButton* btnHostSingleOB;
irr::gui::IGUIStaticText* stHostSingleDuelist[2];
irr::gui::IGUIStaticText* stHostSingleOB[8];
irr::gui::IGUIStaticText* stHostSingleRule;
irr::gui::IGUICheckBox* chkHostSingleReady[2];
irr::gui::IGUIButton* btnHostSingleKick[2];
irr::gui::IGUIComboBox* cbDeckSelect;
irr::gui::IGUIButton* btnHostSingleKick[10];
irr::gui::IGUIStaticText* stHostSingleRule;
irr::gui::IGUIStaticText* stHostSingleOB;
irr::gui::IGUIButton* btnHostSingleReady;
irr::gui::IGUIButton* btnHostSingleStart;
irr::gui::IGUIButton* btnHostSingleCancel;
......
......@@ -186,6 +186,10 @@ struct processor {
card_set operated_set;
card_set discarded_set;
card_set destroy_canceled;
card_set summoned_cards_pt[2];
card_set normalsummoned_cards_pt[2];
card_set spsummoned_cards_pt[2];
card_set flipsummoned_cards_pt[2];
effect_set_v disfield_effects;
effect_set_v extraz_effects;
effect_set_v extraz_effects_e;
......
......@@ -432,6 +432,10 @@ static const struct luaL_Reg duellib[] = {
{ "CheckSpecialSummonActivity", scriptlib::duel_check_special_summon_activity },
{ "CheckAttackActivity", scriptlib::duel_check_attack_activity },
{ "CheckPhaseActivity", scriptlib::duel_check_phase_activity },
{ "SummonedCardsThisTurn", scriptlib::duel_get_summoned_cards_this_turn },
{ "NormalSummonedCardsThisTurn", scriptlib::duel_get_normal_summoned_cards_this_turn },
{ "SpecialSummonedCardsThisTurn", scriptlib::duel_get_spsummoned_cards_this_turn },
{ "FlipSummonedCardsThisTurn", scriptlib::duel_get_flip_summoned_cards_this_turn },
{ "VenomSwampCheck", scriptlib::duel_venom_swamp_check },
{ "SwapDeckAndGrave", scriptlib::duel_swap_deck_and_grave },
{ "MajesticCopy", scriptlib::duel_majestic_copy },
......
......@@ -2682,6 +2682,50 @@ int32 scriptlib::duel_check_phase_activity(lua_State *L) {
lua_pushboolean(L, pduel->game_field->core.phase_action);
return 1;
}
int32 scriptlib::duel_get_summoned_cards_this_turn(lua_State *L) {
check_param_count(L, 1);
int32 playerid = lua_tointeger(L, 1);
if(playerid != 0 && playerid != 1)
return 0;
duel* pduel = interpreter::get_duel_info(L);
group* newgroup = pduel->new_group();
newgroup->container = pduel->game_field->core.summoned_cards_pt[playerid];
interpreter::group2value(L, newgroup);
return 1;
}
int32 scriptlib::duel_get_normal_summoned_cards_this_turn(lua_State *L) {
check_param_count(L, 1);
int32 playerid = lua_tointeger(L, 1);
if(playerid != 0 && playerid != 1)
return 0;
duel* pduel = interpreter::get_duel_info(L);
group* newgroup = pduel->new_group();
newgroup->container = pduel->game_field->core.normalsummoned_cards_pt[playerid];
interpreter::group2value(L, newgroup);
return 1;
}
int32 scriptlib::duel_get_spsummoned_cards_this_turn(lua_State *L) {
check_param_count(L, 1);
int32 playerid = lua_tointeger(L, 1);
if(playerid != 0 && playerid != 1)
return 0;
duel* pduel = interpreter::get_duel_info(L);
group* newgroup = pduel->new_group();
newgroup->container = pduel->game_field->core.spsummoned_cards_pt[playerid];
interpreter::group2value(L, newgroup);
return 1;
}
int32 scriptlib::duel_get_flip_summoned_cards_this_turn(lua_State *L) {
check_param_count(L, 1);
int32 playerid = lua_tointeger(L, 1);
if(playerid != 0 && playerid != 1)
return 0;
duel* pduel = interpreter::get_duel_info(L);
group* newgroup = pduel->new_group();
newgroup->container = pduel->game_field->core.flipsummoned_cards_pt[playerid];
interpreter::group2value(L, newgroup);
return 1;
}
int32 scriptlib::duel_venom_swamp_check(lua_State *L) {
check_param_count(L, 2);
check_param(L, PARAM_TYPE_CARD, 2);
......
......@@ -1124,6 +1124,8 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
core.summoning_card = 0;
core.summon_state[sumplayer] = TRUE;
core.normalsummon_state[sumplayer] = TRUE;
core.summoned_cards_pt[sumplayer].insert(target);
core.normalsummoned_cards_pt[sumplayer].insert(target);
raise_event(target, EVENT_SUMMON, proc, 0, sumplayer, sumplayer, 0);
process_instant_event();
add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, TRUE, TRUE);
......@@ -1212,6 +1214,7 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) {
target->current.position = POS_FACEUP_ATTACK;
core.phase_action = TRUE;
core.flipsummon_state[sumplayer] = TRUE;
core.flipsummoned_cards_pt[sumplayer].insert(target);
pduel->write_buffer8(MSG_FLIPSUMMONING);
pduel->write_buffer32(target->data.code);
pduel->write_buffer8(target->current.controler);
......@@ -1411,6 +1414,7 @@ int32 field::mset(uint16 step, uint8 setplayer, card * target, effect * proc, ui
set_control(target, setplayer, 0, 0);
core.phase_action = TRUE;
core.normalsummon_state[setplayer] = TRUE;
core.normalsummoned_cards_pt[setplayer].insert(target);
target->set_status(STATUS_SUMMON_TURN, TRUE);
pduel->write_buffer8(MSG_SET);
pduel->write_buffer32(target->data.code);
......@@ -1601,6 +1605,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
pduel->write_buffer8(target->current.position);
core.spsummoning_card = 0;
core.spsummon_state[sumplayer] = TRUE;
core.spsummoned_cards_pt[sumplayer].insert(target);
raise_event(target, EVENT_SPSUMMON, core.units.begin()->peffect, 0, sumplayer, sumplayer, 0);
process_instant_event();
add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, TRUE, TRUE);
......@@ -1712,6 +1717,7 @@ int32 field::special_summon_step(uint16 step, group * targets, card * target) {
if(!targets)
core.special_summoning.insert(target);
target->enable_field_effect(FALSE);
core.spsummoned_cards_pt[target->summon_player].insert(target);
core.spsummon_state[target->summon_player] = TRUE;
core.hint_timing[target->summon_player] |= TIMING_SPSUMMON;
move_to_field(target, target->summon_player, playerid, LOCATION_MZONE, positions);
......
......@@ -3254,6 +3254,10 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
core.normalsummon_state[p] = 0;
core.flipsummon_state[p] = 0;
core.spsummon_state[p] = 0;
core.summoned_cards_pt[p].clear();
core.normalsummoned_cards_pt[p].clear();
core.spsummoned_cards_pt[p].clear();
core.flipsummoned_cards_pt[p].clear();
core.attack_state[p] = 0;
}
for(auto rit = effects.rechargeable.begin(); rit != effects.rechargeable.end(); ++rit)
......
......@@ -431,6 +431,10 @@ public:
static int32 duel_check_special_summon_activity(lua_State *L);
static int32 duel_check_attack_activity(lua_State *L);
static int32 duel_check_phase_activity(lua_State *L);
static int32 duel_get_summoned_cards_this_turn(lua_State *L);
static int32 duel_get_normal_summoned_cards_this_turn(lua_State *L);
static int32 duel_get_spsummoned_cards_this_turn(lua_State *L);
static int32 duel_get_flip_summoned_cards_this_turn(lua_State *L);
//specific card functions
static int32 duel_venom_swamp_check(lua_State *L);
......
......@@ -21,7 +21,6 @@ function c10002346.initial_effect(c)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c10002346.reptg)
e3:SetOperation(c10002346.repop)
c:RegisterEffect(e3)
end
function c10002346.val(e,c)
......@@ -29,8 +28,8 @@ function c10002346.val(e,c)
end
function c10002346.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
return Duel.SelectYesNo(tp,aux.Stringid(10002346,0))
end
function c10002346.repop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
if Duel.SelectYesNo(tp,aux.Stringid(10002346,0)) then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
return true
else return false end
end
--デス·ドーナツ
function c10389794.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10389794,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetTarget(c10389794.target)
e1:SetOperation(c10389794.operation)
c:RegisterEffect(e1)
end
function c10389794.filter(c)
return c:IsFaceup() and c:IsDestructable() and (c:GetBaseAttack()==0 or c:GetBaseDefence()==0)
end
function c10389794.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c10389794.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c10389794.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c10389794.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -15,7 +15,7 @@ function c14759024.initial_effect(c)
c:RegisterEffect(e2)
end
function c14759024.filter(c)
return c:IsSetCard(0x53) and c:IsAbleToHand()
return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c14759024.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14759024.filter,tp,LOCATION_DECK,0,1,nil) end
......
--フォトン·サンクチュアリ
function c17418744.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c17418744.cost)
e1:SetTarget(c17418744.target)
e1:SetOperation(c17418744.activate)
c:RegisterEffect(e1)
end
function c17418744.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.SummonedCardsThisTurn(tp):IsExists(Card.IsAttribute,1,nil,0x6f)
and not Duel.FlipSummonedCardsThisTurn(tp):IsExists(Card.IsAttribute,1,nil,0x6f)
and not Duel.SpecialSummonedCardsThisTurn(tp):IsExists(Card.IsAttribute,1,nil,0x6f) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c17418744.sumlimit)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(c17418744.sumlimit)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
Duel.RegisterEffect(e3,tp)
end
function c17418744.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsAttribute(0x6f)
end
function c17418744.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,17418745,0,0x4011,2000,0,1,RACE_THUNDER,ATTRIBUTE_LIGHT)
end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c17418744.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,17418745,0,0x4011,2000,0,1,RACE_THUNDER,ATTRIBUTE_LIGHT) then
for i=1,2 do
local token=Duel.CreateToken(tp,17418745)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(1)
token:RegisterEffect(e2,true)
end
Duel.SpecialSummonComplete()
end
end
--マアト
function c18631392.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c18631392.spcon)
e2:SetOperation(c18631392.spop)
c:RegisterEffect(e2)
--announce 3 cards
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(18631392,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c18631392.anctg)
c:RegisterEffect(e3)
end
function c18631392.spfilter(c,rac)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(rac) and c:IsAbleToGraveAsCost()
end
function c18631392.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c18631392.spfilter,tp,LOCATION_MZONE,0,1,nil,RACE_FAIRY)
and Duel.IsExistingMatchingCard(c18631392.spfilter,tp,LOCATION_MZONE,0,1,nil,RACE_DRAGON)
end
function c18631392.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c18631392.spfilter,tp,LOCATION_MZONE,0,1,1,nil,RACE_FAIRY)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c18631392.spfilter,tp,LOCATION_MZONE,0,1,1,nil,RACE_DRAGON)
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
end
function c18631392.anctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end
Duel.Hint(HINT_SELECTMSG,tp,0)
local ac1=Duel.AnnounceCard(tp)
Duel.Hint(HINT_SELECTMSG,tp,0)
local ac2=Duel.AnnounceCard(tp)
Duel.Hint(HINT_SELECTMSG,tp,0)
local ac3=Duel.AnnounceCard(tp)
e:SetOperation(c18631392.retop(ac1,ac2,ac3))
end
function c18631392.hfilter(c,code1,code2,code3)
local code=c:GetCode()
return (code==code1 or code==code2 or code==code3) and c:IsAbleToHand()
end
function c18631392.retop(code1,code2,code3)
return
function (e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
local hg=g:Filter(c18631392.hfilter,nil,code1,code2,code3)
g:Sub(hg)
if hg:GetCount()~=0 then
Duel.DisableShuffleCheck()
Duel.SendtoHand(hg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hg)
Duel.ShuffleHand(tp)
end
if g:GetCount()~=0 then
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT)
end
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(hg:GetCount()*1000)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENCE)
c:RegisterEffect(e2)
end
end
end
--影無茶ナイト
function c19353570.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19353570,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c19353570.spcon)
e1:SetTarget(c19353570.sptg)
e1:SetOperation(c19353570.spop)
c:RegisterEffect(e1)
--unsynchroable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c19353570.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst():GetLevel()==3
end
function c19353570.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.ShuffleHand(tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c19353570.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--M·HERO アシッド
function c29095552.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--destrroy & atkdown
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29095552,0))
e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(c29095552.destg)
e2:SetOperation(c29095552.desop)
c:RegisterEffect(e2)
end
function c29095552.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c29095552.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c29095552.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c29095552.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c29095552.filter,tp,0,LOCATION_ONFIELD,nil)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=mg:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-300)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc=mg:GetNext()
end
end
end
......@@ -37,7 +37,7 @@ function c29552709.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
end
function c29552709.filter(c)
return c:IsSetCard(0x10) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsSetCard(0x10) and c:IsAbleToHand()
end
function c29552709.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c29552709.filter(chkc) end
......
--ウミノタウルス
function c30464153.initial_effect(c)
--pierce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_PIERCE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c30464153.target)
c:RegisterEffect(e1)
end
function c30464153.target(e,c)
return c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA)
end
--カブトロン
function c30587695.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30587695,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c30587695.spcost)
e1:SetTarget(c30587695.sptg)
e1:SetOperation(c30587695.spop)
c:RegisterEffect(e1)
end
function c30587695.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c30587695.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30587695.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c30587695.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c30587695.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c30587695.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c95503687.filter(chkc,e,tp) end
if chk==0 then return Duel.GetFlagEffect(tp,30587695)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c30587695.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c30587695.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.RegisterFlagEffect(tp,30587695,RESET_PHASE+PHASE_END,0,1)
end
function c30587695.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
end
......@@ -3,7 +3,7 @@ function c30604579.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,c30604579.tfilter,aux.NonTuner(nil),2)
c:EnableReviveLimit()
--disable
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30604579,0))
e1:SetCategory(CATEGORY_DISABLE)
......
--素早いマンタ
function c3070049.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(3070049,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c3070049.condition)
e1:SetOperation(c3070049.operation)
c:RegisterEffect(e1)
end
function c3070049.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY)
end
function c3070049.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
tc:AddCounter(0x15,1,REASON_EFFECT)
tc=g:GetNext()
end
end
--陽炎獣 ヒッポグリフォ
function c31303283.initial_effect(c)
--cannot be target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c31303283.tgvalue)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(31303283,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c31303283.atkcost)
e2:SetOperation(c31303283.atkop)
c:RegisterEffect(e2)
end
function c31303283.tgvalue(e,tp)
return tp~=e:GetHandlerPlayer()
end
function c31303283.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,e:GetHandler(),ATTRIBUTE_FIRE) end
local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,e:GetHandler(),ATTRIBUTE_FIRE)
Duel.Release(g,REASON_COST)
end
function c31303283.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
......@@ -17,7 +17,7 @@ function c33550694.initial_effect(c)
c:RegisterEffect(e2)
end
function c33550694.filter1(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c33550694.filter2(c,e,tp,m,chkf)
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
......
......@@ -39,6 +39,7 @@ function c40732515.spcon(e,c)
if c==nil then return true end
local fd=Duel.GetFieldCard(c:GetControler(),LOCATION_SZONE,5)
return fd and fd:IsCode(39910367) and fd:IsCanRemoveCounter(c:GetControler(),0x3001,6,REASON_COST)
and Duel.GetLocationCount(tp,LOCATION_MZONE)~=0
end
function c40732515.spop(e,tp,eg,ep,ev,re,r,rp,c)
local fd=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
......
--森の聖霊 エーコ
function c4192696.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4192696,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_DAMAGE)
e1:SetCondition(c4192696.spcon)
e1:SetTarget(c4192696.sptg)
e1:SetOperation(c4192696.spop)
c:RegisterEffect(e1)
end
function c4192696.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and tp~=rp and bit.band(r,REASON_EFFECT)~=0
end
function c4192696.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.ShuffleHand(tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ev)
end
function c4192696.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Damage(1-tp,ev,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(c4192696.damval)
e1:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e1,tp)
end
end
function c4192696.damval(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 then return 0
else return val end
end
--反射光子流
function c43813459.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetCondition(c43813459.condition)
e1:SetTarget(c43813459.target)
e1:SetOperation(c43813459.activate)
c:RegisterEffect(e1)
end
function c43813459.condition(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return a:IsOnField() and d and d:IsFaceup() and d:IsControler(tp) and d:IsAttribute(ATTRIBUTE_LIGHT) and d:IsRace(RACE_DRAGON)
end
function c43813459.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.GetAttacker():CreateEffectRelation(e)
Duel.GetAttackTarget():CreateEffectRelation(e)
end
function c43813459.activate(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if a:IsFacedown() or not a:IsRelateToEffect(e) or d:IsFacedown() or not d:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(a:GetAttack())
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE)
d:RegisterEffect(e1)
end
--グラヴィティ·ウォリアー
function c44035031.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(44035031,0))
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c44035031.atkcon)
e1:SetOperation(c44035031.atkop)
c:RegisterEffect(e1)
--pos
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(44035031,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c44035031.poscon)
e2:SetTarget(c44035031.postg)
e2:SetOperation(c44035031.posop)
c:RegisterEffect(e2)
end
function c44035031.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
end
function c44035031.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end
local ct=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*300)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
function c44035031.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE
end
function c44035031.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsDefence() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDefence,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,Card.IsDefence,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c44035031.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
if tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MUST_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
end
......@@ -45,9 +45,11 @@ function c45041488.ccost(e,tp)
select=select+1
end
if select==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=g1:Select(tp,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
elseif select==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=g2:Select(tp,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
......
--素早いマンタ
function c46384403.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(46384403,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c46384403.condition)
e1:SetTarget(c46384403.target)
e1:SetOperation(c46384403.operation)
c:RegisterEffect(e1)
end
function c46384403.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_EFFECT)
end
function c46384403.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c46384403.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c46384403.filter(c,e,tp)
return c:IsCode(46384403) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
end
function c46384403.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft==0 then return end
local g=Duel.SelectMatchingCard(tp,c46384403.filter,tp,LOCATION_DECK,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -45,6 +45,7 @@ function c49680980.ccost(e,tp)
select=select+1
end
if select==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=g1:Select(tp,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
elseif select==1 then
......
--フォトン·ワイバーン
function c55758589.initial_effect(c)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(55758589,0))
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c55758589.destg)
e1:SetOperation(c55758589.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c55758589.filter(c)
return c:IsFacedown() and c:IsDestructable()
end
function c55758589.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c55758589.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c55758589.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c55758589.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
--M·HERO ダイアン
function c62624486.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(62624486,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c62624486.spcon)
e2:SetTarget(c62624486.sptg)
e2:SetOperation(c62624486.spop)
c:RegisterEffect(e2)
end
function c62624486.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 c62624486.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c62624486.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c62624486.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c62624486.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,c62624486.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -45,6 +45,7 @@ function c66816282.ccost(e,tp)
select=select+1
end
if select==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=g1:Select(tp,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
elseif select==1 then
......
--フィッシュボーグ-ランチャー
function c66853752.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(66853752,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c66853752.condition)
e1:SetTarget(c66853752.target)
e1:SetOperation(c66853752.operation)
c:RegisterEffect(e1)
--synchro limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetValue(c66853752.synlimit)
c:RegisterEffect(e2)
end
function c66853752.cfilter(c)
return c:IsType(TYPE_MONSTER) and not c:IsAttribute(ATTRIBUTE_WATER)
end
function c66853752.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c66853752.cfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c66853752.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,66853752)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.RegisterFlagEffect(tp,66853752,RESET_PHASE+PHASE_END,0,1)
end
function c66853752.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e)
and not Duel.IsExistingMatchingCard(c66853752.cfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
function c66853752.synlimit(e,c)
if not c then return false end
return not c:IsAttribute(ATTRIBUTE_WATER)
end
--スノーダスト·ドラゴン
function c67675300.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:SetCondition(c67675300.spcon)
e1:SetOperation(c67675300.spop)
c:RegisterEffect(e1)
--atk,pos limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c67675300.target)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
c:RegisterEffect(e3)
end
function c67675300.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(tp,LOCATION_MZONE)~=0 and Duel.IsCanRemoveCounter(c:GetControler(),1,1,0x15,4,REASON_COST)
end
function c67675300.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RemoveCounter(tp,1,1,0x15,4,REASON_RULE)
end
function c67675300.target(e,c)
return c~=e:GetHandler() and c:GetCounter(0x15)~=0
end
--深海の怒り
function c73778008.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c73778008.atkup)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e2)
end
function c73778008.atkup(e,c)
return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_FISH+RACE_SEASERPENT+RACE_AQUA)*500
end
--森の聖獣 アルパカリブ
function c77797992.initial_effect(c)
--indes1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCondition(c77797992.cona)
e1:SetTarget(c77797992.targeta)
e1:SetValue(1)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c77797992.cond)
e2:SetTarget(c77797992.targetd)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
end
function c77797992.cona(e)
return e:GetHandler():IsAttack()
end
function c77797992.targeta(e,c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsRace(RACE_WINDBEAST+RACE_PLANT+RACE_INSECT)
end
function c77797992.cond(e)
return e:GetHandler():IsDefence()
end
function c77797992.targetd(e,c)
return c:IsPosition(POS_FACEUP_DEFENCE) and c:IsRace(RACE_WINDBEAST+RACE_PLANT+RACE_INSECT)
end
--発条機雷ゼンマイン
function c78156759.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterEqualFunction(Card.GetLevel,3),2)
c:EnableReviveLimit()
--destroy replace
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c78156759.reptg)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(78156759,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_REPEAT)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c78156759.descon)
e2:SetTarget(c78156759.destg)
e2:SetOperation(c78156759.desop)
c:RegisterEffect(e2)
end
function c78156759.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
if Duel.SelectYesNo(tp,aux.Stringid(78156759,0)) then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
e:GetHandler():RegisterFlagEffect(78156759,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
return true
else return false end
end
function c78156759.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(78156759)~=0
end
function c78156759.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c78156759.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
......@@ -11,7 +11,7 @@ function c78486968.initial_effect(c)
c:RegisterEffect(e1)
end
function c78486968.filter(c)
return c:IsSetCard(0x53) and c:IsAbleToHand()
return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c78486968.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c78486968.filter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -49,6 +49,7 @@ function c80367387.ccost(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=g2:Select(tp,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
else
Duel.Destroy(e:GetHandler(),REASON_RULE)
end
......
--煉獄龍 オーガ·ドラグーン
function c81020646.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81020646,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c81020646.discon)
e1:SetTarget(c81020646.distg)
e1:SetOperation(c81020646.disop)
c:RegisterEffect(e1)
end
function c81020646.discon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainInactivatable(ev)
and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
end
function c81020646.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c81020646.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--大凛魔天使ローザリアン
function c81146288.initial_effect(c)
c:EnableReviveLimit()
--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:SetCondition(c81146288.spcon)
e1:SetOperation(c81146288.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(81146288,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c81146288.distg)
e2:SetOperation(c81146288.disop)
c:RegisterEffect(e2)
end
function c81146288.spfilter(c)
return c:IsLevelAbove(7) and c:IsRace(RACE_PLANT) and c:IsAbleToRemoveAsCost()
end
function c81146288.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c81146288.spfilter,tp,LOCATION_HAND,0,1,c)
and Duel.IsExistingMatchingCard(c81146288.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c81146288.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c81146288.spfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c81146288.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function c81146288.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
end
function c81146288.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_MZONE,c)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
--ブーテン
function c83991690.initial_effect(c)
--tuner
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(83991690,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c83991690.cost)
e1:SetTarget(c83991690.target)
e1:SetOperation(c83991690.operation)
c:RegisterEffect(e1)
end
function c83991690.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 c83991690.filter(c)
return c:IsFaceup() and c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and not c:IsType(TYPE_TUNER)
end
function c83991690.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c83991690.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c83991690.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c83991690.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c83991690.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
end
end
--カオス·ソーサラー
function c9596126.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9596126,0))
......@@ -22,7 +23,6 @@ function c9596126.initial_effect(c)
e2:SetTarget(c9596126.rmtg)
e2:SetOperation(c9596126.rmop)
c:RegisterEffect(e2)
c:EnableReviveLimit()
end
function c9596126.spfilter(c,att)
return c:IsAttribute(att) and c:IsAbleToRemoveAsCost()
......
......@@ -2,7 +2,7 @@
function c96146814.initial_effect(c)
--adchange
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(96146814,1))
e1:SetDescription(aux.Stringid(96146814,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
......
......@@ -75,6 +75,7 @@
!system 561 请选择表示形式
!system 562 请选择要宣言的属性
!system 563 请选择要宣言的种族
!system 564 请宣言一个卡名
!system 1000 卡组
!system 1001 手牌
!system 1002 怪兽区
......@@ -197,7 +198,7 @@
!system 1222 主机密码:
!system 1223 加入游戏
!system 1224 建立主机
!system 1225 决斗规则
!system 1225 卡片允许
!system 1226 禁限卡表:
!system 1227 决斗模式:
!system 1228 ↓额外选项(无特殊要求请勿修改)
......@@ -208,21 +209,24 @@
!system 1233 每回合抽卡:
!system 1234 主机名称:
!system 1235 主机密码:
!system 1240 OCG
!system 1241 TCG
!system 1242 世界赛
!system 1243 单局模式
!system 1244 比赛模式
!system 1245 决斗准备
!system 1246 决斗者
!system 1247 OB
!system 1248 卡组选择:
!system 1249 准备完毕!
!system 1236 允许启动效果优先权
!system 1240 OCG专有
!system 1241 TCG专有
!system 1242 全部允许
!system 1243 全部禁止
!system 1244 单局模式
!system 1245 比赛模式
!system 1250 决斗准备
!system 1251 决斗者
!system 1252 观战
!system 1253 当前观战人数:
!system 1254 卡组选择:
!system 1255 准备完毕!
!system 1270 卡片信息
!system 1271 消息记录
!system 1272 清除记录
!system 1273 系统设定
!system 1274 自动选择卡片位置"
!system 1274 自动选择卡片位置
!system 1275 ↑随机选择位置
!system 1276 自动排列连锁顺序
!system 1277 没有可连锁的卡时延迟回应
......@@ -251,6 +255,10 @@
!system 1326 效果
!system 1327 重新搜索
!system 1328 结果中搜索
!system 1330 主卡组:
!system 1331 额外卡组:
!system 1332 副卡组:
!system 1333 搜索结果:
!system 1340 是否保存录像?
!system 1341 保存
!system 1342 录像文件:
......@@ -289,3 +297,4 @@
!counter 0x12 机巧指示物
!counter 0x13 混沌指示物
!counter 0x14 指示物(奇迹之侏罗纪蛋)
!counter 0x15 冰指示物
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