Commit 75fba7e9 authored by argon.sun's avatar argon.sun

fix & new scripts

parent ee3da713
...@@ -931,15 +931,18 @@ void card::reset(uint32 id, uint32 reset_type) { ...@@ -931,15 +931,18 @@ void card::reset(uint32 id, uint32 reset_type) {
} }
} }
if(id & RESET_TURN_SET) { if(id & RESET_TURN_SET) {
pr = single_effect.equal_range(EFFECT_SET_CONTROL); effect* peffect = check_equip_control_effect();
for(; pr.first != pr.second; ++pr.first) { if(peffect) {
peffect = pr.first->second; effect* new_effect = pduel->new_effect();
if(peffect->condition) { new_effect->id = peffect->id;
luaL_unref(pduel->lua->lua_state, LUA_REGISTRYINDEX, peffect->condition); new_effect->owner = this;
peffect->value = current.controler; new_effect->handler = this;
peffect->flag &= ~EFFECT_FLAG_FUNC_VALUE; new_effect->type = EFFECT_TYPE_SINGLE;
peffect->condition = 0; new_effect->code = EFFECT_SET_CONTROL;
} new_effect->value = current.controler;
new_effect->flag = EFFECT_FLAG_CANNOT_DISABLE;
new_effect->reset_flag = RESET_EVENT | 0xec0000;
this->add_effect(new_effect);
} }
} }
} }
...@@ -1359,6 +1362,18 @@ effect* card::is_affected_by_effect(int32 code, card* target) { ...@@ -1359,6 +1362,18 @@ effect* card::is_affected_by_effect(int32 code, card* target) {
} }
return 0; return 0;
} }
effect* card::check_equip_control_effect() {
effect* ret_effect = 0;
for (auto cit = equiping_cards.begin(); cit != equiping_cards.end(); ++cit) {
auto rg = (*cit)->equip_effect.equal_range(EFFECT_SET_CONTROL);
for (; rg.first != rg.second; ++rg.first) {
effect* peffect = rg.first->second;
if(!ret_effect || peffect->id > ret_effect->id)
ret_effect = peffect;
}
}
return ret_effect;
}
int32 card::fusion_check(group* fusion_m, card* cg, int32 chkf) { int32 card::fusion_check(group* fusion_m, card* cg, int32 chkf) {
auto ecit = single_effect.find(EFFECT_FUSION_MATERIAL); auto ecit = single_effect.find(EFFECT_FUSION_MATERIAL);
if(ecit == single_effect.end()) if(ecit == single_effect.end())
......
...@@ -185,6 +185,7 @@ public: ...@@ -185,6 +185,7 @@ public:
void filter_spsummon_procedure(uint8 playerid, effect_set* eset); void filter_spsummon_procedure(uint8 playerid, effect_set* eset);
effect* is_affected_by_effect(int32 code); effect* is_affected_by_effect(int32 code);
effect* is_affected_by_effect(int32 code, card* target); effect* is_affected_by_effect(int32 code, card* target);
effect* check_equip_control_effect();
int32 fusion_check(group* fusion_m, card* cg, int32 chkf); int32 fusion_check(group* fusion_m, card* cg, int32 chkf);
void fusion_select(uint8 playerid, group* fusion_m, card* cg, int32 chkf); void fusion_select(uint8 playerid, group* fusion_m, card* cg, int32 chkf);
......
...@@ -175,8 +175,7 @@ struct processor { ...@@ -175,8 +175,7 @@ struct processor {
instant_f_list quick_f_chain; instant_f_list quick_f_chain;
card_set leave_confirmed; card_set leave_confirmed;
card_set special_summoning; card_set special_summoning;
card_list adjust_list; card_set control_adjust_set[2];
card_set adjust_set;
card_set release_cards; card_set release_cards;
card_set release_cards_ex; card_set release_cards_ex;
card_set destroy_set; card_set destroy_set;
...@@ -419,6 +418,7 @@ public: ...@@ -419,6 +418,7 @@ public:
int32 remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8 rplayer, uint8 s, uint8 o, uint16 min, uint16 max); int32 remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8 rplayer, uint8 s, uint8 o, uint16 min, uint16 max);
int32 get_control(uint16 step, effect* reason_effect, uint8 reason_player, card* pcard, uint8 playerid, uint8 reset_phase, uint8 reset_count); int32 get_control(uint16 step, effect* reason_effect, uint8 reason_player, card* pcard, uint8 playerid, uint8 reset_phase, uint8 reset_count);
int32 swap_control(uint16 step, effect* reason_effect, uint8 reason_player, card* pcard1, card* pcard2, uint8 reset_phase, uint8 reset_count); int32 swap_control(uint16 step, effect* reason_effect, uint8 reason_player, card* pcard1, card* pcard2, uint8 reset_phase, uint8 reset_count);
int32 control_adjust(uint16 step);
int32 equip(uint16 step, uint8 equip_player, card* equip_card, card* target, uint32 up); int32 equip(uint16 step, uint8 equip_player, card* equip_card, card* target, uint32 up);
int32 draw(uint16 step, effect* reason_effect, uint32 reason, uint8 reason_player, uint8 playerid, uint32 count); int32 draw(uint16 step, effect* reason_effect, uint32 reason, uint8 reason_player, uint8 playerid, uint32 count);
int32 damage(uint16 step, effect* reason_effect, uint32 reason, uint8 reason_player, card* pcard, uint8 playerid, uint32 amount); int32 damage(uint16 step, effect* reason_effect, uint32 reason, uint8 reason_player, card* pcard, uint8 playerid, uint32 amount);
...@@ -573,6 +573,7 @@ public: ...@@ -573,6 +573,7 @@ public:
#define PROCESSOR_EQUIP 73 #define PROCESSOR_EQUIP 73
#define PROCESSOR_GET_CONTROL 74 #define PROCESSOR_GET_CONTROL 74
#define PROCESSOR_SWAP_CONTROL 75 #define PROCESSOR_SWAP_CONTROL 75
#define PROCESSOR_CONTROL_ADJUST 76
#define PROCESSOR_PAY_LPCOST 80 #define PROCESSOR_PAY_LPCOST 80
#define PROCESSOR_REMOVE_COUNTER 81 #define PROCESSOR_REMOVE_COUNTER 81
......
...@@ -858,7 +858,130 @@ int32 field::swap_control(uint16 step, effect * reason_effect, uint8 reason_play ...@@ -858,7 +858,130 @@ int32 field::swap_control(uint16 step, effect * reason_effect, uint8 reason_play
} }
return TRUE; return TRUE;
} }
int32 field::equip(uint16 step, uint8 equip_player, card* equip_card, card* target, uint32 up) { int32 field::control_adjust(uint16 step) {
switch(step) {
case 0: {
core.operated_set.clear();
uint32 b0 = pduel->game_field->get_useable_count(0, LOCATION_MZONE, PLAYER_NONE, 0);
uint32 b1 = pduel->game_field->get_useable_count(1, LOCATION_MZONE, PLAYER_NONE, 0);
for(auto cit = core.control_adjust_set[0].begin(); cit != core.control_adjust_set[0].end(); ++cit)
(*cit)->filter_disable_related_cards();
for(auto cit = core.control_adjust_set[1].begin(); cit != core.control_adjust_set[1].end(); ++cit)
(*cit)->filter_disable_related_cards();
if(core.control_adjust_set[0].size() > core.control_adjust_set[1].size()) {
if(core.control_adjust_set[0].size() - core.control_adjust_set[1].size() > b1) {
if(core.control_adjust_set[1].size() == 0 && b1 == 0) {
core.destroy_set = core.control_adjust_set[0];
core.control_adjust_set[0].clear();
core.units.begin()->step = 4;
} else {
uint32 count = core.control_adjust_set[0].size() - core.control_adjust_set[1].size() - b1;
core.select_cards.clear();
for(auto cit = core.control_adjust_set[0].begin(); cit != core.control_adjust_set[0].end(); ++cit)
core.select_cards.push_back(*cit);
pduel->write_buffer8(MSG_HINT);
pduel->write_buffer8(HINT_SELECTMSG);
pduel->write_buffer8(infos.turn_player);
pduel->write_buffer32(504);
add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, 1, count + (count << 16));
}
}
} else if (core.control_adjust_set[0].size() < core.control_adjust_set[1].size()) {
if(core.control_adjust_set[1].size() - core.control_adjust_set[0].size() > b0) {
if(core.control_adjust_set[0].size() == 0 && b0 == 0) {
core.destroy_set = core.control_adjust_set[1];
core.control_adjust_set[1].clear();
core.units.begin()->step = 4;
} else {
uint32 count = core.control_adjust_set[1].size() - core.control_adjust_set[0].size() - b0;
core.select_cards.clear();
for(auto cit = core.control_adjust_set[1].begin(); cit != core.control_adjust_set[1].end(); ++cit)
core.select_cards.push_back(*cit);
pduel->write_buffer8(MSG_HINT);
pduel->write_buffer8(HINT_SELECTMSG);
pduel->write_buffer8(infos.turn_player);
pduel->write_buffer32(504);
add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, 1, count + (count << 16));
}
}
} else
core.units.begin()->step = 1;
return FALSE;
}
case 1: {
core.destroy_set.clear();
uint8 adjp = core.temp_var[0];
for(int32 i = 0; i < returns.bvalue[0]; ++i) {
card* pcard = core.select_cards[returns.bvalue[i + 1]];
core.destroy_set.insert(pcard);
core.control_adjust_set[adjp].erase(pcard);
}
return FALSE;
}
case 2: {
auto cit1 = core.control_adjust_set[0].begin();
auto cit2 = core.control_adjust_set[1].begin();
while(cit1 != core.control_adjust_set[0].end() && cit2 != core.control_adjust_set[1].end()) {
card* pcard1 = *cit1++;
card* pcard2 = *cit2++;
uint8 p1 = pcard1->current.controler, p2 = pcard2->current.controler;
uint8 l1 = pcard1->current.location, l2 = pcard2->current.location;
uint8 s1 = pcard1->current.sequence, s2 = pcard2->current.sequence;
remove_card(pcard1);
remove_card(pcard2);
add_card(p2, pcard1, l2, s2);
add_card(p1, pcard2, l1, s1);
pcard1->reset(RESET_CONTROL, RESET_EVENT);
pcard1->reset(RESET_CONTROL, RESET_EVENT);
pduel->write_buffer8(MSG_SWAP);
pduel->write_buffer32(pcard1->data.code);
pduel->write_buffer8(pcard2->current.controler);
pduel->write_buffer8(pcard2->current.location);
pduel->write_buffer8(pcard2->current.sequence);
pduel->write_buffer8(pcard2->current.position);
pduel->write_buffer32(pcard2->data.code);
pduel->write_buffer8(pcard1->current.controler);
pduel->write_buffer8(pcard1->current.location);
pduel->write_buffer8(pcard1->current.sequence);
pduel->write_buffer8(pcard1->current.position);
}
while(cit1 != core.control_adjust_set[0].end())
core.operated_set.insert(*cit1++);
while(cit2 != core.control_adjust_set[1].end())
core.operated_set.insert(*cit2++);
return FALSE;
}
case 3: {
if(core.operated_set.size() == 0)
return FALSE;
auto cit = core.operated_set.begin();
card* pcard = *cit;
core.operated_set.erase(cit);
pcard->reset(RESET_CONTROL, RESET_EVENT);
move_to_field(pcard, 1 - pcard->current.controler, 1 - pcard->current.controler, LOCATION_MZONE, pcard->current.position);
return FALSE;
}
case 4: {
for(auto cit = core.control_adjust_set[1].begin(); cit != core.control_adjust_set[1].end(); ++cit)
core.control_adjust_set[0].insert(*cit);
for(auto cit = core.control_adjust_set[0].begin(); cit != core.control_adjust_set[0].end(); ++cit) {
(*cit)->filter_disable_related_cards();
raise_single_event((*cit), 0, EVENT_CONTROL_CHANGED, 0, REASON_RULE, 0, 0, 0);
}
raise_event(&core.control_adjust_set[0], EVENT_CONTROL_CHANGED, 0, 0, 0, 0, 0);
process_single_event();
process_instant_event();
return FALSE;
};
case 5: {
if(core.destroy_set.size())
send_to(&core.destroy_set, 0, REASON_RULE, PLAYER_NONE, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP);
return TRUE;
}
}
return TRUE;
}
int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * target, uint32 up) {
switch(step) { switch(step) {
case 0: { case 0: {
returns.ivalue[0] = FALSE; returns.ivalue[0] = FALSE;
...@@ -919,7 +1042,7 @@ int32 field::equip(uint16 step, uint8 equip_player, card* equip_card, card* targ ...@@ -919,7 +1042,7 @@ int32 field::equip(uint16 step, uint8 equip_player, card* equip_card, card* targ
} }
return TRUE; return TRUE;
} }
int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, uint8 ignore_count) { int32 field::summon(uint16 step, uint8 sumplayer, card * target, effect * proc, uint8 ignore_count) {
switch(step) { switch(step) {
case 0: { case 0: {
if(!(target->data.type & TYPE_MONSTER)) if(!(target->data.type & TYPE_MONSTER))
...@@ -3152,7 +3275,7 @@ int32 field::operation_replace(uint16 step, effect * replace_effect, group * tar ...@@ -3152,7 +3275,7 @@ int32 field::operation_replace(uint16 step, effect * replace_effect, group * tar
} }
return TRUE; return TRUE;
} }
int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, int32 min, int32 max) { int32 field::select_synchro_material(int16 step, uint8 playerid, card * pcard, int32 min, int32 max) {
switch(step) { switch(step) {
case 0: { case 0: {
core.select_cards.clear(); core.select_cards.clear();
...@@ -3409,7 +3532,7 @@ int32 field::select_tribute_cards(int16 step, uint8 playerid, uint8 cancelable, ...@@ -3409,7 +3532,7 @@ int32 field::select_tribute_cards(int16 step, uint8 playerid, uint8 cancelable,
} }
return TRUE; return TRUE;
} }
int32 field::toss_coin(uint16 step, effect* reason_effect, uint8 reason_player, uint8 playerid, uint8 count) { int32 field::toss_coin(uint16 step, effect * reason_effect, uint8 reason_player, uint8 playerid, uint8 count) {
switch(step) { switch(step) {
case 0: { case 0: {
effect_set eset; effect_set eset;
...@@ -3454,7 +3577,7 @@ int32 field::toss_coin(uint16 step, effect* reason_effect, uint8 reason_player, ...@@ -3454,7 +3577,7 @@ int32 field::toss_coin(uint16 step, effect* reason_effect, uint8 reason_player,
} }
return TRUE; return TRUE;
} }
int32 field::toss_dice(uint16 step, effect* reason_effect, uint8 reason_player, uint8 playerid, uint8 count) { int32 field::toss_dice(uint16 step, effect * reason_effect, uint8 reason_player, uint8 playerid, uint8 count) {
switch(step) { switch(step) {
case 0: { case 0: {
effect_set eset; effect_set eset;
......
...@@ -444,6 +444,13 @@ int32 field::process() { ...@@ -444,6 +444,13 @@ int32 field::process() {
core.units.begin()->step++; core.units.begin()->step++;
return pduel->bufferlen; return pduel->bufferlen;
} }
case PROCESSOR_CONTROL_ADJUST: {
if (control_adjust(it->step)) {
core.units.pop_front();
} else
core.units.begin()->step++;
return pduel->bufferlen;
}
case PROCESSOR_PAY_LPCOST: { case PROCESSOR_PAY_LPCOST: {
if (pay_lp_cost(it->step, it->arg1, it->arg2)) if (pay_lp_cost(it->step, it->arg1, it->arg2))
core.units.pop_front(); core.units.pop_front();
...@@ -4416,8 +4423,8 @@ int32 field::adjust_step(uint16 step) { ...@@ -4416,8 +4423,8 @@ int32 field::adjust_step(uint16 step) {
//1-4 control //1-4 control
card* pcard; card* pcard;
uint8 cur, ref, tp = infos.turn_player; uint8 cur, ref, tp = infos.turn_player;
card_list::iterator cit; core.control_adjust_set[0].clear();
core.adjust_list.clear(); core.control_adjust_set[1].clear();
for(uint8 p = 0; p < 2; ++p) { for(uint8 p = 0; p < 2; ++p) {
for(uint8 i = 0; i < 5; ++i) { for(uint8 i = 0; i < 5; ++i) {
pcard = player[tp].list_mzone[i]; pcard = player[tp].list_mzone[i];
...@@ -4425,60 +4432,26 @@ int32 field::adjust_step(uint16 step) { ...@@ -4425,60 +4432,26 @@ int32 field::adjust_step(uint16 step) {
cur = pcard->current.controler; cur = pcard->current.controler;
ref = pcard->refresh_control_status(); ref = pcard->refresh_control_status();
if(cur != ref && pcard->is_capable_change_control()) { if(cur != ref && pcard->is_capable_change_control()) {
core.adjust_list.push_back(pcard); core.control_adjust_set[p].insert(pcard);
pcard->operation_param = ref; pcard->operation_param = ref;
} }
} }
tp = 1 - tp; tp = 1 - tp;
} }
if(core.adjust_list.size()) if(core.control_adjust_set[0].size() || core.control_adjust_set[1].size()) {
core.units.begin()->arg1 = TRUE; core.units.begin()->arg1 = TRUE;
card* swap[2]; add_process(PROCESSOR_CONTROL_ADJUST, 0, 0, 0, 0, 0);
card_list::iterator it[2];
bool swaped;
swap[0] = swap[1] = 0;
do {
swaped = false;
for(cit = core.adjust_list.begin(); cit != core.adjust_list.end(); ++cit) {
tp = (*cit)->current.controler;
if(((tp == 0 && swap[0] == 0) || (tp == 1 && swap[1] == 0)) &&
(!((*cit)->get_type()&TYPE_TRAPMONSTER) || get_useable_count(1 - tp, LOCATION_SZONE, 1 - tp, LOCATION_REASON_CONTROL) > 0)) {
swap[tp] = *cit;
it[tp] = cit;
if(swap[0] && swap[1]) {
swap_control(0, PLAYER_NONE, swap[0], swap[1], 0, 0);
core.adjust_list.erase(it[0]);
core.adjust_list.erase(it[1]);
swap[0] = 0;
swap[1] = 0;
swaped = true;
break;
}
} }
} core.units.begin()->step = 7;
} while(swaped);
core.adjust_set.clear();
return FALSE; return FALSE;
} }
case 5: { case 5: {
if(!core.adjust_list.size()) {
core.units.begin()->step = 6;
return FALSE;
}
card_list::iterator cit = core.adjust_list.begin();
get_control(0, PLAYER_NONE, *cit, 1 - (*cit)->current.controler, 0, 0);
return FALSE; return FALSE;
} }
case 6: { case 6: {
if(!returns.ivalue[0])
core.adjust_set.insert(core.adjust_list.front());
core.adjust_list.pop_front();
core.units.begin()->step = 4;
return FALSE; return FALSE;
} }
case 7: { case 7: {
if(core.adjust_set.size())
send_to(&core.adjust_set, 0, REASON_RULE, PLAYER_NONE, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP);
return FALSE; return FALSE;
} }
case 8: { case 8: {
...@@ -4541,7 +4514,7 @@ int32 field::adjust_step(uint16 step) { ...@@ -4541,7 +4514,7 @@ int32 field::adjust_step(uint16 step) {
//position //position
uint32 tp = infos.turn_player, pos; uint32 tp = infos.turn_player, pos;
card* pcard; card* pcard;
core.adjust_set.clear(); card_set pos_adjust;
effect_set eset; effect_set eset;
for(uint8 p = 0; p < 2; ++p) { for(uint8 p = 0; p < 2; ++p) {
for(uint8 i = 0; i < 5; ++i) { for(uint8 i = 0; i < 5; ++i) {
...@@ -4553,7 +4526,7 @@ int32 field::adjust_step(uint16 step) { ...@@ -4553,7 +4526,7 @@ int32 field::adjust_step(uint16 step) {
if(eset.count) { if(eset.count) {
pos = eset.get_last()->get_value(); pos = eset.get_last()->get_value();
if((pos & 0xff) != pcard->current.position) { if((pos & 0xff) != pcard->current.position) {
core.adjust_set.insert(pcard); pos_adjust.insert(pcard);
pcard->operation_param = pos; pcard->operation_param = pos;
if(pcard->is_status(STATUS_JUST_POS)) if(pcard->is_status(STATUS_JUST_POS))
pcard->set_status(STATUS_CONTINUOUS_POS, TRUE); pcard->set_status(STATUS_CONTINUOUS_POS, TRUE);
...@@ -4566,10 +4539,10 @@ int32 field::adjust_step(uint16 step) { ...@@ -4566,10 +4539,10 @@ int32 field::adjust_step(uint16 step) {
} }
tp = 1 - tp; tp = 1 - tp;
} }
if(core.adjust_set.size()) { if(pos_adjust.size()) {
core.units.begin()->arg1 = TRUE; core.units.begin()->arg1 = TRUE;
group* ng = pduel->new_group(); group* ng = pduel->new_group();
ng->container = core.adjust_set; ng->container = pos_adjust;
ng->is_readonly = TRUE; ng->is_readonly = TRUE;
add_process(PROCESSOR_CHANGEPOS, 0, 0, ng, PLAYER_NONE, TRUE); add_process(PROCESSOR_CHANGEPOS, 0, 0, ng, PLAYER_NONE, TRUE);
} }
......
--E·HERO エアー·ネオス
function c11502550.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,54959865,true,true)
--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(c11502550.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c11502550.spcon)
e2:SetOperation(c11502550.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11502550,0))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_REPEAT)
e3:SetCondition(c11502550.retcon1)
e3:SetTarget(c11502550.rettg)
e3:SetOperation(c11502550.retop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(0)
e4:SetCondition(c11502550.retcon2)
c:RegisterEffect(e4)
--atkup
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(c11502550.atkval)
c:RegisterEffect(e5)
end
c11502550.material_count=2
c11502550.material={89943723,54959865}
function c11502550.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c11502550.spfilter(c,code)
if c:GetCode()~=code then return false end
if c:IsType(TYPE_FUSION) then return c:IsAbleToExtraAsCost()
else return c:IsAbleToDeckAsCost() end
end
function c11502550.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
local g1=Duel.GetMatchingGroup(c11502550.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c11502550.spfilter,tp,LOCATION_ONFIELD,0,nil,54959865)
if g1:GetCount()==0 or g2:GetCount()==0 then return false end
if ft>0 then return true end
local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
if ft==-1 then return f1>0 and f2>0
else return f1>0 or f2>0 end
end
function c11502550.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g1=Duel.GetMatchingGroup(c11502550.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c11502550.spfilter,tp,LOCATION_ONFIELD,0,nil,54959865)
g1:Merge(g2)
local g=Group.CreateGroup()
local tc=nil
for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
tc=g1:Select(tp,1,1,nil):GetFirst()
end
g:AddCard(tc)
g1:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft+1
end
local cg=g:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c11502550.retcon1(e,tp,eg,ep,ev,re,r,rp,chk)
return not Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c11502550.retcon2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c11502550.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c11502550.retop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
function c11502550.atkval(e,c)
local lps=Duel.GetLP(c:GetControler())
local lpo=Duel.GetLP(1-c:GetControler())
if lps>=lpo then return 0
else return lpo-lps end
end
--魂の共有-コモンソウル
function c14772491.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c14772491.target)
e1:SetOperation(c14772491.operation)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c14772491.thcon)
e2:SetOperation(c14772491.thop)
c:RegisterEffect(e2)
e1:SetLabelObject(e2)
end
function c14772491.spfilter(c,e,tp)
return c:IsSetCard(0x1f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c14772491.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.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c14772491.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end
function c14772491.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c14772491.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()==0 then return end
local sc=g:GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
c:SetCardTarget(tc)
c:SetCardTarget(sc)
e:GetLabelObject():SetLabelObject(sc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCondition(c14772491.rcon)
e1:SetValue(sc:GetAttack())
e1:SetLabelObject(sc)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
end
end
function c14772491.rcon(e)
return e:GetOwner():IsHasCardTarget(e:GetHandler())
and e:GetOwner():IsHasCardTarget(e:GetLabelObject())
end
function c14772491.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return tc:IsOnField() and e:GetHandler():IsHasCardTarget(tc)
end
function c14772491.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT)
end
--E·HERO カオス·ネオス
function c17032740.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode3(c,89943723,43237273,17732278,true,true)
--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(c17032740.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c17032740.spcon)
e2:SetOperation(c17032740.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(17032740,0))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_REPEAT)
e3:SetCondition(c17032740.retcon1)
e3:SetTarget(c17032740.rettg)
e3:SetOperation(c17032740.retop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(0)
e4:SetCondition(c17032740.retcon2)
c:RegisterEffect(e4)
--coin
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(17032740,1))
e5:SetCategory(CATEGORY_COIN+CATEGORY_DESTROY+CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c17032740.coincon)
e5:SetTarget(c17032740.cointg)
e5:SetOperation(c17032740.coinop)
c:RegisterEffect(e5)
end
c17032740.material_count=3
c17032740.material={89943723,43237273,17732278}
function c17032740.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c17032740.spfilter(c,code)
if c:GetCode()~=code then return false end
if c:IsType(TYPE_FUSION) then return c:IsAbleToExtraAsCost()
else return c:IsAbleToDeckAsCost() end
end
function c17032740.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-2 then return false end
local g1=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,43237273)
local g3=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,17732278)
if g1:GetCount()==0 or g2:GetCount()==0 or g3:GetCount()==0 then return false end
if ft>0 then return true end
local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0
local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0
local f3=g3:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0
if ft==-2 then return f1+f2+f3==3
elseif ft==-1 then return f1+f2+f3>=2
else return f1+f2+f3>=1 end
end
function c17032740.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g1=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,43237273)
local g3=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,17732278)
g1:Merge(g2)
g1:Merge(g3)
local g=Group.CreateGroup()
local tc=nil
for i=1,3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
tc=g1:Select(tp,1,1,nil):GetFirst()
end
g:AddCard(tc)
g1:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft+1
end
local cg=g:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c17032740.retcon1(e,tp,eg,ep,ev,re,r,rp,chk)
return not Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c17032740.retcon2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c17032740.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c17032740.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE)
end
function c17032740.coincon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c17032740.cointg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3)
end
function c17032740.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c17032740.coinop(e,tp,eg,ep,ev,re,r,rp)
local c1,c2,c3=Duel.TossCoin(tp,3)
if c1+c2+c3==3 then
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
elseif c1+c2+c3==2 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local c=e:GetHandler()
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
elseif c1+c2+c3==1 then
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,0,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
--リバース·オブ·ネオス
function c18302224.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_DESTROYED)
e1:SetCondition(c18302224.condition)
e1:SetTarget(c18302224.target)
e1:SetOperation(c18302224.activate)
c:RegisterEffect(e1)
end
function c18302224.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
and c:IsPreviousPosition(POS_FACEUP) and c:IsSetCard(0x9) and c:IsType(TYPE_FUSION)
end
function c18302224.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c18302224.cfilter,1,nil,tp)
end
function c18302224.filter(c,e,tp)
return c:IsCode(89943723) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c18302224.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c18302224.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c18302224.activate(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,c18302224.filter,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_ATTACK)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetOperation(c18302224.desop)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetCountLimit(1)
tc:RegisterEffect(e2)
end
end
function c18302224.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
--XY-ドラゴン·キャノン --XY-ドラゴン·キャノン
function c2111707.initial_effect(c) function c2111707.initial_effect(c)
--fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCode2(c,62651957,65622692,true,true)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
--YZ-キャタピラー·ドラゴン --YZ-キャタピラー·ドラゴン
function c25119460.initial_effect(c) function c25119460.initial_effect(c)
--fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCode2(c,65622692,64500000,true,true)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
--剣闘獣ヘラクレイノス --剣闘獣ヘラクレイノス
function c27346636.initial_effect(c) function c27346636.initial_effect(c)
--fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,78868776,aux.FilterBoolFunction(Card.IsSetCard,0x19),2,true,true)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
--E·HERO ブラック·ネオス
function c28677304.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,43237273,true,true)
--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(c28677304.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c28677304.spcon)
e2:SetOperation(c28677304.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(28677304,0))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_REPEAT)
e3:SetCondition(c28677304.retcon1)
e3:SetTarget(c28677304.rettg)
e3:SetOperation(c28677304.retop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(0)
e4:SetCondition(c28677304.retcon2)
c:RegisterEffect(e4)
--disable
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(28677304,1))
e5:SetCategory(CATEGORY_DISABLE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCondition(c28677304.discon)
e5:SetTarget(c28677304.distg)
e5:SetOperation(c28677304.disop)
c:RegisterEffect(e5)
end
c28677304.material_count=2
c28677304.material={89943723,43237273}
function c28677304.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c28677304.spfilter(c,code)
if c:GetCode()~=code then return false end
if c:IsType(TYPE_FUSION) then return c:IsAbleToExtraAsCost()
else return c:IsAbleToDeckAsCost() end
end
function c28677304.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
local g1=Duel.GetMatchingGroup(c28677304.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c28677304.spfilter,tp,LOCATION_ONFIELD,0,nil,43237273)
if g1:GetCount()==0 or g2:GetCount()==0 then return false end
if ft>0 then return true end
local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
if ft==-1 then return f1>0 and f2>0
else return f1>0 or f2>0 end
end
function c28677304.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g1=Duel.GetMatchingGroup(c28677304.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c28677304.spfilter,tp,LOCATION_ONFIELD,0,nil,43237273)
g1:Merge(g2)
local g=Group.CreateGroup()
local tc=nil
for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
tc=g1:Select(tp,1,1,nil):GetFirst()
end
g:AddCard(tc)
g1:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft+1
end
local cg=g:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c28677304.retcon1(e,tp,eg,ep,ev,re,r,rp,chk)
return not Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c28677304.retcon2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c28677304.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c28677304.retop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
function c28677304.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCardTargetCount()==0
end
function c28677304.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c28677304.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c28677304.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c28677304.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c28677304.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c28677304.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCondition(c28677304.rcon)
tc:RegisterEffect(e1,true)
end
end
function c28677304.rcon(e)
return e:GetOwner():IsHasCardTarget(e:GetHandler())
end
...@@ -77,17 +77,10 @@ function c31829185.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,17 +77,10 @@ function c31829185.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c31829185.eqlimit) e1:SetValue(c31829185.eqlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_CONTROL) e2:SetCode(EFFECT_SET_CONTROL)
e2:SetValue(tp) e2:SetValue(tp)
e2:SetReset(RESET_EVENT+0x1fc0000) e2:SetReset(RESET_EVENT+0x1fc0000)
e2:SetCondition(c31829185.con) c:RegisterEffect(e2)
tc:RegisterEffect(e2,true)
end end
end end
function c31829185.con(e)
local c=e:GetOwner()
local h=e:GetHandler()
return not c:IsDisabled() and c:IsHasCardTarget(h) and not c:IsImmuneToEffect(e)
end
...@@ -65,21 +65,14 @@ function c45247637.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,21 +65,14 @@ function c45247637.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c45247637.eqlimit) e1:SetValue(c45247637.eqlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_CONTROL) e2:SetCode(EFFECT_SET_CONTROL)
e2:SetValue(tp) e2:SetValue(tp)
e2:SetReset(RESET_EVENT+0x1fc0000) e2:SetReset(RESET_EVENT+0x1fc0000)
e2:SetCondition(c45247637.con) c:RegisterEffect(e2)
tc:RegisterEffect(e2,true)
e:SetLabelObject(e2) e:SetLabelObject(e2)
end end
end end
function c45247637.con(e)
local c=e:GetOwner()
local h=e:GetHandler()
return not c:IsDisabled() and c:IsHasCardTarget(h) and not c:IsImmuneToEffect(e)
end
function c45247637.ccon(e,tp,eg,ep,ev,re,r,rp) function c45247637.ccon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() return tp==Duel.GetTurnPlayer()
end end
......
...@@ -50,20 +50,13 @@ function c45986603.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,20 +50,13 @@ function c45986603.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c45986603.eqlimit) e1:SetValue(c45986603.eqlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_CONTROL) e2:SetCode(EFFECT_SET_CONTROL)
e2:SetValue(tp) e2:SetValue(tp)
e2:SetReset(RESET_EVENT+0x1fc0000) e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetCondition(c45986603.con) c:RegisterEffect(e2)
tc:RegisterEffect(e2,true)
end end
end end
function c45986603.con(e)
local c=e:GetOwner()
local h=e:GetHandler()
return not c:IsDisabled() and c:IsHasCardTarget(h) and not c:IsImmuneToEffect(e)
end
function c45986603.reccon(e,tp,eg,ep,ev,re,r,rp) function c45986603.reccon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() return tp~=Duel.GetTurnPlayer()
end end
......
--ネオス·フォース
function c47274077.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c47274077.target)
e1:SetOperation(c47274077.operation)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(800)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c47274077.eqlimit)
c:RegisterEffect(e3)
--damage
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(47274077,0))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetRange(LOCATION_SZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCondition(c47274077.damcon)
e4:SetTarget(c47274077.damtg)
e4:SetOperation(c47274077.damop)
c:RegisterEffect(e4)
--return
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(47274077,1))
e5:SetCategory(CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1)
e5:SetProperty(EFFECT_FLAG_REPEAT)
e5:SetTarget(c47274077.rettg)
e5:SetOperation(c47274077.retop)
c:RegisterEffect(e5)
end
function c47274077.eqlimit(e,c)
return c:IsCode(89943723)
end
function c47274077.filter(c)
return c:IsFaceup() and c:IsCode(89943723)
end
function c47274077.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c47274077.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c47274077.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c47274077.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c47274077.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c47274077.damcon(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
local bc=ec:GetBattleTarget()
return ec==e:GetHandler():GetEquipTarget() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE)
end
function c47274077.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ec=eg:GetFirst()
local bc=ec:GetBattleTarget()
local dam=bc:GetAttack()
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function c47274077.damop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c47274077.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c47274077.retop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
--剣闘獣ガイザレス --剣闘獣ガイザレス
function c48156348.initial_effect(c) function c48156348.initial_effect(c)
--fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,41470137,aux.FilterBoolFunction(Card.IsSetCard,0x19),1,true,true)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
--E·HERO グラン·ネオス
function c48996569.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,80344569,true,true)
--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(c48996569.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c48996569.spcon)
e2:SetOperation(c48996569.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(48996569,0))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_REPEAT)
e3:SetCondition(c48996569.retcon1)
e3:SetTarget(c48996569.rettg)
e3:SetOperation(c48996569.retop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(0)
e4:SetCondition(c48996569.retcon2)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(48996569,1))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetTarget(c48996569.thtg)
e5:SetOperation(c48996569.thop)
c:RegisterEffect(e5)
end
c48996569.material_count=2
c48996569.material={89943723,80344569}
function c48996569.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c48996569.spfilter(c,code)
if c:GetCode()~=code then return false end
if c:IsType(TYPE_FUSION) then return c:IsAbleToExtraAsCost()
else return c:IsAbleToDeckAsCost() end
end
function c48996569.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
local g1=Duel.GetMatchingGroup(c48996569.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c48996569.spfilter,tp,LOCATION_ONFIELD,0,nil,80344569)
if g1:GetCount()==0 or g2:GetCount()==0 then return false end
if ft>0 then return true end
local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
if ft==-1 then return f1>0 and f2>0
else return f1>0 or f2>0 end
end
function c48996569.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g1=Duel.GetMatchingGroup(c48996569.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c48996569.spfilter,tp,LOCATION_ONFIELD,0,nil,80344569)
g1:Merge(g2)
local g=Group.CreateGroup()
local tc=nil
for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
tc=g1:Select(tp,1,1,nil):GetFirst()
end
g:AddCard(tc)
g1:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft+1
end
local cg=g:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c48996569.retcon1(e,tp,eg,ep,ev,re,r,rp,chk)
return not Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c48996569.retcon2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c48996569.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c48996569.retop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
function c48996569.filter(c)
return c:IsAbleToHand()
end
function c48996569.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c48996569.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c48996569.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c48996569.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c48996569.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--E·HERO ストーム·ネオス
function c49352945.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode3(c,89943723,17955766,54959865,true,true)
--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(c49352945.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c49352945.spcon)
e2:SetOperation(c49352945.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(49352945,0))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_REPEAT)
e3:SetCondition(c49352945.retcon1)
e3:SetTarget(c49352945.rettg)
e3:SetOperation(c49352945.retop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(0)
e4:SetCondition(c49352945.retcon2)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(49352945,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(c49352945.destg)
e5:SetOperation(c49352945.desop)
c:RegisterEffect(e5)
--todeck
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(49352945,2))
e6:SetCategory(CATEGORY_TODECK)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(49352945)
e6:SetTarget(c49352945.tdtg)
e6:SetOperation(c49352945.tdop)
c:RegisterEffect(e6)
end
c49352945.material_count=3
c49352945.material={89943723,17955766,54959865}
function c49352945.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c49352945.spfilter(c,code)
if c:GetCode()~=code then return false end
if c:IsType(TYPE_FUSION) then return c:IsAbleToExtraAsCost()
else return c:IsAbleToDeckAsCost() end
end
function c49352945.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-2 then return false end
local g1=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,17955766)
local g3=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,54959865)
if g1:GetCount()==0 or g2:GetCount()==0 or g3:GetCount()==0 then return false end
if ft>0 then return true end
local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0
local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0
local f3=g3:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0
if ft==-2 then return f1+f2+f3==3
elseif ft==-1 then return f1+f2+f3>=2
else return f1+f2+f3>=1 end
end
function c49352945.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g1=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,17955766)
local g3=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,54959865)
g1:Merge(g2)
g1:Merge(g3)
local g=Group.CreateGroup()
local tc=nil
for i=1,3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
tc=g1:Select(tp,1,1,nil):GetFirst()
end
g:AddCard(tc)
g1:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft+1
end
local cg=g:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c49352945.retcon1(e,tp,eg,ep,ev,re,r,rp,chk)
return not Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c49352945.retcon2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c49352945.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c49352945.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
if c:IsLocation(LOCATION_EXTRA) then
Duel.RaiseSingleEvent(c,49352945,e,0,0,0,0)
end
end
function c49352945.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c49352945.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49352945.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c49352945.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c49352945.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c49352945.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
function c49352945.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c49352945.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
--E·HERO マリン·ネオス
function c5128859.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,78734254,true,true)
--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(c5128859.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c5128859.spcon)
e2:SetOperation(c5128859.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(5128859,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c5128859.destg)
e3:SetOperation(c5128859.desop)
c:RegisterEffect(e3)
end
c5128859.material_count=2
c5128859.material={89943723,78734254}
function c5128859.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c5128859.spfilter(c,code)
if c:GetCode()~=code then return false end
if c:IsType(TYPE_FUSION) then return c:IsAbleToExtraAsCost()
else return c:IsAbleToDeckAsCost() end
end
function c5128859.spfilter2(c,code)
if c:GetOriginalCode()~=code then return false end
if c:IsType(TYPE_FUSION) then return c:IsAbleToExtraAsCost()
else return c:IsAbleToDeckAsCost() end
end
function c5128859.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
local g1=Duel.GetMatchingGroup(c5128859.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c5128859.spfilter2,tp,LOCATION_ONFIELD,0,nil,78734254)
if g1:GetCount()==0 or g2:GetCount()==0 then return false end
if ft>0 then return true end
local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
if ft==-1 then return f1>0 and f2>0
else return f1>0 or f2>0 end
end
function c5128859.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g1=Duel.GetMatchingGroup(c5128859.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c5128859.spfilter2,tp,LOCATION_ONFIELD,0,nil,78734254)
g1:Merge(g2)
local g=Group.CreateGroup()
local tc=nil
for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
tc=g1:Select(tp,1,1,nil):GetFirst()
end
g:AddCard(tc)
g1:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft+1
end
local cg=g:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c5128859.filter(c)
return c:IsFacedown() and c:IsDestructable()
end
function c5128859.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_HAND)
end
function c5128859.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local sg=g:RandomSelect(tp,1)
Duel.Destroy(sg,REASON_EFFECT)
end
--E·HERO アクア·ネオス
function c55171412.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,17955766,true,true)
--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(c55171412.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c55171412.spcon)
e2:SetOperation(c55171412.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(55171412,0))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_REPEAT)
e3:SetCondition(c55171412.retcon1)
e3:SetTarget(c55171412.rettg)
e3:SetOperation(c55171412.retop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(0)
e4:SetCondition(c55171412.retcon2)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(55171412,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCost(c55171412.descost)
e5:SetTarget(c55171412.destg)
e5:SetOperation(c55171412.desop)
c:RegisterEffect(e5)
end
c55171412.material_count=2
c55171412.material={89943723,17955766}
function c55171412.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c55171412.spfilter(c,code)
if c:GetCode()~=code then return false end
if c:IsType(TYPE_FUSION) then return c:IsAbleToExtraAsCost()
else return c:IsAbleToDeckAsCost() end
end
function c55171412.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
local g1=Duel.GetMatchingGroup(c55171412.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c55171412.spfilter,tp,LOCATION_ONFIELD,0,nil,17955766)
if g1:GetCount()==0 or g2:GetCount()==0 then return false end
if ft>0 then return true end
local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
if ft==-1 then return f1>0 and f2>0
else return f1>0 or f2>0 end
end
function c55171412.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g1=Duel.GetMatchingGroup(c55171412.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c55171412.spfilter,tp,LOCATION_ONFIELD,0,nil,17955766)
g1:Merge(g2)
local g=Group.CreateGroup()
local tc=nil
for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
tc=g1:Select(tp,1,1,nil):GetFirst()
end
g:AddCard(tc)
g1:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft+1
end
local cg=g:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c55171412.retcon1(e,tp,eg,ep,ev,re,r,rp,chk)
return not Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c55171412.retcon2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c55171412.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c55171412.retop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
function c55171412.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c55171412.filter(c)
return c:IsFacedown() and c:IsDestructable()
end
function c55171412.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_HAND)
end
function c55171412.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local sg=g:RandomSelect(tp,1)
Duel.Destroy(sg,REASON_EFFECT)
end
--VW-タイガー·カタパルト --VW-タイガー·カタパルト
function c58859575.initial_effect(c) function c58859575.initial_effect(c)
--fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCode2(c,51638941,96300057,true,true)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
--コンタクト·アウト
function c69270537.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c69270537.target)
e1:SetOperation(c69270537.activate)
c:RegisterEffect(e1)
end
function c69270537.tdfilter(c)
return c:IsFaceup() and c:IsSetCard(0x9) and c:IsType(TYPE_FUSION) and c:IsAbleToExtra()
end
function c69270537.filter2(c,e,tp,m,chkf)
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
and c:CheckFusionMaterial(m,nil,chkf)
end
function c69270537.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c69270537.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c69270537.tdfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c69270537.tdfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c69270537.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c69270537.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and tc:IsLocation(LOCATION_EXTRA) then
local sg=Duel.GetMatchingGroup(c69270537.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if tc:CheckFusionMaterial(sg,nil,PLAYER_NONE) and Duel.SelectYesNo(tp,aux.Stringid(69270537,0)) then
local mats=Duel.SelectFusionMaterial(tp,tc,sg,nil,PLAYER_NONE)
Duel.SpecialSummon(mats,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--Gladiator Beast Essedarii --Gladiator Beast Essedarii
function c73285669.initial_effect(c) function c73285669.initial_effect(c)
--fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0x19),2,true)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -43,18 +43,11 @@ function c74854609.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,18 +43,11 @@ function c74854609.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetLabelObject(tc) e1:SetLabelObject(tc)
ec:RegisterEffect(e1) ec:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_CONTROL) e2:SetCode(EFFECT_SET_CONTROL)
e2:SetValue(tp) e2:SetValue(tp)
e2:SetReset(RESET_EVENT+0x1fc0000) e2:SetReset(RESET_EVENT+0x1fc0000)
e2:SetCondition(c74854609.con)
e2:SetLabelObject(ec) e2:SetLabelObject(ec)
tc:RegisterEffect(e2) c:RegisterEffect(e2)
end end
end end
function c74854609.con(e)
local c=e:GetLabelObject()
local h=e:GetHandler()
return c:IsHasCardTarget(h)
end
--E·HERO マグマ·ネオス
function c78512663.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode3(c,89943723,89621922,80344569,true,true)
--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(c78512663.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c78512663.spcon)
e2:SetOperation(c78512663.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(78512663,0))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_REPEAT)
e3:SetCondition(c78512663.retcon1)
e3:SetTarget(c78512663.rettg)
e3:SetOperation(c78512663.retop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(0)
e4:SetCondition(c78512663.retcon2)
c:RegisterEffect(e4)
--atkup
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(c78512663.atkval)
c:RegisterEffect(e5)
--tohand
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(78512663,1))
e6:SetCategory(CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(78512663)
e6:SetTarget(c78512663.thtg)
e6:SetOperation(c78512663.thop)
c:RegisterEffect(e6)
end
c78512663.material_count=3
c78512663.material={89943723,89621922,80344569}
function c78512663.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c78512663.spfilter(c,code)
if c:GetCode()~=code then return false end
if c:IsType(TYPE_FUSION) then return c:IsAbleToExtraAsCost()
else return c:IsAbleToDeckAsCost() end
end
function c78512663.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-2 then return false end
local g1=Duel.GetMatchingGroup(c78512663.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c78512663.spfilter,tp,LOCATION_ONFIELD,0,nil,89621922)
local g3=Duel.GetMatchingGroup(c78512663.spfilter,tp,LOCATION_ONFIELD,0,nil,80344569)
if g1:GetCount()==0 or g2:GetCount()==0 or g3:GetCount()==0 then return false end
if ft>0 then return true end
local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0
local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0
local f3=g3:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0
if ft==-2 then return f1+f2+f3==3
elseif ft==-1 then return f1+f2+f3>=2
else return f1+f2+f3>=1 end
end
function c78512663.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g1=Duel.GetMatchingGroup(c78512663.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c78512663.spfilter,tp,LOCATION_ONFIELD,0,nil,89621922)
local g3=Duel.GetMatchingGroup(c78512663.spfilter,tp,LOCATION_ONFIELD,0,nil,80344569)
g1:Merge(g2)
g1:Merge(g3)
local g=Group.CreateGroup()
local tc=nil
for i=1,3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
tc=g1:Select(tp,1,1,nil):GetFirst()
end
g:AddCard(tc)
g1:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft+1
end
local cg=g:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c78512663.atkval(e,c)
return Duel.GetFieldGroupCount(0,LOCATION_ONFIELD,LOCATION_ONFIELD)*400
end
function c78512663.retcon1(e,tp,eg,ep,ev,re,r,rp,chk)
return not Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c78512663.retcon2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c78512663.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c78512663.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
if c:IsLocation(LOCATION_EXTRA) then
Duel.RaiseSingleEvent(c,78512663,e,0,0,0,0)
end
end
function c78512663.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c78512663.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
--究極宝玉神 レインボー·ダーク·ドラゴン
function c79407975.initial_effect(c)
c:EnableReviveLimit()
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
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(c79407975.spcon)
e2:SetOperation(c79407975.spop)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(79407975,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c79407975.atkcost)
e3:SetOperation(c79407975.atkop)
c:RegisterEffect(e3)
end
function c79407975.spfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost()
end
function c79407975.spcon(e,c)
if c==nil then return true end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)==0 then return false end
local g=Duel.GetMatchingGroup(c79407975.spfilter,c:GetControler(),LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
return ct>=7
end
function c79407975.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c79407975.spfilter,tp,LOCATION_GRAVE,0,nil)
local rg=Group.CreateGroup()
for i=1,7 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc then
rg:AddCard(tc)
g:Remove(Card.IsCode,nil,tc:GetCode())
end
end
Duel.Remove(rg,POS_FACEUP,REASON_COST)
end
function c79407975.cfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function c79407975.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c79407975.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler())
if chk==0 then return g:GetCount()>0 and g:FilterCount(Card.IsAbleToRemoveAsCost,nil)==g:GetCount() end
e:SetLabel(g:GetCount())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c79407975.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:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(e:GetLabel()*500)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
--E·HERO フレア·ネオス
function c81566151.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,89621922,true,true)
--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(c81566151.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c81566151.spcon)
e2:SetOperation(c81566151.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(81566151,0))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_REPEAT)
e3:SetCondition(c81566151.retcon1)
e3:SetTarget(c81566151.rettg)
e3:SetOperation(c81566151.retop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(0)
e4:SetCondition(c81566151.retcon2)
c:RegisterEffect(e4)
--atkup
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(c81566151.atkval)
c:RegisterEffect(e5)
end
c81566151.material_count=2
c81566151.material={89943723,89621922}
function c81566151.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c81566151.spfilter(c,code)
if c:GetCode()~=code then return false end
if c:IsType(TYPE_FUSION) then return c:IsAbleToExtraAsCost()
else return c:IsAbleToDeckAsCost() end
end
function c81566151.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
local g1=Duel.GetMatchingGroup(c81566151.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c81566151.spfilter,tp,LOCATION_ONFIELD,0,nil,89621922)
if g1:GetCount()==0 or g2:GetCount()==0 then return false end
if ft>0 then return true end
local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
if ft==-1 then return f1>0 and f2>0
else return f1>0 or f2>0 end
end
function c81566151.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g1=Duel.GetMatchingGroup(c81566151.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c81566151.spfilter,tp,LOCATION_ONFIELD,0,nil,89621922)
g1:Merge(g2)
local g=Group.CreateGroup()
local tc=nil
for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
tc=g1:Select(tp,1,1,nil):GetFirst()
end
g:AddCard(tc)
g1:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft+1
end
local cg=g:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c81566151.retcon1(e,tp,eg,ep,ev,re,r,rp,chk)
return not Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c81566151.retcon2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c81566151.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c81566151.retop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
function c81566151.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)*400
end
--コンバート·コンタクト
function c82639107.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c82639107.target)
e1:SetOperation(c82639107.activate)
c:RegisterEffect(e1)
end
function c82639107.filter(c)
return c:IsSetCard(0x1f) and c:IsAbleToGrave()
end
function c82639107.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2)
and Duel.IsExistingMatchingCard(c82639107.filter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(c82639107.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c82639107.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(c82639107.filter,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c82639107.filter,tp,LOCATION_DECK,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.SendtoGrave(sg1,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.Draw(tp,2,REASON_EFFECT)
end
end
--VWXYZ-ドラゴン·カタパルトキャノン --VWXYZ-ドラゴン·カタパルトキャノン
function c84243274.initial_effect(c) function c84243274.initial_effect(c)
--fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCode2(c,58859575,91998119,true,true)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
--E·HERO グロー·ネオス
function c85507811.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,89943723,17732278,true,true)
--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(c85507811.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c85507811.spcon)
e2:SetOperation(c85507811.spop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(85507811,0))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_REPEAT)
e3:SetCondition(c85507811.retcon1)
e3:SetTarget(c85507811.rettg)
e3:SetOperation(c85507811.retop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(0)
e4:SetCondition(c85507811.retcon2)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(85507811,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCondition(c85507811.descon)
e5:SetTarget(c85507811.destg)
e5:SetOperation(c85507811.desop)
c:RegisterEffect(e5)
end
c85507811.material_count=2
c85507811.material={89943723,17732278}
function c85507811.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function c85507811.spfilter(c,code)
if c:GetCode()~=code then return false end
if c:IsType(TYPE_FUSION) then return c:IsAbleToExtraAsCost()
else return c:IsAbleToDeckAsCost() end
end
function c85507811.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
local g1=Duel.GetMatchingGroup(c85507811.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c85507811.spfilter,tp,LOCATION_ONFIELD,0,nil,17732278)
if g1:GetCount()==0 or g2:GetCount()==0 then return false end
if ft>0 then return true end
local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
if ft==-1 then return f1>0 and f2>0
else return f1>0 or f2>0 end
end
function c85507811.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g1=Duel.GetMatchingGroup(c85507811.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c85507811.spfilter,tp,LOCATION_ONFIELD,0,nil,17732278)
g1:Merge(g2)
local g=Group.CreateGroup()
local tc=nil
for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
tc=g1:Select(tp,1,1,nil):GetFirst()
end
g:AddCard(tc)
g1:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft+1
end
local cg=g:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c85507811.retcon1(e,tp,eg,ep,ev,re,r,rp,chk)
return not Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c85507811.retcon2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsPlayerAffectedByEffect(tp,42015635)
end
function c85507811.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtra() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c85507811.retop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
function c85507811.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c85507811.filter(c)
return c:IsFaceup() and c:IsDestructable()
end
function c85507811.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c85507811.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c85507811.filter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c85507811.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c85507811.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Destroy(tc,REASON_EFFECT)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
if tc:IsType(TYPE_MONSTER) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
elseif tc:IsType(TYPE_SPELL) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
else
Duel.ChangePosition(c,POS_FACEUP_DEFENCE)
end
end
end
--レインボー·ネオス
function c86346643.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,89943723,c86346643.fusfilter,1,false,false)
--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(c86346643.splimit)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86346643,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_TODECK)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c86346643.tdcost1)
e2:SetTarget(c86346643.tdtg1)
e2:SetOperation(c86346643.tdop1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86346643,2))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_TODECK)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c86346643.tdcost2)
e3:SetTarget(c86346643.tdtg2)
e3:SetOperation(c86346643.tdop2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(86346643,3))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCategory(CATEGORY_TODECK)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c86346643.tdcost3)
e4:SetTarget(c86346643.tdtg3)
e4:SetOperation(c86346643.tdop3)
c:RegisterEffect(e4)
end
c86346643.material_count=1
c86346643.material={89943723}
function c86346643.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c86346643.fusfilter(c)
local code=c:GetCode()
return code==79856792 or code==79407975
end
function c86346643.cfilter1(c)
return c:IsAbleToGraveAsCost()
end
function c86346643.tdcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86346643.cfilter1,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c86346643.cfilter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c86346643.tdtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(86346643)==0
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,nil)
e:GetHandler():RegisterFlagEffect(86346643,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c86346643.tdop1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_MZONE,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
function c86346643.cfilter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c86346643.tdcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86346643.cfilter2,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c86346643.cfilter2,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c86346643.filter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c86346643.tdtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(86346643)==0
and Duel.IsExistingMatchingCard(c86346643.filter2,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c86346643.filter2,tp,0,LOCATION_ONFIELD,nil)
e:GetHandler():RegisterFlagEffect(86346643,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c86346643.tdop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c86346643.filter2,tp,0,LOCATION_ONFIELD,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
function c86346643.tdcost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.DiscardDeck(tp,1,REASON_COST)
end
function c86346643.tdtg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(86346643)==0
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil)
e:GetHandler():RegisterFlagEffect(86346643,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c86346643.tdop3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
--剣闘獣ゲオルディアス --剣闘獣ゲオルディアス
function c90957527.initial_effect(c) function c90957527.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,79580323,aux.FilterBoolFunction(Card.IsSetCard,0x19),1,true,true)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -39,7 +42,6 @@ function c90957527.initial_effect(c) ...@@ -39,7 +42,6 @@ function c90957527.initial_effect(c)
e4:SetTarget(c90957527.sptg) e4:SetTarget(c90957527.sptg)
e4:SetOperation(c90957527.spop) e4:SetOperation(c90957527.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
c:EnableReviveLimit()
end end
c90957527.material_count=1 c90957527.material_count=1
c90957527.material={79580323} c90957527.material={79580323}
......
--YZ-キャタピラー·ドラゴ --XYZ-ドラゴン·キャノ
function c91998119.initial_effect(c) function c91998119.initial_effect(c)
--fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCode3(c,62651957,65622692,64500000,true,true)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
--YZ-キャタピラー·ドラゴ --XYZ-ドラゴン·キャノ
function c91998120.initial_effect(c) function c91998120.initial_effect(c)
--fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCode3(c,62651957,65622692,64500000,true,true)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
--YZ-キャタピラー·ドラゴ --XYZ-ドラゴン·キャノ
function c91998121.initial_effect(c) function c91998121.initial_effect(c)
--fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCode3(c,62651957,65622692,64500000,true,true)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
--XZ-キャタピラー·キャノン --XZ-キャタピラー·キャノン
function c99724761.initial_effect(c) function c99724761.initial_effect(c)
--fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCode2(c,62651957,64500000,true,true)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
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