Commit a7206917 authored by tianchenglipu's avatar tianchenglipu

changes

parent da5e7c6b
...@@ -28,7 +28,8 @@ function c36693940.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +28,8 @@ function c36693940.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetDescription(aux.Stringid(36693940,0)) e1:SetDescription(aux.Stringid(36693940,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(36693940) e1:SetCode(EFFECT_ADD_FUSION_SETCODE)
e1:SetValue(0xad)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
......
...@@ -2,16 +2,7 @@ ...@@ -2,16 +2,7 @@
function c57707471.initial_effect(c) function c57707471.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--xyz summon --xyz summon
local e1=Effect.CreateEffect(c) aux.AddXyzProcedure(c,nil,6,2,c57707471.ovfilter,aux.Stringid(57707471,0),2,c57707471.xyzop)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c57707471.xyzcon)
e1:SetTarget(c57707471.xyztg)
e1:SetOperation(c57707471.xyzop)
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
--atk --atk
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
...@@ -30,72 +21,16 @@ function c57707471.initial_effect(c) ...@@ -30,72 +21,16 @@ function c57707471.initial_effect(c)
e3:SetTarget(c57707471.destg) e3:SetTarget(c57707471.destg)
e3:SetOperation(c57707471.desop) e3:SetOperation(c57707471.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
if not c57707471.xyz_filter then
c57707471.xyz_filter=function(mc) return mc:IsXyzLevel(c,6) end
end
end end
c57707471.xyz_number=21 c57707471.xyz_number=21
c57707471.xyz_count=2
function c57707471.ovfilter(c,tp,xyzc) function c57707471.ovfilter(c,tp,xyzc)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetRank()==5 and c:IsCanBeXyzMaterial(xyzc) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetRank()==5 and c:IsCanBeXyzMaterial(xyzc)
and c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:CheckRemoveOverlayCard(tp,1,REASON_COST)
end end
function c57707471.xyzcon(e,c,og,min,max) function c57707471.xyzop(e,tp,chk,mc)
if c==nil then return true end if chk==0 then return true end
local tp=c:GetControler() mc:RemoveOverlayCard(tp,1,1,REASON_COST)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) end
local ct=-ft
if 2<=ct then return false end
if min and (min>2 or max<2) then return false end
if ct<1 and not og and Duel.IsExistingMatchingCard(c57707471.ovfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) then
return true
end
return Duel.CheckXyzMaterial(c,nil,6,2,2,og)
end
function c57707471.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if og and not min then
return true
end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft
local b1=Duel.CheckXyzMaterial(c,nil,6,2,2,og)
local b2=ct<1 and not og and Duel.IsExistingMatchingCard(c57707471.ovfilter,tp,LOCATION_MZONE,0,1,nil)
if b2 and (not b1 or Duel.SelectYesNo(tp,aux.Stringid(57707471,0))) then
e:SetLabel(1)
return true
else
e:SetLabel(0)
local g=Duel.SelectXyzMaterial(tp,c,nil,6,2,2,og)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
end
function c57707471.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
c:SetMaterial(og)
Duel.Overlay(c,og)
else
if e:GetLabel()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local mg=Duel.SelectMatchingCard(tp,c57707471.ovfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c)
mg:GetFirst():RemoveOverlayCard(tp,1,1,REASON_COST)
local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then
Duel.Overlay(c,mg2)
end
c:SetMaterial(mg)
Duel.Overlay(c,mg)
else
local mg=e:GetLabelObject()
c:SetMaterial(mg)
Duel.Overlay(c,mg)
mg:DeleteGroup()
end
end
end
function c57707471.atkval(e,c) function c57707471.atkval(e,c)
return c:GetOverlayCount()*1000 return c:GetOverlayCount()*1000
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c83866861.initial_effect(c) function c83866861.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c83866861.ffilter,3,false) aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xad),3,false)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -39,9 +39,6 @@ function c83866861.initial_effect(c) ...@@ -39,9 +39,6 @@ function c83866861.initial_effect(c)
e4:SetValue(c83866861.atkval) e4:SetValue(c83866861.atkval)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c83866861.ffilter(c)
return c:IsFusionSetCard(0xad) or c:IsHasEffect(36693940)
end
function c83866861.aclimit(e,re,tp) function c83866861.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e) return not re:GetHandler():IsImmuneToEffect(e)
end end
......
...@@ -480,7 +480,8 @@ EFFECT_UNSUMMONABLE_CARD =336 --不能通常召唤的怪獸 ...@@ -480,7 +480,8 @@ EFFECT_UNSUMMONABLE_CARD =336 --不能通常召唤的怪獸
EFFECT_DISABLE_CHAIN_FIELD =337 --連鎖串中場上發動的效果無效(Duel.NegateRelatedChain()) EFFECT_DISABLE_CHAIN_FIELD =337 --連鎖串中場上發動的效果無效(Duel.NegateRelatedChain())
EFFECT_DISCARD_COST_CHANGE =338 --反制陷阱捨棄手牌的代價改變(解放之阿里阿德涅) EFFECT_DISCARD_COST_CHANGE =338 --反制陷阱捨棄手牌的代價改變(解放之阿里阿德涅)
EFFECT_HAND_SYNCHRO =339 --用手牌的怪獸當作同步素材 EFFECT_HAND_SYNCHRO =339 --用手牌的怪獸當作同步素材
EFFECT_ADD_FUSION_CODE =340 -- EFFECT_ADD_FUSION_CODE =340 --作为融合素材时可以当作某一卡名(融合识别)
EFFECT_ADD_FUSION_SETCODE =341 --作为融合素材时可以当作某一字段(魔玩具改造)
--下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发) --下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发)
EVENT_STARTUP =1000 --游戏开始时 EVENT_STARTUP =1000 --游戏开始时
......
...@@ -317,10 +317,11 @@ function Auxiliary.XyzTarget2(f,lv,minc,maxc,alterf,desc,op) ...@@ -317,10 +317,11 @@ function Auxiliary.XyzTarget2(f,lv,minc,maxc,alterf,desc,op)
local b1=ct<minc and Duel.CheckXyzMaterial(c,f,lv,minc,maxc,og) local b1=ct<minc and Duel.CheckXyzMaterial(c,f,lv,minc,maxc,og)
local b2=ct<1 and not og and Duel.IsExistingMatchingCard(Auxiliary.XyzAlterFilter,tp,LOCATION_MZONE,0,1,nil,alterf,c) local b2=ct<1 and not og and Duel.IsExistingMatchingCard(Auxiliary.XyzAlterFilter,tp,LOCATION_MZONE,0,1,nil,alterf,c)
and (not op or op(e,tp,0)) and (not op or op(e,tp,0))
if b2 and (not b1 or Duel.SelectYesNo(tp,desc)) then if b2 and Duel.SelectYesNo(tp,desc) then
e:SetLabel(1) e:SetLabel(1)
return true return true
else else
if not b1 then return false end
e:SetLabel(0) e:SetLabel(0)
local g=Duel.SelectXyzMaterial(tp,c,f,lv,minc,maxc,og) local g=Duel.SelectXyzMaterial(tp,c,f,lv,minc,maxc,og)
if g then if g then
...@@ -346,9 +347,9 @@ function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op) ...@@ -346,9 +347,9 @@ function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op)
Duel.Overlay(c,og) Duel.Overlay(c,og)
else else
if e:GetLabel()==1 then if e:GetLabel()==1 then
if op then op(e,tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local mg=Duel.SelectMatchingCard(tp,Auxiliary.XyzAlterFilter,tp,LOCATION_MZONE,0,1,1,nil,alterf,c) local mg=Duel.SelectMatchingCard(tp,Auxiliary.XyzAlterFilter,tp,LOCATION_MZONE,0,1,1,nil,alterf,c)
if op then op(e,tp,1,mg:GetFirst()) end
local mg2=mg:GetFirst():GetOverlayGroup() local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then if mg2:GetCount()~=0 then
Duel.Overlay(c,mg2) Duel.Overlay(c,mg2)
......
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