Commit 2cbec0a5 authored by argon.sun's avatar argon.sun

dt14

parent 8ad8c5d4
......@@ -1404,7 +1404,7 @@ int32 card::is_summonable(effect* peffect) {
int32 card::is_can_be_summoned(uint8 playerid, uint8 ignore_count, effect* peffect) {
if(!is_summonable())
return FALSE;
if(!ignore_count && !is_affected_by_effect(EFFECT_EXTRA_SUMMON_COUNT)
if(!ignore_count && (pduel->game_field->core.extra_summon[playerid] || !is_affected_by_effect(EFFECT_EXTRA_SUMMON_COUNT))
&& pduel->game_field->core.summon_count[playerid] >= pduel->game_field->get_summon_count_limit(playerid))
return FALSE;
pduel->game_field->save_lp_cost();
......@@ -1611,7 +1611,7 @@ int32 card::is_setable_mzone(uint8 playerid, uint8 ignore_count, effect* peffect
return FALSE;
if(is_affected_by_effect(EFFECT_CANNOT_MSET))
return FALSE;
if(!ignore_count && !is_affected_by_effect(EFFECT_EXTRA_SET_COUNT)
if(!ignore_count && (pduel->game_field->core.extra_summon[playerid] || !is_affected_by_effect(EFFECT_EXTRA_SET_COUNT))
&& pduel->game_field->core.summon_count[playerid] >= pduel->game_field->get_summon_count_limit(playerid))
return FALSE;
pduel->game_field->save_lp_cost();
......
......@@ -976,7 +976,7 @@ void field::ritual_release(card_set* material) {
release(&rel, core.reason_effect, REASON_RITUAL + REASON_EFFECT + REASON_MATERIAL, core.reason_player);
send_to(&rem, core.reason_effect, REASON_RITUAL + REASON_EFFECT + REASON_MATERIAL, core.reason_player, PLAYER_NONE, LOCATION_REMOVED, 0, POS_FACEUP);
}
void field::get_exceed_material(card* scard, card_set* material) {
void field::get_xyz_material(card* scard, card_set* material) {
card* pcard = 0;
int32 playerid = scard->current.controler;
for(int i = 0; i < 5; ++i) {
......
......@@ -221,6 +221,7 @@ struct processor {
uint8 attack_cancelable;
int32 battle_damage[2];
int32 summon_count[2];
uint8 extra_summon[2];
int32 spe_effect[2];
int32 duel_options;
uint32 copy_reset;
......@@ -309,7 +310,7 @@ public:
int32 get_draw_count(uint8 playerid);
void get_ritual_material(uint8 playerid, card_set* material);
void ritual_release(card_set* material);
void get_exceed_material(card* scard, card_set* material);
void get_xyz_material(card* scard, card_set* material);
void get_overlay_group(uint8 self, uint8 s, uint8 o, card_set* pset);
int32 get_overlay_count(uint8 self, uint8 s, uint8 o);
void update_disable_check_list(effect* peffect);
......
......@@ -2105,7 +2105,7 @@ int32 scriptlib::duel_get_xyz_material(lua_State *L) {
card* scard = *(card**) lua_touserdata(L, 1);
duel* pduel = scard->pduel;
group* pgroup = pduel->new_group();
pduel->game_field->get_exceed_material(scard, &pgroup->container);
pduel->game_field->get_xyz_material(scard, &pgroup->container);
interpreter::group2value(L, pgroup);
return 1;
}
......
......@@ -1027,12 +1027,12 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
core.temp_var[0] = 0;
if(!ignore_count) {
returns.ivalue[0] = FALSE;
effect* pextra = target->is_affected_by_effect(EFFECT_EXTRA_SUMMON_COUNT);
effect* pextra = core.extra_summon[sumplayer] ? 0 : target->is_affected_by_effect(EFFECT_EXTRA_SUMMON_COUNT);
if(pextra) {
core.temp_var[0] = (ptr)pextra;
if(core.summon_count[sumplayer] < get_summon_count_limit(sumplayer))
add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, sumplayer, 91);
else
// if(core.summon_count[sumplayer] < get_summon_count_limit(sumplayer))
// add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, sumplayer, 91);
// else
returns.ivalue[0] = TRUE;
}
} else
......@@ -1043,6 +1043,7 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
if(!returns.ivalue[0])
core.summon_count[sumplayer]++;
else if(core.temp_var[0]) {
core.extra_summon[sumplayer] = TRUE;
effect* pextra = (effect*)core.temp_var[0];
pextra->get_value(target);
}
......@@ -1384,12 +1385,12 @@ int32 field::mset(uint16 step, uint8 setplayer, card * target, effect * proc, ui
case 5: {
if(!ignore_count) {
returns.ivalue[0] = FALSE;
effect* pextra = target->is_affected_by_effect(EFFECT_EXTRA_SET_COUNT);
effect* pextra = core.extra_summon[setplayer]? 0: target->is_affected_by_effect(EFFECT_EXTRA_SET_COUNT);
if(pextra) {
core.temp_var[0] = (ptr)pextra;
if(core.summon_count[setplayer] < get_summon_count_limit(setplayer))
add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, setplayer, 91);
else
// if(core.summon_count[setplayer] < get_summon_count_limit(setplayer))
// add_process(PROCESSOR_SELECT_YESNO, 0, 0, 0, setplayer, 91);
// else
returns.ivalue[0] = TRUE;
}
} else
......@@ -1400,13 +1401,12 @@ int32 field::mset(uint16 step, uint8 setplayer, card * target, effect * proc, ui
if(!returns.ivalue[0])
core.summon_count[setplayer]++;
else if(core.temp_var[0]) {
core.extra_summon[setplayer] = TRUE;
effect* pextra = (effect*)core.temp_var[0];
pextra->get_value(target);
}
target->enable_field_effect(FALSE);
move_to_field(target, setplayer, setplayer, LOCATION_MZONE, POS_FACEDOWN_DEFENCE);
if(!ignore_count)
core.summon_count[setplayer]++;
return FALSE;
}
case 7: {
......
......@@ -3319,13 +3319,13 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
core.spsummoned_cards_pt[p].clear();
core.flipsummoned_cards_pt[p].clear();
core.attack_state[p] = 0;
core.summon_count[p] = 0;
core.extra_summon[p] = 0;
}
for(auto rit = effects.rechargeable.begin(); rit != effects.rechargeable.end(); ++rit)
if(!((*rit)->flag & EFFECT_FLAG_NO_TURN_RESET))
(*rit)->recharge();
infos.turn_id++;
core.summon_count[0] = 0;
core.summon_count[1] = 0;
infos.turn_player = turn_player;
pduel->write_buffer8(MSG_NEW_TURN);
pduel->write_buffer8(turn_player);
......
......@@ -55,7 +55,7 @@ function c10979723.excon(e)
return Duel.IsExistingMatchingCard(c10979723.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c10979723.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN) then return true end
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c10979723.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c10979723.descon(e)
......
......@@ -24,18 +24,10 @@ function c13455953.sumop(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetCondition(c13455953.escon)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x42))
e1:SetValue(c13455953.esop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c13455953.escon(e)
return Duel.GetFlagEffect(Duel.GetTurnPlayer(),13455953)==0
end
function c13455953.esop(e,c)
Duel.RegisterFlagEffect(c:GetControler(),13455953,RESET_PHASE+PHASE_END,0,1)
end
function c13455953.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local pos=c:GetPreviousPosition()
......
--異次元ジェット・アイアン号
function c15574615.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(c15574615.spcon)
e1:SetOperation(c15574615.spop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(15574615,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c15574615.cost)
e2:SetTarget(c15574615.target)
e2:SetOperation(c15574615.operation)
c:RegisterEffect(e2)
end
function c15574615.spfilter(c,code)
return c:IsFaceup() and c:IsCode(code) and c:IsAbleToGraveAsCost()
end
function c15574615.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE,0)~=0
and Duel.IsExistingMatchingCard(c15574615.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,80208158)
and Duel.IsExistingMatchingCard(c15574615.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,16796157)
and Duel.IsExistingMatchingCard(c15574615.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,43791861)
and Duel.IsExistingMatchingCard(c15574615.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,79185500)
end
function c15574615.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c15574615.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,80208158)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c15574615.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,16796157)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g3=Duel.SelectMatchingCard(tp,c15574615.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,43791861)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g4=Duel.SelectMatchingCard(tp,c15574615.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,79185500)
g1:Merge(g2)
g1:Merge(g3)
g1:Merge(g4)
Duel.SendtoGrave(g1,REASON_COST)
end
function c15574615.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleaseable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c15574615.spfilter2(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c15574615.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=3
and Duel.IsExistingTarget(c15574615.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp,80208158)
and Duel.IsExistingTarget(c15574615.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp,16796157)
and Duel.IsExistingTarget(c15574615.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp,43791861)
and Duel.IsExistingTarget(c15574615.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp,79185500) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c15574615.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,80208158)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectTarget(tp,c15574615.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,16796157)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g3=Duel.SelectTarget(tp,c15574615.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,43791861)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g4=Duel.SelectTarget(tp,c15574615.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,79185500)
g1:Merge(g2)
g1:Merge(g3)
g1:Merge(g4)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,4,0,0)
end
function c15574615.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if g:GetCount()>ft then return end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
--野獣戦士ピューマン
function c16796157.initial_effect(c)
--salvage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16796157,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c16796157.thcost)
e1:SetTarget(c16796157.thtg)
e1:SetOperation(c16796157.thop)
c:RegisterEffect(e1)
end
function c16796157.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleaseable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c16796157.filter(c)
return c:IsCode(80208158) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c16796157.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16796157.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
function c16796157.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOHAND)
local g=Duel.SelectMatchingCard(tp,c16796157.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--セイクリッド・レスカ
function c16906241.initial_effect(c)
--summon success
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16906241,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c16906241.sptg)
e2:SetOperation(c16906241.spop)
c:RegisterEffect(e2)
end
function c16906241.filter(c,e,tp)
return c:IsSetCard(0x53) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16906241.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16906241.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c16906241.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,c16906241.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
end
--セイクリッド・レオニス
function c17129783.initial_effect(c)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x53))
c:RegisterEffect(e1)
end
--リチュア・ナタリア
function c17241370.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--summon,flip
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(c17241370.retreg)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FLIP)
c:RegisterEffect(e3)
--to deck
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(17241370,1))
e4:SetCategory(CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetTarget(c17241370.tdtg)
e4:SetOperation(c17241370.tdop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_FLIP)
c:RegisterEffect(e5)
end
function c17241370.filter(c)
return c:IsSetCard(0x3a) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c17241370.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c17241370.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c17241370.filter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectTarget(tp,c17241370.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c17241370.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
end
end
function c17241370.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(aux.Stringid(17241370,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_REPEAT)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e1:SetCondition(c17241370.retcon)
e1:SetTarget(c17241370.rettg)
e1:SetOperation(c17241370.retop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
c:RegisterEffect(e2)
end
function c17241370.retcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end
if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then
return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN)
else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end
end
function c17241370.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c17241370.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--ブリキンギョ
function c18063928.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(18063928,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c18063928.sptg)
e1:SetOperation(c18063928.spop)
c:RegisterEffect(e1)
end
function c18063928.filter(c,e,tp)
return c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c18063928.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c18063928.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c18063928.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,c18063928.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--セイクリッド・ビーハイブ
function c2091298.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c26329679.xyzfilter,2)
c:EnableReviveLimit()
--attack up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(2091298,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_CAL)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c2091298.condition)
e1:SetCost(c2091298.cost)
e1:SetOperation(c2091298.operation)
c:RegisterEffect(e1)
end
function c2091298.xyzfilter(c)
return c:GetLevel()==4 and c:IsSetCard(0x53)
end
function c2091298.condition(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if (phase~=PHASE_DAMAGE and phase~=PHASE_DAMAGE_CAL) or Duel.IsDamageCalculated() then return false end
local tc=Duel.GetAttacker()
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
e:SetLabelObject(tc)
return tc and tc:IsFaceup() and tc:IsSetCard(0x53) and tc:IsRelateToBattle()
end
function c2091298.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c2091298.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if not tc:IsRelateToBattle() or tc:IsFacedown() then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(1000)
tc:RegisterEffect(e1)
end
......@@ -23,14 +23,11 @@ function c24621460.initial_effect(c)
c:RegisterEffect(e3)
--extra summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(24621460,1))
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e4:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e4:SetCondition(c24621460.escon)
e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x11))
e4:SetValue(c24621460.esop)
c:RegisterEffect(e4)
end
function c24621460.becon(e)
......@@ -42,9 +39,3 @@ function c24621460.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangePosition(c,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0)
end
end
function c24621460.escon(e)
return Duel.GetFlagEffect(Duel.GetTurnPlayer(),24621460)==0
end
function c24621460.esop(e,c)
Duel.RegisterFlagEffect(c:GetControler(),24621460,RESET_PHASE+PHASE_END,0,1)
end
......@@ -69,7 +69,7 @@ function c26082117.excon(e)
return Duel.IsExistingMatchingCard(c26082117.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c26082117.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN) then return true end
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c26082117.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c26082117.descon(e)
......
--セイクリッド・オメガ
function c26329679.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c26329679.xyzfilter,2)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(26329679,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c26329679.cost)
e1:SetOperation(c26329679.operation)
c:RegisterEffect(e1)
end
function c26329679.xyzfilter(c)
return c:GetLevel()==4 and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c26329679.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c26329679.filter(c)
return c:IsFaceup() and c:IsSetCard(0x53)
end
function c26329679.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c26329679.filter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e1:SetValue(c26329679.efilter)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c26329679.efilter(e,te)
return te:GetOwner():IsType(TYPE_SPELL+TYPE_TRAP)
end
......@@ -18,8 +18,6 @@ function c26722601.sumop(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetCondition(c26722601.escon)
e1:SetValue(c26722601.esop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
......@@ -27,9 +25,3 @@ function c26722601.sumop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2)
end
end
function c26722601.escon(e)
return Duel.GetFlagEffect(e:GetOwnerPlayer(),26722601)==0
end
function c26722601.esop(e,c)
Duel.RegisterFlagEffect(e:GetOwnerPlayer(),26722601,RESET_PHASE+PHASE_END,0,1)
end
--侵略の汎発感染
function c27541267.initial_effect(c)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c27541267.operation)
c:RegisterEffect(e1)
end
function c27541267.filter(c)
return c:IsFaceup() and c:IsSetCard(0xa)
end
function c27541267.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c27541267.filter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e1:SetValue(c27541267.efilter)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c27541267.efilter(e,te)
return te:GetOwner():IsType(TYPE_SPELL+TYPE_TRAP)
end
--イビリチュア·プシュケローネ
function c30334522.initial_effect(c)
c:EnableReviveLimit()
--confirm
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30334522,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c30334522.target)
e1:SetOperation(c30334522.operation)
c:RegisterEffect(e1)
end
function c30334522.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 end
Duel.Hint(HINT_SELECTMSG,tp,563)
local rc=Duel.AnnounceRace(tp,1,0xffffff)
e:SetLabel(rc)
Duel.Hint(HINT_SELECTMSG,tp,562)
local at=Duel.AnnounceAttribute(tp,1,0xffff)
Duel.SetTargetParam(at)
end
function c30334522.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tc=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1):GetFirst()
Duel.ConfirmCards(tp,tc)
local rc=e:GetLabel()
local at=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tc:IsRace(rc) and tc:IsAttribute(at) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
else Duel.ShuffleHand(1-tp) end
end
--ジェムナイト・セラフィ
function c3113836.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x1047),aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),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(c3113836.splimit)
c:RegisterEffect(e1)
--extra summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e2:SetRange(LOCATION_MZONE)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_EXTRA_SET_COUNT)
c:RegisterEffect(e3)
end
function c3113836.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
--ヴェルズ・ゴーレム
function c31456110.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(31456110,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c31456110.destg)
e1:SetOperation(c31456110.desop)
c:RegisterEffect(e1)
end
function c31456110.filter(c)
return c:IsFaceup() and c:IsAttribute(0x5f) and c:IsLevelAbove(5) and c:IsDestructable()
end
function c31456110.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c31456110.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c31456110.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c31456110.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c31456110.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c31456110.filter(tc) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
......@@ -28,13 +28,13 @@ function c31826057.filter(c)
return c:IsFaceup() and c:IsSetCard(0x66) and c:IsLevelAbove(1)
end
function c31826057.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c24920410.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c31826057.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c31826057.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c31826057.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c31826057.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c24920410.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c31826057.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c31826057.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c31826057.filter,tp,LOCATION_MZONE,0,1,1,nil)
......
--ヴェルズ・ウロボロス
function c38273745.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterEqualFunction(Card.GetLevel,4),3)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(38273745,1))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c38273745.con1)
e1:SetCost(c38273745.cost)
e1:SetTarget(c38273745.tg1)
e1:SetOperation(c38273745.op1)
c:RegisterEffect(e1)
--handes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(38273745,2))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c38273745.con2)
e2:SetCost(c38273745.cost)
e2:SetTarget(c38273745.tg2)
e2:SetOperation(c38273745.op2)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(38273745,3))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c38273745.con3)
e3:SetCost(c38273745.cost)
e3:SetTarget(c38273745.tg3)
e3:SetOperation(c38273745.op3)
c:RegisterEffect(e3)
end
function c38273745.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c38273745.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(38273745)==0 and e:GetHandler():GetFlagEffect(38273746)==0
end
function c38273745.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
e:GetHandler():RegisterFlagEffect(38273745,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
e:GetHandler():RegisterFlagEffect(38273746,RESET_EVENT+0x1fe0000,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c38273745.op1(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
function c38273745.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(38273745)==0 and e:GetHandler():GetFlagEffect(38273747)==0
end
function c38273745.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)~=0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND)
e:GetHandler():RegisterFlagEffect(38273745,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
e:GetHandler():RegisterFlagEffect(38273747,RESET_EVENT+0x1fe0000,0,1)
end
function c38273745.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if g:GetCount()==0 then return end
local sg=g:RandomSelect(1-tp,1)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
function c38273745.con3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(38273745)==0 and e:GetHandler():GetFlagEffect(38273748)==0
end
function c38273745.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
e:GetHandler():RegisterFlagEffect(38273745,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
e:GetHandler():RegisterFlagEffect(38273748,RESET_EVENT+0x1fe0000,0,1)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c38273745.op3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--セイクリッド・トレミスM7
function c38495396.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c38495396.xyzcon)
e1:SetOperation(c38495396.xyzop)
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(38495396,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c38495396.thcost)
e2:SetTarget(c38495396.thtg)
e2:SetOperation(c38495396.thop)
c:RegisterEffect(e2)
end
function c38495396.xyzfilter(c)
return c:GetLevel()==6
end
function c38495396.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x53) and c:GetCode()~=38495396 and c:IsType(TYPE_XYZ)
end
function c38495396.xyzcon(e,c)
if c==nil then return true end
if Duel.IsExistingMatchingCard(c38495396.ovfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) then return true end
local g=Duel.GetXyzMaterial(c)
return g:IsExists(c38495396.xyzfilter,3,nil)
end
function c38495396.xyzop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetXyzMaterial(c)
local b1=g:IsExists(c38495396.xyzfilter,2,nil)
local b2=Duel.IsExistingMatchingCard(c38495396.ovfilter,tp,LOCATION_MZONE,0,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
if (b1 and b2 and Duel.SelectYesNo(tp,aux.Stringid(38495396,1))) or ((not b1) and b2) then
local mg=Duel.SelectMatchingCard(tp,c38495396.ovfilter,tp,LOCATION_MZONE,0,1,1,nil)
local mg2=mg:GetFirst():GetOverlayGroup()
Duel.Overlay(c,mg2)
Duel.Overlay(c,mg)
mg:Merge(mg2)
c:SetMaterial(mg)
c:RegisterFlagEffect(38495396,RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END,0,1)
else
local mg=g:FilterSelect(tp,c38495396.xyzfilter,2,2,nil)
Duel.Overlay(c,mg)
c:SetMaterial(mg)
end
end
function c38495396.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c38495396.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c38495396.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c38495396.thfilter(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(38495396)==0
and Duel.IsExistingTarget(c38495396.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c38495396.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c38495396.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
......@@ -12,17 +12,19 @@ function c38562933.initial_effect(c)
c:RegisterEffect(e1)
end
function c38562933.descon(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
local c=e:GetHandler()
return c==Duel.GetAttacker() and d and d:IsFaceup() and d:GetDefence()<=c:GetAttack()
local d=Duel.GetAttackTarget()
if d==c then d=Duel.GetAttacker() end
e:SetLabelObject(d)
return d and d:IsFaceup() and d:GetDefence()<=c:GetAttack()
end
function c38562933.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0)
end
function c38562933.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local d=Duel.GetAttackTarget()
local d=e:GetLabelObject()
if c:IsFaceup() and c:IsRelateToEffect(e) and d:IsRelateToBattle() and d:GetDefence()<=c:GetAttack() then
Duel.Destroy(d,REASON_EFFECT)
end
......
--ジェムナイトマスター・ダイヤ
function c39512984.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsSetCard,0x1047),3,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(c39512984.splimit)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c39512984.atkup)
c:RegisterEffect(e2)
--copy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(39512984,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c39512984.cost)
e3:SetOperation(c39512984.operation)
c:RegisterEffect(e3)
end
function c39512984.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c39512984.atkup(e,c)
return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x1047)*100
end
function c39512984.filter(c)
return c:IsLevelBelow(7) and c:IsSetCard(0x1047) and c:IsType(TYPE_FUSION) and c:IsAbleToRemoveAsCost()
end
function c39512984.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c39512984.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c39512984.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabel(g:GetFirst():GetOriginalCode())
end
function c39512984.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local code=e:GetLabel()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
c:RegisterEffect(e1)
c:CopyEffect(code, RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END, 1)
end
end
--ヴェルズ・サラマンドラ
function c4058065.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4058065,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(2)
e1:SetCost(c4058065.cost)
e1:SetOperation(c4058065.operation)
c:RegisterEffect(e1)
end
function c4058065.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c4058065.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4058065.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c4058065.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c4058065.operation(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+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
end
end
--セイクリッド・アンタレス
function c42391240.initial_effect(c)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(42391240,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c42391240.thtg)
e1:SetOperation(c42391240.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c42391240.tgfilter(c)
return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c42391240.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:GetControler()==tp and c42391240.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c42391240.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c42391240.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c42391240.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--ヴェルズ・アザトホース
function c42679662.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(42679662,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetTarget(c42679662.target)
e1:SetOperation(c42679662.operation)
c:RegisterEffect(e1)
end
function c42679662.filter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)~=0 and c:IsAbleToDeck()
end
function c42679662.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c42679662.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c42679662.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c42679662.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
--アイアイアン
function c42969214.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(42969214,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c42969214.cost)
e1:SetOperation(c42969214.operation)
c:RegisterEffect(e1)
end
function c42969214.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c42969214.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c42969214.operation(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:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetValue(400)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
--創星神 sophia
function c4335427.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(c4335427.spcon)
e1:SetOperation(c4335427.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DISABLE_SUMMON)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e2)
--cannot special summon
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e3)
--remove
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(4335427,0))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetTarget(c4335427.rmtg)
e4:SetOperation(c4335427.rmop)
c:RegisterEffect(e4)
end
function c4335427.spfilter(c,tpe)
return c:IsFaceup() and c:IsType(tpe) and c:IsAbleToRemoveAsCost()
end
function c4335427.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c4335427.spfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_RITUAL)
and Duel.IsExistingMatchingCard(c4335427.spfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_FUSION)
and Duel.IsExistingMatchingCard(c4335427.spfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SYNCHRO)
and Duel.IsExistingMatchingCard(c4335427.spfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_XYZ)
end
function c4335427.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c4335427.spfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_RITUAL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c4335427.spfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_FUSION)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g3=Duel.SelectMatchingCard(tp,c4335427.spfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SYNCHRO)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g4=Duel.SelectMatchingCard(tp,c4335427.spfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_XYZ)
g1:Merge(g2)
g1:Merge(g3)
g1:Merge(g4)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function c4335427.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0x1e,0x1e,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
Duel.SetChainLimit(aux.FALSE)
end
function c4335427.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0x1e,0x1e,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
--セイクリッド・アクベス
function c43513897.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43513897,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c43513897.atkop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c43513897.filter(c)
return c:IsFaceup() and c:IsSetCard(0x53)
end
function c43513897.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c26329679.filter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e1:SetValue(500)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--鳳王獣ガイルーダ
function c43791861.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCondition(c43791861.condtion)
e1:SetValue(300)
c:RegisterEffect(e1)
end
function c43791861.condtion(e)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL)
and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil
end
--セイクリッド・シェアト
function c44635489.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(c44635489.spcon)
c:RegisterEffect(e1)
--lv change
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(44635489,0))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c44635489.lvtg)
e2:SetOperation(c44635489.lvop)
c:RegisterEffect(e2)
--xyzlimit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetValue(c44635489.xyzlimit)
c:RegisterEffect(e3)
end
function c44635489.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c44635489.filter(c)
return c:IsSetCard(0x53) and c:GetLevel()~=0
and ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) or (c:IsLocation(LOCATION_GRAVE) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)))
end
function c44635489.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c44635489.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c44635489.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SelectTarget(tp,c44635489.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler())
end
function c44635489.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and (not tc:IsLocation(LOCATION_MZONE) or tc:IsFaceup()) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetLevel())
e1:SetReset(RESET_EVENT+0x1ff0000)
e:GetHandler():RegisterEffect(e1)
end
end
function c44635489.xyzlimit(e,c)
if not c then return false end
return not c:IsSetCard(0x53)
end
......@@ -25,7 +25,7 @@ function c4466015.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local ct=tc:GetCounter(0x9)
if ct>0 then
tc:RemoveCounter(tp,0x9,ct,REASON_COST)
tc:RemoveCounter(tp,0x9,ct,REASON_EFFECT)
Duel.Damage(1-tp,ct*700,REASON_EFFECT)
end
end
--ネジマキシキガミ
function c45458027.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(c45458027.spcon)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(45458027,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c45458027.target)
e2:SetOperation(c45458027.operation)
c:RegisterEffect(e2)
end
function c45458027.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,1,nil,RACE_MACHINE)
and not Duel.IsExistingMatchingCard(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,1,nil,0xffffffff-RACE_MACHINE)
end
function c45458027.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function c45458027.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(0)
tc:RegisterEffect(e1)
end
end
--ヴェルズ・オ・ウィスプ
function c5284653.initial_effect(c)
--Disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(5284653,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c5284653.condition)
e1:SetOperation(c5284653.operation)
c:RegisterEffect(e1)
end
function c5284653.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
if a==c then a=Duel.GetAttackTarget() end
e:SetLabelObject(a)
return a and a:IsType(TYPE_EFFECT) and a:IsRelateToBattle()
end
function c5284653.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:IsFacedown() or not tc:IsRelateToBattle() then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x17a0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x17a0000)
tc:RegisterEffect(e2)
end
......@@ -16,7 +16,7 @@ function c53540729.filter(c)
return c:IsFaceup() and c:IsSetCard(0x58) and c:IsLevelAbove(1)
end
function c53540729.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c24920410.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c53540729.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c53540729.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c53540729.filter,tp,LOCATION_MZONE,0,1,1,nil)
......
--セイクリッドの流星
function c63545861.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c63545861.regop)
c:RegisterEffect(e1)
end
function c63545861.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetOperation(c63545861.retop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c63545861.retop(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
local g=Group.CreateGroup()
if a:IsSetCard(0x53) and d and d:IsControler(1-tp) and d:IsRelateToBattle() then g:AddCard(d) end
if d and d:IsSetCard(0x53) and a:IsControler(1-tp) and a:IsRelateToBattle() then g:AddCard(a) end
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
--アイアンコール
function c64662453.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c64662453.condition)
e1:SetTarget(c64662453.target)
e1:SetOperation(c64662453.activate)
c:RegisterEffect(e1)
end
function c64662453.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE)
end
function c64662453.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c64662453.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c64662453.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c64662453.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64662453.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c64662453.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c64662453.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c64662453.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetOperation(c64662453.desop)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e3:SetCountLimit(1)
tc:RegisterEffect(e3)
Duel.SpecialSummonComplete()
end
end
function c64662453.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
\ No newline at end of file
--ヴェルズ・タナトス
function c65884091.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c65884091.xyzfilter,2)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65884091,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c65884091.cost)
e1:SetOperation(c65884091.operation)
c:RegisterEffect(e1)
end
function c65884091.xyzfilter(c)
return c:GetLevel()==4 and c:IsAttribute(ATTRIBUTE_DARK)
end
function c65884091.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c65884091.operation(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_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e1:SetValue(c65884091.efilter)
c:RegisterEffect(e1)
end
end
function c65884091.efilter(e,te)
return te:GetOwner():IsType(TYPE_EFFECT)
end
--ブリキの大公
function c66506689.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterEqualFunction(Card.GetLevel,4),3)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(66506689,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCountLimit(1)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1c0)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c66506689.cost)
e1:SetTarget(c66506689.tg)
e1:SetOperation(c66506689.op)
c:RegisterEffect(e1)
end
function c66506689.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c66506689.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c66506689.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true)
end
end
--イビリチュア·ジールギガス
function c66729231.initial_effect(c)
c:EnableReviveLimit()
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(66729231,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c66729231.cost)
e1:SetTarget(c66729231.target)
e1:SetOperation(c66729231.operation)
c:RegisterEffect(e1)
end
function c66729231.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c66729231.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c66729231.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end
local tc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,tc)
if tc:IsSetCard(0x3a) and tc:IsType(TYPE_MONSTER) then
local dg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SendtoDeck(dg,nil,2,REASON_EFFECT)
end
Duel.ShuffleHand(tp)
end
......@@ -28,13 +28,13 @@ function c68933343.filter(c)
return c:IsFaceup() and c:IsSetCard(0x66) and c:IsLevelAbove(1)
end
function c68933343.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c24920410.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c68933343.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c68933343.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c68933343.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c68933343.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c24920410.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c68933343.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c68933343.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c68933343.filter,tp,LOCATION_MZONE,0,1,1,nil)
......
--セイクリッド・ハワー
function c70624184.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(70624184,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c70624184.spcost)
e1:SetTarget(c70624184.sptg)
e1:SetOperation(c70624184.spop)
c:RegisterEffect(e1)
end
function c70624184.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleaseable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c70624184.filter(c,e,tp)
return c:IsSetCard(0x53) and c:GetCode()~=70624184 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c70624184.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c70624184.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c70624184.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,c70624184.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
--セイクリッド・カウスト
function c70908596.initial_effect(c)
--lv change
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(70908596,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(2)
e1:SetTarget(c70908596.target)
e1:SetOperation(c70908596.operation)
c:RegisterEffect(e1)
--
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 c70908596.filter(c)
return c:IsFaceup() and c:IsSetCard(0x53) and c:IsLevelAbove(1)
end
function c70908596.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c70908596.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c70908596.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c70908596.filter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
local op=0
if tc:GetLevel()==1 then op=Duel.SelectOption(tp,aux.Stringid(70908596,1))
else op=Duel.SelectOption(tp,aux.Stringid(70908596,1),aux.Stringid(70908596,2)) end
e:SetLabel(op)
end
function c70908596.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+0x1fe0000)
if e:GetLabel()==0 then
e1:SetValue(1)
else e1:SetValue(-1) end
tc:RegisterEffect(e1)
end
end
......@@ -28,7 +28,7 @@ end
function c73964868.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
......
......@@ -105,7 +105,7 @@ function c76080032.excon(e)
return Duel.IsExistingMatchingCard(c76080032.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c76080032.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN) then return true end
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c76080032.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c76080032.descon(e)
......
--ヴェルズ・コッペリアル
function c77841719.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--control
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_CONTROL)
e2:SetDescription(aux.Stringid(77841719,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c77841719.condition)
e2:SetTarget(c77841719.target)
e2:SetOperation(c77841719.operation)
c:RegisterEffect(e2)
end
function c77841719.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK)
and c:GetPreviousControler()==tp and rp~=tp
end
function c77841719.filter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged()
end
function c77841719.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end
if chk==0 then return Duel.IsExistingTarget(c77841719.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c77841719.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c77841719.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local tct=1
if Duel.GetTurnPlayer()~=tp then tct=2 end
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END,tct) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
......@@ -13,16 +13,8 @@ function c78364470.sumop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetCondition(c78364470.escon)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x53))
e1:SetValue(c78364470.esop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,78364471,RESET_PHASE+PHASE_END,0,1)
end
function c78364470.escon(e)
return Duel.GetFlagEffect(Duel.GetTurnPlayer(),78364470)==0
end
function c78364470.esop(e,c)
Duel.RegisterFlagEffect(c:GetControler(),78364470,RESET_PHASE+PHASE_END,0,1)
end
--ヴェルズ・サンダーバード
function c78663366.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetDescription(aux.Stringid(78663366,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c78663366.target)
e1:SetOperation(c78663366.operation)
c:RegisterEffect(e1)
end
function c78663366.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,78663366)==0 and e:GetHandler():IsAbleToRemove() end
Duel.RegisterFlagEffect(tp,78663366,RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function c78663366.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetReset(RESET_PHASE+PHASE_STANDBY)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(c78663366.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c78663366.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.ReturnToField(tc)
if tc:IsLocation(LOCATION_MZONE) then
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+0x1ff0000)
tc:RegisterEffect(e1)
end
end
--鉄巨人アイアンハンマー
function c79185500.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(c79185500.spcon)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(79185500,0))
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c79185500.target)
e3:SetOperation(c79185500.operation)
c:RegisterEffect(e3)
end
function c79185500.spfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function c79185500.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE,0)~=0
and Duel.IsExistingMatchingCard(c79185500.spfilter,tp,LOCATION_ONFIELD,0,1,nil,80208158)
and Duel.IsExistingMatchingCard(c79185500.spfilter,tp,LOCATION_ONFIELD,0,1,nil,16796157)
and Duel.IsExistingMatchingCard(c79185500.spfilter,tp,LOCATION_ONFIELD,0,1,nil,43791861)
end
function c79185500.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end
function c79185500.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--ヴェルズ・カストル
function c79785958.initial_effect(c)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c79785958.sumop)
c:RegisterEffect(e1)
end
function c79785958.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,79785958)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xa))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,79785958,RESET_PHASE+PHASE_END,0,1)
end
--異次元エスパー・スター・ロビン
function c80208158.initial_effect(c)
--target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetTarget(c80208158.tglimit)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetValue(c80208158.tgval)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(80208158,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c80208158.spcon)
e3:SetTarget(c80208158.sptg)
e3:SetOperation(c80208158.spop)
c:RegisterEffect(e3)
--only 1 can exists
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_SUMMON)
e4:SetCondition(c80208158.excon)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetCode(EFFECT_SPSUMMON_CONDITION)
e6:SetValue(c80208158.splimit)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_SELF_DESTROY)
e7:SetCondition(c80208158.descon)
c:RegisterEffect(e7)
end
function c80208158.tglimit(e,c)
return c~=e:GetHandler()
end
function c80208158.tgval(e,re,rp)
return e:GetHandlerPlayer()~=rp
end
function c80208158.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
function c80208158.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.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c80208158.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_DEFENCE)>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 c80208158.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==80208158 and (fid==nil or c:GetFieldID()<fid)
end
function c80208158.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c80208158.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c80208158.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c80208158.exfilter,tgp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c80208158.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c80208158.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c:GetFieldID())
end
--ジェムナイト・ラズリー
function c81846636.initial_effect(c)
--salvage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81846636,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c81846636.condition)
e1:SetTarget(c81846636.target)
e1:SetOperation(c81846636.operation)
c:RegisterEffect(e1)
end
function c81846636.condition(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_RETURN)==0 and bit.band(r,REASON_EFFECT)~=0
end
function c81846636.filter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToHand()
end
function c81846636.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c81846636.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c81846636.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c81846636.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
......@@ -12,7 +12,6 @@ function c85668449.initial_effect(c)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,LOCATION_HAND+LOCATION_MZONE)
e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e2:SetCondition(c85668449.escon)
e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_PSYCHO))
e2:SetValue(c85668449.esop)
c:RegisterEffect(e2)
......@@ -38,11 +37,7 @@ function c85668449.initial_effect(c)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
end
function c85668449.escon(e)
return Duel.GetFlagEffect(Duel.GetTurnPlayer(),85668449)==0
end
function c85668449.esop(e,c)
Duel.RegisterFlagEffect(c:GetControler(),85668449,RESET_PHASE+PHASE_END,0,1)
e:GetHandler():AddCounter(0x3004,1)
end
function c85668449.lrcon(e,tp,eg,ep,ev,re,r,rp)
......
--スノーマンイーター
--渋い忍者
function c87483942.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
......@@ -56,7 +56,7 @@ function c87483942.excon(e)
return Duel.IsExistingMatchingCard(c87483942.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c87483942.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN) then return true end
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c87483942.exfilter,tgp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c87483942.descon(e)
......
--セイクリッドの超新生
function c90156158.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c90156158.cost)
e1:SetTarget(c90156158.target)
e1:SetOperation(c90156158.activate)
c:RegisterEffect(e1)
end
function c90156158.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCurrentPhase()~=PHASE_MAIN2 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c90156158.filter(c)
return c:IsSetCard(0x53) and c:IsType(TYPE_MONSTER)
end
function c90156158.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c90156158.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c90156158.filter,tp,LOCATION_GRAVE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c90156158.filter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0)
end
function c90156158.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
......@@ -2,19 +2,10 @@
function c9056100.initial_effect(c)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9056100,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetCondition(c9056100.escon)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2f))
e1:SetValue(c9056100.esop)
c:RegisterEffect(e1)
end
function c9056100.escon(e)
return Duel.GetFlagEffect(Duel.GetTurnPlayer(),9056100)==0
end
function c9056100.esop(e,c)
Duel.RegisterFlagEffect(c:GetControler(),9056100,RESET_PHASE+PHASE_END,0,1)
end
--侵略の侵喰崩壊
function c90934570.initial_effect(c)
--remove & tohand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1c0)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c90934570.target)
e1:SetOperation(c90934570.operation)
c:RegisterEffect(e1)
end
function c90934570.rmfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa) and c:IsAbleToRemove()
end
function c90934570.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c90934570.rmfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectTarget(tp,c90934570.rmfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,1,0,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOHAND)
local g2=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,g2:GetCount(),0,0)
end
function c90934570.operation(e,tp,eg,ep,ev,re,r,rp)
local ex,g1=Duel.GetOperationInfo(0,CATEGORY_REMOVE)
local ex,g2=Duel.GetOperationInfo(0,CATEGORY_TOHAND)
if g1:GetFirst():IsRelateToEffect(e) and g1:GetFirst():IsFaceup() and Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)~=0 then
local hg=g2:Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoHand(hg,nil,REASON_EFFECT)
end
end
......@@ -73,19 +73,11 @@ function c9126351.exop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetCondition(c9126351.escon)
e1:SetTarget(c9126351.estg)
e1:SetValue(c9126351.esop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,9126352,RESET_PHASE+PHASE_END,0,1)
end
function c9126351.escon(e)
return Duel.GetFlagEffect(e:GetOwnerPlayer(),9126351)==0
end
function c9126351.estg(e,c)
return c:IsSetCard(0x12) and c:GetCode()~=9126351
end
function c9126351.esop(e,c)
Duel.RegisterFlagEffect(c:GetControler(),9126351,RESET_PHASE+PHASE_END,0,1)
end
--ヴェルズ・オピオン
function c91279700.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c91279700.xyzfilter,2)
c:EnableReviveLimit()
--disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(c91279700.sumlimit)
e1:SetCondition(c91279700.dscon)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(91279700,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c91279700.cost)
e2:SetTarget(c91279700.target)
e2:SetOperation(c91279700.operation)
c:RegisterEffect(e2)
end
function c91279700.xyzfilter(c)
return c:GetLevel()==4 and c:IsSetCard(0xa)
end
function c91279700.dscon(e)
return e:GetHandler():GetOverlayCount()~=0
end
function c91279700.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLevelAbove(5)
end
function c91279700.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c91279700.filter(c)
return c:IsSetCard(0x65) and c:IsAbleToHand()
end
function c91279700.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c91279700.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c91279700.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c91279700.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
......@@ -29,7 +29,7 @@ end
function c92361635.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) end
and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,0,0)
......
......@@ -28,13 +28,13 @@ function c94331452.filter(c)
return c:IsFaceup() and c:IsSetCard(0x66) and c:IsLevelAbove(1)
end
function c94331452.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c24920410.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c94331452.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c94331452.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c94331452.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c94331452.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c24920410.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c94331452.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c94331452.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c94331452.filter,tp,LOCATION_MZONE,0,1,1,nil)
......
......@@ -6,7 +6,6 @@ function c95453143.initial_effect(c)
--copy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(95453143,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
......@@ -25,8 +24,7 @@ function c95453143.initial_effect(c)
c:RegisterEffect(e2)
end
function c95453143.filter(c)
local lv=c:GetLevel()
return lv>0 and lv<=6 and c:IsType(TYPE_EFFECT) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost()
return c:IsLevelBelow(6) and c:IsType(TYPE_EFFECT) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost()
end
function c95453143.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c95453143.filter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -56,8 +56,7 @@ function c9888196.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c9888196.desop1(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=tg:GetFirst()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
......
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