Commit f10d1514 authored by CubeRuler's avatar CubeRuler

fix

parent 451186d7
...@@ -63,10 +63,13 @@ function c12026030.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,10 +63,13 @@ function c12026030.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c12026030.atkfilter(c,e) function c12026030.atkfilter(c,e)
return not c:IsAbleToHandAsCost() and e:GetHandler():GetLinkedGroup():IsContains(c)
end
function c12026030.atkfilter2(c,e)
return c:IsAbleToHandAsCost() and e:GetHandler():GetLinkedGroup():IsContains(c) return c:IsAbleToHandAsCost() and e:GetHandler():GetLinkedGroup():IsContains(c)
end end
function c12026030.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c12026030.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12026030.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e) end if chk==0 then return Duel.IsExistingMatchingCard(c12026030.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e) and Duel.IsExistingMatchingCard(c12026030.atkfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e) end
local g=Duel.GetMatchingGroup(c12026030.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e) local g=Duel.GetMatchingGroup(c12026030.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e)
if g:GetCount()>0 then if g:GetCount()>0 then
local upa=0 local upa=0
......
...@@ -4,6 +4,7 @@ local cm=_G["c"..m] ...@@ -4,6 +4,7 @@ local cm=_G["c"..m]
Duel.LoadScript("c10199990.lua") Duel.LoadScript("c10199990.lua")
cm.rssetcode="yatori" cm.rssetcode="yatori"
function cm.initial_effect(c) function cm.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,cm.mfilter,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,cm.mfilter,aux.NonTuner(nil),1)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -20,6 +21,7 @@ function cm.initial_effect(c) ...@@ -20,6 +21,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES) e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(cm.drtg) e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop) e1:SetOperation(cm.drop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -44,8 +46,8 @@ function cm.initial_effect(c) ...@@ -44,8 +46,8 @@ function cm.initial_effect(c)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
cm.halo_yatori=1 c12030002.halo_yatori=1
function cm.named_with_yatori(c) function c12030002.named_with_yatori(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.halo_yatori return m and m.halo_yatori
end end
...@@ -69,18 +71,18 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,18 +71,18 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local tt=1 local tt=1
Duel.PayLPCost(tp,2000) Duel.PayLPCost(tp,2000)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
if c.dsop then if c.drop1 then
c.dsop(e,tp,eg,ep,ev,re,r,rp,tt) c.drop1(e,tp,eg,ep,ev,re,r,rp,tt)
end end
end end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp,tt) function cm.drop1(e,tp,eg,ep,ev,re,r,rp,tt)
local tt=tt*2 local tt=tt*2
local c=e:GetHandler() local c=e:GetHandler()
if Duel.CheckLPCost(tp,2000*tt) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.CheckLPCost(tp,2000*tt) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
Duel.PayLPCost(tp,2000*tt) Duel.PayLPCost(tp,2000*tt)
if c.dsop then if c.drop1 then
c.dsop(e,tp,eg,ep,ev,re,r,rp,tt) c.drop1(e,tp,eg,ep,ev,re,r,rp,tt)
end end
end end
end end
......
...@@ -13,11 +13,17 @@ function cm.initial_effect(c) ...@@ -13,11 +13,17 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetTargetRange(0xff,0) e2:SetTarget(function(e,c)
return c:GetOwner()==e:GetHandlerPlayer()
end)
e2:SetTargetRange(0xff,0xff)
e2:SetValue(LOCATION_REMOVED) e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetTargetRange(0,0xff) e3:SetTarget(function(e,c)
return c:GetOwner()~=e:GetHandlerPlayer()
end)
e3:SetTargetRange(0xff,0xff)
e3:SetValue(LOCATION_DECKBOT) e3:SetValue(LOCATION_DECKBOT)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
......
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