Commit 9094f367 authored by TanakaKotoha's avatar TanakaKotoha

fix

parent b96ef452
--骑士的行军 --骑士的行军
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end local m=16104218
local m,cm=rscf.DefineCard(16104218,"CHURCH_KNIGHT") local cm=_G["c"..m]
c16104218.rksetcode="CHURCH_KNIGHT"
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
...@@ -55,7 +56,7 @@ function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se) ...@@ -55,7 +56,7 @@ function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return (not c:IsRace(RACE_WARRIOR)) or c:IsLocation(LOCATION_EXTRA) return (not c:IsRace(RACE_WARRIOR)) or c:IsLocation(LOCATION_EXTRA)
end end
function cm.filter(c) function cm.filter(c)
return c:CheckSetCard("CHURCH_KNIGHT") and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) return c.rksetcode=="CHURCH_KNIGHT" and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
...@@ -70,7 +71,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,7 +71,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.filter1(c) function cm.filter1(c)
return c:CheckSetCard("CHURCH") and c:IsSummonable(true,nil) and c:IsType(TYPE_MONSTER) return (c.rksetcode=="CHURCH_KNIGHT" or c.rksetcode=="CHURCH") and c:IsSummonable(true,nil) and c:IsType(TYPE_MONSTER)
end end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_HAND,0,1,nil) end
......
--直到最后一刻 --直到最后一刻
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end local m=16104220
local m,cm=rscf.DefineCard(16104220,"CHURCH_KNIGHT") local cm=_G["c"..m]
c16104220.rksetcode="CHURCH_KNIGHT"
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m) c:SetUniqueOnField(1,0,m)
--Activate --Activate
...@@ -48,13 +49,13 @@ function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp) ...@@ -48,13 +49,13 @@ function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return not c:IsRace(RACE_WARRIOR) return not c:IsRace(RACE_WARRIOR)
end end
function cm.spfilter(c) function cm.spfilter(c)
return c:CheckSetCard("CHURCH") and c:IsAbleToRemove() and c:IsType(TYPE_MONSTER) return (c.rksetcode=="CHURCH_KNIGHT" or c.rksetcode=="CHURCH") and c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end end
function cm.spfilter1(c,e,tp) function cm.spfilter1(c,e,tp)
return c:CheckSetCard("CHURCH") and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and c:IsType(TYPE_MONSTER) return (c.rksetcode=="CHURCH_KNIGHT" or c.rksetcode=="CHURCH") and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and c:IsType(TYPE_MONSTER)
end end
function cm.smfilter(c) function cm.smfilter(c)
return c:CheckSetCard("CHURCH") and c:IsSummonable(true,nil) return (c.rksetcode=="CHURCH_KNIGHT" or c.rksetcode=="CHURCH") and c:IsSummonable(true,nil)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,16104222,nil,0x21,0,0,1,RACE_WARRIOR,ATTRIBUTE_LIGHT) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,16104222,nil,0x21,0,0,1,RACE_WARRIOR,ATTRIBUTE_LIGHT) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil) end
...@@ -68,7 +69,6 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,7 +69,6 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if tc then if tc then
atk=tc:GetAttack() atk=tc:GetAttack()
def=tc:GetDefense() def=tc:GetDefense()
code=tc:GetOriginalCode()
end end
if not (tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) then return end if not (tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,16104222,nil,0x21,atk,def,1,RACE_WARRIOR,ATTRIBUTE_LIGHT) then if Duel.IsPlayerCanSpecialSummonMonster(tp,16104222,nil,0x21,atk,def,1,RACE_WARRIOR,ATTRIBUTE_LIGHT) then
...@@ -78,13 +78,11 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,13 +78,11 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK) e1:SetCode(EFFECT_SET_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(atk) e1:SetValue(atk)
token:RegisterEffect(e1,true) token:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE) e2:SetCode(EFFECT_SET_DEFENSE)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetValue(def) e2:SetValue(def)
token:RegisterEffect(e2,true) token:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -100,7 +98,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,7 +98,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(cm.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,cm.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,cm.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end end
...@@ -108,45 +106,40 @@ function cm.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -108,45 +106,40 @@ function cm.spop2(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 not (tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)) then return end if not (tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)) then return end
if tc:GetActivateEffect() and e:GetOperation() then if tc.rksetcode=="CHURCH_KNIGHT" then
local e=tc:GetActivateEffect() tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1)
local op=e:GetOperation() local e1_2=Effect.CreateEffect(c)
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetDescription(aux.Stringid(m,4))
e1_1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1_1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1_1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1_1:SetOperation(op)
tc:RegisterEffect(e1_1)
local e1_2=Effect.CreateEffect(e:GetHandler())
e1_2:SetType(EFFECT_TYPE_SINGLE) e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetDescription(aux.Stringid(m,5)) e1_2:SetDescription(aux.Stringid(m,5))
e1_2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1_2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1_2:SetRange(LOCATION_MZONE) e1_2:SetRange(LOCATION_MZONE)
e1_2:SetReset(RESET_EVENT+RESETS_STANDARD) e1_2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
tc:RegisterEffect(e1_2,true) tc:RegisterEffect(e1_2,true)
end end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local fid=e:GetHandler():GetFieldID() local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,fid) tc:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1_3=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1_3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1_3:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1_3:SetCountLimit(1) e1:SetCountLimit(1)
e1_3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1_3:SetLabel(fid) e1:SetLabel(fid)
e1_3:SetLabelObject(tc) e1:SetLabelObject(tc)
e1_3:SetCondition(cm.thcon) e1:SetCondition(cm.thacon)
e1_3:SetOperation(cm.thop) e1:SetOperation(cm.thaop)
Duel.RegisterEffect(e1_3,tp) Duel.RegisterEffect(e1,tp)
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thacon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(m)~=e:GetLabel() then if tc:GetFlagEffectLabel(m+1)~=e:GetLabel() then
e:Reset() e:Reset()
return false return false
else return true end else return true end
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thaop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT)
end end
function cm.condition(e,c)
return (c.rksetcode=="CHURCH_KNIGHT" or c.rksetcode=="CHURCH")
end
\ No newline at end of file
--异端剿灭 --异端剿灭
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end local m=16104224
local m,cm=rscf.DefineCard(16104224,"CHURCH_KNIGHT") local cm=_G["c"..m]
c16104224.rksetcode="CHURCH_KNIGHT"
function cm.initial_effect(c) function cm.initial_effect(c)
--ACT --ACT
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -26,7 +27,7 @@ end ...@@ -26,7 +27,7 @@ end
--return c:IsRace(RACE_WARRIOR) and c:IsControlerCanBeChanged() and c:IsFaceup() --return c:IsRace(RACE_WARRIOR) and c:IsControlerCanBeChanged() and c:IsFaceup()
--end --end
function cm.filter(c) function cm.filter(c)
return c:CheckSetCard("CHURCH_KNIGHT") and c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:GetLevel()>=5 return c.rksetcode=="CHURCH_KNIGHT" and c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:GetLevel()>=5
end end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter1,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter1,tp,0,LOCATION_MZONE,1,nil) end
......
--前路的抉择 --前路的抉择
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end local m=16104226
local m,cm=rscf.DefineCard(16104226,"CHURCH") local cm=_G["c"..m]
c16104226.rksetcode="CHURCH"
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
...@@ -24,7 +25,7 @@ function cm.initial_effect(c) ...@@ -24,7 +25,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsFaceup() and c:CheckSetCard("CHURCH") return c:IsFaceup() and (c.rksetcode=="CHURCH_KNIGHT" or c.rksetcode=="CHURCH")
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,c:GetCode(),e,tp) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,c:GetCode(),e,tp)
end end
function cm.spfilter(c,code,e,tp) function cm.spfilter(c,code,e,tp)
...@@ -53,7 +54,7 @@ function cm.filter1(c,e,tp) ...@@ -53,7 +54,7 @@ function cm.filter1(c,e,tp)
and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,c,e,tp) and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,c,e,tp)
end end
function cm.spfilter1(c,cad,e,tp) function cm.spfilter1(c,cad,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.IsCodeListed(cad,c:GetCode()) and c:CheckSetCard("CHURCH") and not c:IsSetCard(0xcc4) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.IsCodeListed(cad,c:GetCode()) and (c.rksetcode=="CHURCH_KNIGHT" or c.rksetcode=="CHURCH") and not c:IsSetCard(0xcc4)
end end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(cm.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(cm.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
...@@ -69,7 +70,7 @@ function cm.spop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +70,7 @@ function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
local sc=sg:GetFirst() local sc=sg:GetFirst()
if sc:CheckSetCard("CHURCH_KNIGHT") then if sc.rksetcode=="CHURCH_KNIGHT" then
if sc:GetActivateEffect() and e:GetOperation() then if sc:GetActivateEffect() and e:GetOperation() then
local e=sc:GetActivateEffect() local e=sc:GetActivateEffect()
local op=e:GetOperation() local op=e:GetOperation()
......
--教团的异骑士 燎煌 --教团的异骑士 燎煌
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end local m=16104228
local m,cm=rscf.DefineCard(16104228,"CHURCH_KNIGHT") local cm=_G["c"..m]
c16104228.rksetcode="CHURCH_KNIGHT"
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetUniqueOnField(1,1,m) c:SetUniqueOnField(1,1,m)
--summon success --summon success
...@@ -9,9 +10,23 @@ function cm.initial_effect(c) ...@@ -9,9 +10,23 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(cm.sumsuc) e1:SetOperation(cm.sumsuc)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1_1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1_1:SetOperation(cm.sumsuc1)
c:RegisterEffect(e1_1)
--a d A --a d A
local e2=REIKAI.CHRUCH_KNIGHT_DES(c,cm.gacon,cm.gatg,{1,m},cm.gaop) local e2=Effect.CreateEffect(c)
local e3=REIKAI.CHRUCH_KNIGHT_ADV(c,cm.gacon,cm.gatg,{1,m},cm.gaop) e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.gacon)
e2:SetTarget(cm.gatg)
e2:SetOperation(cm.gaop)
c:RegisterEffect(e2)
--summon with 1 tribute --summon with 1 tribute
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2)) e4:SetDescription(aux.Stringid(m,2))
...@@ -51,8 +66,7 @@ function cm.otcon(e,c,minc) ...@@ -51,8 +66,7 @@ function cm.otcon(e,c,minc)
return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg) and Duel.IsEnvironment(16104206,e:GetOwnerPlayer(),LOCATION_FZONE) return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg) and Duel.IsEnvironment(16104206,e:GetOwnerPlayer(),LOCATION_FZONE)
end end
function cm.otop(e,tp,eg,ep,ev,re,r,rp,c) function cm.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(cm.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) local sg=Duel.SelectMatchingCard(tp,cm.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local sg=(mg+mg):SelectSubGroup(tp,aux.TRUE,false,1,1,tp)
c:SetMaterial(sg) c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end end
...@@ -75,9 +89,38 @@ function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,9 +89,38 @@ function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
if e:GetHandler():GetFlagEffect(16104206)~=0 then
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
end
end
function cm.sumsuc1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetHandler():GetFlagEffect(16104220)~=0 then
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
end
end end
function cm.adfilter(c) function cm.adfilter(c)
return c:IsRace(RACE_WARRIOR) or c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsRace(RACE_WARRIOR) or c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)
end end
function cm.aclimit(e,re,tp) function cm.aclimit(e,re,tp)
return re:GetHandler():IsOnField() and re:GetHandler():IsType(TYPE_MONSTER) return re:GetHandler():IsOnField() and re:GetHandler():IsType(TYPE_MONSTER)
...@@ -105,6 +148,7 @@ function cm.gaop(e,tp,eg,ep,ev,re,r,rp) ...@@ -105,6 +148,7 @@ function cm.gaop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetTarget(cm.destg) e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop) e2:SetOperation(cm.desop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
......
--终末之歌 --终末之歌
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end local m=16104230
local m,cm=rscf.DefineCard(16104230,"CHURCH_KNIGHT") local cm=_G["c"..m]
c16104230.rksetcode="CHURCH_KNIGHT"
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -25,7 +26,7 @@ function cm.initial_effect(c) ...@@ -25,7 +26,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.filter(c) function cm.filter(c)
return c:CheckSetCard("CHURCH_KNIGHT") and c:IsType(TYPE_MONSTER) return c.rksetcode=="CHURCH_KNIGHT" and c:IsType(TYPE_MONSTER)
and c:IsAbleToGrave() and c:IsFaceup() and c:IsAbleToGrave() and c:IsFaceup()
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -55,7 +56,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +56,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.filter1(c) function cm.filter1(c)
return (c:CheckSetCard("CHURCH")) and c:IsAbleToDeck() return (c.rksetcode=="CHURCH_KNIGHT" or c.rksetcode=="CHURCH") and c:IsAbleToDeck()
end end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter1(chkc) end
......
--教团的圣女 让·达克 --教团的圣女 让·达克
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end local m=16104232
local m,cm=rscf.DefineCard(16104232,"CHURCH") local cm=_G["c"..m]
c16104232.rksetcode="CHURCH"
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetUniqueOnField(1,1,m) c:SetUniqueOnField(1,1,m)
--Sumeffect --Sumeffect
...@@ -45,13 +46,13 @@ function cm.counterfilter1(c) ...@@ -45,13 +46,13 @@ function cm.counterfilter1(c)
return c:GetSummonLocation()~=LOCATION_EXTRA and c:IsRace(RACE_WARRIOR) return c:GetSummonLocation()~=LOCATION_EXTRA and c:IsRace(RACE_WARRIOR)
end end
function cm.condition(e,c) function cm.condition(e,c)
return c:CheckSetCard("CHURCH") return (c.rksetcode=="CHURCH_KNIGHT" or c.rksetcode=="CHURCH")
end end
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:IsAbleToDeck() return c:IsFaceup() and c:IsAbleToDeck()
end end
function cm.setfilter(c) function cm.setfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSSetable() and c:CheckSetCard("CHURCH") return c:IsType(TYPE_SPELL) and c:IsSSetable() and (c.rksetcode=="CHURCH_KNIGHT" or c.rksetcode=="CHURCH")
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetCustomActivityCount(m,tp,ACTIVITY_SUMMON)==0 end if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetCustomActivityCount(m,tp,ACTIVITY_SUMMON)==0 end
...@@ -68,7 +69,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -68,7 +69,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se) function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) or not c:IsRace(RACE_WARRIOR) return (not c:IsRace(RACE_WARRIOR)) or c:IsLocation(LOCATION_EXTRA)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK,0,3,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK,0,3,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
...@@ -100,7 +101,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,7 +101,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:CheckSetCard("CHURCH_KNIGHT") and c:IsAbleToHand() return (c.rksetcode=="CHURCH_KNIGHT" or c.rksetcode=="CHURCH") and c:IsAbleToHand()
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.thcon(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return e:GetHandler():GetReason()==26 return e:GetHandler():GetReason()==26
......
--于圣殿前起誓 --于圣殿前起誓
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end local m=16104234
local m,cm=rscf.DefineCard(16104234,"CHURCH_KNIGHT") local cm=_G["c"..m]
c16104234.rksetcode="CHURCH"
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
...@@ -23,7 +24,7 @@ function cm.initial_effect(c) ...@@ -23,7 +24,7 @@ function cm.initial_effect(c)
e1_1:SetCode(EFFECT_INDESTRUCTABLE) e1_1:SetCode(EFFECT_INDESTRUCTABLE)
e1_1:SetRange(LOCATION_SZONE) e1_1:SetRange(LOCATION_SZONE)
e1_1:SetTargetRange(LOCATION_ONFIELD,0) e1_1:SetTargetRange(LOCATION_ONFIELD,0)
e1_1:SetTarget(aux.TargetBoolFunction(Card.CheckSetCard,"CHURCH")) e1_1:SetTarget(aux.TargetBoolFunction(Card.ischurch))
e1_1:SetValue(cm.indesval) e1_1:SetValue(cm.indesval)
c:RegisterEffect(e1_1) c:RegisterEffect(e1_1)
--EFFECT_LIMIT --EFFECT_LIMIT
...@@ -57,6 +58,9 @@ function cm.initial_effect(c) ...@@ -57,6 +58,9 @@ function cm.initial_effect(c)
e4:SetCode(EFFECT_CANNOT_SUMMON) e4:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function Card.ischurch(c)
return (c.rksetcode=="CHURCH_KNIGHT" or c.rksetcode=="CHURCH")
end
function cm.disfilter(c) function cm.disfilter(c)
return (not c:IsRace(RACE_WARRIOR)) and c:IsType(TYPE_MONSTER) return (not c:IsRace(RACE_WARRIOR)) and c:IsType(TYPE_MONSTER)
end end
...@@ -72,7 +76,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,7 +76,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+0x17a0000) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
tc=d:GetNext() tc=d:GetNext()
end end
...@@ -82,13 +86,13 @@ function cm.indesval(e,re,r,rp) ...@@ -82,13 +86,13 @@ function cm.indesval(e,re,r,rp)
return bit.band(r,REASON_RULE+REASON_BATTLE)==0 return bit.band(r,REASON_RULE+REASON_BATTLE)==0
end end
function cm.ntgtg(e,c) function cm.ntgtg(e,c)
return c:IsFaceup() and c:CheckSetCard("CHURCH") return c:IsFaceup() and (c.rksetcode=="CHURCH_KNIGHT" or c.rksetcode=="CHURCH")
end end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp) function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return not (c:CheckSetCard("CHURCH") or c:IsCode(16104222)) return not ((c.rksetcode=="CHURCH_KNIGHT" or c.rksetcode=="CHURCH") or c:IsCode(16104222))
end end
function cm.tffilter(c) function cm.tffilter(c)
return c:CheckSetCard("CHURCH") and c:IsAbleToDeck() return (c.rksetcode=="CHURCH_KNIGHT" or c.rksetcode=="CHURCH") and c:IsAbleToDeck()
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
......
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