Commit ecd9edcc authored by Tachibana's avatar Tachibana

ybb

parent f3b683dd
No preview for this file type
...@@ -22,7 +22,7 @@ function c12033006.initial_effect(c) ...@@ -22,7 +22,7 @@ function c12033006.initial_effect(c)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
function c12033006.spfilter(c,sp) function c12033006.spfilter(c,sp)
return c:GetSummonPlayer()==sp return c:GetSummonPlayer()==sp and c:IsType(TYPE_LINK)
end end
function c12033006.spcon(e,tp,eg,ep,ev,re,r,rp) function c12033006.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c12033006.spfilter,1,nil,1-tp) return eg:IsExists(c12033006.spfilter,1,nil,1-tp)
......
...@@ -65,7 +65,12 @@ function cm.poperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,12 @@ function cm.poperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsCanOverlay() and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsCanOverlay() and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) then
Duel.Overlay(c,tc) local g=Group.FromCards(tc)
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(c,mg)
end
Duel.Overlay(c,g)
Duel.SpecialSummon(c,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
c:CompleteProcedure() c:CompleteProcedure()
end end
......
...@@ -44,7 +44,7 @@ local cate_table_for_reikai={ ...@@ -44,7 +44,7 @@ local cate_table_for_reikai={
['ct'] = CATEGORY_COUNTER, ['ct'] = CATEGORY_COUNTER,
['des'] = CATEGORY_DESTROY, ['des'] = CATEGORY_DESTROY,
} }
function rk.set(code,setcode) function rk.set(code,setcode,rkflag)
if not _G["c"..code] then _G["c"..code]={} if not _G["c"..code] then _G["c"..code]={}
setmetatable(_G["c"..code],Card) setmetatable(_G["c"..code],Card)
_G["c"..code].__index=_G["c"..code] _G["c"..code].__index=_G["c"..code]
...@@ -53,8 +53,57 @@ function rk.set(code,setcode) ...@@ -53,8 +53,57 @@ function rk.set(code,setcode)
if setcode and not ccodem.rksetcode then if setcode and not ccodem.rksetcode then
ccodem.rksetcode=setcode ccodem.rksetcode=setcode
end end
if rkflag==1 then
ccodem.rkcheck=true
end
if not rk.Dalogcheck then
rk.Dalogcheck=true
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(rk.Dalogactcon)
e1:SetOperation(rk.Dalogactop)
Duel.RegisterEffect(e1,0)
local e2=Effect.GlobalEffect()
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCondition(rk.Dalogscon)
e2:SetOperation(rk.Dalogsop)
Duel.RegisterEffect(e2,0)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(e3,0)
end
return code,ccodem return code,ccodem
end end
function rk.rkcardcheck(c)
return c.rkcheck==true
end
function rk.Dalogactcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler().rkcheck==true and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function rk.Dalogactop(e,tp,eg,ep,ev,re,r,rp)
local og=eg:Filter(rk.rkcardcheck,nil)
for tc in aux.Next(og) do
local codefordal=tc:GetOriginalCode()
Duel.Hint(24,0,aux.Stringid(codefordal,9))
Duel.Hint(24,0,aux.Stringid(codefordal,10))
Duel.Hint(24,0,aux.Stringid(codefordal,11))
end
end
function rk.Dalogscon(e,tp,eg)
return eg:IsExists(rk.rkcardcheck,1,nil)
end
function rk.Dalogsop(e,tp,eg)
local og=eg:Filter(rk.rkcardcheck,nil)
for tc in aux.Next(og) do
local codefordal=tc:GetOriginalCode()
Duel.Hint(24,0,aux.Stringid(codefordal,12))
Duel.Hint(24,0,aux.Stringid(codefordal,13))
Duel.Hint(24,0,aux.Stringid(codefordal,14))
end
end
function rk.check(c,str) function rk.check(c,str)
local code1,code2=c:GetCode() local code1,code2=c:GetCode()
local subtr=nil local subtr=nil
...@@ -123,7 +172,7 @@ end ...@@ -123,7 +172,7 @@ end
function rk.Loc_Bin(loc) function rk.Loc_Bin(loc)
return rk.bin('loc',loc) return rk.bin('loc',loc)
end end
function rk.Cate_Bin(cate) function rk.Cate_Bin(cate)
return rk.bin('cate',cate) return rk.bin('cate',cate)
end end
function rk.Self_Select_Deck(player,f,min,max,exg,...) function rk.Self_Select_Deck(player,f,min,max,exg,...)
...@@ -148,31 +197,31 @@ function rk.selectcard(sel_p,tar_p,f,loc,loc1,min,max,exg,...) ...@@ -148,31 +197,31 @@ function rk.selectcard(sel_p,tar_p,f,loc,loc1,min,max,exg,...)
return Duel.SelectMatchingCard(sel_p,f,tar_p,loc,loc1,min,max,exg,...) return Duel.SelectMatchingCard(sel_p,f,tar_p,loc,loc1,min,max,exg,...)
end end
function rk.yk(c,loc) function rk.yk(c,loc)
local tc=c local tc=c
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST) e1:SetCode(EVENT_ADJUST)
e1:SetRange(loc) e1:SetRange(loc)
e1:SetCondition(rk.ykcon2) e1:SetCondition(rk.ykcon2)
e1:SetOperation(rk.op2) e1:SetOperation(rk.op2)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
return e1,e2,e3,e4,e5 return e1,e2,e3,e4,e5
end end
function rk.ykcon2(e,tp) function rk.ykcon2(e,tp)
local c=e:GetHandler() local c=e:GetHandler()
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
if c:GetFlagEffect(16199990)==0 then if c:GetFlagEffect(16199990)==0 then
c:RegisterFlagEffect(16199990,RESET_EVENT+RESETS_STANDARD,0,0,0) c:RegisterFlagEffect(16199990,RESET_EVENT+RESETS_STANDARD,0,0,0)
c:RegisterFlagEffect(16199990+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+ph,0,0,0) c:RegisterFlagEffect(16199990+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+ph,0,0,0)
end end
return c:IsAbleToRemove() and c:GetFlagEffect(16199990+1)==0 return c:IsAbleToRemove() and c:GetFlagEffect(16199990+1)==0
end end
function rk.ykcon1(e,tp) function rk.ykcon1(e,tp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsAbleToRemove() return c:IsAbleToRemove()
end end
function rk.op2(e,tp) function rk.op2(e,tp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end end
function rk.effectg(c,code) function rk.effectg(c,code)
local tc=c local tc=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