Commit 4970b9fc authored by TanakaKotoha's avatar TanakaKotoha

fix

parent dc4b6a96
......@@ -42,14 +42,15 @@ function c12009058.drop(e,tp,eg,ep,ev,re,r,rp)
local cc=(cg-sg)*2
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if true then
Duel.Draw(tp,cc,REASON_EFFECT)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg=g:Select(p,cc-1,cc-1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,cc-1,cc-1,nil)
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)
Duel.SortDecktop(p,p,cc-1)
Duel.SortDecktop(tp,tp,cc-1)
for i=1,cc-1 do
local mg=Duel.GetDecktopGroup(p,1)
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
......
......@@ -14,9 +14,13 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.chainfilter)
end
function cm.chainfilter(re,tp,cid)
return not ( re:GetHandler():IsLocation(LOCATION_EXTRA) )
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)==0 and Duel.IsPlayerCanSendtoGrave(tp) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......@@ -39,5 +43,15 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tt=math.floor(ct/2)
if ct>0 then
Duel.DiscardDeck(tp,tt,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
HakaShiro.cannoteffectop(e,tp,eg,ep,ev,re,r,rp,g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
\ No newline at end of file
......@@ -73,7 +73,7 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(1,1)
e5:SetLabelObject(sc)
e5:SetTarget(cm.sumlimit)
e5:SetTarget(cm.distg)
e5:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e5,tp)
local e6=e5:Clone()
......@@ -83,8 +83,7 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function cm.sumlimit(e,rc,sump,sumtype,sumpos,targetp,se)
local c=e:GetHandler()
local sc=e:GetLabelObject
return c:IsCode(sc)
function cm.distg(e,c)
local sc=e:GetLabelObject()
return c:IsOriginalCodeRule(sc:GetOriginalCodeRule())
end
\ No newline at end of file
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