Commit c192c4f2 authored by TanakaKotoha's avatar TanakaKotoha

iidx gooooooooooooooooooold

parent 500308b1
...@@ -14,7 +14,13 @@ function cm.initial_effect(c) ...@@ -14,7 +14,13 @@ function cm.initial_effect(c)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon) e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e1) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetRange(LOCATION_HAND)
e2:SetTargetRange(LOCATION_HAND,0)
e2:SetTarget(cm.eftg)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
if not cm.global_flag then if not cm.global_flag then
cm.global_flag=true cm.global_flag=true
local ge0=Effect.CreateEffect(c) local ge0=Effect.CreateEffect(c)
...@@ -32,6 +38,9 @@ function cm.initial_effect(c) ...@@ -32,6 +38,9 @@ function cm.initial_effect(c)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function cm.eftg(e,c)
return c==e:GetHandler()
end
function cm.atcon(e,tp,eg,ep,ev,re,r,rp) function cm.atcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)
end end
...@@ -48,10 +57,27 @@ end ...@@ -48,10 +57,27 @@ end
function cm.spcon(e,c) function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFlagEffect(tp,17061155)>9 local b1=Duel.IsPlayerCanSpecialSummonMonster(tp,17061156,0,0x21,4000,4000,10,RACE_DRAGON,ATTRIBUTE_LIGHT)
local b2=Duel.IsPlayerCanSpecialSummonMonster(tp,17061157,0,0x21,4000,4000,10,RACE_DRAGON,ATTRIBUTE_DARK)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (b1 or b2) and Duel.GetFlagEffect(tp,17061155)>9
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ops={aux.Stringid(17061155,1),aux.Stringid(17061155,2)} local b1=Duel.IsPlayerCanSpecialSummonMonster(tp,17061156,0,0x21,4000,4000,10,RACE_DRAGON,ATTRIBUTE_LIGHT)
local b2=Duel.IsPlayerCanSpecialSummonMonster(tp,17061157,0,0x21,4000,4000,10,RACE_DRAGON,ATTRIBUTE_DARK)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (b1 or b2) end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(17061155,1)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(17061155,2)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops)) local op=Duel.SelectOption(tp,table.unpack(ops))
Duel.Hint(HINT_CARD,0,17061156+op) Duel.Hint(HINT_CARD,0,17061156+op)
--back --back
......
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