Commit d7d3d1bd authored by 聖園ミカ's avatar 聖園ミカ 🐟

1+1=3

parent f2586301
......@@ -19,6 +19,17 @@ Duel.EnableGlobalFlag(GLOBALFLAG_DECK_REVERSE_CHECK)
e2:SetTarget(s.drtg)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_GRAVE_ACTION)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCountLimit(1)
e3:SetCondition(s.spcon)
e3:SetTarget(s.tdtg)
e3:SetOperation(s.tdop)
c:RegisterEffect(e3)
end
function s.plfilter(c)
return c:IsSetCard(0xc88) and not c:IsCode(m) and c:IsFacedown()
......@@ -44,4 +55,41 @@ end
function s.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 s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function s.tdfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xc88)
and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
and (not c:IsLocation(LOCATION_DECK) or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1)
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp)
end
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local loc=LOCATION_GRAVE+LOCATION_REMOVED
if not Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp)
or Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_DECK,0,1,nil,tp)
and Duel.SelectYesNo(tp,aux.Stringid(16605586,3)) then
loc=loc+LOCATION_DECK
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(16605586,2))
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,loc,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
if not tc:IsLocation(LOCATION_DECK) then
Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)
end
if loc&LOCATION_DECK>0 then
Duel.ShuffleDeck(tp)
end
if tc:IsLocation(LOCATION_DECK) then
Duel.MoveSequence(tc,0)
tc:ReverseInDeck()
Duel.ConfirmDecktop(tp,1)
end
end
end
\ No newline at end of file
......@@ -16,6 +16,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(s.matcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(65711558,1))
......@@ -56,14 +57,13 @@ function s.matcheck(e,c)
tc=g:GetNext()
end
if res then
e:SetLabel(1)
e:GetLabelObject():SetLabel(1)
else
e:SetLabel(0)
e:GetLabelObject():SetLabel(0)
end
end
function s.xacon(e)
local flag=e:GetLabelObject():GetLabel()
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and flag==1
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and e:GetLabel()==1
end
function s.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
......
......@@ -39,6 +39,7 @@ local e1=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(s.matcheck)
e4:SetLabelObject(e1)
c:RegisterEffect(e4)
end
function s.matfilter1(c,syncard)
......@@ -56,14 +57,13 @@ function s.matcheck(e,c)
tc=g:GetNext()
end
if res then
e:SetLabel(1)
e:GetLabelObject():SetLabel(1)
else
e:SetLabel(0)
e:GetLabelObject():SetLabel(0)
end
end
function s.xacon(e)
local flag=e:GetLabelObject():GetLabel()
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and flag==1
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,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