Commit c3ebc8dc authored by POLYMER's avatar POLYMER

fix

parent a003907a
No preview for this file type
--天斗辉巧核
function c11533709.initial_effect(c)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(function(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS) end)
c:RegisterEffect(e1)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_RELEASE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,11533709)
e1:SetCondition(function(e)
return e:GetHandler():GetReasonEffect():GetHandler():IsSetCard(0x163,0x154) and e:GetHandler():IsReason(REASON_COST) end)
e1:SetTarget(c11533709.thtg)
e1:SetOperation(c11533709.thop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,21533709)
e2:SetCost(c11533709.spcost)
e2:SetTarget(c11533709.sptg)
e2:SetOperation(c11533709.spop)
c:RegisterEffect(e2)
end
function c11533709.thfil(c)
return c:IsCode(89771220) and c:IsAbleToHand()
end
function c11533709.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11533709.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11533709.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11533709.thfil,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c11533709.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(function(c) return not c:IsPublic() and c:IsCode(89771220) end,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,function(c) return not c:IsPublic() and c:IsCode(89771220) end,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
end
function c11533709.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11533709.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local code=e:GetHandler():GetCode()
getmetatable(e:GetHandler()).announce_filter={89264428,OPCODE_ISCODE,27693363,OPCODE_ISCODE,OPCODE_OR,58793369,OPCODE_ISCODE,OPCODE_OR,97148796,OPCODE_ISCODE,OPCODE_OR}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(ac)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local lv=Duel.AnnounceNumber(tp,1,8)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
--龙辉巧-天厨三ε
local m=11612601
local cm=_G["c"..m]
function c11612601.initial_effect(c)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--spsummon
local e2=aux.AddDrytronSpSummonEffect(c,cm.extraop)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH)
e2:SetCountLimit(1,m)
end
function cm.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x154)
end
function cm.thfilter(c)
return c:IsSetCard(0x154) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.extraop(e,tp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--龙辉巧-上宰θ
local m=11612602
local cm=_G["c"..m]
function c11612602.initial_effect(c)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--spsummon
local e2=aux.AddDrytronSpSummonEffect(c,cm.extraop)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetCountLimit(1,m)
end
function cm.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x154)
end
function cm.thfilter(c)
return c:IsSetCard(0x154) or c:IsType(TYPE_RITUAL) and c:IsAbleToDeck()
end
function cm.extraop(e,tp)
local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if tg:GetCount()>4 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=tg:Select(tp,5,5,nil)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local ct=sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==5 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
--龙辉巧-左枢ι
local m=11612603
local cm=_G["c"..m]
function c11612603.initial_effect(c)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--spsummon
local e2=aux.AddDrytronSpSummonEffect(c,cm.extraop)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH)
e2:SetCountLimit(1,m)
end
function cm.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x154)
end
function cm.thfilter(c)
return c:IsSetCard(0x154) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(m)
end
function cm.extraop(e,tp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--龙辉巧-少尉κ
local m=11612604
local cm=_G["c"..m]
function c11612604.initial_effect(c)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--spsummon
local e2=aux.AddDrytronSpSummonEffect(c,cm.extraop)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH)
e2:SetCountLimit(1,m)
end
function cm.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x154)
end
function cm.thfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function cm.extraop(e,tp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sh=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sh,REASON_EFFECT)
end
end
\ No newline at end of file
--龙辉巧-天培二ν1
local m=11612605
local cm=_G["c"..m]
function c11612605.initial_effect(c)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--spsummon
local e2=aux.AddDrytronSpSummonEffect(c,cm.extraop)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH)
e2:SetCountLimit(1,m)
end
function cm.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x154)
end
function cm.thfilter(c)
return c:IsSetCard(0x154) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
function cm.extraop(e,tp)
local t=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if t:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
\ No newline at end of file
--龙辉巧-上辅λ
local m=11612606
local cm=_G["c"..m]
function c11612606.initial_effect(c)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--spsummon
local e2=aux.AddDrytronSpSummonEffect(c,cm.extraop)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCountLimit(1,m)
end
function cm.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x154)
end
function cm.extraop(e,tp)
if Duel.IsExistingMatchingCard(cm.disfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) and Duel.IsPlayerCanDraw(tp,2) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.disfilter),tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.SendtoDeck(tg,nil,1,REASON_EFFECT)
Duel.Draw(tp,2,REASON_EFFECT)
end
end
function cm.disfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsAbleToDeck() and c:IsType(TYPE_MONSTER)
end
\ No newline at end of file
--龙辉巧-天棓增九μ
local m=11612607
local cm=_G["c"..m]
function c11612607.initial_effect(c)
--link summon
c:SetSPSummonOnce(m)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x154),1,1)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.regcon)
e1:SetOperation(cm.regop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(cm.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--cannot target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.tgcon)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--atklimit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_ATTACK)
e4:SetCondition(cm.tgcon)
c:RegisterEffect(e4)
--lv
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_XYZ_LEVEL)
e5:SetCondition(cm.tgcon)
e5:SetValue(1)
c:RegisterEffect(e5)
--effect gain
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_BE_MATERIAL)
e6:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e6:SetCountLimit(1,m)
e6:SetCondition(cm.effcon)
e6:SetOperation(cm.effop)
c:RegisterEffect(e6)
--effect gain2
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_BE_MATERIAL)
e7:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e7:SetCondition(cm.effcon)
e7:SetOperation(cm.efop)
c:RegisterEffect(e7)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabel()==1
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(11612607,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11612607,1))
end
function cm.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsLinkSetCard,1,nil,0x154) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function cm.tgcon(e)
return e:GetHandler():GetFlagEffect(11612607)>0
end
--
function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ and e:GetHandler():GetReasonCard():IsSetCard(0x154)
end
function cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(11612607,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(rc)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(11612607)
e2:SetOperation(cm.op1)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
rc:RegisterEffect(e2)
if not rc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e3,true)
end
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(11612607,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11612607,2))
end
function cm.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local reset_flag=RESET_EVENT+RESETS_STANDARD
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(m,3))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCountLimit(1)
e1:SetCondition(cm.dfcon)
e1:SetTarget(cm.dftg)
e1:SetOperation(cm.dfop)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function cm.dfcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.dffilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end
function cm.dftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.dffilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.dffilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,c,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectTarget(tp,cm.dffilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,c,e,tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function cm.dfop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
end
\ No newline at end of file
--龙辉巧-天厨六π
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,s.lfilter,2,2,s.lcheck)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetCost(s.thcost)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_XYZ_LEVEL)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetValue(s.xyzlv)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter)
end
function s.counterfilter(c)
return not c:IsSummonType(SUMMON_TYPE_RITUAL) or c:IsSetCard(0x154)
end
function s.lfilter(c)
return not c:IsSummonableCard()
end
function s.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x154)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,tp,sumtp,sumpos)
return bit.band(sumtp,SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL and not c:IsSetCard(0x154)
end
function s.thfilter1(c)
return c:IsCode(22398665) and c:IsAbleToHand()
end
function s.thfilter2(c)
return c:IsSetCard(0x154) and bit.band(c:GetType(),0x81)==0x81 and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter1),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
end
end
function s.xyzlv(e,c,rc)
return 0xc0001
end
\ No newline at end of file
--龙辉巧-扶筐四ο
local m=11612609
local cm=_G["c"..m]
function c11612609.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x154),cm.sfilter)
c:EnableReviveLimit()
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--e sp
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(function(e)
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) end)
e2:SetCountLimit(1,11612610)
e2:SetTarget(cm.esptg)
e2:SetOperation(cm.espop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetValue(cm.synlimit)
c:RegisterEffect(e3)
end
--
function cm.sfilter(c)
return not c:IsSummonableCard()
end
function cm.synlimit(e,c)
if not c then return false end
return not c:IsAttribute(ATTRIBUTE_LIGHT)
end
--
function cm.ctfil(c)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x154) and c:IsLevel(1)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.ctfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,cm.ctfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
function cm.etdgck(g,e,tp,rc)
local tc1=g:GetFirst()
local tc2=g:GetNext()
return Duel.GetLocationCountFromEx(tp,tp,g,rc)>0 and math.abs(tc1:GetLevel()-tc2:GetLevel())==rc:GetLevel() and g:IsContains(e:GetHandler()) and g:FilterCount(Card.IsType,e:GetHandler(),TYPE_RITUAL)==1
end
function cm.espfil(c,e,tp)
local g=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_MZONE,0,nil)
return g:CheckSubGroup(cm.etdgck,2,2,e,tp,c) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.esptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.espfil,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.espop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.espfil,tp,LOCATION_EXTRA,0,nil,e,tp)
if g:GetCount()>0 then
local tc=g:Select(tp,1,1,nil):GetFirst()
local rg=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_MZONE,0,nil)
local sg=rg:SelectSubGroup(tp,cm.etdgck,false,2,2,e,tp,tc)
Duel.Release(sg,REASON_EFFECT)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--龙仪巧-狮子流星=LEO
if not require and loadfile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=loadfile(str)
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
return require_list[str]
end
return require_list[str]
end
end
local m=11612610
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/11610000") end) then require("script/11610000") end
cm.text=zhc_lhq_zs
function c11612610.initial_effect(c)
c:EnableReviveLimit()
local e00=fpjdiy.Zhc(c,cm.text)
--
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(cm.valcheck)
c:RegisterEffect(e0)
--cannot be effect target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.indoval)
c:RegisterEffect(e1)
--th
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.matcon)
e3:SetOperation(cm.matop)
c:RegisterEffect(e3)
e0:SetLabelObject(e3)
--Destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCountLimit(1,m*2+1)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(cm.detg)
e4:SetOperation(cm.deop)
c:RegisterEffect(e4)
end
function cm.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and e:GetLabel()==1
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
function cm.lvfilter(c,rc)
return c:GetRitualLevel(rc)>0
end
function cm.valcheck(e,c)
local mg=c:GetMaterial()
local fg=mg:Filter(cm.lvfilter,nil,c)
if #fg>0 and fg:GetSum(Card.GetRitualLevel,c)<=2 then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0
end
function cm.thfilter(c,e,tp)
return c:IsSetCard(0x154) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if not e:GetHandler():IsLevel(1) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e1)
end
end
end
--03
function cm.detg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function cm.deop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if Duel.Destroy(tc,REASON_EFFECT)~=0 and tc:IsPreviousLocation(LOCATION_MZONE) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
atk=atk/2
Duel.BreakEffect()
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
\ No newline at end of file
--龙仪巧-水瓶流星=AQU
if not require and loadfile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=loadfile(str)
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
return require_list[str]
end
return require_list[str]
end
end
local m=11612611
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/11610000") end) then require("script/11610000") end
cm.text=zhc_lhq_sp
function c11612611.initial_effect(c)
c:EnableReviveLimit()
--
local e00=fpjdiy.Zhc(c,cm.text)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(cm.valcheck)
c:RegisterEffect(e0)
--cannot be effect target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
--th
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.matcon)
e3:SetOperation(cm.matop)
c:RegisterEffect(e3)
e0:SetLabelObject(e3)
--copy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,3))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m*2+1)
e4:SetCost(cm.copycost)
e4:SetCondition(cm.cpcon)
e4:SetTarget(cm.cptg)
e4:SetOperation(cm.cpop)
c:RegisterEffect(e4)
end
function cm.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and e:GetLabel()==1
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
function cm.lvfilter(c,rc)
return c:GetRitualLevel(rc)>0
end
function cm.valcheck(e,c)
local mg=c:GetMaterial()
local fg=mg:Filter(cm.lvfilter,nil,c)
if #fg>0 and fg:GetSum(Card.GetRitualLevel,c)<=2 then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
--1
function cm.efilter(e,te)
return te:IsActiveType(TYPE_SPELL) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
--2
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return e:GetHandler():GetFlagEffect(m)>0 and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function cm.etfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) and c:IsReleasable()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.etfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.spfilter(c,atk,e,tp)
return c:IsAttackBelow(atk) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and bit.band(c:GetType(),0x81)==0x81
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.etfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
local code=tc:GetCode()-- tc:IsRelateToEffect(e) and
if Duel.Release(tc,REASON_EFFECT) then
local rg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,tc:GetAttack(),e,tp)
if rg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local rc=rg:Select(tp,1,1,nil):GetFirst()
if Duel.SpecialSummon(rc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)>0 then
rc:CompleteProcedure()
local code=rc:GetCode()
if rc:GetFlagEffect(code)==0 and rc:IsOriginalSetCard(0x154) then
rc:RegisterFlagEffect(code,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
end
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_RELEASE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0x04,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_SUM)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_UNRELEASABLE_NONSUM)
Duel.RegisterEffect(e3,tp)
end
--03
function cm.copycost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function cm.cpcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==1-tp
end
function cm.filter1(c)
return c:CheckActivateEffect(true,true,false)
end
function cm.filter2(c,e,tp,eg,ep,ev,re,r,rp)
if c:CheckActivateEffect(true,true,false) then return true end
local te=c:GetActivateEffect()
--if te:GetCode()~=EVENT_CHAINING then return false end
local tg=te:GetTarget()
if not tg then return true end
local res=false
if not pcall(function() res=tg(e,tp,eg,ep,ev,re,r,rp,0) end) then return false end
return res
end
function cm.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local te=e:GetLabelObject()
local tg=te:GetTarget()
return te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and (not tg or tg(e,tp,eg,ep,ev,re,r,rp,0,chkc))
end
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return cm.filter2(re:GetHandler(),e,tp,eg,ep,ev,re,r,rp)
end
e:SetLabel(0)
local tc=re:GetHandler()
local te,ceg,cep,cev,cre,cr,crp
local fchain=cm.filter1(tc)
if fchain then
te,ceg,cep,cev,cre,cr,crp=tc:CheckActivateEffect(true,true,true)
else
te=tc:GetActivateEffect()
end
e:SetCategory(te:GetCategory())
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then
if fchain then
tg(e,tp,ceg,cep,cev,cre,cr,crp,1)
else
tg(e,tp,eg,ep,ev,re,r,rp,1)
end
end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
end
function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
e:GetHandler():ReleaseEffectRelation(e)
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
\ No newline at end of file
--龙仪巧-仙英流星=PER
if not require and loadfile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=loadfile(str)
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
return require_list[str]
end
return require_list[str]
end
end
local m=11612612
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/11610000") end) then require("script/11610000") end
cm.text=zhc_lhq_xy
function c11612612.initial_effect(c)
c:EnableReviveLimit()
--
local e00=fpjdiy.Zhc(c,cm.text)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(cm.valcheck)
c:RegisterEffect(e0)
--atk limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(cm.atklimit)
c:RegisterEffect(e1)
--th
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.tdcon)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.matcon)
e3:SetOperation(cm.matop)
c:RegisterEffect(e3)
e0:SetLabelObject(e3)
--draw count
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DRAW_COUNT)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(1,0)
e4:SetCondition(cm.drcon)
e4:SetValue(cm.drval)
c:RegisterEffect(e4)
end
function cm.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and e:GetLabel()==1
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
function cm.lvfilter(c,rc)
return c:GetRitualLevel(rc)>0
end
function cm.valcheck(e,c)
local mg=c:GetMaterial()
local fg=mg:Filter(cm.lvfilter,nil,c)
if #fg>0 and fg:GetSum(Card.GetRitualLevel,c)<=2 then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
--01
function cm.atklimit(e,c)
return c~=e:GetHandler()
end
--02
function cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,5,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,nil,0,0)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
--
function cm.drfilter(c)
return c:IsFaceup() and c:IsSetCard(0x154) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end
function cm.drcon(e)
return Duel.GetMatchingGroupCount(cm.drfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)>0
end
function cm.drval(e)
return Duel.GetMatchingGroupCount(cm.drfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
end
\ No newline at end of file
--龙仪巧-双子流星=GEM
if not require and loadfile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=loadfile(str)
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
return require_list[str]
end
return require_list[str]
end
end
local m=11612616
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/11610000") end) then require("script/11610000") end
cm.text=zhc_lhq_sz
function c11612616.initial_effect(c)
c:EnableReviveLimit()
--
local e00=fpjdiy.Zhc(c,cm.text)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(cm.valcheck)
c:RegisterEffect(e0)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
--sp
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,m)
e2:SetCost(cm.copycost)
e2:SetCondition(cm.copycon)
e2:SetTarget(cm.copytg)
e2:SetOperation(cm.copyop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.matcon)
e3:SetOperation(cm.matop)
c:RegisterEffect(e3)
e0:SetLabelObject(e3)
-- if not cm.global_flag then
-- cm.global_flag=true
-- Sr_srlesetback={}
-- Sr_srlesetback[1]=0
-- local ge1=Effect.CreateEffect(c)
-- ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
-- ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
-- ge1:SetOperation(cm.regop)
-- Duel.RegisterEffect(ge1,0)
-- end
--03
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_RELEASE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,m*2+1)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
end
--
function cm.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and e:GetLabel()==1
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
function cm.lvfilter(c,rc)
return c:GetRitualLevel(rc)>0
end
function cm.valcheck(e,c)
local mg=c:GetMaterial()
local fg=mg:Filter(cm.lvfilter,nil,c)
if #fg>0 and fg:GetSum(Card.GetRitualLevel,c)<=2 then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
--01
function cm.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
--02
function cm.cfilter(c,tp)
return c:GetSummonType(SUMMON_TYPE_RITUAL) and c:IsSetCard(0x154)
end
--function cm.regop(e,tp,eg,ep,ev,re,r,rp)
-- if not eg then return end
-- local sg=eg:Filter(cm.cfilter,nil,tp)
-- local tc=sg:GetFirst()
-- while tc do
-- Sr_srlesetback[#Sr_srlesetback+1]=tc:GetCode()
-- tc=sg:GetNext()
-- end
--end
function cm.copycost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(41209827)==0 end
e:GetHandler():RegisterFlagEffect(41209827,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function cm.copycon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0 --and Duel.GetTurnPlayer()==1-tp
end
function cm.copyfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_TOKEN)
end
function cm.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and cm.copyfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(cm.copyfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SetChainLimit(cm.limit(Duel.SelectTarget(tp,cm.copyfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c):GetFirst()))
end
function cm.limit(c)
return function (e,lp,tp)
return e:GetHandler()~=c
end
end
function cm.copyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsType(TYPE_TOKEN) then
local e01=Effect.CreateEffect(c)
e01:SetType(EFFECT_TYPE_SINGLE)
e01:SetCode(EFFECT_DISABLE)
e01:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e01)
local e02=Effect.CreateEffect(c)
e02:SetType(EFFECT_TYPE_SINGLE)
e02:SetCode(EFFECT_DISABLE_EFFECT)
e02:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e02)
local code=tc:GetOriginalCodeRule()
local cid=0
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
if not tc:IsType(TYPE_TRAPMONSTER) then
cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
end
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetLabelObject(e1)
e2:SetLabel(cid)
e2:SetOperation(cm.rstop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
function cm.rstop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cid=e:GetLabel()
if cid~=0 then
c:ResetEffect(cid,RESET_COPY)
c:ResetEffect(RESET_DISABLE,RESET_EVENT)
end
local e1=e:GetLabelObject()
e1:Reset()
Duel.HintSelection(Group.FromCards(c))
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
--03
function cm.thcfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsReleasable() and (c:IsSetCard(0x154) or c:IsType(TYPE_RITUAL))
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_HAND) and chkc:IsControler(tp) and cm.thcfilter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thcfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) and e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectReleaseGroupEx(tp,cm.thcfilter,1,1,nil,tp)
if Duel.Release(sg,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--极超之龙辉巧
local m=11612618
local cm=_G["c"..m]
function c11612618.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11612618+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c11612618.cost)
e1:SetTarget(c11612618.target)
e1:SetOperation(c11612618.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return not c:IsSummonableCard()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--cant special summon summonable card check
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(97148796)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsSummonableCard()
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x154) and c:IsType(TYPE_MONSTER)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--绮罗星列流星辉巧群
local m=11612619
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--Activate2
local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target2)
e2:SetOperation(cm.activate2)
c:RegisterEffect(e2)
if not cm.global_flag then
cm.global_flag=true
Sr_srlesetback={}
Sr_srlesetback[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(cm.regop)
Duel.RegisterEffect(ge1,0)
end
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.regfilter(c,tp)
return c:GetSummonType(SUMMON_TYPE_RITUAL)-- and c:IsSetCard(0x154)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
if not eg then return end
local sg=eg:Filter(cm.regfilter,nil,tp)
local tc=sg:GetFirst()
while tc do
Sr_srlesetback[#Sr_srlesetback+1]=tc:GetCode()
tc=sg:GetNext()
end
end
function cm.counterfilter(c)
return not c:IsSummonableCard()
end
--
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c)
return c:IsSummonableCard()
end
function cm.spfil(c,e,tp)
return c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and c:IsCode(table.unpack(Sr_srlesetback))
end
function cm.rmfil(c)
return c:IsSetCard(0x154) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.rgck(g,e,tp)
local sg=Duel.GetMatchingGroup(cm.spfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
return sg:CheckSubGroup(cm.spgck,1,5,e,tp,g)
end
function cm.spgck(g,e,tp,rg)
if Duel.IsPlayerAffectedByEffect(tp,59822133) and g:GetCount()>1 then return false end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>=g:GetCount() and rg:CheckWithSumGreater(Card.GetAttack,g:GetSum(Card.GetAttack))
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.rmfil,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
if chk==0 then return g:CheckSubGroup(cm.rgck,1,99,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.rmfil,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local xg=Duel.GetMatchingGroup(cm.spfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if g:CheckSubGroup(cm.rgck,1,99,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local rg=g:SelectSubGroup(tp,cm.rgck,false,1,99,e,tp)
--Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_RITUAL+REASON_MATERIAL)
Duel.SendtoDeck(rg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=xg:SelectSubGroup(tp,cm.spgck,false,1,5,e,tp,rg)
--local sg=xg:CheckSubGroup(cm.spgck,1,5,e,tp,rg)
--local sg=xg:Filter(cm.spgck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp,rg)
local sg1=sg:SelectSubGroup(tp,aux.drccheck,false,1,5)
local sc=sg1:GetFirst()
while sc do
sc:SetMaterial(rg)
Duel.SpecialSummon(sc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
sc:CompleteProcedure()
sc=sg1:GetNext()
end
end
end
--
function cm.spfil2(c,e,tp)
return c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
end
function cm.rmfil2(c)
return c:IsSetCard(0x154) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function cm.rgck2(g,e,tp)
local sg=Duel.GetMatchingGroup(cm.spfil2,tp,LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_HAND,0,nil,e,tp)
return sg:CheckSubGroup(cm.spgck2,1,5,e,tp,g)
end
function cm.spgck2(g,e,tp,rg)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>=1 and rg:CheckWithSumGreater(Card.GetAttack,g:GetSum(Card.GetAttack))
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.rmfil2,tp,LOCATION_DECK,0,nil)
if chk==0 then return g:CheckSubGroup(cm.rgck2,1,99,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_HAND)
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.rmfil2,tp,LOCATION_DECK,0,nil)
local xg=Duel.GetMatchingGroup(cm.spfil2,tp,LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_HAND,0,nil,e,tp)
if g:CheckSubGroup(cm.rgck2,1,99,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:SelectSubGroup(tp,cm.rgck2,false,1,1,e,tp)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_RITUAL+REASON_MATERIAL)
--Duel.SendtoDeck(rg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=xg:SelectSubGroup(tp,cm.spgck2,false,1,1,e,tp,rg)
--local sg=xg:CheckSubGroup(cm.spgck,1,5,e,tp,rg)
--local sg=xg:Filter(cm.spgck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp,rg)
--local sg1=sg:SelectSubGroup(tp,aux.drccheck,false,1,1)
local sc=sg:GetFirst()
Duel.SpecialSummon(sc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
sc:CompleteProcedure()
end
end
\ No newline at end of file
--星连珠的龙辉巧
local m=11612620
local cm=_G["c"..m]
function c11612620.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--1
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--destroy/draw/salvage
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_DRAW+CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1,11612621)
e4:SetCondition(cm.con)
e4:SetTarget(cm.target)
e4:SetOperation(cm.operation)
c:RegisterEffect(e4)
--
if not cm.global_check then
cm.global_check=true
cm[0]=0
cm[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge3:SetOperation(cm.clear)
Duel.RegisterEffect(ge3,0)
end
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return not c:IsSummonableCard()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--cant special summon summonable card check
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(97148796)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsSummonableCard()
end
--
function cm.spfilter(c)
return (c:GetTextAttack()==-2 or c:GetTextAttack()==0) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end
function cm.scfilter(c,tp)
return c:IsRace(RACE_MACHINE) and c:IsReleasableByEffect()
end
--01
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.scfilter,1,nil) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectReleaseGroupEx(tp,cm.scfilter,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
rct=Duel.Release(g,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=tg:GetFirst()
if tc then
tc:SetMaterial(nil)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
end
--02
--03
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsSummonType(SUMMON_TYPE_RITUAL) then
local p=tc:GetSummonPlayer()
cm[p]=cm[p]+1
end
tc=eg:GetNext()
end
end
function cm.clear(e,tp,eg,ep,ev,re,r,rp)
cm[0]=0
cm[1]=0
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return cm[tp]>0
end
function cm.thfilter(c)
return c:IsSetCard(0x154) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.thfilter2(c)
return c:IsSetCard(0x154) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=cm[tp]>2 and Duel.IsPlayerCanDraw(tp,1)
local b2=cm[tp]>3 and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE,0,1,nil)
local b3=cm[tp]>4 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 or b3 end
if b1 then
local g=Duel.GetMatchingGroup(cm.filter1,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
if b2 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
if b3 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND+CATEGORY_SEARCH,nil,0,tp,1)
end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local act=false
if cm[tp]>2 and Duel.IsPlayerCanDraw(tp,1) then
if act then Duel.BreakEffect() end
Duel.Draw(tp,1,REASON_EFFECT)
act=true
end
if cm[tp]>3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
if tg:GetCount()>0 then
if act then Duel.BreakEffect() end
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
act=true
end
end
if cm[tp]>4 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
if act then Duel.BreakEffect() end
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
--龙辉巧星云
local m=11612621
local cm=_G["c"..m]
function c11612621.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--03
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_PREDRAW)
e3:SetCountLimit(1,11612622)
e3:SetCost(cm.cost)
e3:SetCondition(cm.condition)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return not c:IsSummonableCard()
end
function cm.costfilter(c)
return bit.band(c:GetType(),0x81)==0x81 and not c:IsPublic()
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 and Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,nil) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--cant special summon summonable card check
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(97148796)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
--
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--cant special summon summonable card check
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(97148796)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsSummonableCard()
end
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,11612625,0x154,TYPES_TOKEN_MONSTER,0,0,1,RACE_MACHINE,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,11612625,0x154,TYPES_TOKEN_MONSTER,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,11612625)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
--
function cm.thfilter(c)
return (c:IsType(TYPE_RITUAL) or c:IsSetCard(0x154)) and c:IsAbleToHand()
end
function cm.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x154) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetDrawCount(tp)>0 and Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_MZONE,0,1,nil)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
aux.DrawReplaceCount=aux.DrawReplaceCount+1
if aux.DrawReplaceCount<=aux.DrawReplaceMax then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
--龙辉巧的赠礼
local m=11612623
local cm=_G["c"..m]
function c11612623.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(cm.cost)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.cfilter1(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end
function cm.cfilter2(c)
return c:IsSetCard(0x154) and c:IsLevel(12)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter1,1,nil,tp) end
local g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_MZONE,0,nil)
if g:IsExists(cm.cfilter2,1,nil) then
local sg1=g:FilterSelect(tp,cm.cfilter2,1,1,nil)
g:RemoveCard(sg1:GetFirst())
local sg2=g:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.Release(sg1,REASON_COST)
end
end
--
function cm.cfilter2(c)
return c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local op=0
local ct=Duel.GetFieldGroupCount(0,tp,LOCATION_EXTRA)
if ct<2 then
op=1
else
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_EFFECT)
op=Duel.SelectOption(1-tp,aux.Stringid(m,2),aux.Stringid(m,1))
end
if op==0 then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetTarget(cm.sumlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
else
ct=math.floor(ct/2)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,nil)
if g2:GetCount()<=1 then return end
local sg=g2:Select(1-tp,ct,ct,nil)
if Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)~=0 and sg:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then
local c=e:GetHandler()
local og2=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED)
local tc=og2:GetFirst()
while tc do
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
tc=og2:GetNext()
end
og2:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(og2)
e1:SetCountLimit(1)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsSummonableCard()
end
\ No newline at end of file
--眠于星列中之记忆
local m=11612624
local cm=_G["c"..m]
function c11612624.initial_effect(c)
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x154) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_MZONE,0,1,nil)
end
function cm.nefilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and cm.nefilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(cm.nefilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,cm.nefilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
--
if Duel.IsExistingMatchingCard(cm.gfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,3,nil) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(cm.aclimit)
e1:SetLabel(tc:GetCode())
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.gfilter(c)
return c:IsSetCard(0x154) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
\ No newline at end of file
--龙仪巧-双鱼流星=PIS
if not require and loadfile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=loadfile(str)
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
return require_list[str]
end
return require_list[str]
end
end
local m=11612626
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/11610000") end) then require("script/11610000") end
cm.text=zhc_lhq_sy
function c11612626.initial_effect(c)
c:EnableReviveLimit()
--
local e00=fpjdiy.Zhc(c,cm.text)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(cm.valcheck)
c:RegisterEffect(e0)
--cannot be effect target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
--th
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,11612626)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.matcon)
e3:SetOperation(cm.matop)
c:RegisterEffect(e3)
e0:SetLabelObject(e3)
--copy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,3))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetRange(LOCATION_HAND)
e4:SetCountLimit(1,m*2+1)
e4:SetCost(cm.copycost)
--e4:SetCondition(cm.cpcon)
e4:SetTarget(cm.cptg)
e4:SetOperation(cm.cpop)
c:RegisterEffect(e4)
end
function cm.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and e:GetLabel()==1
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
function cm.lvfilter(c,rc)
return c:GetRitualLevel(rc)>0
end
function cm.valcheck(e,c)
local mg=c:GetMaterial()
local fg=mg:Filter(cm.lvfilter,nil,c)
if #fg>0 and fg:GetSum(Card.GetRitualLevel,c)<=2 then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
--1
function cm.efilter(e,te)
local ph=Duel.GetCurrentPhase()
return not (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
--2
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return e:GetHandler():GetFlagEffect(m)>0
end
function cm.etfilter(c)
return c:IsFaceup() and (c:GetAttack()>0 or c:GetDefense()>0 )
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.etfilter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.etfilter,tp,0,LOCATION_MZONE,1,nil) end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Group.CreateGroup()
local count=2
while count>0 do
if count<3 then Duel.BreakEffect() end
if count==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
g=Duel.SelectMatchingCard(tp,cm.etfilter,tp,0,LOCATION_MZONE,1,1,nil)
count=1
else
local rg=Duel.GetMatchingGroup(cm.etfilter,1-tp,LOCATION_MZONE,0,nil)
if rg:GetCount()<1 then return end
g=rg:RandomSelect(tp,1)
--local tc=g:GetFirst()
end
local tc=g:GetFirst()
local yatk=tc:GetAttack()
local ydef=tc:GetDefense()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
if tc:GetAttack()==0 or tc:GetDefense()==0 then
Duel.Destroy(tc,REASON_EFFECT)
count=0
end
if yatk==tc:GetAttack() and ydef==tc:GetDefense() then count=0 end
end
end
--03
function cm.copycost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function cm.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterialEx(tp)--:Filter(Card.IsRace,nil,RACE_ALL)
return Duel.IsExistingMatchingCard(cm.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,nil,e,tp,mg,nil,aux.GetCappedAttack,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterialEx(tp)--:Filter(Card.IsRace,nil,RACE_ALL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.RitualUltimateFilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,nil,e,tp,mg,nil,aux.GetCappedAttack,"Greater")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if sg then
mg:Merge(sg)
end
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=cm.RitualCheckAdditional(tc,tc:GetAttack(),"Greater")
local mat=mg:SelectSubGroup(tp,cm.RitualCheck,false,1,#mg,tp,tc,tc:GetAttack(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
local code=tc:GetCode()
if tc:GetFlagEffect(m)>0 then return end
tc:RegisterFlagEffect(code,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end
end
function cm.RitualCheckGreater(g,c,atk)
if atk==0 then return false end
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(aux.GetCappedAttack,atk)
end
function cm.RitualCheckEqual(g,c,atk)
if atk==0 then return false end
return g:CheckWithSumEqual(aux.GetCappedAttack,atk,#g,#g)
end
function cm.RitualCheck(g,tp,c,atk,greater_or_equal)
return cm["RitualCheck"..greater_or_equal](g,c,atk) and Duel.GetMZoneCount(tp,g,tp)>0 and (not c.mat_group_check or c.mat_group_check(g,tp))
and (not aux.RCheckAdditional or aux.RCheckAdditional(tp,g,c))
end
function cm.RitualCheckAdditional(c,atk,greater_or_equal)
if greater_or_equal=="Equal" then
return function(g)
return (not aux.RGCheckAdditional or aux.RGCheckAdditional(g)) and g:GetSum(aux.GetCappedAttack)<=atk
end
else
return function(g,ec)
if atk==0 then return #g<=1 end
if ec then
return (not aux.RGCheckAdditional or aux.RGCheckAdditional(g,ec)) and g:GetSum(aux.GetCappedAttack)-aux.GetCappedAttack(ec)<=atk
else
return not aux.RGCheckAdditional or aux.RGCheckAdditional(g)
end
end
end
end
function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,attack_function,greater_or_equal,chk)
if bit.band(c:GetType(),0x81)~=0x81 or not(c:IsSetCard(0x154)) or (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
if m2 then
mg:Merge(m2)
end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
else
mg:RemoveCard(c)
end
local atk=attack_function(c)
aux.GCheckAdditional=cm.RitualCheckAdditional(c,atk,greater_or_equal)
local res=mg:CheckSubGroup(cm.RitualCheck,1,#mg,tp,c,atk,greater_or_equal)
aux.GCheckAdditional=nil
return res
end
\ No newline at end of file
--龙仪巧-处女流星=AIR
if not require and loadfile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=loadfile(str)
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
return require_list[str]
end
return require_list[str]
end
end
local m=11612629
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/11610000") end) then require("script/11610000") end
cm.text=zhc_lhq_cn
function c11612629.initial_effect(c)
c:EnableReviveLimit()
--
local e00=fpjdiy.Zhc(c,cm.text)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(cm.valcheck)
c:RegisterEffect(e0)
--cannot be effect target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
--th
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.matcon)
e3:SetOperation(cm.matop)
c:RegisterEffect(e3)
e0:SetLabelObject(e3)
--copy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,3))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_DRAW)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCountLimit(1,m*2+1)
e4:SetCondition(cm.cpcon)
e4:SetTarget(cm.cptg)
e4:SetOperation(cm.cpop)
c:RegisterEffect(e4)
end
function cm.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and e:GetLabel()==1
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
function cm.lvfilter(c,rc)
return c:GetRitualLevel(rc)>0
end
function cm.valcheck(e,c)
local mg=c:GetMaterial()
local fg=mg:Filter(cm.lvfilter,nil,c)
if #fg>0 and fg:GetSum(Card.GetRitualLevel,c)<=2 then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
--1
function cm.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and (re:GetActivateLocation()==LOCATION_GRAVE or (re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSummonLocation(LOCATION_GRAVE)) )
end
--2
function cm.cfilter(c)
return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local ex,g,gc,dp,dv=Duel.GetOperationInfo(ev,CATEGORY_SPECIAL_SUMMON)
if e:GetHandler():GetFlagEffect(m)<=0 then return false end
return (((ex and (dv&LOCATION_GRAVE==LOCATION_GRAVE or g and g:IsExists(cm.cfilter,1,nil)) or re:IsHasCategory(CATEGORY_GRAVE_SPSUMMON))) or re:GetActivateLocation()==LOCATION_GRAVE ) and Duel.IsChainNegatable(ev) and rp==1-tp
end
function cm.etfilter(c)
return c:IsFaceup() and (c:GetAttack()>0 or c:GetDefense()>0 )
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
--03
function cm.cpcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE)
and e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.tfilter(c)
return c:IsSetCard(0x154) and c:IsAbleToHand()
end
function cm.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local bool_a=Duel.IsPlayerCanDraw(tp,1)
local bool_b=Duel.IsExistingMatchingCard(cm.tfilter,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return bool_a or bool_b end
local op=0
if bool_a and bool_b then
op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
elseif bool_a then
op=Duel.SelectOption(tp,aux.Stringid(m,0))
else
op=Duel.SelectOption(tp,aux.Stringid(m,1))+1
end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_DRAW)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
else
e:SetCategory(CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
end
function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.tfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
--龙仪巧-天蝎流星=SCO
if not require and loadfile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=loadfile(str)
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
return require_list[str]
end
return require_list[str]
end
end
local m=11612631
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/11610000") end) then require("script/11610000") end
cm.text=zhc_lhq_tx
function cm.initial_effect(c)
c:EnableReviveLimit()
--
local e00=fpjdiy.Zhc(c,cm.text)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(cm.valcheck)
c:RegisterEffect(e0)
--cannot be effect target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_PATRICIAN_OF_DARKNESS)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
c:RegisterEffect(e1)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_FIELD)
e12:SetCode(EFFECT_MUST_ATTACK)
e12:SetRange(LOCATION_MZONE)
e12:SetTargetRange(0,LOCATION_MZONE)
c:RegisterEffect(e12)
--th
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.spcon)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.matcon)
e3:SetOperation(cm.matop)
c:RegisterEffect(e3)
e0:SetLabelObject(e3)
--copy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,m*2+1)
e4:SetCode(EVENT_RELEASE)
e4:SetTarget(cm.detg)
e4:SetOperation(cm.deop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_DESTROYED)
c:RegisterEffect(e5)
end
--0
function cm.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and e:GetLabel()==1
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
function cm.lvfilter(c,rc)
return c:GetRitualLevel(rc)>0
end
function cm.valcheck(e,c)
local mg=c:GetMaterial()
local fg=mg:Filter(cm.lvfilter,nil,c)
if #fg>0 and fg:GetSum(Card.GetRitualLevel,c)<=2 then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
--
--1
--2
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:GetFirst()
while tc do
if tc:IsFaceup() and tc:IsControler(1-tp) then
tc:AddCounter(0x1161,1,REASON_EFFECT)
cm.counter(tc,c)
end
tc=eg:GetNext()
end
end
function cm.counter(tc,ec)
--tc:AddCounter(0x1161,1,REASON_EFFECT)
local e1=Effect.CreateEffect(ec)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
--e1:SetCondition(cm.atkcon)
e1:SetValue(cm.atkva)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
-- local e2=e1:Clone()
--e2:SetCode(EFFECT_UPDATE_DEFENSE)
--tc:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(ec)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCode(EFFECT_SELF_DESTROY)
e3:SetCondition(cm.descon)
tc:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(ec)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetCondition(cm.condition)
e4:SetOperation(cm.mtop)
tc:RegisterEffect(e4)
end
--function cm.atkcon(e)
-- return e:GetHandler():GetCounter(0x12c3)>0
--end
function cm.atkva(e)
local ct=e:GetHandler():GetCounter(0x1161)
return ct*(-400)
end
function cm.descon(e)
local c=e:GetHandler()
return c:IsAttack(0)
end
function cm.desfilter(c)
return c:GetCounter(0x1161)>0
end
function cm.desfilter2(c,s,tp)
local seq=c:GetSequence()
return seq<5 and math.abs(seq-s)==1 and c:IsControler(tp)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 and not Duel.CheckPhaseActivity() and c:GetCounter(0x1161)>0
end
function cm.mtop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message('你已无药可救')
local c=e:GetHandler()
if c:GetCounter(0x1161)<=0 then return end
c:AddCounter(0x1161,1,REASON_EFFECT)
local seq=c:GetSequence()
local dg=Duel.GetMatchingGroup(cm.desfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,seq,c:GetControler())
if seq<5 and dg:GetCount()>0 then
local dgc=dg:GetFirst()
while dgc do
if dgc:GetCounter(0x1161)<=0 then
cm.counter(dgc,c)
end
dgc:AddCounter(0x1161,1,REASON_EFFECT)
dgc=dg:GetNext()
end
end
end
--03
function cm.thfilter(c)
return c:IsSetCard(0x154) and c:IsAbleToHand()
end
function cm.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.deop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--龙仪巧-射手流星=SAG
if not require and loadfile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=loadfile(str)
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
return require_list[str]
end
return require_list[str]
end
end
local m=11612632
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/11610000") end) then require("script/11610000") end
cm.text=zhc_lhq_ss
function cm.initial_effect(c)
c:EnableReviveLimit()
--
local e00=fpjdiy.Zhc(c,cm.text)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(cm.valcheck)
c:RegisterEffect(e0)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.atktg)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
local e13=e1:Clone()
e13:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e13)
--th
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.matcon)
e3:SetOperation(cm.matop)
c:RegisterEffect(e3)
e0:SetLabelObject(e3)
--copy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCountLimit(1,m*2+1)
e4:SetRange(LOCATION_MZONE)
e4:SetLabel(0)
e4:SetCost(cm.decost)
e4:SetTarget(cm.detg)
e4:SetOperation(cm.deop)
c:RegisterEffect(e4)
end
--0
function cm.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and e:GetLabel()==1
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
function cm.lvfilter(c,rc)
return c:GetRitualLevel(rc)>0
end
function cm.valcheck(e,c)
local mg=c:GetMaterial()
local fg=mg:Filter(cm.lvfilter,nil,c)
if #fg>0 and fg:GetSum(Card.GetRitualLevel,c)<=2 then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
--
--1
function cm.atktg(e,c)
return c:IsSetCard(0x154) and c~=e:GetHandler()
end
function cm.atkfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL)
end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE+LOCATION_GRAVE,0,nil)*200
end
--2
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local c=e:GetHandler()
--EVENT_CHAINING
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
--e1:SetLabel(ac)
e1:SetOperation(cm.reop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetLabel(ac)
e2:SetCondition(cm.drawcon)
e2:SetOperation(cm.drawop)
c:RegisterEffect(e2)
--sp_summon effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetLabel(ac)
e3:SetCondition(cm.drcon1)
e3:SetOperation(cm.drop1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
--sp_summon effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_MZONE)
e4:SetLabel(ac)
e4:SetCondition(cm.regcon)
e4:SetOperation(cm.regop)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_CHAIN_SOLVED)
e5:SetRange(LOCATION_MZONE)
e5:SetLabel(ac)
e5:SetCondition(cm.drcon2)
e5:SetOperation(cm.drop2)
e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e5)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1)
end
function cm.drawcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ac=e:GetLabel()
return ep~=tp and re:GetHandler():IsCode(ac) and Duel.GetFlagEffect(tp,m)~=0
end
function cm.drawop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
--
function cm.filter(c,sp,ac)
return c:IsSummonPlayer(sp) and c:IsCode(ac)
end
function cm.drcon1(e,tp,eg,ep,ev,re,r,rp)
local ac=e:GetLabel()
return eg:IsExists(cm.filter,1,nil,1-tp,ac)
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end
function cm.drop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
--
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local ac=e:GetLabel()
return eg:IsExists(cm.filter,1,nil,1-tp,ac)
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m*2+1,RESET_CHAIN,0,1)
--Debug.Message('123')
end
--
function cm.drcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m*2+1)>0
end
function cm.drop2(e,tp,eg,ep,ev,re,r,rp)
local n=Duel.GetFlagEffect(tp,m*2+1)
Duel.ResetFlagEffect(tp,m*2+1)
Duel.Draw(tp,1,REASON_EFFECT)
end
--123
--03
function cm.decost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function cm.costfilter(c,e,tp)
local atk=c:GetAttack()
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.filter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,atk,tp)
end
function cm.filter2(c,e,atk,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x154) and c:GetBaseAttack()<=atk and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.spgck(g,e,tp,atk)
if Duel.IsPlayerAffectedByEffect(tp,59822133) and g:GetCount()>1 then return false end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>=g:GetCount() and g:GetSum(Card.GetAttack)<=atk
end
function cm.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
e:SetLabel(0)
return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,nil,e,tp)
end
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,99,nil,e,tp)
local atk=g:GetSum(Card.GetAttack)
Duel.Release(g,REASON_COST)
e:SetLabel(atk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.deop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=e:GetLabel()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,atk,tp)
if ft<=0 then return false end
--if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=tg:SelectSubGroup(tp,cm.spgck,false,1,5,e,tp,atk)
local ct=0
local sc=sg:GetFirst()
while sc do
Duel.SpecialSummon(sc,SUMMON_TYPE_SPECIAL,tp,tp,false,false,POS_FACEUP_DEFENSE)
ct=ct+1
sc=sg:GetNext()
end
Duel.BreakEffect()
--if ct==0 or not Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.spfilter),1-tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,1-tp) or Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 then return end
local loc=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
if ct<1 or loc<1 then return end
if ct>loc then ct=loc end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
if ct>1 and Duel.IsPlayerAffectedByEffect(1-tp,59822133) then ct=1 end
--Debug.Message(ct)
local g=Duel.SelectMatchingCard(1-tp,aux.NecroValleyFilter(cm.spfilter),1-tp,LOCATION_DECK+LOCATION_GRAVE,0,ct,ct,nil,e,1-tp)
cm.sp(g,1-tp,POS_FACEUP)
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sp(g,tp,pos)
local sc=g:GetFirst()
while sc do
Duel.SpecialSummonStep(sc,0,tp,tp,false,false,pos)
local e1=Effect.CreateEffect(sc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=Effect.CreateEffect(sc)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2)
sc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
\ No newline at end of file
This diff is collapsed.
--龙仪巧-仙王流星=CEP
if not require and loadfile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=loadfile(str)
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
return require_list[str]
end
return require_list[str]
end
end
local m=11612634
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/11610000") end) then require("script/11610000") end
cm.text=zhc_lhq_xw
cm.ts1=zhc_lhq_xw_1
local ts1c=0
cm.ts2=zhc_lhq_xw_2
local count=6
function cm.initial_effect(c)
aux.AddXyzProcedure(c,nil,12,count*2)
c:EnableReviveLimit()
--
local e00=fpjdiy.Zhc(c,cm.text)
--
--adjust
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_ADJUST)
e1:SetRange(0xff)
e1:SetOperation(cm.adjustop)
c:RegisterEffect(e1)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SPSUMMON_COST)
e6:SetCost(cm.e6cost)
c:RegisterEffect(e6)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_EXTRA)
e2:SetCountLimit(1)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
--e2:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_OVERLAY_RITUAL_MATERIAL)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(m)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_UNCOPYABLE)
e4:SetTargetRange(1,0)
c:RegisterEffect(e4)
--special summon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_NEGATE)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetCountLimit(1)
--e5:SetCondition(cm.spcon)
--e5:SetCost(cm.spcost)
e5:SetTarget(cm.tg)
e5:SetOperation(cm.op)
c:RegisterEffect(e5)
--cannot NegateActivation
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetRange(0x7f)
e12:SetCode(EFFECT_CANNOT_DISABLE)
e12:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
c:RegisterEffect(e12)
local e13=Effect.CreateEffect(c)
e13:SetType(EFFECT_TYPE_FIELD)
e13:SetRange(0x7f)
e13:SetCode(EFFECT_CANNOT_INACTIVATE)
e13:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e13:SetValue(cm.effectfilter)
c:RegisterEffect(e13)
local e14=Effect.CreateEffect(c)
e14:SetType(EFFECT_TYPE_FIELD)
e14:SetRange(0x7f)
e14:SetCode(EFFECT_CANNOT_DISEFFECT)
e14:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e14:SetValue(cm.effectfilter)
c:RegisterEffect(e14)
if not cm.global_flag then
cm.global_flag=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(cm.regop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if not cm.globle_check then
cm.globle_check=true
local g=Duel.GetMatchingGroup(Card.IsOriginalCodeRule,0,0xff,0xff,nil,22398665)
for tc in aux.Next(g) do
table_effect={}
tc:ReplaceEffect(m+1,0)
end
end
e:Reset()
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x154) and tc:GetSummonType()==SUMMON_TYPE_RITUAL then
if Duel.GetFlagEffect(tc:GetSummonPlayer(),11612635)~=0 then
for _,i in ipairs{Duel.GetFlagEffectLabel(tc:GetSummonPlayer(),11612635)} do
if i==tc:GetCode() then return end
end
end
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),11612635,0,0,0,tc:GetCode())
local set={Duel.GetFlagEffectLabel(tp,11612635)}
if ts1c==0 and (#set)>=count then
fpjdiy.printLines(cm.ts1)
--Debug.Message(cm.ts1)
ts1c=1
elseif ts1c==1 and (#set)>=(count*2) then
fpjdiy.printLines(cm.ts2)
--Debug.Message(cm.ts2)
ts1c=2
end
end
end
end
--
function cm.e6cost(e,c,tp,st)
if bit.band(st,SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_XYZ then
return false
elseif bit.band(st,SUMMON_TYPE_XYZ)~=SUMMON_TYPE_XYZ then
return true
else
return false
end
end
--
function cm.cfilter(c,tp,sc)
return c:IsFaceup() and c:IsLevel(12) and c:IsCanBeXyzMaterial(sc)
end
function cm.cfilter2(c,sc)
return c:IsLevel(12) and c:IsType(TYPE_RITUAL) and ( c:IsFaceup() or c:IsLocation(LOCATION_GRAVE) ) and c:IsCanBeXyzMaterial(sc)
end
function cm.cfilter3(c,sc)
return c:IsFaceup() and c:IsCanBeXyzMaterial(sc)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local set={Duel.GetFlagEffectLabel(tp,11612635)}
local zone=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,0,nil,tp,c)
local loc=LOCATION_MZONE
local loa=0
if (#set)>=(count) then
loc=LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED
local ag=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,zone,c)
zone:Merge(ag)
if (#set)>=(count*2) then
loa=LOCATION_MZONE
local bg=Duel.GetMatchingGroup(cm.cfilter3,tp,0,LOCATION_MZONE,zone,c)
zone:Merge(bg)
end
end
local maxc=zone:GetCount()
if Duel.GetFlagEffect(tp,11612635)==0 or (#set)<1 then return false end
return maxc>=(count*2)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if og and not min then
return true
end
local set={Duel.GetFlagEffectLabel(tp,11612635)}
local mg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,0,nil,tp,c)
if (#set)>=(count) then
local ag=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,c)
mg:Merge(ag)
end
if (#set)>=(count*2) then
local bg=Duel.GetMatchingGroup(cm.cfilter3,tp,0,LOCATION_MZONE,nil,c)
mg:Merge(bg)
end
local minc=(count*2)
local maxc=mg:GetCount()
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local sg=Group.CreateGroup()
while sg:GetCount()<(count*2) do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=mg:FilterSelect(tp,aux.TRUE,1,1,sg)
sg:Merge(g)
end
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
if og and not min then
local sg=Group.CreateGroup()
local tc=og:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=og:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(og)
Duel.Overlay(c,og)
else
local mg=e:GetLabelObject()
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(mg)
Duel.Overlay(c,mg)
mg:DeleteGroup()
end
end
--03
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=1 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,nil)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local code=c:GetCode()
getmetatable(c).announce_filter={ TYPE_MONSTER,OPCODE_ISTYPE,code,OPCODE_ISCODE,OPCODE_NOT,TYPE_RITUAL,OPCODE_ISTYPE,OPCODE_AND,OPCODE_AND }
local ac=Duel.AnnounceCard(tp,table.unpack( getmetatable(c).announce_filter ))
if rcode~=nil then return false end
local rc=Duel.CreateToken(tp,ac)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(rc,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
if rc:IsSetCard(0x154) then
rc:RegisterFlagEffect(ac,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
end
end
\ No newline at end of file
--仙王流星·辉巧
function c11612635.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22398665,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c11612635.target)
e1:SetOperation(c11612635.operation)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22398665,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c11612635.thcon)
e2:SetTarget(c11612635.thtg)
e2:SetOperation(c11612635.thop)
c:RegisterEffect(e2)
end
function c11612635.thcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,11612634) then
return true
else return Duel.GetFlagEffect(tp,22398665)<1 end
end
function c11612635.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x154) and c:IsAttackAbove(1000)
end
function c11612635.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c11612635.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11612635.cfilter,tp,LOCATION_MZONE,0,1,nil) and e:GetHandler():IsAbleToHand() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c11612635.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.RegisterFlagEffect(tp,22398665,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c11612635.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsAttackAbove(1000) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e1)
if not tc:IsHasEffect(EFFECT_REVERSE_UPDATE) and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
end
function c11612635.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterialEx(tp)--:Filter(Card.IsRace,nil,RACE_ALL)
if not Duel.IsPlayerAffectedByEffect(tp,11612607) then
mg=Duel.GetRitualMaterialEx(tp):Filter(Card.IsRace,nil,RACE_MACHINE)
end
return Duel.IsExistingMatchingCard(c11612635.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,nil,e,tp,mg,nil,aux.GetCappedAttack,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c11612635.operation(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterialEx(tp)--:Filter(Card.IsRace,nil,RACE_ALL)
if not Duel.IsPlayerAffectedByEffect(tp,11612607) then
mg=Duel.GetRitualMaterialEx(tp):Filter(Card.IsRace,nil,RACE_MACHINE)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11612635.RitualUltimateFilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,nil,e,tp,mg,nil,aux.GetCappedAttack,"Greater")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if sg then
mg:Merge(sg)
end
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=c11612635.RitualCheckAdditional(tc,tc:GetAttack(),"Greater")
local mat=mg:SelectSubGroup(tp,c11612635.RitualCheck,false,1,#mg,tp,tc,tc:GetAttack(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c11612635.RitualCheckGreater(g,c,atk)
if atk==0 then return false end
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(aux.GetCappedAttack,atk)
end
function c11612635.RitualCheckEqual(g,c,atk)
if atk==0 then return false end
return g:CheckWithSumEqual(aux.GetCappedAttack,atk,#g,#g)
end
function c11612635.RitualCheck(g,tp,c,atk,greater_or_equal)
return c11612635["RitualCheck"..greater_or_equal](g,c,atk) and Duel.GetMZoneCount(tp,g,tp)>0 and (not c.mat_group_check or c.mat_group_check(g,tp))
and (not aux.RCheckAdditional or aux.RCheckAdditional(tp,g,c))
end
function c11612635.RitualCheckAdditional(c,atk,greater_or_equal)
if greater_or_equal=="Equal" then
return function(g)
return (not aux.RGCheckAdditional or aux.RGCheckAdditional(g)) and g:GetSum(aux.GetCappedAttack)<=atk
end
else
return function(g,ec)
if atk==0 then return #g<=1 end
if ec then
return (not aux.RGCheckAdditional or aux.RGCheckAdditional(g,ec)) and g:GetSum(aux.GetCappedAttack)-aux.GetCappedAttack(ec)<=atk
else
return not aux.RGCheckAdditional or aux.RGCheckAdditional(g)
end
end
end
end
function c11612635.RitualUltimateFilter(c,filter,e,tp,m1,m2,attack_function,greater_or_equal,chk)
if bit.band(c:GetType(),0x81)~=0x81 or (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
if m2 then
mg:Merge(m2)
end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
else
mg:RemoveCard(c)
end
local atk=attack_function(c)
aux.GCheckAdditional=c11612635.RitualCheckAdditional(c,atk,greater_or_equal)
local res=mg:CheckSubGroup(c11612635.RitualCheck,1,#mg,tp,c,atk,greater_or_equal)
aux.GCheckAdditional=nil
return res
end
--龙仪巧-小熊流星=URS
if not require and loadfile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=loadfile(str)
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
return require_list[str]
end
return require_list[str]
end
end
local m=11612636
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/11610000") end) then require("script/11610000") end
cm.text=zhc_lhq_xx
function c11612636.initial_effect(c)
c:EnableReviveLimit()
--
local e00=fpjdiy.Zhc(c,cm.text)
--
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(11612636,0))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(c11612636.valcheck)
c:RegisterEffect(e0)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c11612636.efilter)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c11612636.rmcon)
e3:SetOperation(c11612636.rmop)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c11612636.matcon)
e3:SetOperation(c11612636.matop)
c:RegisterEffect(e3)
e0:SetLabelObject(e3)
--control
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetDescription(aux.Stringid(11612636,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11612636)
e2:SetTarget(c11612636.thtg)
e2:SetOperation(c11612636.thop)
c:RegisterEffect(e2)
end
function c11612636.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(0x1) and not te:GetHandler():IsLevelAbove(1)
end
function c11612636.lvfilter(c,rc)
return c:GetRitualLevel(rc)>0
end
function c11612636.valcheck(e,c)
local mg=c:GetMaterial()
local fg=mg:Filter(c11612636.lvfilter,nil,c)
if #fg>0 and fg:GetSum(Card.GetRitualLevel,c)<=2 then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c11612636.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and e:GetLabel()==1
end
function c11612636.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(11612636,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11612636,0))
end
function c11612636.cfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsLevel(0)
end
function c11612636.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(c11612636.cfilter,1,nil,1-tp) and e:GetHandler():GetFlagEffect(11612636)>0
end
function c11612636.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,2)
Duel.Hint(HINT_CARD,0,11612636)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
--
function c11612636.thfilter(c)
return c:IsCode(22398665) and c:IsAbleToHand()
end
function c11612636.sfilter(c,e,tp)
return c:IsSetCard(0x154) and c:IsType(TYPE_MONSTER) and c:IsLevel(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11612636.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11612636.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c11612636.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11612636.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c11612636.sfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) and c:IsAbleToRemove() and Duel.SelectYesNo(tp,aux.Stringid(11612636,1)) then
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11612636.sfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
\ No newline at end of file
--龙仪巧-凤凰流星=PHO
if not require and loadfile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=loadfile(str)
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
return require_list[str]
end
return require_list[str]
end
end
local m=11612637
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/11610000") end) then require("script/11610000") end
cm.text=zhc_lhq_fh
function c11612637.initial_effect(c)
c:EnableReviveLimit()
--
local e00=fpjdiy.Zhc(c,cm.text)
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(11612637,0))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(c11612637.valcheck)
c:RegisterEffect(e0)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(c11612637.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c11612637.damcon1)
e2:SetOperation(c11612637.damop1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c11612637.regcon)
e3:SetOperation(c11612637.regop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_CHAIN_SOLVED)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c11612637.damcon2)
e4:SetOperation(c11612637.damop2)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c11612637.matcon)
e3:SetOperation(c11612637.matop)
c:RegisterEffect(e3)
e0:SetLabelObject(e3)
if not c11612637.global_check then
c11612637.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVING)
ge1:SetOperation(c11612637.count)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_CHAIN_SOLVED)
ge2:SetOperation(c11612637.reset)
Duel.RegisterEffect(ge2,0)
end
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11612637,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,11612637)
e2:SetCondition(c11612637.spcon)
e2:SetTarget(c11612637.sptg)
e2:SetOperation(c11612637.spop)
c:RegisterEffect(e2)
end
function c11612637.atkfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x154)
end
function c11612637.atkval(e,c,tp)
local g=Duel.GetMatchingGroup(c11612637.atkfilter,tp,LOCATION_GRAVE,0,nil,nil)
return g:GetClassCount(Card.GetCode)*-200
end
function c11612637.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and e:GetLabel()==1
end
function c11612637.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(11612637,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11612637,0))
end
function c11612637.lvfilter(c,rc)
return c:GetRitualLevel(rc)>0
end
function c11612637.valcheck(e,c)
local mg=c:GetMaterial()
local fg=mg:Filter(c11612637.lvfilter,nil,c)
if #fg>0 and fg:GetSum(Card.GetRitualLevel,c)<=2 then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c11612637.count(e,tp,eg,ep,ev,re,r,rp)
c11612637.chain_solving=true
end
function c11612637.reset(e,tp,eg,ep,ev,re,r,rp)
c11612637.chain_solving=false
end
function c11612637.damcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,1-tp) and not c11612637.chain_solving
and e:GetHandler():GetFlagEffect(11612637)>0
end
function c11612637.damop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,11612637)
local ct=eg:FilterCount(Card.IsControler,nil,1-tp)
Duel.Damage(1-tp,ct*150,REASON_EFFECT)
end
function c11612637.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,1-tp) and c11612637.chain_solving
and e:GetHandler():GetFlagEffect(11612637)>0
end
function c11612637.regop(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(Card.IsControler,nil,1-tp)
e:GetHandler():RegisterFlagEffect(11612638,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1,ct)
end
function c11612637.damcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(11612638)>0 and e:GetHandler():GetFlagEffect(11612637)>0
end
function c11612637.damop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,11612637)
local labels={e:GetHandler():GetFlagEffectLabel(11612638)}
local ct=0
for i=1,#labels do ct=ct+labels[i] end
e:GetHandler():ResetFlagEffect(11612638)
Duel.Damage(1-tp,ct*150,REASON_EFFECT)
end
function c11612637.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_RITUAL) and rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c11612637.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11612637.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)
local code=c:GetCode()
if c:GetFlagEffect(11612637)>0 then return end
c:RegisterFlagEffect(code,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11612637,1))
c:CompleteProcedure()
end
end
\ No newline at end of file
--龙仪巧-船尾流星=PUP
if not require and loadfile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=loadfile(str)
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
return require_list[str]
end
return require_list[str]
end
end
local m=11612639
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/11610000") end) then require("script/11610000") end
cm.text=zhc_lhq_cw
function c11612639.initial_effect(c)
c:EnableReviveLimit()
--
local e00=fpjdiy.Zhc(c,cm.text)
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(11612639,0))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(c11612639.valcheck)
c:RegisterEffect(e0)
--cannot remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTarget(c11612639.rmlimit)
e2:SetTargetRange(0,1)
c:RegisterEffect(e2)
--sucai
--[[local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11612639,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,11612639)
e3:SetCondition(c11612639.xyzcon)
e3:SetTarget(c11612639.xyztg)
e3:SetOperation(c11612639.xyzop)
c:RegisterEffect(e3)--]]
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c11612639.matcon)
e3:SetOperation(c11612639.matop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_SEND_REPLACE)
e4:SetCondition(c11612639.xyzcon)
e4:SetTarget(c11612639.reptg)
e4:SetValue(c11612639.repval)
c:RegisterEffect(e4)
local g=Group.CreateGroup()
g:KeepAlive()
e4:SetLabelObject(g)
e0:SetLabelObject(e3)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,116126390)
e1:SetCost(c11612639.thcost)
e1:SetTarget(c11612639.thtg)
e1:SetOperation(c11612639.thop)
c:RegisterEffect(e1)
end
function c11612639.repfilter(c,tp)
return c:GetOwner()==1-tp and c:GetDestination()==LOCATION_GRAVE and c:GetLeaveFieldDest()==0 and c:IsReason(REASON_DESTROY)
end
function c11612639.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c11612639.repfilter,1,nil,tp) end
if 1==1 then
local container=e:GetLabelObject()
container:Clear()
local g=eg:Filter(c11612639.repfilter,nil,tp)
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(11612639,RESET_EVENT+0x1fe0000-RESET_TOHAND-RESET_TODECK-RESET_LEAVE+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetValue(0x154)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOHAND-RESET_TODECK-RESET_LEAVE)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1)
e1:SetCondition(c11612639.thcon2)
e1:SetOperation(c11612639.thop2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.SendtoHand(g,tp,REASON_EFFECT)
container:Merge(g)
return true
else return false end
end
function c11612639.repval(e,c)
return e:GetLabelObject():IsContains(c)
end
function c11612639.thfilter2(c)
return c:GetFlagEffect(11612639)~=0
end
function c11612639.thcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11612639.thfilter2,1,nil)
end
function c11612639.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(c11612639.thfilter2,nil)
Duel.ConfirmCards(1-tp,g)
g=g:Filter(Card.IsType,nil,TYPE_MONSTER)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_MACHINE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
Duel.ShuffleHand(tp)
end
function c11612639.rmlimit(e,c,p)
return c:IsControler(tp)
end
function c11612639.lvfilter(c,rc)
return c:GetRitualLevel(rc)>0
end
function c11612639.valcheck(e,c)
local mg=c:GetMaterial()
local fg=mg:Filter(c11612639.lvfilter,nil,c)
if #fg>0 and fg:GetSum(Card.GetRitualLevel,c)<=2 then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c11612639.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and e:GetLabel()==1
end
function c11612639.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(11612639,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11612639,0))
end
function c11612639.xyzcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(11612639)>0
end
function c11612639.xyz1filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c11612639.xyz2filter(c)
return (c:IsFacedown() or c:IsType(TYPE_MONSTER)) and c:IsCanOverlay()
end
function c11612639.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsSetCard(0x154)
end
function c11612639.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) end
local g=Duel.GetFieldGroup(1-tp,0,LOCATION_EXTRA)
if chk==0 then
local ct=Duel.GetMatchingGroupCount(c11612639.cfilter,tp,LOCATION_MZONE,0,nil)
e:SetLabel(ct)
if ct==0 then return end
if ct>3 then ct=3 end
return g:FilterCount(c11612639.xyz2filter,nil)>0 and Duel.IsExistingMatchingCard(c11612639.xyz1filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.SelectTarget(tp,c11612639.xyz2filter,tp,0,LOCATION_EXTRA,1,ct,e:GetHandler())
end
function c11612639.xyzop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c11612639.cfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(c11612639.xyz2filter,1-tp,LOCATION_EXTRA,0,nil)
if ct==0 then return end
if ct>3 then ct=3 end
if g:GetCount()>=ct then
local rg=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA):RandomSelect(1-tp,ct)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=Duel.SelectMatchingCard(tp,c11612639.xyz1filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(rg)
Duel.Overlay(sg:GetFirst(),rg)
end
end
function c11612639.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c11612639.tgfilter(c,tp)
return c:IsCode(11612610,11612611,11612614,11612616,11612626,11612627,11612629,11612630,11612631,11612632,11612633) and c:IsAbleToGrave()
and Duel.IsExistingMatchingCard(c11612639.thfilter,tp,LOCATION_DECK,0,1,nil)
end
function c11612639.thfilter(c)
return c:IsCode(11612628) and c:IsAbleToHand()
end
function c11612639.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11612639.tgfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11612639.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c11612639.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c11612639.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
\ No newline at end of file
--龙辉巧栗子球
local m=11612640
local cm=_G["c"..m]
function c11612640.initial_effect(c)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11612640,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11612640)
e1:SetCondition(c11612640.spcon)
e1:SetTarget(c11612640.sptg)
e1:SetOperation(c11612640.spop)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,116126400)
e2:SetTarget(c11612640.eqtg)
e2:SetOperation(c11612640.eqop)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11612640,1))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c11612640.drcon)
e3:SetOperation(c11612640.drop)
c:RegisterEffect(e3)
end
function c11612640.drcon(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
local bc=ec:GetBattleTarget()
return e:GetHandler():GetEquipTarget()==eg:GetFirst() and ec:IsControler(tp)
and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE)
end
function c11612640.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,11612640)
Duel.Draw(tp,1,REASON_EFFECT)
end
function c11612640.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x154)
end
function c11612640.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c11612640.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c11612640.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c11612640.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c11612640.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(tp) then
if not Duel.Equip(tp,c,tc) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(c11612640.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
end
function c11612640.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c11612640.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c11612640.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterialEx(tp)--:Filter(Card.IsRace,nil,RACE_ALL)
return Duel.IsExistingMatchingCard(cm.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,nil,e,tp,mg,nil,aux.GetCappedAttack,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c11612640.spop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterialEx(tp)--:Filter(Card.IsRace,nil,RACE_ALL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.RitualUltimateFilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,nil,e,tp,mg,nil,aux.GetCappedAttack,"Greater")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if sg then
mg:Merge(sg)
end
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=cm.RitualCheckAdditional(tc,tc:GetAttack(),"Greater")
local mat=mg:SelectSubGroup(tp,cm.RitualCheck,false,1,#mg,tp,tc,tc:GetAttack(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
local at=Duel.GetAttacker()
if at:IsAttackable() and not at:IsImmuneToEffect(e) then
Duel.CalculateDamage(at,tc)
end
end
end
function cm.RitualCheckGreater(g,c,atk)
if atk==0 then return false end
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(aux.GetCappedAttack,atk)
end
function cm.RitualCheckEqual(g,c,atk)
if atk==0 then return false end
return g:CheckWithSumEqual(aux.GetCappedAttack,atk,#g,#g)
end
function cm.RitualCheck(g,tp,c,atk,greater_or_equal)
return cm["RitualCheck"..greater_or_equal](g,c,atk) and Duel.GetMZoneCount(tp,g,tp)>0 and (not c.mat_group_check or c.mat_group_check(g,tp))
and (not aux.RCheckAdditional or aux.RCheckAdditional(tp,g,c))
end
function cm.RitualCheckAdditional(c,atk,greater_or_equal)
if greater_or_equal=="Equal" then
return function(g)
return (not aux.RGCheckAdditional or aux.RGCheckAdditional(g)) and g:GetSum(aux.GetCappedAttack)<=atk
end
else
return function(g,ec)
if atk==0 then return #g<=1 end
if ec then
return (not aux.RGCheckAdditional or aux.RGCheckAdditional(g,ec)) and g:GetSum(aux.GetCappedAttack)-aux.GetCappedAttack(ec)<=atk
else
return not aux.RGCheckAdditional or aux.RGCheckAdditional(g)
end
end
end
end
function cm.RitualUltimateFilter(c,filter,e,tp,m1,m2,attack_function,greater_or_equal,chk)
if bit.band(c:GetType(),0x81)~=0x81 or not(c:IsSetCard(0x154)) or not(c:IsLevel(12)) or (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
if m2 then
mg:Merge(m2)
end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
else
mg:RemoveCard(c)
end
local atk=attack_function(c)
aux.GCheckAdditional=cm.RitualCheckAdditional(c,atk,greater_or_equal)
local res=mg:CheckSubGroup(cm.RitualCheck,1,#mg,tp,c,atk,greater_or_equal)
aux.GCheckAdditional=nil
return res
end
--龙仪巧-盾牌流星=SCU
if not require and loadfile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=loadfile(str)
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
return require_list[str]
end
return require_list[str]
end
end
local m=11612642
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/11610000") end) then require("script/11610000") end
cm.text=zhc_lhq_dp
function c11612642.initial_effect(c)
c:EnableReviveLimit()
--
local e00=fpjdiy.Zhc(c,cm.text)
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(11612642,0))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(c11612642.valcheck)
c:RegisterEffect(e0)
--pierce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(LOCATION_GRAVE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x154))
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetCondition(c11612642.econ)
e1:SetTarget(c11612642.etg)
e1:SetValue(c11612642.efilter)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c11612642.matcon)
e3:SetOperation(c11612642.matop)
c:RegisterEffect(e3)
e0:SetLabelObject(e3)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11612642,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,11612642)
e2:SetCondition(c11612642.negcon)
e2:SetTarget(c11612642.negtg)
e2:SetOperation(c11612642.negop)
c:RegisterEffect(e2)
end
function c11612642.lvfilter(c,rc)
return c:GetRitualLevel(rc)>0
end
function c11612642.valcheck(e,c)
local mg=c:GetMaterial()
local fg=mg:Filter(c11612642.lvfilter,nil,c)
if #fg>0 and fg:GetSum(Card.GetRitualLevel,c)<=2 then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c11612642.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and e:GetLabel()==1
end
function c11612642.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(11612642,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11612642,0))
end
function c11612642.econ(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(11612642)>0
end
function c11612642.etg(e,c)
local seq=c:GetSequence()
return c:IsSetCard(0x154) and c~=e:GetHandler() and seq<5 and math.abs(e:GetHandler():GetSequence()-seq)<=1
end
function c11612642.efilter(e,re)
return not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c11612642.tfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x154) and c:IsControler(tp)
end
function c11612642.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g:GetCount()>0 and rp==1-tp and g:FilterCount(c11612642.tfilter,nil,tp)==#g
end
function c11612642.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c11612642.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP_DEFENSE)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
Duel.BreakEffect()
Duel.ChangeTargetCard(ev,Group.FromCards(c))
end
end
\ No newline at end of file
--龙仪巧-飞马流星=PEG
if not require and loadfile then
function require(str)
require_list=require_list or {}
if not require_list[str] then
if string.find(str,"%.") then
require_list[str]=loadfile(str)
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
return require_list[str]
end
return require_list[str]
end
end
local m=11612643
local cm=_G["c"..m]
if not pcall(function() require("expansions/script/11610000") end) then require("script/11610000") end
cm.text=zhc_lhq_fm
function c11612643.initial_effect(c)
c:EnableReviveLimit()
local e00=fpjdiy.Zhc(c,cm.text)
--
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(11612643,0))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(c11612643.valcheck)
c:RegisterEffect(e0)
--extra attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EXTRA_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c11612643.atkval)
c:RegisterEffect(e3)
--damage reduce
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c11612643.atkcon)
e4:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE))
c:RegisterEffect(e4)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11612643,2))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetCountLimit(1,11612643)
e3:SetCondition(c11612643.econ)
e3:SetTarget(c11612643.target)
e3:SetOperation(c11612643.operation)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c11612643.matcon)
e3:SetOperation(c11612643.matop)
c:RegisterEffect(e3)
e0:SetLabelObject(e3)
--SpecialSummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(11612643,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e5:SetCountLimit(1,116126430)
e5:SetCondition(c11612643.spcon)
e5:SetCost(c11612643.spcost)
e5:SetTarget(c11612643.sptg)
e5:SetOperation(c11612643.spop)
c:RegisterEffect(e5)
end
function c11612643.lvfilter(c,rc)
return c:GetRitualLevel(rc)>0
end
function c11612643.valcheck(e,c)
local mg=c:GetMaterial()
local fg=mg:Filter(c11612643.lvfilter,nil,c)
if #fg>0 and fg:GetSum(Card.GetRitualLevel,c)<=2 then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c11612643.atkcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetAttackTarget()==nil and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c11612643.atkfilter(c)
return c:IsType(TYPE_RITUAL)
end
function c11612643.atkval(e,c)
return Duel.GetMatchingGroupCount(c11612643.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
end
function c11612643.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and e:GetLabel()==1
end
function c11612643.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(11612643,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11612643,0))
end
function c11612643.econ(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(11612643)>0
end
function c11612643.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
end
function c11612643.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetValue(10262698)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_MONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_CHANGE_RACE)
e3:SetValue(RACE_ROCK)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(ATTRIBUTE_EARTH)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
if tc:IsType(TYPE_TRAP) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_CHANGE_RANK_FINAL)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
end
end
function c11612643.cfilter(c,tp,rp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsSetCard(0x154)
end
function c11612643.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11612643.cfilter,1,nil,tp,rp)
end
function c11612643.rfilter(c)
return c:IsAttackAbove(1) and c:IsReleasable()
end
function c11612643.fselect(g,tp)
return g:GetSum(Card.GetAttack)>=4000
end
function c11612643.gcheck(g)
return g:GetSum(Card.GetAttack)>=1
end
function c11612643.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c11612643.rfilter,tp,LOCATION_MZONE,0,nil)
aux.GCheckAdditional=c11612643.gcheck
if chk==0 then
local res=g:CheckSubGroup(c11612643.fselect,1,g:GetCount(),tp)
aux.GCheckAdditional=nil
return res
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=g:SelectSubGroup(tp,c11612643.fselect,false,1,g:GetCount(),tp)
aux.GCheckAdditional=nil
Duel.Release(rg,REASON_COST)
end
function c11612643.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11612643.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)
local code=c:GetCode()
if c:GetFlagEffect(11612643)>0 then return end
c:RegisterFlagEffect(code,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11612643,1))
c:CompleteProcedure()
end
end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
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