Commit 453147d7 authored by Tachibana's avatar Tachibana

得得得得得

parent 419e618d
Pipeline #12142 passed with stages
in 32 minutes and 23 seconds
...@@ -68,6 +68,6 @@ function c12301117.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,6 +68,6 @@ function c12301117.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
tg=tg:Filter(Card.IsRelateToEffect,nil,e) tg=tg:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then if tg:GetCount()>0 then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -16,6 +16,7 @@ function c12892003.initial_effect(c) ...@@ -16,6 +16,7 @@ function c12892003.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS) e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCondition(cm.ycon)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,12892103) e3:SetCountLimit(1,12892103)
e3:SetTarget(cm.sptg) e3:SetTarget(cm.sptg)
...@@ -38,6 +39,12 @@ function c12892003.initial_effect(c) ...@@ -38,6 +39,12 @@ function c12892003.initial_effect(c)
e5:SetTarget(cm.target) e5:SetTarget(cm.target)
e5:SetOperation(cm.operation) e5:SetOperation(cm.operation)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e6:SetValue(1)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE) e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) e7:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
...@@ -72,8 +79,13 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,8 +79,13 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function cm.condition(c,e,tp,eg,ep,ev,re,r,rp) function cm.ycon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,c) local c=e:GetHandler()
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,c)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,c)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0x7a72) return re and re:GetHandler():IsSetCard(0x7a72)
...@@ -90,4 +102,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,4 +102,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -6,6 +6,7 @@ function cm.initial_effect(c) ...@@ -6,6 +6,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMING_SSET+TIMING_DRAW_PHASE+TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(cm.accost) e1:SetCost(cm.accost)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -53,24 +54,27 @@ end ...@@ -53,24 +54,27 @@ end
function cm.filter(c) function cm.filter(c)
return c:IsSetCard(0x1535) and c:IsType(TYPE_TRAP) and c:IsSSetable(true) return c:IsSetCard(0x1535) and c:IsType(TYPE_TRAP) and c:IsSSetable(true)
end end
function cm.fselect(g,ft)
return ft>=g:FilterCount(function(c)return not c:IsLocation(LOCATION_SZONE) or c:GetSequence()==5 end,nil)
end
function cm.accost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.accost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local dct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_DECK,0,nil) local dct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_DECK,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,c) and dct>0 end local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD,0,c)
local sct=2 local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if dct<sct then sct=dct end if chk==0 then return g:CheckSubGroup(cm.fselect,1,math.min(2,dct),ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_ONFIELD,0,1,sct,c) local sg=g:SelectSubGroup(tp,cm.fselect,false,1,math.min(2,dct),ft)
local ct=Duel.SendtoGrave(g,REASON_COST) local ct=Duel.SendtoGrave(sg,REASON_COST)
e:SetLabel(ct) e:SetLabel(ct)
Debug.Message(ct)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel() local ct=e:GetLabel()
Debug.Message(ct)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,ct,nil) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,ct,nil)
if g:GetCount()>0 then if g:GetCount()>0 then Duel.SSet(tp,g) end
Duel.SSet(tp,g)
end
end end
function cm.atkcfilter(c,tp) function cm.atkcfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:GetSummonPlayer()==tp return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:GetSummonPlayer()==tp
......
...@@ -59,10 +59,7 @@ function cm.initial_effect(c) ...@@ -59,10 +59,7 @@ function cm.initial_effect(c)
end end
mc:SetMaterial(g) mc:SetMaterial(g)
end end
cm[1](g,reason) return cm[1](g,reason)
if #res>0 then
for i=1,#res do Duel.ShuffleDeck(res[i]) end
end
end end
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment