Commit 5376146b authored by POLYMER's avatar POLYMER

fix

parent 89f8f57e
No preview for this file type
...@@ -55,21 +55,23 @@ function cm.CheckGroupRecursive(sg,g,f,min,max,ext_params) ...@@ -55,21 +55,23 @@ function cm.CheckGroupRecursive(sg,g,f,min,max,ext_params)
if (#sg>=min and #sg<=max and f(sg,table.unpack(ext_params))) or (#sg<max and cm.CheckGroupRecursive(sg,eg,f,min,max,ext_params)) then return true end if (#sg>=min and #sg<=max and f(sg,table.unpack(ext_params))) or (#sg<max and cm.CheckGroupRecursive(sg,eg,f,min,max,ext_params)) then return true end
end end
sg:RemoveCard(c) sg:RemoveCard(c)
eg:RemoveCard(c) eg:Sub(eg:Filter(cm.slfilter,nil,c))
end end
return false return false
end end
function cm.CheckGroupRecursiveCapture(bool,sg,g,f,min,max,ext_params) function cm.CheckGroupRecursiveCapture(bool,sg,g,f,min,max,ext_params)
local eg=g:Clone() local eg=g:Clone()
if bool then cm.esg=sg:Clone() end if bool then cm.esg=sg:Clone() cm.eeg=g:Clone() end
for c in aux.Next(g-sg) do local tempg=g-sg
local c=tempg:GetFirst()
while c do
if not bool or not Auxiliary.SubGroupCaptured:IsContains(c) then if not bool or not Auxiliary.SubGroupCaptured:IsContains(c) then
sg:AddCard(c) sg:AddCard(c)
if not Auxiliary.GCheckAdditional or Auxiliary.GCheckAdditional(sg,c,eg,f,min,max,ext_params) then if not Auxiliary.GCheckAdditional or Auxiliary.GCheckAdditional(sg,c,eg,f,min,max,ext_params) then
if (#sg>=min and #sg<=max and f(sg,table.unpack(ext_params))) then -- or (#sg<max and cm.CheckGroupRecursiveCapture(false,sg,eg,f,min,max,ext_params)) then if (#sg>=min and #sg<=max and f(sg,table.unpack(ext_params))) then -- or (#sg<max and cm.CheckGroupRecursiveCapture(false,sg,eg,f,min,max,ext_params)) then
--Debug.Message(cm[0]) --Debug.Message(cm[0])
for sc in aux.Next(sg-cm.esg) do for sc in aux.Next(sg-cm.esg) do
Auxiliary.SubGroupCaptured:Merge(eg:Filter(cm.slfilter,nil,sc)) Auxiliary.SubGroupCaptured:Merge(cm.eeg:Filter(cm.slfilter,nil,sc))
end end
end end
if #sg<max then cm.CheckGroupRecursiveCapture(false,sg,eg,f,min,max,ext_params) end if #sg<max then cm.CheckGroupRecursiveCapture(false,sg,eg,f,min,max,ext_params) end
...@@ -77,7 +79,10 @@ function cm.CheckGroupRecursiveCapture(bool,sg,g,f,min,max,ext_params) ...@@ -77,7 +79,10 @@ function cm.CheckGroupRecursiveCapture(bool,sg,g,f,min,max,ext_params)
sg:RemoveCard(c) sg:RemoveCard(c)
--eg:RemoveCard(c) --eg:RemoveCard(c)
eg:Sub(eg:Filter(cm.slfilter,nil,c)) eg:Sub(eg:Filter(cm.slfilter,nil,c))
tempg:Sub(eg:Filter(cm.slfilter,nil,c))
end end
tempg:RemoveCard(c)
c=tempg:GetFirst()
end end
end end
function cm.slfilter(c,sc) function cm.slfilter(c,sc)
......
...@@ -170,7 +170,10 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -170,7 +170,10 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if not tc:IsType(TYPE_EQUIP+TYPE_CONTINUOUS+TYPE_FIELD) and not tc:IsHasEffect(EFFECT_REMAIN_FIELD) then tc:CancelToGrave(false) end if not tc:IsType(TYPE_EQUIP+TYPE_CONTINUOUS+TYPE_FIELD) and not tc:IsHasEffect(EFFECT_REMAIN_FIELD) then tc:CancelToGrave(false) end
tc:CreateEffectRelation(te) tc:CreateEffectRelation(te)
if cost then cost(te,tp,ceg,cep,cev,cre,cr,crp,1) end if cost then cost(te,tp,ceg,cep,cev,cre,cr,crp,1) end
local _GetTurnPlayer=Duel.GetTurnPlayer
Duel.GetTurnPlayer=function() return 1-tp end
if target then target(te,tp,ceg,cep,cev,cre,cr,crp,1) end if target then target(te,tp,ceg,cep,cev,cre,cr,crp,1) end
Duel.GetTurnPlayer=_GetTurnPlayer
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g then if g then
for fc in aux.Next(g) do for fc in aux.Next(g) do
...@@ -221,7 +224,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -221,7 +224,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.ClearTargetCard() Duel.ClearTargetCard()
tc:CreateEffectRelation(te) tc:CreateEffectRelation(te)
if cost then cost(te,tp,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tp,eg,ep,ev,re,r,rp,1) end
if target then target(te,tp,eg,ep,ev,re,r,rp,1) end if target then target(te,tp,eg,ep,ev,re,r,rp,1,false,true) end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g then if g then
for fc in aux.Next(g) do for fc in aux.Next(g) do
...@@ -237,6 +240,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -237,6 +240,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
g=g:Filter(Card.IsControler,nil,tp):Filter(Card.IsLocation,nil,LOCATION_HAND)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end end
end end
......
...@@ -67,7 +67,7 @@ function c28333723.setfilter(c) ...@@ -67,7 +67,7 @@ function c28333723.setfilter(c)
return c:IsSetCard(0x285) and c:IsSSetable() return c:IsSetCard(0x285) and c:IsSSetable()
end end
function c28333723.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c28333723.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28333723.setfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c28333723.setfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,0,0)
end end
function c28333723.setop(e,tp,eg,ep,ev,re,r,rp) function c28333723.setop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -74,7 +74,7 @@ function c28381783.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -74,7 +74,7 @@ function c28381783.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
if Duel.GetLP(tp)<=3000 then if Duel.GetLP(tp)<=3000 then
e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_NEGATE) e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CAN_FORBIDDEN)
else e:SetProperty(EFFECT_FLAG_DELAY) end else e:SetProperty(EFFECT_FLAG_DELAY) end
end end
function c28381783.tgfilter(c) function c28381783.tgfilter(c)
......
...@@ -75,7 +75,7 @@ function c28382113.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -75,7 +75,7 @@ function c28382113.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(c28382113.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(c28382113.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
if Duel.GetLP(tp)<=3000 then if Duel.GetLP(tp)<=3000 then
e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_NEGATE) e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CAN_FORBIDDEN)
else e:SetProperty(EFFECT_FLAG_DELAY) end else e:SetProperty(EFFECT_FLAG_DELAY) end
end end
function c28382113.tdop(e,tp,eg,ep,ev,re,r,rp) function c28382113.tdop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -58,7 +58,7 @@ function c28385399.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,7 +58,7 @@ function c28385399.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
if Duel.GetLP(tp)<=3000 then if Duel.GetLP(tp)<=3000 then
e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_NEGATE) e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CAN_FORBIDDEN)
else e:SetProperty(EFFECT_FLAG_DELAY) end else e:SetProperty(EFFECT_FLAG_DELAY) end
end end
function c28385399.tgfilter(c) function c28385399.tgfilter(c)
......
...@@ -17,7 +17,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,7 +17,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
local op=Duel.SelectOption(tp,1057,1056,1063,1345) local op=Duel.SelectOption(tp,1057,1056,1063,1345)
if op==3 then op=Duel.SelectOption(tp,1073,1074,1076)+3 end while op==3 or op==6 do
if op==3 then
op=Duel.SelectOption(tp,1073,1074,1076,1345)+3
elseif op==6 then
op=Duel.SelectOption(tp,1057,1056,1063,1345)
end
end
Duel.SetTargetParam(op) Duel.SetTargetParam(op)
end end
function s.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -118,5 +118,5 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -118,5 +118,5 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tg=Duel.SelectMatchingCard(tp,Card.IsCanOverlay,tp,0,LOCATION_ONFIELD,1,1,nil) tg=Duel.SelectMatchingCard(tp,Card.IsCanOverlay,tp,0,LOCATION_ONFIELD,1,1,nil)
tg:Merge(Duel.SelectMatchingCard(tp,Card.IsCanOverlay,tp,0,LOCATION_GRAVE,1,1,nil)) tg:Merge(Duel.SelectMatchingCard(tp,Card.IsCanOverlay,tp,0,LOCATION_GRAVE,1,1,nil))
end end
Duel.Overlay(c,tg) Duel.Overlay(c,tg-tg:Filter(Card.IsImmuneToEffect,nil,e))
end end
\ No newline at end of file
--火焰纹章if·阿库娅-白
local m=75000700
local cm=_G["c"..m]
function cm.initial_effect(c)
--Effect 1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.sprcon)
c:RegisterEffect(e1)
--Effect 2
local e02=Effect.CreateEffect(c)
e02:SetDescription(aux.Stringid(m,0))
e02:SetType(EFFECT_TYPE_IGNITION)
e02:SetRange(LOCATION_GRAVE)
e02:SetCountLimit(1,m+m)
e02:SetCondition(aux.exccon)
e02:SetCost(aux.bfgcost)
e02:SetTarget(cm.tg)
e02:SetOperation(cm.op)
c:RegisterEffect(e02)
--Effect 3
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.cttg)
e2:SetOperation(cm.ctop)
c:RegisterEffect(e2)
end
--Effect 1
function cm.filter(c)
return c:IsSetCard(0x750) and c:IsFaceup()
end
function cm.sprcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
--Effect 2
function cm.f(c,tp)
local mg=Duel.GetMatchingGroup(cm.f1,tp,0,LOCATION_MZONE,nil,c,c)
local b1=c:IsFaceup() and c:IsSetCard(0x95e) and c:IsPosition(POS_FACEUP_DEFENSE)
return b1 and #mg>0
end
function cm.f1(c,ac)
return c:IsCanBeBattleTarget(ac) and c:IsPosition(POS_FACEUP_DEFENSE)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.f,tp,LOCATION_MZONE,0,nil,tp)
if chk==0 then return #g>0 end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.f,tp,LOCATION_MZONE,0,nil)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local tcc=Duel.SelectMatchingCard(tp,cm.f1,tp,0,LOCATION_MZONE,1,1,nil,tc):GetFirst()
local ag=Group.FromCards(tc,tcc)
Duel.HintSelection(ag)
Duel.ChangePosition(ag,POS_FACEUP_ATTACK)
if ag:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)==2
and tc:IsPosition(POS_FACEUP_ATTACK)
and tcc:IsPosition(POS_FACEUP_ATTACK) then
Duel.CalculateDamage(tc,tcc,true)
end
end
--Effect 3
function cm.ctfilter(c,tp)
return c:IsFaceup() and c:GetOwner()==tp and c:IsControlerCanBeChanged()
end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.ctfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.ctfilter,tp,0,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,cm.ctfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,tp)
end
end
--基格尔德细胞
function c75011870.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c75011870.spcost)
e1:SetTarget(c75011870.sptg)
e1:SetOperation(c75011870.spop)
c:RegisterEffect(e1)
end
c75011870.SetCard_TT_JGRD=true
function c75011870.cfilter(c,ft,tp)
return c:IsType(TYPE_TOKEN) and c:IsFaceup()
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c75011870.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(tp,c75011870.cfilter,1,nil,ft,tp) end
local g=Duel.SelectReleaseGroup(tp,c75011870.cfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST)
end
function c75011870.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c75011870.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
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 c75011871.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,75011871)
e1:SetTarget(c75011871.actg)
e1:SetOperation(c75011871.acop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,15011871)
e2:SetCondition(c75011871.thcon)
e2:SetTarget(c75011871.thtg)
e2:SetOperation(c75011871.thop)
c:RegisterEffect(e2)
end
c75011871.SetCard_TT_JGRD=true
function c75011871.ovfil(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanOverlay()
end
function c75011871.xxfil(c,e,tp)
local g=Duel.GetMatchingGroup(c75011871.ovfil,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,c)
return c:IsFaceup() and c.SetCard_TT_JGRD and c:IsType(TYPE_XYZ) and g:GetCount()>0
end
function c75011871.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c75011871.xxfil,tp,LOCATION_MZONE,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c75011871.xxfil,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c75011871.espfil(c,e,tp,sc,x)
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsType(TYPE_XYZ) and c.SetCard_TT_JGRD and c:IsRank(sc:GetRank()+x)
end
function c75011871.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(c75011871.ovfil,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,tc)
if g:GetCount()>0 then
local og=g:Select(tp,1,99,nil)
Duel.Overlay(tc,og)
if Duel.IsExistingMatchingCard(c75011871.espfil,tp,LOCATION_EXTRA,0,1,nil,e,tp,tc,og:GetCount()) and Duel.SelectYesNo(tp,aux.Stringid(75011871,0)) then
local sc=Duel.SelectMatchingCard(tp,c75011871.espfil,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,og:GetCount()):GetFirst()
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
end
function c75011871.ckfil(c,tp)
return c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp and c.SetCard_TT_JGRD
end
function c75011871.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c75011871.ckfil,1,nil,tp)
end
function c75011871.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c75011871.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,2,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
--基格尔德多面体
function c75011872.initial_effect(c)
c:SetUniqueOnField(1,0,75011872)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--rank up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75011872,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c75011872.rptg)
e2:SetOperation(c75011872.rpop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(75011872,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCost(c75011872.spcost)
e3:SetTarget(c75011872.sptg)
e3:SetOperation(c75011872.spop)
c:RegisterEffect(e3)
--limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(0,1)
e4:SetTarget(function(e,c,sump,sumtype,sumpos,targetp,se)
return targetp==e:GetHandlerPlayer() end)
c:RegisterEffect(e4)
end
c75011872.SetCard_TT_JGRD=true
function c75011872.filter1(c,e,tp)
local rk=c:GetRank()
return rk>0 and c:IsFaceup() and c.SetCard_TT_JGRD and c:IsRankBelow(5)
and Duel.IsExistingMatchingCard(c75011872.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function c75011872.filter2(c,e,tp,mc)
return not c:IsCode(mc:GetCode()) and c:IsRankBelow(5) and c.SetCard_TT_JGRD and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c75011872.rptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c75011872.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c75011872.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c75011872.rpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c75011872.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
function c75011872.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,LOCATION_MZONE,LOCATION_MZONE,1,REASON_COST) end
Duel.RemoveOverlayCard(tp,LOCATION_MZONE,LOCATION_MZONE,1,1,REASON_COST)
end
function c75011872.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,75011877,nil,TYPES_TOKEN_MONSTER,0,0,1,RACE_DRAGON,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c75011872.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,75011877,nil,TYPES_TOKEN_MONSTER,0,0,1,RACE_DRAGON,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,75011877)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
--基格尔德核心
function c75011873.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75011873,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,75011873)
e1:SetTarget(c75011873.sptg)
e1:SetOperation(c75011873.spop)
c:RegisterEffect(e1)
--Gains Effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(c75011873.efcon)
e2:SetOperation(c75011873.efop)
c:RegisterEffect(e2)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,15011873)
e2:SetCondition(c75011873.thcon)
e2:SetTarget(c75011873.thtg)
e2:SetOperation(c75011873.thop)
c:RegisterEffect(e2)
end
c75011873.SetCard_TT_JGRD=true
function c75011873.spfil(c,e,tp)
return c:IsCode(75011870) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c75011873.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c75011873.spfil,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c75011873.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(c75011873.spfil,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.BreakEffect()
local sg=Duel.SelectMatchingCard(tp,c75011873.spfil,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c75011873.efcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return r==REASON_XYZ and c:GetReasonCard().SetCard_TT_JGRD
end
function c75011873.efop(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(75011873,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c75011873.xthtg)
e1:SetOperation(c75011873.xthop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
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 c75011873.xthfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c.SetCard_TT_JGRD and c:IsAbleToHand()
end
function c75011873.xthtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c75011873.xthfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c75011873.xthop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c75011873.xthfilter,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 c75011873.ckfil(c,tp)
return c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp and c.SetCard_TT_JGRD
end
function c75011873.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c75011873.ckfil,1,nil,tp)
end
function c75011873.tdfil(c)
return c:IsCode(75011870) and c:IsAbleToDeck()
end
function c75011873.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() and Duel.IsExistingMatchingCard(c75011873.tdfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c75011873.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,2,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
if Duel.IsExistingMatchingCard(c75011873.tdfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) then
local sg=Duel.SelectMatchingCard(tp,c75011873.tdfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
end
--核心惩戒者-基格尔德100%
function c75011874.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,c75011874.mfilter,c75011874.xyzcheck,2,2)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.xyzlimit)
c:RegisterEffect(e1)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
--destroy replace
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c75011874.reptg)
c:RegisterEffect(e1)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_POSITION)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_ONFIELD)
e2:SetTarget(function(e,c)
return c:IsType(TYPE_SPELL) end)
c:RegisterEffect(e2)
--disable effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local tl,p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_PLAYER)
if bit.band(tl,LOCATION_SZONE)~=0 and p~=tp and re:IsActiveType(TYPE_SPELL) then
Duel.NegateEffect(ev)
end end)
c:RegisterEffect(e3)
--immuse
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) end)
e4:SetTarget(c75011874.immtg)
e4:SetOperation(c75011874.immop)
c:RegisterEffect(e4)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(function(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) end)
e0:SetOperation(function(e)
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(75011874,0))
Duel.Hint(HINT_MESSAGE,1,aux.Stringid(75011874,0))
end)
c:RegisterEffect(e0)
end
c75011874.SetCard_TT_JGRD=true
function c75011874.mfilter(c,xyzc)
return (c:IsXyzLevel(xyzc,5) or c:IsRank(5)) and c.SetCard_TT_JGRD
end
function c75011874.xyzcheck(g)
return true
end
function c75011874.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local dam=Duel.GetBattleDamage(tp)
if chk==0 then return c:IsReason(REASON_BATTLE) and not c:IsReason(REASON_REPLACE) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(-dam)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
if c:IsDefense(0) then
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
end
return true
else return false end
end
function c75011874.immtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end
end
function c75011874.immop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
if c:IsRelateToEffect(e) and g:GetCount()>0 then
local tc=g:Select(tp,1,1,nil):GetFirst()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetLabelObject(tc)
e1:SetValue(function(e,te)
return te:GetOwner()==e:GetLabelObject() end)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
end
end
--秩序守护者-基格尔德50%
function c75011875.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,c75011875.mfilter,c75011875.xyzcheck,5,5)
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_FZONE)
c:RegisterEffect(e1)
--disable effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if bit.band(tl,LOCATION_SZONE)~=0 and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsType(TYPE_FIELD) then
Duel.NegateEffect(ev)
end end)
c:RegisterEffect(e2)
--des
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c75011875.destg)
e3:SetOperation(c75011875.desop)
c:RegisterEffect(e3)
end
c75011875.SetCard_TT_JGRD=true
function c75011875.mfilter(c,xyzc)
return (c:IsXyzLevel(xyzc,1) or c:IsRank(1)) and c.SetCard_TT_JGRD
end
function c75011875.xyzcheck(g)
return true
end
function c75011875.desfil(c)
return c:IsFacedown() or not c:IsAttribute(ATTRIBUTE_WIND)
end
function c75011875.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c75011875.desfil,tp,0,LOCATION_MZONE,nil)
if chk==0 then return g:GetCount()>0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
local a=g:GetCount()
local x=e:GetHandler():RemoveOverlayCard(tp,1,a,REASON_COST)
e:SetLabel(x)
end
function c75011875.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local x=e:GetLabel()
local g=Duel.GetMatchingGroup(c75011875.desfil,tp,0,LOCATION_MZONE,nil)
if x>0 and g:GetCount()>=x then
local dg=g:Select(tp,x,x,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_HAND)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_ONFIELD+LOCATION_GRAVE))
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_DECK)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_ONFIELD+LOCATION_GRAVE))
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
--气场破坏者-基格尔德10%
function c75011876.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,1,2,nil,nil,99)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75011876,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) end)
e1:SetTarget(c75011876.sptg)
e1:SetOperation(c75011876.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75011876,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,75011876)
e2:SetCost(c75011876.rspcost)
e2:SetTarget(c75011876.rsptg)
e2:SetOperation(c75011876.rspop)
c:RegisterEffect(e2)
end
c75011876.SetCard_TT_JGRD=true
function c75011876.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,75011877,nil,TYPES_TOKEN_MONSTER,0,0,1,RACE_DRAGON,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c75011876.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,75011877,nil,TYPES_TOKEN_MONSTER,0,0,1,RACE_DRAGON,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,75011877)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
function c75011876.rspcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c75011876.rspfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c75011876.rsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(c75011876.rspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c75011876.rspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c75011876.rspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
...@@ -14,6 +14,7 @@ function c98920744.initial_effect(c) ...@@ -14,6 +14,7 @@ function c98920744.initial_effect(c)
e2:SetCountLimit(1,98920744) e2:SetCountLimit(1,98920744)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c98920744.atkcon) e2:SetCondition(c98920744.atkcon)
e2:SetTarget(c98920744.atktg)
e2:SetOperation(c98920744.atkop) e2:SetOperation(c98920744.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--indes --indes
...@@ -67,6 +68,11 @@ end ...@@ -67,6 +68,11 @@ end
function c98920744.atkcon(e,tp,eg,ep,ev,re,r,rp) function c98920744.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end end
function c98920744.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c98920744.atkop(e,tp,eg,ep,ev,re,r,rp) function c98920744.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local dg=Group.CreateGroup() local dg=Group.CreateGroup()
......
...@@ -33,8 +33,7 @@ end ...@@ -33,8 +33,7 @@ end
function c98940044.hspcon(e,c) function c98940044.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0
end end
function c98940044.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c98940044.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment