Commit 088d0845 authored by POLYMER's avatar POLYMER

fix

parent bb648667
......@@ -47,7 +47,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x1d) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x1d) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
......@@ -58,7 +58,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE)
......
......@@ -67,7 +67,7 @@ function c40009339.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c40009339.eqlimit(e,c)
return c:GetControler()==e:GetHandlerPlayer() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xf13)
return e:GetOwner()==c
end
function c40009339.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -82,7 +82,7 @@ function c40009339.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(aux.tgoval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
local e3=Effect.CreateEffect(tc)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......
......@@ -3,6 +3,7 @@ AD_Database=true
SNNM=SNNM or {}
local cm=SNNM
--53702700 alleffectreset
if not Group.ForEach then
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
......@@ -11,6 +12,7 @@ local cm=SNNM
end
end
end
end
--
function cm.AllGlobalCheck(c)
if not cm.snnm_global_check then
......@@ -6637,6 +6639,48 @@ function cm.HTAmvhint(code)
else c:RegisterFlagEffect(code+50,RESET_EVENT+0x7e0000,EFFECT_FLAG_CLIENT_HINT,1,1,aux.Stringid(53765000,0)) end
end
end
function cm.DragoronMergedDelay(c)
local mt=getmetatable(c)
if mt[53757098]==true then return end
mt[53757098]=true
if not g then g=Group.CreateGroup() end
g:KeepAlive()
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetLabelObject(g)
ge1:SetOperation(cm.DragoronM1)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(4179255)
ge2:SetOperation(cm.DragoronM2)
Duel.RegisterEffect(ge2,0)
local ge3=ge1:Clone()
ge3:SetCode(EVENT_CHAIN_END)
ge3:SetOperation(cm.DragoronMEnd)
Duel.RegisterEffect(ge3,0)
end
function cm.DragoronM1(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if re and re:IsHasType(EFFECT_TYPE_ACTIVATE) then g:Merge(re:GetHandler()) end
end
function cm.DragoronM2(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if re then g:Merge(re:GetHandler()) end
if Duel.GetCurrentChain()==0 and not Duel.CheckEvent(EVENT_CHAIN_END) then
local _eg=g:Clone()
Duel.RaiseEvent(_eg,EVENT_CUSTOM+53757098,re,r,rp,ep,ev)
g:Clear()
end
end
function cm.DragoronMEnd(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if #g>0 then
local _eg=g:Clone()
Duel.RaiseEvent(_eg,EVENT_CUSTOM+53757098,re,r,rp,ep,ev)
g:Clear()
end
end
function cm.DragoronActivate(c,code)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
......
local m=53757002
local cm=_G["c"..m]
cm.name="秽界龙 卡帝亚克"
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
aux.AddCodeList(c,m-1)
local e1=Effect.CreateEffect(c)
......@@ -24,10 +26,7 @@ function cm.initial_effect(c)
e2:SetTarget(cm.trtg)
e2:SetOperation(cm.trop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return re and (re:GetHandler():IsCode(m-1) or re:GetHandler()==e:GetHandler())end)
e3:SetCode(4179255)
c:RegisterEffect(e3)
SNNM.DragoronMergedDelay(c)
end
function cm.cfilter(c)
return c:IsFaceup() and c:GetType()&0x20002==0x20002 and c:IsAbleToRemoveAsCost()
......@@ -103,7 +102,8 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
end
function cm.trcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsHasType(EFFECT_TYPE_ACTIVATE) and (re:GetHandler():IsCode(m-1) or re:GetHandler()==e:GetHandler())
local tc=eg:GetFirst()
return tc:IsCode(m-1) or tc==e:GetHandler()
end
function cm.trtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_ONFIELD) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
......
local m=53757004
local cm=_G["c"..m]
cm.name="秽界龙 戈尔登"
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
aux.AddCodeList(c,m-1)
local e1=Effect.CreateEffect(c)
......@@ -23,10 +25,7 @@ function cm.initial_effect(c)
e2:SetTarget(cm.trtg)
e2:SetOperation(cm.trop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return re and (re:GetHandler():IsCode(m-1) or re:GetHandler()==e:GetHandler())end)
e3:SetCode(4179255)
c:RegisterEffect(e3)
SNNM.DragoronMergedDelay(c)
end
function cm.filter(c)
return c:IsType(TYPE_FIELD) and not c:IsForbidden()
......@@ -50,7 +49,8 @@ function cm.pop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.trcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsHasType(EFFECT_TYPE_ACTIVATE) and (re:GetHandler():IsCode(m-1) or re:GetHandler()==e:GetHandler())
local tc=eg:GetFirst()
return tc:IsCode(m-1) or tc==e:GetHandler()
end
function cm.cfilter(c,s)
if not c:IsRace(RACE_DRAGON) or not c:GetType()&0x20002~=0x20002 then return false end
......
local m=53757006
local cm=_G["c"..m]
cm.name="秽界龙 科尔兹"
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
aux.AddCodeList(c,m-1)
local e1=Effect.CreateEffect(c)
......@@ -26,10 +28,7 @@ function cm.initial_effect(c)
e2:SetTarget(cm.trtg)
e2:SetOperation(cm.trop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return re and (re:GetHandler():IsCode(m-1) or re:GetHandler()==e:GetHandler())end)
e3:SetCode(4179255)
c:RegisterEffect(e3)
SNNM.DragoronMergedDelay(c)
end
function cm.cfilter(c,tp)
return c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==tp and c:IsPreviousControler(1-tp)
......@@ -46,7 +45,8 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
end
function cm.trcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsHasType(EFFECT_TYPE_ACTIVATE) and (re:GetHandler():IsCode(m-1) or re:GetHandler()==e:GetHandler())
local tc=eg:GetFirst()
return tc:IsCode(m-1) or tc==e:GetHandler()
end
function cm.trtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil,tp,POS_FACEDOWN) end
......
local m=53757008
local cm=_G["c"..m]
cm.name="秽界龙 阿尔蒙多"
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
aux.AddCodeList(c,m-1)
local e1=Effect.CreateEffect(c)
......@@ -24,10 +26,7 @@ function cm.initial_effect(c)
e2:SetTarget(cm.trtg)
e2:SetOperation(cm.trop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return re and (re:GetHandler():IsCode(m-1) or re:GetHandler()==e:GetHandler())end)
e3:SetCode(4179255)
c:RegisterEffect(e3)
SNNM.DragoronMergedDelay(c)
Duel.AddCustomActivityCounter(m,ACTIVITY_SUMMON,cm.counterfilter)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
......@@ -66,7 +65,8 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
end
function cm.trcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsHasType(EFFECT_TYPE_ACTIVATE) and (re:GetHandler():IsCode(m-1) or re:GetHandler()==e:GetHandler())
local tc=eg:GetFirst()
return tc:IsCode(m-1) or tc==e:GetHandler()
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsLevel(3)
......
local m=53757010
local cm=_G["c"..m]
cm.name="秽界龙 葛利迪"
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
aux.AddCodeList(c,m-1)
local e1=Effect.CreateEffect(c)
......@@ -23,17 +25,14 @@ function cm.initial_effect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHAINING)
e3:SetCode(EVENT_CUSTOM+53757098)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.trcon)
e3:SetTarget(cm.trtg)
e3:SetOperation(cm.trop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return re and (re:GetHandler():IsCode(m-1) or re:GetHandler()==e:GetHandler())end)
e4:SetCode(4179255)
c:RegisterEffect(e4)
SNNM.DragoronMergedDelay(c)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
......@@ -60,7 +59,8 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.trcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsHasType(EFFECT_TYPE_ACTIVATE) and (re:GetHandler():IsCode(m-1) or re:GetHandler()==e:GetHandler())
local tc=eg:GetFirst()
return tc:IsCode(m-1) or tc==e:GetHandler()
end
function cm.trtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
......
......@@ -55,6 +55,7 @@ function s.initial_effect(c)
e6:SetTarget(s.setlimit)
c:RegisterEffect(e6)
end
s.material_type=TYPE_SYNCHRO
function s.acop(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(FLAG_ID_CHAINING)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -3,7 +3,7 @@ if not c71401001 then dofile("expansions/script/c71401001.lua") end
function c71401010.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,2,c71401010.lcheck)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_SPELLCASTER),2,2,c71401010.lcheck)
--target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -3,7 +3,7 @@ if not c71401001 then dofile("expansions/script/c71401001.lua") end
function c71401022.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,2,c71401022.lcheck)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_SPELLCASTER),2,2,c71401022.lcheck)
--act limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
......@@ -7,7 +7,7 @@ function c98920104.initial_effect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetRange(LOCATION_PZONE)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e0:SetTargetRange(1,0)
e0:SetTarget(c98920104.splimit)
c:RegisterEffect(e0)
......
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