Commit 06ffaef9 authored by POLYMER's avatar POLYMER

fix

parent 20046398
......@@ -107,22 +107,37 @@ function cm.nnfilter(c,ec)
return false
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
e:Reset()
local ag=Duel.GetMatchingGroup(cm.nnfilter,0,0xff,0xff,nil)
local _TGetID=GetID
local stack={}
for ac in aux.Next(ag) do
local int=ac:GetOriginalCode()
if not _G["c"..int] then
_G["c"..int]={}
_G["c"..int].__index=_G["c"..int]
end
GetID=function()
return _G["c"..int],int
end
require("expansions/script/c"..int)
local ini=ac.initial_effect
if ini then ac.initial_effect(ac) end
if ini then
--ac.initial_effect(ac)
stack[#stack+1]=ac
else
if not _G["c"..int] then
_G["c"..int]={}
_G["c"..int].__index=_G["c"..int]
end
GetID=function()
return _G["c"..int],int,int<100000000 and 1 or 100
end
require("expansions/script/c"..int)
local ini=ac.initial_effect
if ini then stack[#stack+1]=ac end
end
end
GetID=_TGetID
if #stack>0 then
for i=#stack,1,-1 do
local ac=stack[i]
local ini=ac.initial_effect
if ini then ac.initial_effect(ac) end
end
end
local c=e:GetHandler()
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_DECK,0,nil)
......@@ -155,7 +170,6 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_RULE)
end
end
e:Reset()
end
if not apricot_nightfall then
apricot_nightfall=true
......
......@@ -169,7 +169,7 @@ end
function cm.chainop2(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsType(0x6) and rc:IsOnField() and rc:IsCanTurnSet() and re:GetActivateLocation()&0x0f~=0 then
if rc:IsType(0x6) and rc:IsOnField() and not rc:IsLocation(0x200) and rc:IsRelateToChain(re) and rc:IsCanTurnSet() and re:GetActivateLocation()&0x0f~=0 then
if rc:IsStatus(STATUS_LEAVE_CONFIRMED) then
rc:CancelToGrave()
end
......
......@@ -63,7 +63,7 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0x02,0,1,1,chdck)
if #rg>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) then
local g,gc=Duel.GetMatchingGroup(Card.IsCode,tp,0x03,0,1,nil,m),nil
local g,gc=Duel.GetMatchingGroup(Card.IsCode,tp,0x03,0,nil,m),nil
if #g>0 then
if #g==1 then
gc=g:GetFirst()
......
......@@ -70,7 +70,6 @@ function c60152905.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetCard(dg)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0)
end
end
function c60152905.e2op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if p==PLAYER_ALL then
......
......@@ -50,14 +50,14 @@ function c60152906.e1tgfilter(c,e,tp)
end
function c60152906.e1tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_MONSTER)
local mg=Duel.GetRitualMaterial(tp)
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,c60152906.e1tgfilter,e,tp,mg,sg,Card.GetLevel,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c60152906.e1op(e,tp,eg,ep,ev,re,r,rp)
::cancel::
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_MONSTER)
local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(aux.RitualUltimateFilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,c60152906.e1tgfilter,e,tp,mg,sg,Card.GetLevel,"Greater")
local tc=tg:GetFirst()
......
......@@ -50,14 +50,14 @@ function c60152907.e1tgfilter(c,e,tp)
end
function c60152907.e1tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_MONSTER)
local mg=Duel.GetRitualMaterial(tp)
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,c60152907.e1tgfilter,e,tp,mg,sg,Card.GetLevel,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c60152907.e1op(e,tp,eg,ep,ev,re,r,rp)
::cancel::
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_MONSTER)
local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(aux.RitualUltimateFilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,c60152907.e1tgfilter,e,tp,mg,sg,Card.GetLevel,"Greater")
local tc=tg:GetFirst()
......
......@@ -80,7 +80,7 @@ function c6483224.filter2(c)
end
function c60152927.e5tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_MONSTER)
local mg=Duel.GetRitualMaterial(tp)
local sg=nil
if Duel.IsExistingMatchingCard(c60152927.filter2,c:GetControler(),0,LOCATION_MZONE,1,nil) then
sg=Duel.GetMatchingGroup(c60152927.exfilter0,tp,LOCATION_DECK,0,nil)
......@@ -91,7 +91,7 @@ function c60152927.e5tg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c60152927.e5op(e,tp,eg,ep,ev,re,r,rp)
::cancel::
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_MONSTER)
local mg=Duel.GetRitualMaterial(tp)
local sg=nil
if Duel.IsExistingMatchingCard(c60152927.filter2,c:GetControler(),0,LOCATION_MZONE,1,nil) then
sg=Duel.GetMatchingGroup(c60152927.exfilter0,tp,LOCATION_DECK,0,nil)
......
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