Commit 360c8295 authored by Nemo Ma's avatar Nemo Ma

fix

parent d67dcd36
......@@ -55,7 +55,7 @@ function cm.initial_effect(c)
Duel.SetTargetCard(tg)
return tg
else
return _SelectMatchingCard(sp,f,p,s,o,min,max,nc,...)
return _SelectTarget(sp,f,p,s,o,min,max,nc,...)
end
end
function Duel.SelectTribute(sp,ac,min,max,mg,top)
......@@ -105,7 +105,7 @@ function cm.initial_effect(c)
if c and e then Duel.RaiseSingleEvent(c,EVENT_DETACH_MATERIAL,e,0,0,0,0) end
return ct
else
return _DRemoveOverlayCard(sp,s,o,min,max,r)
return _CRemoveOverlayCard(oc,sp,min,max,r)
end
end
function Group.FilterSelect(g,sp,f,min,max,nc,...)
......@@ -113,7 +113,7 @@ function cm.initial_effect(c)
local fg=cm.filter(g,f,nc,...)
return fg:Select(sp,min,max,nc)
else
return _FilterSelect(g,sp,f,min,max,nc)
return _FilterSelect(g,sp,f,min,max,nc,...)
end
end
function Group.Select(g,sp,min,max,nc)
......
......@@ -233,7 +233,7 @@ function cm.spfilter(c,e,tp)
return c:IsSetCard(0x3977) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.mrtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and e:GetHandler():IsAbleToDeck() end
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
......
......@@ -27,7 +27,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD+LOCATION_EXTRA,0,1,nil)
end
function cm.filter(c)
return c:GetType()&0x82~=0 and c:IsAbleToHand()
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
......@@ -158,22 +158,22 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end
end
local all_cards=Duel.GetMatchingGroup(nil,tp,0x1ff,0x1ff,nil)
all_cards:ForEach(cm.enum)
local nng=Duel.GetMatchingGroup(Card.IsOriginalCodeRule,tp,0x1ff,0x1ff,nil,115045)
local reg=Card.RegisterEffect
Card.RegisterEffect=function(sc,se,bool)
se:SetOperation(cm.nnop)
reg(sc,se,bool)
end
for tc in aux.Next(nng) do
if sc:GetOriginalCode()==115045 then se:SetOperation(cm.nnop) end
reg(sc,se,bool)
end
for tc in aux.Next(all_cards) do
if tc.initial_effect then
tc:ReplaceEffect(tc:GetOriginalCode(),0)
local ini=cm.initial_effect
cm.initial_effect=function() end
tc:ReplaceEffect(m,0)
cm.initial_effect=ini
tc.initial_effect(tc)
end
end
Card.RegisterEffect=reg
end
function cm.enum(c)
Card.ReplaceEffect(c,c:GetCode(),RESET_EVENT,1)
e:Reset()
end
function cm.nnop(e,tp,eg,ep,ev,re,r,rp)
local exf=function(c)return (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsLevelAbove(1) and c:IsAbleToGrave() and c:IsLocation(LOCATION_EXTRA)end
......
......@@ -22,6 +22,6 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetTargetRange(1,1)
e1:SetTarget(function(e,c,sump,sumtype,sumpos,targetp,se)return se and not se:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) and c==se:GetHandler()end)
e1:SetTarget(function(e,c,sump,sumtype,sumpos,targetp,se)return se and se:IsHasType(EFFECT_TYPE_ACTIONS) and c:IsType(TYPE_MONSTER) and c==se:GetHandler()end)
Duel.RegisterEffect(e1,tp)
end
......@@ -9,6 +9,7 @@ function c67200610.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,67200610)
e1:SetCondition(c67200610.tecon)
e1:SetTarget(c67200610.tetg)
e1:SetOperation(c67200610.teop)
......@@ -19,6 +20,7 @@ function c67200610.initial_effect(c)
--e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c67200610.stcost)
e3:SetTarget(c67200610.sttg)
e3:SetOperation(c67200610.stop)
......
......@@ -96,7 +96,7 @@ end
function c9911007.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
and not Duel.IsChainDisabled(ev) and Duel.GetFlagEffect(tp,9911007)<1
and Duel.GetFlagEffect(tp,9911007)<1
end
function c9911007.negop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.SelectYesNo(tp,aux.Stringid(9911007,1)) then return 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