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)
c:RegisterEffect(e6)
end
function c12033006.spfilter(c,sp)
return c:GetSummonPlayer()==sp
return c:GetSummonPlayer()==sp and c:IsType(TYPE_LINK)
end
function c12033006.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c12033006.spfilter,1,nil,1-tp)
......
......@@ -65,7 +65,12 @@ function cm.poperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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
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)
c:CompleteProcedure()
end
......
......@@ -44,7 +44,7 @@ local cate_table_for_reikai={
['ct'] = CATEGORY_COUNTER,
['des'] = CATEGORY_DESTROY,
}
function rk.set(code,setcode)
function rk.set(code,setcode,rkflag)
if not _G["c"..code] then _G["c"..code]={}
setmetatable(_G["c"..code],Card)
_G["c"..code].__index=_G["c"..code]
......@@ -53,8 +53,57 @@ function rk.set(code,setcode)
if setcode and not ccodem.rksetcode then
ccodem.rksetcode=setcode
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
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)
local code1,code2=c:GetCode()
local subtr=nil
......@@ -123,7 +172,7 @@ end
function rk.Loc_Bin(loc)
return rk.bin('loc',loc)
end
function rk.Cate_Bin(cate)
function rk.Cate_Bin(cate)
return rk.bin('cate',cate)
end
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,...)
return Duel.SelectMatchingCard(sel_p,f,tar_p,loc,loc1,min,max,exg,...)
end
function rk.yk(c,loc)
local tc=c
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetRange(loc)
e1:SetCondition(rk.ykcon2)
e1:SetOperation(rk.op2)
tc:RegisterEffect(e1)
return e1,e2,e3,e4,e5
local tc=c
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetRange(loc)
e1:SetCondition(rk.ykcon2)
e1:SetOperation(rk.op2)
tc:RegisterEffect(e1)
return e1,e2,e3,e4,e5
end
function rk.ykcon2(e,tp)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
if c:GetFlagEffect(16199990)==0 then
c:RegisterFlagEffect(16199990,RESET_EVENT+RESETS_STANDARD,0,0,0)
c:RegisterFlagEffect(16199990+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+ph,0,0,0)
end
return c:IsAbleToRemove() and c:GetFlagEffect(16199990+1)==0
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
if c:GetFlagEffect(16199990)==0 then
c:RegisterFlagEffect(16199990,RESET_EVENT+RESETS_STANDARD,0,0,0)
c:RegisterFlagEffect(16199990+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+ph,0,0,0)
end
return c:IsAbleToRemove() and c:GetFlagEffect(16199990+1)==0
end
function rk.ykcon1(e,tp)
local c=e:GetHandler()
return c:IsAbleToRemove()
local c=e:GetHandler()
return c:IsAbleToRemove()
end
function rk.op2(e,tp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
function rk.effectg(c,code)
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