Commit 50a4971a authored by Momobako's avatar Momobako

Push by Appveyor

parent 8d3ca35a
......@@ -58,10 +58,10 @@ function c1110001.op1(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(c1110001.ofilter1,tp,LOCATION_GRAVE+LOCATION_DECK,0,nil)
local g=Duel.GetMatchingGroup(c1110001.ofilter1,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(1110001,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g2=Duel.SelectMatchingCard(tp,c1110001.ofilter1,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,c1110001.ofilter1,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
if Duel.SSet(tp,g2)~=0 then
Duel.ConfirmCards(1-tp,g2)
......
......@@ -4,7 +4,7 @@ function c1110003.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,1110003)
e1:SetTarget(c1110003.tg1)
e1:SetOperation(c1110003.op1)
......@@ -44,12 +44,12 @@ function c1110003.filter1(c,e,tp)
end
function c1110003.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c1110003.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,LOCATION_HAND)
end
--
function c1110003.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) then
if c:IsRelateToEffect(e) and c:IsLocation(LOCATION_HAND) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if Duel.SelectYesNo(tp,aux.Stringid(1110003,1)) then
local e3=Effect.CreateEffect(c)
......
......@@ -96,9 +96,9 @@ function c1110121.filter4(c)
end
function c1110121.op4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c1110121.filter4,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) then
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c1110121.filter4,tp,LOCATION_REMOVED,0,1,nil) then
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c1110121.filter4,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c1110121.filter4,tp,LOCATION_REMOVED,0,1,1,nil)
tc=g:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
......
......@@ -99,9 +99,9 @@ function c1110122.filter4(c)
end
function c1110122.op4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c1110122.filter4,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) then
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c1110122.filter4,tp,LOCATION_REMOVED,0,1,nil) then
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c1110122.filter4,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c1110122.filter4,tp,LOCATION_REMOVED,0,1,1,nil)
tc=g:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
......
......@@ -36,7 +36,7 @@ function c1110142.initial_effect(c)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e4:SetCategory(CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
......@@ -132,7 +132,7 @@ function c1110142.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(c1110142.ofilter2x1,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(1110142,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c1110142.ofilter2x1,tp,0,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c1110142.ofilter2x1,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
......@@ -169,10 +169,7 @@ function c1110142.op4(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c1110142.tfilter4,tp,LOCATION_REMOVED,0,1,3,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT)
end
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
--
......
......@@ -15,15 +15,15 @@ function c1110161.initial_effect(c)
e1:SetOperation(c1110161.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,1110166)
e2:SetCost(c1110161.cost2)
e2:SetTarget(c1110161.tg2)
e2:SetOperation(c1110161.op2)
c:RegisterEffect(e2)
-- local e2=Effect.CreateEffect(c)
-- e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
-- e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
-- e2:SetCode(EVENT_SPSUMMON_SUCCESS)
-- e2:SetCountLimit(1,1110166)
-- e2:SetCost(c1110161.cost2)
-- e2:SetTarget(c1110161.tg2)
-- e2:SetOperation(c1110161.op2)
-- c:RegisterEffect(e2)
--
end
--
......
......@@ -2,7 +2,7 @@
function c1111001.initial_effect(c)
--coin
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_COIN+CATEGORY_DAMAGE+CATEGORY_REMOVE)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_COIN+CATEGORY_DAMAGE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1111001)
......@@ -39,8 +39,6 @@ function c1111001.op1(e,tp,eg,ep,ev,re,r,rp)
if gn~=0 then
Duel.Damage(tp,gn*800,REASON_EFFECT)
end
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
elseif r1+r2+r3==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c1111001.filter2,tp,LOCATION_DECK,0,1,1,nil)
......@@ -54,9 +52,7 @@ function c1111001.op1(e,tp,eg,ep,ev,re,r,rp)
local g3=Duel.SelectMatchingCard(tp,c1111001.filter1,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g3:GetCount()>0 then
local tc3=g3:GetFirst()
if Duel.Remove(tc3,POS_FACEUP,REASON_EFFECT)~=0 and tc3:GetPreviousLocation()==LOCATION_DECK then
Duel.Draw(tp,1,REASON_EFFECT)
end
Duel.Remove(tc3,POS_FACEUP,REASON_EFFECT)
end
end
end
......@@ -50,10 +50,10 @@ function c1111003.op1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c1111003.ofilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(c1111003.ofilter1x1,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1110003,0))
local g2=Duel.SelectMatchingCard(tp,c1110003.ofilter1x1,tp,LOCATION_DECK,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1111003,0))
local g2=Duel.SelectMatchingCard(tp,c1111003.ofilter1x1,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
local tc2=ge:GetFirst()
local tc2=g2:GetFirst()
Duel.MoveToField(tc2,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
......
......@@ -2,7 +2,7 @@
function c1111005.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c1111005.cost1)
......@@ -18,10 +18,10 @@ function c1111005.IsDw(c)
end
--
function c1111005.filter1(c)
return c1111005.IsDw(c) and c:IsAbleToHand()
return c:IsAbleToDeck()
end
function c1111005.filter2(c,e,tp)
return c:GetLevel()<6 and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and not c:IsType(TYPE_XYZ) and not c:IsType(TYPE_LINK)
function c1111005.filter2(c)
return c:GetLevel()<6 and c:IsFaceup() and c:IsAbleToHand() and not c:IsType(TYPE_XYZ) and not c:IsType(TYPE_LINK)
end
function c1111005.costfilter1(c)
return c:IsAbleToRemoveAsCost() and c:IsCode(1110111)
......@@ -33,30 +33,37 @@ function c1111005.cfilterx(c)
return (c:IsCode(1110112) or c:IsCode(1110111)) and c:IsAbleToRemoveAsCost()
end
function c1111005.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return ((Duel.IsExistingMatchingCard(c1111005.costfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(c1111005.filter1,tp,LOCATION_DECK,0,1,nil)) or (Duel.IsExistingMatchingCard(c1111005.costfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(c1111005.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp))) end
if chk==0 then return ((Duel.IsExistingMatchingCard(c1111005.costfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(c1111005.filter1,tp,LOCATION_GRAVE,0,1,nil)) or (Duel.IsExistingMatchingCard(c1111005.costfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(c1111005.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil))) end
local g=Duel.SelectMatchingCard(tp,c1111005.cfilterx,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabelObject(Duel.GetOperatedGroup():GetFirst())
end
function c1111005.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
local dc=e:GetLabelObject()
if dc then
if dc:IsCode(1110111) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_GRAVE)
else
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
end
end
function c1111005.op1(e,tp,eg,ep,ev,re,r,rp)
local dc=e:GetLabelObject()
if dc and dc:IsCode(1110111) and Duel.IsExistingMatchingCard(c1111005.filter1,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1111005.filter1,tp,LOCATION_DECK,0,1,1,nil)
if dc and dc:IsCode(1110111) and Duel.IsExistingMatchingCard(c1111005.filter1,tp,LOCATION_GRAVE,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c1111005.filter1,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
if dc and dc:IsCode(1110112) and Duel.IsExistingMatchingCard(c1111005.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c1111005.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if dc and dc:IsCode(1110112) and Duel.IsExistingMatchingCard(c1111005.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectMatchingCard(tp,c1111005.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
end
......@@ -2,7 +2,7 @@
function c1111008.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DISABLE)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c1111008.cost1)
......@@ -58,34 +58,7 @@ function c1111008.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1111008.tfilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetType(EFFECT_TYPE_FIELD)
e1_1:SetTargetRange(0,LOCATION_MZONE)
e1_1:SetTarget(c1111008.tg1_1)
e1_1:SetReset(RESET_PHASE+PHASE_END)
e1_1:SetCode(EFFECT_DISABLE)
Duel.RegisterEffect(e1_1,tp)
local e1_2=Effect.CreateEffect(e:GetHandler())
e1_2:SetType(EFFECT_TYPE_FIELD)
e1_2:SetCode(EFFECT_IMMUNE_EFFECT)
e1_2:SetReset(RESET_PHASE+PHASE_END)
e1_2:SetTargetRange(0,LOCATION_MZONE)
e1_2:SetTarget(c1111008.tg1_2)
e1_2:SetValue(1)
Duel.RegisterEffect(e1_2,tp)
end
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c1111008.tg1_1(e,c)
return c:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL and c:IsFaceup()
end
function c1111008.tfilter1_2(c)
return c:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL and c:IsFaceup()
end
function c1111008.tg1_2(e,c)
local g=Duel.GetMatchingGroup(c1111008.tfilter1_2,tp,0,LOCATION_MZONE,nil)
return g
end
\ No newline at end of file
......@@ -37,7 +37,7 @@ function c1111009.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
local tc=e:GetLabelObject()
if tc and tc~=nil and ((c1111009.IsLd(tc) and tc:IsType(TYPE_MONSTER)) or tc:IsType(TYPE_SPELL)) then
if tc and tc~=nil and (c1111009.IsLd(tc) then
Duel.ConfirmCards(1-tp,tc)
if Duel.GetMatchingGroupCount(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(1111009,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
......
......@@ -55,7 +55,7 @@ function c1111203.con3(e,tp,eg,ep,ev,re,r,rp)
end
--
function c1111203.tfilter3(c)
return c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and (c:IsRace(RACE_FAIRY) or c:IsRace(RACE_PSYCHO)) and c:GetLevel()<4
return c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FAIRY) and (c:GetLevel()==5 or c:GetLevel()==3)
end
function c1111203.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1111203.tfilter3,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -155,7 +155,7 @@ function c1111401.op3_2(e,tp,eg,ep,ev,re,r,rp)
local e3_2_1=Effect.CreateEffect(e:GetHandler())
e3_2_1:SetType(EFFECT_TYPE_FIELD)
e3_2_1:SetCode(EFFECT_IMMUNE_EFFECT)
e3_2_1:SetTargetRange(LOCATION_SZONE,0)
e3_2_1:SetTargetRange(LOCATION_ONFIELD,0)
e3_2_1:SetReset(RESET_PHASE+PHASE_END)
e3_2_1:SetTarget(c1111401.tg3_2_1)
e3_2_1:SetValue(c1111401.efilter3_2_1)
......
......@@ -169,11 +169,7 @@ end
function c1111402.op4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsLocation(LOCATION_GRAVE) then
if Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 then
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
end
--
......
......@@ -95,7 +95,7 @@ function c1111403.op3(e,tp,eg,ep,ev,re,r,rp)
e3_1:SetCountLimit(1)
e3_1:SetLabelObject(e:GetHandler())
e3_1:SetCondition(c1111403.con3_1)
e3_1:SetCost(c111403.cost3_1)
e3_1:SetCost(c1111403.cost3_1)
e3_1:SetOperation(c1111403.op3_1)
tc:RegisterEffect(e3_1,true)
if e3_1:GetHandler()==nil then return end
......@@ -111,7 +111,7 @@ function c1111403.op3(e,tp,eg,ep,ev,re,r,rp)
e3_2:SetCountLimit(1)
e3_2:SetLabelObject(e:GetHandler())
e3_2:SetCondition(c1111403.con3_2)
e3_2:SetTarget(c111403.tg3_2)
e3_2:SetTarget(c1111403.tg3_2)
e3_2:SetOperation(c1111403.op3_2)
tc:RegisterEffect(e3_2,true)
if e3_2:GetHandler()==nil then return end
......@@ -125,8 +125,8 @@ function c1111403.op3(e,tp,eg,ep,ev,re,r,rp)
e3_3:SetCountLimit(1)
e3_3:SetLabelObject(e:GetHandler())
e3_3:SetCondition(c1111403.con3_3)
e3_3:SetCost(c111403.cost3_3)
e3_3:SetTarget(c111403.tg3_3)
e3_3:SetCost(c1111403.cost3_3)
e3_3:SetTarget(c1111403.tg3_3)
e3_3:SetOperation(c1111403.op3_3)
tc:RegisterEffect(e3_3,true)
if e3_3:GetHandler()==nil then return end
......
......@@ -5,14 +5,15 @@ function c1111501.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
-- e1:SetCost(c1111501.cost1)
e1:SetOperation(c1111501.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1111501,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetCountLimit(1,1111501)
e2:SetRange(LOCATION_FZONE)
e2:SetTarget(c1111501.tg2)
e2:SetOperation(c1111501.op2)
......@@ -20,7 +21,7 @@ function c1111501.initial_effect(c)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1111501,1))
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1)
......@@ -30,6 +31,7 @@ function c1111501.initial_effect(c)
e3:SetOperation(c1111501.op3)
c:RegisterEffect(e3)
--
Duel.AddCustomActivityCounter(1111501,ACTIVITY_SPSUMMON,c1111501.counterfilter)
end
--
c1111501.named_with_Ld=1
......@@ -38,27 +40,67 @@ function c1111501.IsLd(c)
return m and m.named_with_Ld
end
--
function c1111501.counterfilter(c)
return not (c:GetLevel()>7 and c:GetSummonLocation()==LOCATION_EXTRA)
end
--
function c1111501.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(1111501,tp,ACTIVITY_SPSUMMON)==0 end
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetType(EFFECT_TYPE_FIELD)
e1_1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1_1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1_1:SetTargetRange(1,0)
e1_1:SetTarget(c1111501.limit1_1)
e1_1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1_1,tp)
end
function c1111501.limit1_1(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and c:GetLevel()>7
end
--
function c1111501.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,1110199,0,0x4011,100,100,3,RACE_FAIRY,ATTRIBUTE_LIGHT) and Duel.SelectYesNo(tp,aux.Stringid(1111501,3)) then
local token=Duel.CreateToken(tp,1110199)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1_2=Effect.CreateEffect(e:GetHandler())
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_2:SetValue(c1111501.val1_2)
e1_2:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1_2,true)
end
end
end
function c1111501.val1_2(e,c)
return not c1111501.IsLd(c)
end
--
function c1111501.tfilter2(c,e,tp)
function c1111501.tfilter2_1(c)
return c:IsCode(1110004) and c:IsAbleToHand()
end
function c1111501.tfilter2_2(c)
return c:IsAbleToDeck()
end
function c1111501.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1111501.tfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c1111501.tfilter2_1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(c1111501.tfilter2_2,tp,LOCATION_HAND,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,0,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
--
function c1111501.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1111501.tfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c1111501.tfilter2_2,tp,LOCATION_HAND,0,2,2,nil)
if g:GetCount()==2 then
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c1111501.tfilter2_1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoHand(g2,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
end
end
--
......@@ -76,8 +118,8 @@ function c1111501.tfilter3(c,e,tp)
return c:IsCode(1110003) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1111501.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c1111501.tfilter3,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,LOCATION_DECK)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c1111501.tfilter3,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,LOCATION_DECK+LOCATION_GRAVE)
end
--
function c1111501.op3(e,tp,eg,ep,ev,re,r,rp)
......@@ -86,14 +128,7 @@ function c1111501.op3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c1111501.tfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.SelectYesNo(tp,aux.Stringid(1111501,2)) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetValue(2)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--
\ No newline at end of file
......@@ -40,7 +40,7 @@ function c1111502.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1111502.confilter2,tp,LOCATION_MZONE,0,1,nil)
end
function c1111502.filter2(c,e,tp)
return c:GetLevel()<4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:GetLevel()==3 and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1111502.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -33,6 +33,7 @@ function c12000010.activate1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
Duel.Draw(tp,1,REASON_EFFECT)
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
......
......@@ -39,29 +39,20 @@ function c12000039.initial_effect(c)
end
function c12000039.tfilter(c)
return c:IsSetCard(0xfbe) and c:IsType(TYPE_TOKEN)
return c:IsAbleToHand()
end
function c12000039.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c12000039.tfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectTarget(tp,c12000039.tfilter,tp,LOCATION_MZONE,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c12000039.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)==1 and tc:GetPreviousControler()==tp then
--indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE)
e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1ff0000+EVENT_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
function c12000039.costfilter(c,ft,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup() and c:IsAbleToDeckAsCost() and (ft>0 or (c:IsControler(tp) and c:IsLocation(LOCATION_SZONE)))
......
......@@ -6,10 +6,21 @@ function c12000042.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,12000042)
e1:SetCost(c12000042.spcost)
e1:SetTarget(c12000042.sptg)
e1:SetOperation(c12000042.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12000042,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,12000142)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c12000042.thtg)
e2:SetOperation(c12000042.thop)
c:RegisterEffect(e2)
end
function c12000042.tgfilter(c)
......@@ -72,6 +83,12 @@ function c12000042.spop(e,tp,eg,ep,ev,re,r,rp)
e5:SetValue(att)
e5:SetReset(RESET_EVENT+0xfe0000)
token:RegisterEffect(e5)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e8:SetValue(1)
e8:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e8,true)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Equip(tp,c,token)
c:CancelToGrave()
......@@ -83,50 +100,24 @@ function c12000042.spop(e,tp,eg,ep,ev,re,r,rp)
e6:SetValue(c12000042.eqlimit)
e6:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(12000042,0))
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e7:SetCode(EVENT_ATTACK_ANNOUNCE)
e7:SetRange(LOCATION_SZONE)
e7:SetCountLimit(1,12000142)
e7:SetReset(RESET_EVENT+0xfe0000)
e7:SetCost(c12000042.atkcost)
e7:SetCondition(c12000042.atkcon)
e7:SetTarget(c12000042.atktg)
e7:SetOperation(c12000042.atkop)
c:RegisterEffect(e7)
end
end
end
function c12000042.eqlimit(e,c)
return c:GetControler()==e:GetOwnerPlayer()
end
function c12000042.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()==e:GetHandler():GetEquipTarget()
function c12000042.thfilter(c)
return c:IsType(TYPE_RITUAL) and (c:IsType(TYPE_SPELL+TYPE_TRAP) or c:IsSetCard(0xfbe))
end
function c12000042.tgfilter1(c)
return c:IsSetCard(0xfbe) and c:IsAbleToGrave()
function c12000042.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000042.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12000042.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000042.tgfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c12000042.tgfilter1,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c12000042.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return ec and ec:GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end
end
function c12000042.atkop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
local c=e:GetHandler()
if c:IsRelateToEffect(e) and ec and ec:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(1)
ec:RegisterEffect(e1)
function c12000042.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12000042.thfilter,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
......@@ -22,6 +22,7 @@ function c12000047.initial_effect(c)
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,12000047)
e3:SetCondition(c12000047.tgcon)
e3:SetCost(c12000047.tgcost)
e3:SetTarget(c12000047.tgtg)
......@@ -33,7 +34,7 @@ function c12000047.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,23254089)
e4:SetCountLimit(1,12000147)
e4:SetCondition(c12000047.thcon)
e4:SetTarget(c12000047.thtg)
e4:SetOperation(c12000047.thop)
......@@ -43,7 +44,7 @@ function c12000047.initial_effect(c)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCountLimit(1,33254089)
e5:SetCountLimit(1,12000247)
e5:SetTarget(c12000047.eqtg)
e5:SetOperation(c12000047.operation)
c:RegisterEffect(e5)
......
......@@ -5,6 +5,7 @@ function c12000048.initial_effect(c)
e1:SetCategory(CATEGORY_HANDES+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,12000048)
e1:SetCost(c12000048.cost)
e1:SetTarget(c12000048.target)
e1:SetOperation(c12000048.activate)
......@@ -35,8 +36,8 @@ function c12000048.filter(c)
return c:IsAbleToHand() and c:IsSetCard(0xfbe)
end
function c12000048.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12000048.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(c12000048.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetChainLimit(c12000048.chlimit)
end
function c12000048.chlimit(e,ep,tp)
......@@ -44,7 +45,7 @@ function c12000048.chlimit(e,ep,tp)
end
function c12000048.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12000048.filter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c12000048.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
......@@ -43,6 +43,20 @@ function c12000050.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300)
end
function c12000050.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(c12000050.damval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c12000050.damval(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 then return 0
else return val end
end
\ No newline at end of file
--奇迹糕点 梅大福
function c12000054.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xfbe),aux.NonTuner(nil),1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c12000054.ctop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
e2:SetValue(c12000054.damval)
c:RegisterEffect(e1)
local e4=e1:Clone()
e4:SetCode(EFFECT_NO_EFFECT_DAMAGE)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12000054,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCost(c12000054.descost)
e3:SetCountLimit(1,12000054)
e3:SetTarget(c12000054.thtg)
e3:SetOperation(c12000054.thop)
c:RegisterEffect(e1)
end
function c12000054.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x10,2)
end
function c12000054.damval(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 then
e:GetHandler():AddCounter(0x10,1)
return 0
end
return val
end
function c12000054.filter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToHand()
end
function c12000054.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 c12000054.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c12000054.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c12000054.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.NegateEffect()
end
end
function c12000054.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x17,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x10,1,REASON_COST)
end
\ No newline at end of file
......@@ -37,61 +37,21 @@ function c13254033.initial_effect(c)
c:RegisterEffect(e4)
end
function c13254033.filter(c,e,tp)
return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsRace(RACE_FAIRY) and c:IsFaceup() and c:IsLevelBelow(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c13254033.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c13254033.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c13254033.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
local a=Duel.GetLocationCount(tp,LOCATION_MZONE)
if a>2 then a=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c13254033.filter,tp,LOCATION_REMOVED,0,1,a,nil,e,tp)
local g=Duel.SelectTarget(tp,c13254033.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c13254033.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
local tc=sg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
--cannot release
local e11=Effect.CreateEffect(e:GetHandler())
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e11:SetRange(LOCATION_MZONE)
e11:SetCode(EFFECT_UNRELEASABLE_SUM)
e11:SetValue(1)
e11:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e11)
local e12=e11:Clone()
e12:SetCode(EFFECT_UNRELEASABLE_NONSUM)
tc:RegisterEffect(e12)
local e13=Effect.CreateEffect(e:GetHandler())
e13:SetType(EFFECT_TYPE_SINGLE)
e13:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e13:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e13:SetValue(1)
e13:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e13)
local e14=e13:Clone()
e14:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e14)
local e15=e13:Clone()
e15:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e15)
local e16=Effect.CreateEffect(e:GetHandler())
e16:SetDescription(aux.Stringid(13254037,2))
e16:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e16:SetType(EFFECT_TYPE_SINGLE)
e16:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e16)
tc=sg:GetNext()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
function c13254033.splimit(e,c)
return not c:IsType(TYPE_FUSION)
end
function c13254033.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -107,7 +67,7 @@ function c13254033.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c13254033.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c13254033.tgfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,2,nil)
local g=Duel.SelectMatchingCard(tp,c13254033.tgfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
......
......@@ -20,13 +20,12 @@ function c13254041.initial_effect(c)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCategory(CATEGORY_RECOVER)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,13254041)
e3:SetCondition(c13254041.spcon)
e3:SetTarget(c13254041.sptg)
e3:SetOperation(c13254041.spop)
e3:SetTarget(c13254041.retg)
e3:SetOperation(c13254041.reop)
c:RegisterEffect(e3)
end
function c13254041.sfilter(c)
......@@ -92,22 +91,14 @@ function c13254041.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
function c13254041.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
function c13254041.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c13254041.spfilter(c,e,tp)
return c:IsSetCard(0x356) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c13254041.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13254041.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end
function c13254041.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,c13254041.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
function c13254041.reop(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.Recover(p,d,REASON_EFFECT)
end
......@@ -37,9 +37,20 @@ function c13254054.initial_effect(c)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,23254054)
e4:SetTarget(c13254054.target2)
e4:SetOperation(c13254054.operation2)
e4:SetTarget(c13254054.rectg)
e4:SetOperation(c13254054.recop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(13254054,3))
e5:SetCategory(CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(c13254054.rectg1)
e5:SetOperation(c13254054.recop1)
c:RegisterEffect(e5)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......@@ -117,17 +128,27 @@ end
function c13254054.filter1(c)
return c:IsCode(13254035) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c13254054.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c13254054.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c13254054.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c13254054.filter1,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,c13254054.filter1,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0)
end
function c13254054.operation2(e,tp,eg,ep,ev,re,r,rp)
function c13254054.recop(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 Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)~=1 then return end
Duel.BreakEffect()
Duel.Recover(tp,4000,REASON_EFFECT)
end
function c13254054.rectg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2000)
end
function c13254054.recop1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
......@@ -33,9 +33,9 @@ function c13254055.initial_effect(c)
--to grave
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(2,13254055)
e4:SetTarget(c13254055.target2)
e4:SetOperation(c13254055.operation2)
......@@ -105,16 +105,9 @@ function c13254055.spfilter(c,e,tp)
end
function c13254055.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c13254055.gvfilter(chkc) end
if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c13254055.gvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)) or (Duel.GetLocationCount(tp,LOCATION_MZONE)==0 and Duel.IsExistingTarget(c13254055.gvfilter,tp,LOCATION_MZONE,0,1,nil))
and Duel.IsExistingMatchingCard(c13254055.spfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c13254055.gvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c13254055.gvfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
if chk==0 then return Duel.IsExistingTarget(c13254055.gvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c13254055.gvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
......@@ -123,7 +116,7 @@ function c13254055.desop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13254055.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) then
and Duel.IsExistingMatchingCard(c13254055.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(13254055,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c13254055.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
......@@ -145,9 +138,9 @@ end
function c13254055.operation2(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 Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)~=1 then return end
Duel.BreakEffect()
local c=e:GetHandler()
if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)~=1 and c:IsRelateToEffect(e) then return end
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
......@@ -14,14 +14,13 @@ function c13254075.initial_effect(c)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(13254075,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,23254075)
e3:SetCondition(c13254075.spcon)
e3:SetTarget(c13254075.sptg)
e3:SetOperation(c13254075.spop)
e3:SetTarget(c13254075.damtg)
e3:SetOperation(c13254075.damop)
c:RegisterEffect(e3)
end
......@@ -81,49 +80,13 @@ function c13254075.operation(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e16)
end
end
function c13254075.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK)
function c13254075.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function c13254075.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 c13254075.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
--cannot release
local e11=Effect.CreateEffect(e:GetHandler())
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e11:SetRange(LOCATION_MZONE)
e11:SetCode(EFFECT_UNRELEASABLE_SUM)
e11:SetValue(1)
e11:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e11)
local e12=e11:Clone()
e12:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e12)
local e13=Effect.CreateEffect(e:GetHandler())
e13:SetType(EFFECT_TYPE_SINGLE)
e13:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e13:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e13:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e13:SetValue(1)
c:RegisterEffect(e13)
local e14=e13:Clone()
e14:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e14)
local e15=e13:Clone()
e15:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e15)
local e16=Effect.CreateEffect(e:GetHandler())
e16:SetDescription(aux.Stringid(13254037,2))
e16:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e16:SetType(EFFECT_TYPE_SINGLE)
e16:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e16)
end
function c13254075.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
......@@ -11,58 +11,56 @@ function c13254076.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(13254076,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_HAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1,13254076)
e2:SetCost(c13254076.drcost)
e2:SetCondition(c13254076.drcon)
e2:SetTarget(c13254076.drtg)
e2:SetOperation(c13254076.drop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_RELEASE)
e3:SetCountLimit(1,13254076)
e3:SetTarget(c13254076.thtg)
e3:SetOperation(c13254076.thop)
local e3=e2:Clone()
e3:SetCondition(c13254076.drcon1)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,23254076)
e4:SetTarget(c13254076.target)
e4:SetOperation(c13254076.operation)
c:RegisterEffect(e4)
end
function c13254076.cfilter(c)
return c:IsSetCard(0x356) and c:IsDiscardable()
function c13254076.drcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO
end
function c13254076.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable()
and Duel.IsExistingMatchingCard(c13254076.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c13254076.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST)
function c13254076.drcon1(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_FUSION
end
function c13254076.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c13254076.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c13254076.filter(c)
return c:IsCode(13254032) and c:IsAbleToHand()
return c:IsSetCard(0x356) and c:IsType(TYPE_MONSTER)
end
function c13254076.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
function c13254076.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13254076.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c13254076.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
function c13254076.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(13254076,2))
local g=Duel.SelectMatchingCard(tp,c13254076.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
if tc then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
end
......@@ -46,7 +46,7 @@ function c13254091.cfilter(c)
return c:IsSetCard(0x356) and c:IsDiscardable() and c:IsType(TYPE_MONSTER)
end
function c13254091.posfilter(c,tp)
return c:IsFaceup() and c:GetSummonPlayer()~=tp and c:IsCanTurnSet()
return c:IsFaceup() and c:GetSummonPlayer()~=tp and c:IsAttackPos()
end
function c13254091.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -63,14 +63,14 @@ function c13254091.postg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c13254091.postg2(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg:GetFirst()
if chk==0 then return rp==1-tp and tc:IsFaceup() and tc:IsCanTurnSet() and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return rp==1-tp and tc:IsFaceup() and tc:IsAttackPos() and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c13254091.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 then
if Duel.ChangePosition(g,POS_FACEUP_DEFENSE)~=0 then
--local og=Duel.GetOperatedGroup()
--local tc=og:GetFirst()
--while tc do
......
......@@ -59,13 +59,18 @@ function c13254092.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c13254092.rmfilter,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetChainLimit(c13254092.limit(eg))
end
function c13254092.limit(eg)
return function (e,lp,tp)
return not eg:IsContains(e:GetHandler())
end
end
function c13254092.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(c13254092.rmfilter,nil)
if g:GetCount()>0 then
local sg=g:RandomSelect(tp,1)
if g:GetCount()>1 then sg=g:RandomSelect(tp,2) end
if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or not c:IsRelateToEffect(e) then return end
Duel.BreakEffect()
......@@ -85,7 +90,7 @@ function c13254092.rmtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c13254092.rmop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c13254092.rmfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,2,nil)
local g=Duel.SelectMatchingCard(tp,c13254092.rmfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
......
......@@ -12,15 +12,13 @@ function c13254107.initial_effect(c)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(13254107,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCost(c13254107.cost)
e2:SetCondition(c13254107.drcon)
e2:SetTarget(c13254107.drtg)
e2:SetOperation(c13254107.drop)
e2:SetCondition(c13254107.thcon)
e2:SetTarget(c13254107.thtg)
e2:SetOperation(c13254107.thop)
c:RegisterEffect(e2)
--[local e3=Effect.CreateEffect(c)
--e3:SetDescription(1163)
......@@ -61,6 +59,18 @@ function c13254107.initial_effect(c)
e7:SetTargetRange(1,0)
e7:SetTarget(c13254107.splimit)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(13254107,0))
e8:SetCategory(CATEGORY_DESTROY)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e8:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e8:SetCode(EVENT_TO_GRAVE)
e8:SetRange(LOCATION_MZONE)
e8:SetCountLimit(1)
e8:SetCondition(c13254107.descon)
e8:SetTarget(c13254107.destg)
e8:SetOperation(c13254107.desop)
c:RegisterEffect(e8)
end
function c13254107.lfilter(c)
......@@ -69,30 +79,24 @@ end
function c13254107.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c13254107.cfilter(c)
return c:IsSetCard(0x356) and c:IsType(TYPE_MONSTER) and (c:IsAbleToDeckAsCost() or c:IsAbleToExtraAsCost())
end
function c13254107.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13254107.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
local cg=Duel.GetMatchingGroup(c13254107.cfilter,tp,LOCATION_GRAVE,0,nil)
local ct=cg:GetCount()
if ct>4 then ct=4 end
Duel.SendtoDeck(cg,nil,2,REASON_COST)
e:SetLabel(ct)
end
function c13254107.drcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function c13254107.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
local ct=e:GetLabel()
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
function c13254107.thfilter(c)
return c:IsSetCard(0x356) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c13254107.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
function c13254107.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c13254107.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c13254107.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c13254107.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c13254107.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
function c13254107.spfilter(c,e,tp)
return c:IsSetCard(0x356) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
......@@ -129,3 +133,22 @@ end
function c13254107.splimit(e,c,sump,sumtype,sumpos,targetp)
return not c:IsSetCard(0x356) or not c:IsType(TYPE_MONSTER)
end
function c13254107.cfilter(c,tp)
return c:IsSetCard(0x356) and c:GetPreviousControler()==tp
end
function c13254107.descon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c13254107.cfilter,1,nil,tp)
end
function c13254107.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c13254107.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--异域飞球
function c13254120.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,13254050,aux.FilterBoolFunction(c13254120.ffilter),2,true,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(c13254120.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(c13254120.sprcon)
e2:SetOperation(c13254120.sprop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(13254120,2))
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_TODECK)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c13254120.rmtg)
e3:SetOperation(c13254120.rmop)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_REMOVE)
e4:SetCountLimit(1,13254120)
e4:SetTarget(c13254120.sptg)
e4:SetOperation(c13254120.spop)
c:RegisterEffect(e4)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
e10:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e10:SetCode(EFFECT_CHANGE_LEVEL)
e10:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e10:SetValue(1)
c:RegisterEffect(e10)
end
function c13254120.ffilter(c)
return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1)
end
function c13254120.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
function c13254120.cfilter(c)
return (c:IsFusionCode(13254050) or (c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1)) and c:IsType(TYPE_MONSTER))
and c:IsCanBeFusionMaterial() and c:IsAbleToRemoveAsCost()
end
function c13254120.fcheck(c,sg)
return c:IsFusionCode(13254050) and sg:IsExists(c13254120.fcheck2,2,c)
end
function c13254120.fcheck2(c)
return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1)
end
function c13254120.fselect(c,tp,mg,sg)
sg:AddCard(c)
local res=false
if sg:GetCount()<3 then
res=mg:IsExists(c13254120.fselect,1,sg,tp,mg,sg)
elseif Duel.GetLocationCountFromEx(tp,tp,sg)>0 then
res=sg:IsExists(c13254120.fcheck,1,nil,sg)
end
sg:RemoveCard(c)
return res
end
function c13254120.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c13254120.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
return mg:IsExists(c13254120.fselect,1,nil,tp,mg,sg)
end
function c13254120.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c13254120.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup()
while sg:GetCount()<3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=mg:FilterSelect(tp,c13254120.fselect,1,1,sg,tp,mg,sg)
sg:Merge(g)
end
local cg=sg:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function c13254120.filter1(c)
return c:IsCode(13254036) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and c:IsFaceup()
end
function c13254120.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c13254120.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c13254120.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,c13254120.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0)
end
function c13254120.rmop(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 Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)~=1 then return end
Duel.BreakEffect()
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
end
function c13254120.spfilter(c,e,tp)
return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c13254120.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13254120.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c13254120.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,c13254120.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -29,6 +29,7 @@ function c13257311.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCondition(c13257311.econ)
e3:SetOperation(c13257311.atkop)
c:RegisterEffect(e3)
--disable
......
--超时空武装 副炮-穿甲导弹
function c13257327.initial_effect(c)
c:EnableReviveLimit()
--equip limit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_EQUIP_LIMIT)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e11:SetValue(c13257327.eqlimit)
c:RegisterEffect(e11)
--immune
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_IMMUNE_EFFECT)
e12:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e12:SetRange(LOCATION_SZONE)
e12:SetCondition(c13257327.econ)
e12:SetValue(c13257327.efilter)
c:RegisterEffect(e12)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(13257327,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetTarget(c13257327.destg)
e3:SetOperation(c13257327.desop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(13257327,1))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e4:SetCondition(c13257327.damcon)
e4:SetTarget(c13257327.damtg)
e4:SetOperation(c13257327.damop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_BATTLE_DESTROYED)
e5:SetCondition(c13257327.damcon1)
c:RegisterEffect(e5)
end
function c13257327.eqlimit(e,c)
return not c:GetEquipGroup():IsExists(Card.IsSetCard,1,e:GetHandler(),0x6352)
end
function c13257327.econ(e)
return e:GetHandler():GetEquipTarget()
end
function c13257327.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
function c13257327.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup()
end
function c13257327.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13257327.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c13257327.desfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c13257327.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c13257327.desfilter,tp,0,LOCATION_ONFIELD,nil)
if e:GetHandler():IsRelateToEffect(e) and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,1,nil)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
function c13257327.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsReason(REASON_EFFECT)
end
function c13257327.cfilter1(c,tp)
return c:GetPreviousControler()==tp and c:IsReason(REASON_BATTLE)
end
function c13257327.damcon(e,tp,eg,ep,ev,re,r,rp)
if not eg:IsExists(c13257327.cfilter,1,nil,1-tp) then return false end
local rc=re:GetHandler()
local c=e:GetHandler()
return c:GetEquipTarget() and (rc==c or rc==c:GetEquipTarget())
end
function c13257327.damcon1(e,tp,eg,ep,ev,re,r,rp)
if not eg:IsExists(c13257327.cfilter1,1,nil,1-tp) then return false end
local rc=eg:GetFirst():GetReasonCard()
local c=e:GetHandler()
return c:GetEquipTarget() and (rc==c or rc==c:GetEquipTarget())
end
function c13257327.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function c13257327.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 c13257328.initial_effect(c)
c:EnableReviveLimit()
--equip limit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_EQUIP_LIMIT)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e11:SetValue(c13257328.eqlimit)
c:RegisterEffect(e11)
--immune
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_IMMUNE_EFFECT)
e12:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e12:SetRange(LOCATION_SZONE)
e12:SetCondition(c13257328.econ)
e12:SetValue(c13257328.efilter)
c:RegisterEffect(e12)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(13257328,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetTarget(c13257328.destg)
e3:SetOperation(c13257328.desop)
c:RegisterEffect(e3)
end
function c13257328.eqlimit(e,c)
return not c:GetEquipGroup():IsExists(Card.IsSetCard,1,e:GetHandler(),0x6352)
end
function c13257328.econ(e)
return e:GetHandler():GetEquipTarget()
end
function c13257328.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
function c13257328.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c13257328.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c13257328.desfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c13257328.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c13257328.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c13257328.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--超时空武装 副炮-烈性炸弹
function c13257329.initial_effect(c)
c:EnableReviveLimit()
--equip limit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_EQUIP_LIMIT)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e11:SetValue(c13257329.eqlimit)
c:RegisterEffect(e11)
--immune
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_IMMUNE_EFFECT)
e12:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e12:SetRange(LOCATION_SZONE)
e12:SetCondition(c13257329.econ)
e12:SetValue(c13257329.efilter)
c:RegisterEffect(e12)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(700)
c:RegisterEffect(e1)
--def up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(200)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(13257329,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetCondition(c13257329.econ)
e3:SetTarget(c13257329.destg)
e3:SetOperation(c13257329.desop)
c:RegisterEffect(e3)
end
function c13257329.eqlimit(e,c)
return not c:GetEquipGroup():IsExists(Card.IsSetCard,1,e:GetHandler(),0x6352)
end
function c13257329.econ(e)
return e:GetHandler():GetEquipTarget()
end
function c13257329.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
function c13257329.desfilter(c,ec)
return ec:GetColumnGroup():IsContains(c) and c:IsFaceup()
end
function c13257329.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return Duel.IsExistingTarget(c13257329.desfilter,tp,0,LOCATION_ONFIELD,1,nil,ec) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c13257329.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil,ec)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c13257329.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--超时空武装 副炮-双向导弹
function c13257330.initial_effect(c)
c:EnableReviveLimit()
--equip limit
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_EQUIP_LIMIT)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e11:SetValue(c13257330.eqlimit)
c:RegisterEffect(e11)
--immune
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_IMMUNE_EFFECT)
e12:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e12:SetRange(LOCATION_SZONE)
e12:SetCondition(c13257330.econ)
e12:SetValue(c13257330.efilter)
c:RegisterEffect(e12)
--def up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(500)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(13257329,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCondition(c13257330.econ)
e3:SetTarget(c13257330.destg)
e3:SetOperation(c13257330.desop)
c:RegisterEffect(e3)
end
function c13257330.eqlimit(e,c)
return not c:GetEquipGroup():IsExists(Card.IsSetCard,1,e:GetHandler(),0x6352)
end
function c13257330.econ(e)
return e:GetHandler():GetEquipTarget()
end
function c13257330.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
function c13257330.desfilter(c,ec)
return not ec:GetColumnGroup():IsContains(c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup()
end
function c13257330.leftfilter(c,seq)
return c:GetSequence()>4-seq and c:GetSequence()<=5
end
function c13257330.rightfilter(c,seq)
return c:GetSequence()<4-seq or c:GetSequence()==5
end
function c13257330.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return Duel.IsExistingMatchingCard(c13257330.desfilter,tp,0,LOCATION_ONFIELD,1,nil,ec) end
local g=Duel.GetMatchingGroup(c13257330.desfilter,tp,0,LOCATION_ONFIELD,nil,ec)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c13257330.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local ec=e:GetHandler():GetEquipTarget()
local g=Duel.GetMatchingGroup(c13257330.desfilter,tp,0,LOCATION_ONFIELD,nil,ec)
if g:GetCount()>0 then
local seq=ec:GetSequence()
local sg=Group.CreateGroup()
local g1=g:Filter(c13257330.leftfilter,nil,seq)
local g2=g:Filter(c13257330.rightfilter,nil,seq)
if g1:GetCount()>0 and (g2:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(13257330,1))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
sg:Merge(sg1)
if sg1:GetFirst():IsLocation(LOCATION_FZONE) then
g2:Sub(sg1)
end
end
if g2:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(13257330,2))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg2=g2:Select(tp,1,1,nil)
Duel.HintSelection(sg2)
sg:Merge(sg2)
end
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
end
--七曜魔女-帕秋莉·诺蕾姬
function c2170701.initial_effect(c)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(2170701,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c2170701.shtg)
e2:SetOperation(c2170701.shop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(2170701,1))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,2170701)
e2:SetTarget(c2170701.destg)
e2:SetOperation(c2170701.desop)
c:RegisterEffect(e2)
end
function c2170701.filter(c)
return c:IsSetCard(0x211) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c2170701.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c2170701.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c2170701.shop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c2170701.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
function c2170701.cfilter(c)
return c:IsSetCard(0x211) and c:IsDiscardable()
end
function c2170701.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingMatchingCard(c2170701.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.DiscardHand(tp,c2170701.cfilter,1,1,REASON_COST+REASON_DISCARD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0)
end
function c2170701.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--七曜-火符『火天神印』
function c2170702.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,2170702+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c2170702.condition)
e1:SetTarget(c2170702.target)
e1:SetOperation(c2170702.activate)
c:RegisterEffect(e1)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c2170702.condition2)
e1:SetCost(c2170702.thcost)
e1:SetTarget(c2170702.thtg)
e1:SetOperation(c2170702.thop)
c:RegisterEffect(e1)
end
function c2170702.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c2170702.spfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsFaceup()
end
function c2170702.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c2170702.spfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c2170702.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c2170702.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetValue(600)
tc: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_IMMUNE_EFFECT)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e2:SetValue(c2170702.efilter)
tc:RegisterEffect(e2)
end
end
function c2170702.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c2170702.condition2(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:GetControler()~=tp and Duel.GetAttackTarget()==nil
end
function c2170702.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c2170702.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker()
if chkc then return chkc==tg end
if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg)
local dam=tg:GetAttack()
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function c2170702.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.NegateAttack() then
Duel.Damage(1-tp,tc:GetAttack(),REASON_EFFECT)
end
end
end
\ No newline at end of file
--七曜-水符『水精公主』
function c2170703.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,2170703+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c2170703.target)
e1:SetOperation(c2170703.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(2170703,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(c2170703.thcost)
e2:SetTarget(c2170703.thtg)
e2:SetOperation(c2170703.thop)
c:RegisterEffect(e2)
end
function c2170703.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,2170798,0x211,0x4011,1600,1000,4,RACE_SPELLCASTER,ATTRIBUTE_WATER) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c2170703.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.IsPlayerCanSpecialSummonMonster(tp,2170798,0,0x4011,1600,1000,4,RACE_SPELLCASTER,ATTRIBUTE_WATER)
end
local token=Duel.CreateToken(tp,2170798)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
function c2170703.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c2170703.filter(c)
return c:IsSetCard(0x211) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c2170703.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c2170703.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c2170703.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c2170703.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c2170703.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
\ No newline at end of file
--七曜-木符『翠绿风暴』
function c2170704.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,2170704+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c2170704.target)
e1:SetOperation(c2170704.activate)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(2170704,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c2170704.sdcon)
e2:SetCost(c2170704.descost)
e2:SetTarget(c2170704.destg)
e2:SetOperation(c2170704.activate1)
c:RegisterEffect(e2)
end
function c2170704.filter(c)
return c:IsSetCard(0x211) and c:IsAbleToHand() and c:IsType(TYPE_SPELL)
end
function c2170704.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c2170704.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c2170704.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c2170704.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
function c2170704.sdfilter(c)
return c:IsFaceup() and c:IsSetCard(0x211)
end
function c2170704.sdcon(e)
return Duel.IsExistingMatchingCard(c2170704.sdfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,e:GetHandler())
end
function c2170704.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c2170704.filter2(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c2170704.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c2170704.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c2170704.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c2170704.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c2170704.activate1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--七曜-金符『银龙』
function c2170705.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,2170705+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(2170705,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCondition(c2170705.descon)
e3:SetTarget(c2170705.destg)
e3:SetOperation(c2170705.desop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetTarget(c2170705.thtg)
e4:SetOperation(c2170705.thop)
c:RegisterEffect(e4)
end
function c2170705.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
local loc,np=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_CONTROLER)
return loc==LOCATION_SZONE and np==tp and re:IsActiveType(TYPE_SPELL) and rc:IsSetCard(0x211)
end
function c2170705.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c2170705.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c2170705.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,2170799,0x211,0x4011,2100,1500,6,RACE_DRAGON,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c2170705.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.IsPlayerCanSpecialSummonMonster(tp,2170799,0,0x4011,2100,1500,6,RACE_DRAGON,ATTRIBUTE_LIGHT)
end
local token=Duel.CreateToken(tp,2170799)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--七曜-土符『慵懒三石塔』
function c2170706.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,2170706+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c2170706.activate)
c:RegisterEffect(e1)
--cannot remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c2170706.sdcon)
e2:SetTarget(c2170706.rmtarget)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
c:RegisterEffect(e2)
end
function c2170706.filter(c)
return c:IsCode(2170701) and c:IsAbleToHand()
end
function c2170706.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c2170706.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(2170706,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c2170706.rmtarget(e,c)
return not c:IsSetCard(0x211)
end
function c2170706.sdfilter(c)
return c:IsFaceup() and c:IsSetCard(0x211)
end
function c2170706.sdcon(e)
return Duel.IsExistingMatchingCard(c2170706.sdfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil)
end
\ No newline at end of file
--七曜-日符『皇家圣焰』
function c2170707.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,2170707+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c2170707.target)
e1:SetOperation(c2170707.activate)
c:RegisterEffect(e1)
end
function c2170707.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsDestructable()
end
function c2170707.cffilter(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x211) and not c:IsPublic()
end
function c2170707.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c2170707.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c2170707.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(c2170707.cffilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
local rt=Duel.GetTargetCount(c2170707.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,c2170707.cffilter,tp,LOCATION_HAND,0,1,99,e:GetHandler())
Duel.ConfirmCards(1-tp,cg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c2170707.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,0,cg:GetCount(),nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.ShuffleHand(tp)
end
function c2170707.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local rg=tg:Filter(Card.IsRelateToEffect,nil,e)
if rg:GetCount()>0 then
Duel.Destroy(rg,REASON_EFFECT)
end
end
\ No newline at end of file
--七曜-月符『沉静的月神』
function c2170708.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,2170708+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c2170708.sdcon)
e1:SetHintTiming(0,0x1c0)
e1:SetTarget(c2170708.target)
e1:SetOperation(c2170708.activate)
c:RegisterEffect(e1)
end
function c2170708.sdfilter(c)
return c:IsFaceup() and c:IsSetCard(0x211)
end
function c2170708.sdcon(e)
return Duel.IsExistingMatchingCard(c2170708.sdfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,2,e:GetHandler())
end
function c2170708.filter(c)
return c:IsFaceup() and not c:IsDisabled()
end
function c2170708.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and c2170708.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c2170708.filter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c2170708.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
end
function c2170708.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() and tc:IsControler(1-tp) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
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:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--七曜-『贤者之石』
function c2170709.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x211),1)
c:EnableReviveLimit()
--spsommon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(2170709,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,21707091)
e3:SetCost(c2170709.cost)
e3:SetTarget(c2170709.target)
e3:SetOperation(c2170709.operation)
c:RegisterEffect(e3)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(2170709,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_EXTRA)
e2:SetCountLimit(1,21707092)
e2:SetCondition(c2170709.condition)
e2:SetTarget(c2170709.pentg)
e2:SetOperation(c2170709.penop)
c:RegisterEffect(e2)
if not c2170709.global_check then
c2170709.global_check=true
c2170709[0]=0
c2170709[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c2170709.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(c2170709.clear)
Duel.RegisterEffect(ge2,0)
end
end
function c2170709.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if tc:IsCode(2170702) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
c2170709[tc:GetControler()]=c2170709[tc:GetControler()]+1
end
if tc:IsCode(2170703) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
c2170709[tc:GetControler()]=c2170709[tc:GetControler()]+1
end
if tc:IsCode(2170704) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
c2170709[tc:GetControler()]=c2170709[tc:GetControler()]+1
end
if tc:IsCode(2170705) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
c2170709[tc:GetControler()]=c2170709[tc:GetControler()]+1
end
if tc:IsCode(2170706) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
c2170709[tc:GetControler()]=c2170709[tc:GetControler()]+1
end
end
function c2170709.clear(e,tp,eg,ep,ev,re,r,rp)
c2170709[0]=0
c2170709[1]=0
end
function c2170709.condition(e,tp,eg,ep,ev,re,r,rp)
return c2170709[e:GetHandler():GetControler()]>=5
end
function c2170709.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c2170709.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function c2170709.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c2170709.filter(c,e,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c2170709.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c2170709.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c2170709.operation(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,c2170709.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--七曜-土水符『诺亚的大洪水』
function c2170710.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x211),1)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(2170710,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,21707121)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0)
e1:SetTarget(c2170710.destg)
e1:SetOperation(c2170710.desop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(2170710,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_EXTRA)
e2:SetCountLimit(1,2170710)
e2:SetCondition(c2170710.condition)
e2:SetTarget(c2170710.pentg)
e2:SetOperation(c2170710.penop)
c:RegisterEffect(e2)
if not c2170710.global_check then
c2170710.global_check=true
c2170710[0]=0
c2170710[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c2170710.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(c2170710.clear)
Duel.RegisterEffect(ge2,0)
end
end
function c2170710.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if tc:IsCode(2170703) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
c2170710[tc:GetControler()]=c2170710[tc:GetControler()]+1
end
if tc:IsCode(2170706) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
c2170710[tc:GetControler()]=c2170710[tc:GetControler()]+1
end
end
function c2170710.clear(e,tp,eg,ep,ev,re,r,rp)
c2170710[0]=0
c2170710[1]=0
end
function c2170710.condition(e,tp,eg,ep,ev,re,r,rp)
return c2170710[e:GetHandler():GetControler()]>=2
end
function c2170710.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c2170710.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function c2170710.filter(c)
return c:IsSetCard(0x211) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c2170710.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c2170710.filter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectTarget(tp,c2170710.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
end
function c2170710.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
--七曜-金木符『元素收获者』
function c2170711.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x211),1)
c:EnableReviveLimit()
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(2170711,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,21707111)
e3:SetTarget(c2170711.target)
e3:SetOperation(c2170711.operation)
c:RegisterEffect(e3)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(2170711,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_EXTRA)
e2:SetCountLimit(1,2170711)
e2:SetCondition(c2170711.condition)
e2:SetTarget(c2170711.pentg)
e2:SetOperation(c2170711.penop)
c:RegisterEffect(e2)
if not c2170711.global_check then
c2170711.global_check=true
c2170711[0]=0
c2170711[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c2170711.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(c2170711.clear)
Duel.RegisterEffect(ge2,0)
end
end
function c2170711.efilter1(e,te)
return te:IsCode(2170704)
end
function c2170711.efilter2(e,te)
return te:IsCode(2170705)
end
function c2170711.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if tc:IsCode(2170705) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
c2170711[tc:GetControler()]=c2170711[tc:GetControler()]+1
end
if tc:IsCode(2170704) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
c2170711[tc:GetControler()]=c2170711[tc:GetControler()]+1
end
end
function c2170711.clear(e,tp,eg,ep,ev,re,r,rp)
c2170711[0]=0
c2170711[1]=0
end
function c2170711.condition(e,tp,eg,ep,ev,re,r,rp)
return c2170711[e:GetHandler():GetControler()]>=2
end
function c2170711.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c2170711.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function c2170711.filter(c)
return c:IsSetCard(0x211) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c2170711.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c2170711.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c2170711.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c2170711.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
\ No newline at end of file
--七曜-土金符『翡翠巨城』
function c2170712.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x211),1)
c:EnableReviveLimit()
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(2170712,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,21707121)
e3:SetCost(c2170712.cost)
e3:SetTarget(c2170712.target)
e3:SetOperation(c2170712.operation)
c:RegisterEffect(e3)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(2170712,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_EXTRA)
e2:SetCountLimit(1,2170712)
e2:SetCondition(c2170712.condition)
e2:SetTarget(c2170712.pentg)
e2:SetOperation(c2170712.penop)
c:RegisterEffect(e2)
if not c2170712.global_check then
c2170712.global_check=true
c2170712[0]=0
c2170712[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c2170712.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(c2170712.clear)
Duel.RegisterEffect(ge2,0)
end
end
function c2170712.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if tc:IsCode(2170705) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
c2170712[tc:GetControler()]=c2170712[tc:GetControler()]+1
end
if tc:IsCode(2170706) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
c2170712[tc:GetControler()]=c2170712[tc:GetControler()]+1
end
end
function c2170712.clear(e,tp,eg,ep,ev,re,r,rp)
c2170712[0]=0
c2170712[1]=0
end
function c2170712.condition(e,tp,eg,ep,ev,re,r,rp)
return c2170712[e:GetHandler():GetControler()]>=2
end
function c2170712.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c2170712.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function c2170712.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c2170712.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c2170712.filter,1,1,REASON_COST+REASON_DISCARD)
end
function c2170712.filter(c)
return c:IsSetCard(0x211) and c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function c2170712.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c2170712.operation(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.Draw(p,d,REASON_EFFECT)
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
--七曜-日水符『氢化日珥』
function c2170713.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x211),1)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(2170713,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,21707131)
e1:SetTarget(c2170713.target)
e1:SetOperation(c2170713.operation)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(2170713,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_EXTRA)
e2:SetCountLimit(1,2170713)
e2:SetCondition(c2170713.condition)
e2:SetTarget(c2170713.pentg)
e2:SetOperation(c2170713.penop)
c:RegisterEffect(e2)
if not c2170713.global_check then
c2170713.global_check=true
c2170713[0]=0
c2170713[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c2170713.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(c2170713.clear)
Duel.RegisterEffect(ge2,0)
end
end
function c2170713.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if tc:IsCode(2170703) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
c2170713[tc:GetControler()]=c2170713[tc:GetControler()]+1
end
if tc:IsCode(2170707) and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
c2170713[tc:GetControler()]=c2170713[tc:GetControler()]+1
end
end
function c2170713.clear(e,tp,eg,ep,ev,re,r,rp)
c2170713[0]=0
c2170713[1]=0
end
function c2170713.condition(e,tp,eg,ep,ev,re,r,rp)
return c2170713[e:GetHandler():GetControler()]>=2
end
function c2170713.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c2170713.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function c2170713.filter(c)
return c:IsFaceup()
end
function c2170713.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c2170713.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c2170713.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c2170713.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local atk=g:GetFirst():GetTextAttack()
if atk<0 then atk=0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end
function c2170713.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -21,7 +21,7 @@ function c22230004.initial_effect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,22230004)
e1:SetTarget(c22230004.sptg)
e1:SetOperation(c22230004.spop)
......@@ -76,7 +76,7 @@ end
function c22230004.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
if Duel.ChangePosition(tc,POS_FACEDOWN)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsRelateToEffect(e) then
if Duel.ChangePosition(tc,POS_FACEDOWN)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
end
end
......
--动物朋友 赛马
local m=33700179
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c,false)
Senya.AddXyzProcedureCustom(c,aux.FilterBoolFunction(Card.IsSetCard,0x442),function(g) return g:GetClassCount(Card.GetCode)==2 end,2,2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetTargetRange(1,0)
e2:SetTarget(function(e,c,tp,sumtp,sumpos)
return bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_PZONE)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(0x14000)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp
end)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCondition(function(e)
return e:GetHandler():IsFaceup() and e:GetHandler():IsLocation(LOCATION_PZONE)
end)
e3:SetValue(LOCATION_GRAVE)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(function(e,re,tp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return g:IsContains(e:GetHandler())
end)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ATTACK_ALL)
e2:SetValue(1)
e2:SetCondition(function(e)
return e:GetHandler():GetOverlayCount()==0
end)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(function(e,tp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return g:GetClassCount()==g:GetCount()
end)
e2:SetCost(function(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)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(-1000)
e2:SetReset(0x1fe1000)
tc:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(-1000)
e2:SetReset(0x1fe1000)
tc:RegisterEffect(e2)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e2:SetReset(0x1fe1000)
c:RegisterEffect(e2)
end)
c:RegisterEffect(e2)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_LEAVE_FIELD)
e6:SetProperty(0x14000)
e6:SetCondition(cm.pencon)
e6:SetTarget(cm.pentg)
e6:SetOperation(cm.penop)
c:RegisterEffect(e6)
end
function cm.filter(c)
return c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsSetCard(0x442) and c:IsAbleToHand()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(cm.filter,nil)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and g:GetCount()>0 end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=eg:Filter(Senya.AND(cm.filter,function(c) return c:IsRelateToEffect(e) end),nil)
if g:GetCount()>0 and Duel.SendtoHand(g,tp,REASON_EFFECT) then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--JRA薮猫
local m=33700180
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(33700055)
c:RegisterEffect(e1)
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(cm.spcon)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
end
function cm.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.DiscardDeck(p,d,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsCode,1,nil,33700055) and c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1000)
e2:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e2:SetReset(0x1fe1000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
\ No newline at end of file
--动物朋友 狞猫
local m=33700181
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m)
e2:SetCost(Senya.SelfDiscardCost)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function cm.thfilter(c)
return c:IsSetCard(0x442) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(m)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
if tc:IsLocation(LOCATION_HAND) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.aclimit(e,re,tp)
local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e)
end
function cm.filter(c,e,tp)
return c:IsCode(33700055) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.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 cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) and c:IsAbleToHand() and Duel.SelectYesNo(tp,m*16) then
Duel.BreakEffect()
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--Nanahira & Tsubaki
local m=37564563
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
cm.Senya_desc_with_nanahira=true
function cm.initial_effect(c)
Senya.Nanahira(c)
Senya.AddSummonMusic(c,aux.Stringid(m,3),SUMMON_TYPE_ADVANCE)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(cm.otcon)
e1:SetOperation(cm.otop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_HAND)
e4:SetTarget(cm.sumtg)
e4:SetOperation(cm.sumop)
c:RegisterEffect(e4)
Senya.NegateEffectModule(c,1,nil,nil,function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE) end)
end
function cm.otfilter(c)
return c:IsType(TYPE_COUNTER) and c:IsReleasable()
end
function cm.otcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(cm.otfilter,tp,LOCATION_SZONE,0,nil)
return c:GetLevel()>6 and minc<=2
and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>=2
or Duel.CheckTribute(c,1) and mg:GetCount()>=1)
or c:GetLevel()>4 and c:GetLevel()<=6 and minc<=1
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>=1
end
function cm.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(cm.otfilter,tp,LOCATION_SZONE,0,nil)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>=2
local b2=Duel.CheckTribute(c,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=mg:Select(tp,1,1,nil)
if c:GetLevel()>6 then
local g2=nil
if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(m,1))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g2=mg:Select(tp,1,1,g:GetFirst())
else
g2=Duel.SelectTribute(tp,c,1,1)
end
g:Merge(g2)
end
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,c,1,0,0)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pos=0
if c:IsSummonable(true,nil,1) then pos=pos+POS_FACEUP_ATTACK end
if c:IsMSetable(true,nil,1) then pos=pos+POS_FACEDOWN_DEFENSE end
if pos==0 then return end
if Duel.SelectPosition(tp,c,pos)==POS_FACEUP_ATTACK then
Duel.Summon(tp,c,true,nil,1)
else
Duel.MSet(tp,c,true,nil,1)
end
end
\ No newline at end of file
......@@ -12,12 +12,10 @@ function c710231.initial_effect(c)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,710331)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(c710231.setcost)
e2:SetTarget(c710231.settg)
e2:SetOperation(c710231.setop)
......
......@@ -60,6 +60,10 @@ function c710239.initial_effect(c)
e7:SetCode(EFFECT_EQUIP_LIMIT)
e7:SetValue(1)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_EQUIP)
e8:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
c:RegisterEffect(e8)
end
c710239.is_named_with_Relic=1
......@@ -134,7 +138,7 @@ function c710239.spfilter(c)
end
function c710239.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,710239,c710239.spfilter,0x11,0,2400,5,RACE_WARRIOR,ATTRIBUTE_WIND)
and Duel.IsPlayerCanSpecialSummonMonster(tp,710239,c710239.spfilter,0x1011,0,2400,5,RACE_WARRIOR,ATTRIBUTE_WIND)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
......@@ -157,3 +161,6 @@ function c710239.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c710239.acon(e)
return e:GetOwner():IsHasCardTarget(e:GetHandler()) and e:GetHandlerPlayer()==e:GetLabel()
end
\ No newline at end of file
......@@ -9,7 +9,7 @@ function c710245.initial_effect(c)
e1:SetTarget(c710245.thtg)
e1:SetOperation(c710245.thop)
c:RegisterEffect(e1)
--tohand
--epuip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_QUICK_O)
......
......@@ -117,13 +117,14 @@ function c710250.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c710250.spfilter1(c,e,tp)
return c710250.IsTheLostSpirit(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c710250.IsTheLostSpirit(c) and not c:IsCode(710250) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c710250.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToDeck() end
if chk==0 then return e:GetHandler():IsAbleToExtra()
and Duel.IsExistingMatchingCard(c710250.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.GetLocationCountFromEx(tp)>0
and Duel.GetLocationCountFromEx(tp,tp,c)>0
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
......
--失落英魂-伏羲
function c710252.initial_effect(c)
c:SetUniqueOnField(1,1,710252)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c710252.splimit)
c:RegisterEffect(e0)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -99,9 +92,6 @@ function c710252.IsRelic(c)
end
function c710252.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
function c710252.rfilter(c,fc)
return (c710252.IsRelic(c) or c:IsType(TYPE_MONSTER))
and c:IsCanBeFusionMaterial(fc)
......
--失落英魂-莎士比亚
if not pcall(function() require("expansions/script/c700000") end) then require("script/c700000") end
function c710253.initial_effect(c)
c:SetUniqueOnField(1,1,710253)
aux.AddLinkProcedure(c,c710253.matfilter,3,3)
--change
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(710253,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1)
e1:SetCost(c710253.chcost)
e1:SetTarget(c710253.chtg)
e1:SetOperation(c710253.chop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetDescription(aux.Stringid(710253,2))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_EQUIP)
e2:SetCountLimit(1)
e2:SetTarget(c710253.sptg)
e2:SetOperation(c710253.spop)
c:RegisterEffect(e2)
end
c710253.is_named_with_TheLostSpirit=1
function c710253.IsTheLostSpirit(c)
local code=c:GetCode()
local mt=_G["c"..code]
if not mt then
_G["c"..code]={}
if pcall(function() dofile("expansions/script/c"..code..".lua") end) or pcall(function() dofile("script/c"..code..".lua") end) then
mt=_G["c"..code]
_G["c"..code]=nil
else
_G["c"..code]=nil
return false
end
end
return mt and mt.is_named_with_TheLostSpirit
end
function c710253.matfilter(c)
return c:IsLinkType(TYPE_MONSTER) and not c:IsLinkType(TYPE_TOKEN)
end
function c710253.chfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsDiscardable()
end
function c710253.chcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c710253.chfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c710253.chfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c710253.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c710253.chop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(710253,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(710253)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(0x085)
c:RegisterEffect(e1,true)
end
function c710253.spfilter(c,e,tp,zone)
return c710253.IsTheLostSpirit(c) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_DEFENSE,tp,zone,true)
end
function c710253.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=e:GetHandler():GetLinkedZone()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c710253.spfilter(chkc,e,tp,zone) end
if chk==0 then return zone~=0
and Duel.IsExistingTarget(c710253.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c710253.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c710253.spop(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and zone~=0 then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP_DEFENSE,zone)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetOperation(c710253.tdop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c710253.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
......@@ -114,7 +114,8 @@ function c777007.tdfilter(c)
end
function c777007.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost()
and Duel.IsExistingMatchingCard(c777007.tdfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp) end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
......
......@@ -27,6 +27,7 @@
!setname 0x9129 奇迹
!setname 0xa219 秘术
!setname 0x21c 乌莉丝
!setname 0x211 七曜
#set-without-id 圣白龙
......@@ -111,7 +112,7 @@
#兔锅 222
#named_with_Shirasawa_Tama 白泽球
#named_with_Darkest_D DDD
#named_with_Darkest_D Darkest
#Nemoma 337 0x440-0x44f
!setname 0x442 动物朋友
......
......@@ -2,6 +2,8 @@
!2017.7 DIY
#7
00710230 2 --电子水蓝 圣徒
00710250 1 --失落英魂-姬轩辕
00710236 2 --圣遗物-支配之镰
#11
01111009 0 --拂晓彷徨之风
01111501 0 --灵都·命运交错
......@@ -18,8 +20,6 @@
12000001 2 --奇迹糕点 水果茶会
12000002 1 --奇迹糕点 甜点风暴
12000003 1 --奇迹糕点 糕点爆发
#奇迹糕点 马卡龙皇后
#奇迹糕点 黑白皇后
12000008 2 --奇迹糕点 抹茶巴菲
#21
02100008 1 --银屑照魂 梨涅莎
......@@ -50,18 +50,17 @@
16081001 2 --咸鱼征服者 奥丁
16081010 0 --重金属狂欢 关岛
#170
#巴哈姆特
#214
#222
22220005 2 --狂气的白泽球
#传统的白泽球
22220163 1 --乐园最高白泽球
#白泽球的蓝色幻想
#337
33700081 2 --动物朋友 鲸头鹳
33700082 1 --动物朋友 东之青龙
33700085 1 --动物朋友 西之白虎
33700181 1 --动物朋友 狞猫
#375
37564017 1 --Blue Rose Ruin
37564023 1 --天空元灵·翠黛伦
......
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