Commit 63725340 authored by Huangnan's avatar Huangnan

fix

parent 6a8a7362
Pipeline #38824 passed with stages
in 42 minutes and 26 seconds
--神之眷属-<I>-风暴编织者 --神之眷属-<I>-风暴编织者
local cm,m,o=GetID() local cm,m,o=GetID()
Duel.LoadScript("c33503600.lua")
cm.code=18700197
cm.side_code=18700199
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -54,10 +51,6 @@ function cm.initial_effect(c) ...@@ -54,10 +51,6 @@ function cm.initial_effect(c)
e5:SetTarget(cm.tg) e5:SetTarget(cm.tg)
e5:SetOperation(cm.op) e5:SetOperation(cm.op)
c:RegisterEffect(e5) c:RegisterEffect(e5)
if not rk.Side_Check then
rk.Side_Check=true
local ce=rk.side_do(c)
end
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
...@@ -89,7 +82,9 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -89,7 +82,9 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Suyu_bh.changecode(c) c:SetEntityCode(18700199,true)
c:ReplaceEffect(18700199,0,0)
Duel.Hint(10,1,18700199)
end end
function cm.atkcon2(e) function cm.atkcon2(e)
local c=e:GetHandler() local c=e:GetHandler()
......
--神之眷属-<II>-风暴编织者 --神之眷属-<II>-风暴编织者
local cm,m,o=GetID() local cm,m,o=GetID()
Duel.LoadScript("c33503600.lua")
cm.code=18700197
cm.side_code=18700199
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
...@@ -44,10 +41,23 @@ function cm.initial_effect(c) ...@@ -44,10 +41,23 @@ function cm.initial_effect(c)
e3:SetTarget(cm.drtg) e3:SetTarget(cm.drtg)
e3:SetOperation(cm.drop) e3:SetOperation(cm.drop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
if not rk.Side_Check then local e4=Effect.CreateEffect(c)
rk.Side_Check=true e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
local ce=rk.side_do(c) e4:SetCode(EVENT_ADJUST)
end e4:SetRange(LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_HAND+LOCATION_EXTRA)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e4:SetCountLimit(1)
e4:SetCondition(function (e,tp,eg,ep,ev,re,r,rp)
return 18700197 and c:GetOriginalCode()==18700199
end)
e4:SetOperation(function (e,tp,eg,ep,ev,re,r,rp)
c:SetEntityCode(18700197,true)
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
c:ReplaceEffect(18700197,0,0)
c:EnableReviveLimit()
end)
c:RegisterEffect(e4)
end end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
......
...@@ -2,16 +2,20 @@ ...@@ -2,16 +2,20 @@
local m=30900614 local m=30900614
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE) e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function cm.disfilter(c) function cm.disfilter(c)
return c:IsFaceup() and c:IsSummonLocation(LOCATION_EXTRA) and (c:GetAttack()>0 or cm.disfilter(c)) return c:IsFaceup() and c:IsSummonLocation(LOCATION_EXTRA)
end
function cm.chainlm(e,rp,tp)
return not e:GetHandler():IsType(TYPE_MONSTER)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.disfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.disfilter,tp,0,LOCATION_MZONE,1,nil) end
...@@ -21,9 +25,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -21,9 +25,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetChainLimit(cm.chainlm) Duel.SetChainLimit(cm.chainlm)
end end
end end
function cm.chainlm(e,rp,tp)
return not e:GetHandler():IsType(TYPE_MONSTER)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.disfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(cm.disfilter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -36,10 +37,9 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,10 +37,9 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_ATTACK) e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
...@@ -47,4 +47,4 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,4 +47,4 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
tc=g:GetNext() tc=g:GetNext()
end end
end end
\ No newline at end of file
--降阶魔法 心之牺牲 --降阶魔法 心之牺牲
function c33700167.initial_effect(c) function c33700167.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c33700167.cost) e1:SetCost(c33700167.cost)
e1:SetTarget(c33700167.target) e1:SetTarget(c33700167.target)
e1:SetOperation(c33700167.activate) e1:SetOperation(c33700167.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(33700167,ACTIVITY_SPSUMMON,c33700167.counterfilter) Duel.AddCustomActivityCounter(33700167,ACTIVITY_SPSUMMON,c33700167.counterfilter)
end end
function c33700167.counterfilter(c) function c33700167.counterfilter(c)
return c:IsType(TYPE_XYZ) return c:IsType(TYPE_XYZ)
end end
function c33700167.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c33700167.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(33700167,tp,ACTIVITY_SPSUMMON)==0 end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c33700167.splimit) e1:SetTarget(c33700167.splimit)
e1:SetLabelObject(e) e1:SetLabelObject(e)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c33700167.splimit(e,c,sump,sumtype,sumpos,targetp,se) function c33700167.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return se~=e:GetLabelObject() or not se:IsType(TYPE_XYZ) return se~=e:GetLabelObject()
end end
function c33700167.filter(c,e,tp) function c33700167.filter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayCount()>0 and Duel.IsExistingMatchingCard(c33700167.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank(),c:GetOverlayCount()) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayCount()>0
and Duel.IsExistingMatchingCard(c33700167.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank(),c:GetOverlayCount(),c:GetRace(),c:GetAttribute())
end end
function c33700167.filter2(c,e,tp,g,rk,og)
return c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and g:IsCanBeXyzMaterial(c) and c:GetRank()<rk and function c33700167.filter2(c,e,tp,tc,rk,og,race,attr)
c:GetRank()>=og return c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:GetRace()==race or c:GetAttribute()==attr)
and c:GetRank()<rk and c:GetRank()>=og
end end
function c33700167.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33700167.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c33700167.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c33700167.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c33700167.filter,tp,LOCATION_MZONE,0,1,nil,tp) and Duel.GetMZoneCount(tp)>0 end if chk==0 then return Duel.IsExistingTarget(c33700167.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c33700167.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c33700167.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetOverlayCount()*1000) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetOverlayCount()*1000)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_EXTRA)
end end
function c33700167.activate(e,tp,eg,ep,ev,re,r,rp) function c33700167.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local c=e:GetHandler()
if not tc:IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget()
local mg=tc:GetOverlayGroup() if not tc or not tc:IsRelateToEffect(e) then return end
Duel.SendtoGrave(mg,REASON_EFFECT) local mg=tc:GetOverlayGroup()
if mg:GetCount()>0 and Duel.Recover(tp,mg:GetCount()*1000,REASON_EFFECT)>0 then local ogc=mg:GetCount()
if Duel.GetMZoneCount(tp)<=0 then return end Duel.SendtoGrave(mg,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if ogc>0 and Duel.Recover(tp,ogc*1000,REASON_EFFECT)>0 then
local g=Duel.SelectMatchingCard(tp,c33700167.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) if Duel.GetMZoneCount(tp)<=0 then return end
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.Overlay(g,Group.FromCards(tc,e:GetHandler())) local g=Duel.SelectMatchingCard(tp,c33700167.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank(),ogc,tc:GetRace(),tc:GetAttribute())
end local sc=g:GetFirst()
end if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
Duel.Overlay(sc,Group.FromCards(tc))
end
if c:IsRelateToEffect(e) then
c:CancelToGrave()
Duel.Overlay(sc,Group.FromCards(c))
end
end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment