Commit 680e45a2 authored by POLYMER's avatar POLYMER

fix

parent 364e700c
......@@ -8,6 +8,10 @@ function cm.initial_effect(c)
e0:SetOperation(cm.op)
Duel.RegisterEffect(e0,0)
end
if not apricot_nightfall then
apricot_nightfall=true
--Debug.Message("Protocol Request Complete. 杏花宵®漏洞解决方案已上线。")
end
if not aux.GetMustMaterialGroup then
aux.GetMustMaterialGroup=Duel.GetMustMaterial
--[[function aux.GetMustMaterialGroup(tp,code)
......@@ -73,7 +77,7 @@ if not require and loadfile then
else
require_list[str]=loadfile(str..".lua")
end
require_list[str]()
pcall(require_list[str])
return require_list[str]
end
return require_list[str]
......@@ -92,11 +96,13 @@ if not require and Duel.LoadScript then
return require_list[str]
end
end
function cm.nnfilter(c)
return c:GetOriginalType()~=0x11 and c:GetOriginalType()~=0x1011 and not c.initial_effect
function cm.nnfilter(c,ec)
if c:GetOriginalType()==0x11 or c:GetOriginalType()==0x1011 then return false end
if not c.initial_effect then return true end
return false
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local ag=Duel.GetMatchingGroup(cm.nnfilter,0,0xff,0xff,nil)
--[[local ag=Duel.GetMatchingGroup(cm.nnfilter,0,0xff,0xff,nil)
local _TGetID=GetID
for ac in aux.Next(ag) do
local int=ac:GetOriginalCode()
......@@ -111,7 +117,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local ini=ac.initial_effect
if ini then ac.initial_effect(ac) end
end
GetID=_TGetID
GetID=_TGetID--]]
local c=e:GetHandler()
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_DECK,0,nil)
......
......@@ -400,4 +400,5 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if #g2>0 then Duel.ConfirmCards(tp,g2) end
if #ng1>0 then Duel.ConfirmCards(1-tp,ng1) end
if #ng2>0 then Duel.ConfirmCards(tp,ng2) end
end
\ No newline at end of file
end
pcall(dofile,"expansions/script/c11410000.lua")
\ No newline at end of file
......@@ -88,8 +88,11 @@ end
function cm.filter(c)
return c.traveler_saga and c:IsAbleToDeckAsCost()
end
function cm.ssfilter(c)
return c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5
end
function cm.fselect(g)
return g:IsExists(Card.IsLocation,1,nil,LOCATION_SZONE)
return g:IsExists(cm.ssfilter,1,nil)
end
function cm.costchk(e,te,tp)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
......
......@@ -11,7 +11,7 @@ function cm.initial_effect(c)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.xyzcon)
e0:SetCondition(cm.XyzLevelFreeCondition(cm.mcfilter,cm.gfilter,3,3))
e0:SetTarget(aux.XyzLevelFreeTarget(cm.mcfilter,cm.gfilter,3,3))
--e0:SetOperation(cm.xyzop)
e0:SetOperation(cm.XyzLevelFreeOperation(cm.mcfilter,cm.gfilter,3,3))
......@@ -88,6 +88,33 @@ end
function cm.xyzcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),15000194)==0 and aux.XyzLevelFreeCondition(cm.mcfilter,cm.gfilter,3,3)
end
function cm.XyzLevelFreeCondition(f,gf,minct,maxct)
return function(e,c,og,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local minc=minct
local maxc=maxct
if min then
minc=math.max(minc,min)
maxc=math.min(maxc,max)
end
if maxc<minc then return false end
local mg=nil
if og then
mg=og:Filter(aux.XyzLevelFreeFilter,nil,c,f)
else
mg=Duel.GetMatchingGroup(Auxiliary.XyzLevelFreeFilter,tp,LOCATION_MZONE,0,nil,c,f)
end
local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(aux.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(sg)
aux.GCheckAdditional=aux.TuneMagicianCheckAdditionalX(EFFECT_TUNE_MAGICIAN_X)
local res=mg:CheckSubGroup(aux.XyzLevelFreeGoal,minc,maxc,tp,c,gf)
aux.GCheckAdditional=nil
return res and Duel.GetFlagEffect(e:GetHandlerPlayer(),15000194)==0
end
end
function cm.xyzop(e)
Duel.RegisterFlagEffect(e:GetHandlerPlayer(),15000194,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
aux.XyzLevelFreeOperation(cm.mcfilter,cm.gfilter,3,3)
......
......@@ -2,13 +2,14 @@
local cm,m,o=GetID()
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
aux.EnablePendulumAttribute(c,true)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg2)
e1:SetOperation(cm.spop2)
......@@ -153,7 +154,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local sc=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_HAND,0,1,1,nil,TYPE_PENDULUM):GetFirst()
if Duel.MoveToField(sc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
if Duel.MoveToField(sc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND+LOCATION_ONFIELD,0,2,2,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
......
......@@ -2,13 +2,14 @@
local cm,m,o=GetID()
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
aux.EnablePendulumAttribute(c,true)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg2)
e1:SetOperation(cm.spop2)
......
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