Commit b6ea531a authored by POLYMER's avatar POLYMER

fix

parent 10eaa113
......@@ -157,7 +157,7 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab)
local b1=0
local fid=e:GetLabel()
if fid~=0 then b1=1 end
if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (not dr or Duel.IsPlayerCanDraw(tp,1)) then
if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then --and (not dr or Duel.IsPlayerCanDraw(tp,1)) then
if opt==2 then return true end
Duel.HintSelection(Group.FromCards(c))
--if Duel.SelectYesNo(tp,aux.Stringid(m,b1)) then
......@@ -165,7 +165,7 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
if dr then
if dr and Duel.IsPlayerCanDraw(tp,1) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
local e1=Effect.CreateEffect(c)
......
......@@ -34,7 +34,7 @@ function s.thfilter(c)
and not (c:IsLocation(0x20) and c:IsFacedown())
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,0x08)>0
and Duel.IsExistingMatchingCard(s.thfilter,tp,0x30,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x30)
end
......@@ -43,8 +43,12 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,0x30,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsRelateToEffect(e) then
local val=0
if g:GetFirst():IsLocation(0x02) then
Duel.ConfirmCards(1-tp,g)
val=1
end
if val==1 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
......
......@@ -55,17 +55,17 @@ function c21113835.initial_effect(c)
Duel.AddCustomActivityCounter(21113835,ACTIVITY_SPSUMMON,c21113835.counter)
end
function c21113835.counter(c)
return c:IsSetCard(0xc914)
return c:IsSetCard(0xc904)
end
function c21113835.GetLinkCount(c)
if c:IsType(TYPE_LINK) then
if c:IsSetCard(0xc914) and c:IsDisabled() then
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 1+0x10000*c:GetLink()*2
else
return 1+0x10000*c:GetLink()
end
else
if c:IsSetCard(0xc914) and c:IsDisabled() then
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 2
else
return 1
......@@ -74,7 +74,9 @@ function c21113835.GetLinkCount(c)
end
function c21113835.LCheckGoal(sg,tp,lc,lmat)
return #sg==1 and sg:IsExists(Card.IsDisabled,1,nil)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and sg:GetFirst():IsLink(3) or #sg>=2
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and sg:GetFirst():IsLink(3) or #sg==2
and sg:IsExists(Card.IsDisabled,2,nil) and sg:IsExists(Card.IsType,2,nil,TYPE_LINK)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and sg:GetClassCount(Card.GetLink)==6 or #sg>=2
and sg:CheckWithSumEqual(c21113835.GetLinkCount,6,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat)) or #sg>=2
......@@ -93,7 +95,7 @@ function c21113835.linkcon()
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc914) end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
......@@ -120,7 +122,7 @@ function c21113835.linktg()
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc914) end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
......@@ -171,10 +173,10 @@ function c21113835.opq(e,tp,eg,ep,ev,re,r,rp)
e:Reset()
end
function c21113835.q(c)
return c:IsFaceup() and c:IsSetCard(0xc914)
return c:IsFaceup() and c:IsSetCard(0xc904)
end
function c21113835.w(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0xc914) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,4)>0 and not c:IsCode(21113835)
return c:IsFaceupEx() and c:IsSetCard(0xc904) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,4)>0 and not c:IsCode(21113835)
end
function c21113835.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21113835.q,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,4)>0 end
......@@ -226,7 +228,7 @@ function c21113835.cost4(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp)
end
function c21113835.r(c)
return c:IsType(6) and c:IsSetCard(0xc914) and c:IsSSetable()
return c:IsType(6) and c:IsSetCard(0xc904) and c:IsSSetable()
end
function c21113835.opw(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,21113835+1)==0 and Duel.IsExistingMatchingCard(c21113835.r,tp,1,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(21113835,2)) then
......@@ -247,7 +249,7 @@ function c21113835.op4(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(12,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc914))
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc904))
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
......@@ -256,7 +258,7 @@ function c21113835.op4(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(12,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc914))
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc904))
e2:SetValue(aux.indoval)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
......@@ -276,5 +278,5 @@ function c21113835.op5(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function c21113835.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc914)
return not c:IsSetCard(0xc904)
end
\ No newline at end of file
......@@ -37,6 +37,7 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetDescription(1,id+o)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.sptg)
......@@ -54,17 +55,17 @@ function s.initial_effect(c)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counter)
end
function s.counter(c)
return c:IsSetCard(0xc914)
return c:IsSetCard(0xc904)
end
function s.GetLinkCount(c)
if c:IsType(TYPE_LINK) then
if c:IsSetCard(0xc914) and c:IsDisabled() then
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 1+0x10000*c:GetLink()*2
else
return 1+0x10000*c:GetLink()
end
else
if c:IsSetCard(0xc914) and c:IsDisabled() then
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 2
else
return 1
......@@ -92,7 +93,7 @@ function s.linkcon()
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc914) end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
......@@ -119,7 +120,7 @@ function s.linktg()
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc914) end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
......@@ -182,7 +183,7 @@ function s.reop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.spfilter(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0xc914) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsFaceupEx() and c:IsSetCard(0xc904) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -225,5 +226,5 @@ function s.op5(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc914)
return not c:IsSetCard(0xc904)
end
......@@ -54,17 +54,17 @@ function s.initial_effect(c)
Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counter)
end
function s.counter(c)
return c:IsSetCard(0xc914)
return c:IsSetCard(0xc904)
end
function s.GetLinkCount(c)
if c:IsType(TYPE_LINK) then
if c:IsSetCard(0xc914) and c:IsDisabled() then
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 1+0x10000*c:GetLink()*2
else
return 1+0x10000*c:GetLink()
end
else
if c:IsSetCard(0xc914) and c:IsDisabled() then
if c:IsSetCard(0xc904) and c:IsDisabled() then
return 2
else
return 1
......@@ -73,7 +73,9 @@ function s.GetLinkCount(c)
end
function s.LCheckGoal(sg,tp,lc,lmat)
return #sg==1 and sg:IsExists(Card.IsDisabled,1,nil)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and sg:GetFirst():IsLink(3) or #sg>=2
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and sg:GetFirst():IsLink(3) or #sg==2
and sg:IsExists(Card.IsDisabled,2,nil) and sg:IsExists(Card.IsType,2,nil,TYPE_LINK)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and sg:GetClassCount(Card.GetLink)==6 or #sg>=2
and sg:CheckWithSumEqual(s.GetLinkCount,6,#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and not sg:IsExists(Auxiliary.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat)) or #sg>=2
......@@ -92,7 +94,7 @@ function s.linkcon()
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc914) end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local tp=c:GetControler()
local mg=nil
if og then
......@@ -119,7 +121,7 @@ function s.linktg()
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc914) end
local f = function(c) return c:IsFaceup() and c:IsLinkSetCard(0xc904) end
local mg=nil
if og then
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
......@@ -216,7 +218,7 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp)
Duel.AdjustAll()
end
function s.setfilter(c)
return c:IsSetCard(0xc914) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
return c:IsSetCard(0xc904) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -239,7 +241,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0xc914) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsFaceupEx() and c:IsSetCard(0xc904) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -269,5 +271,5 @@ function s.op5(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xc914)
return not c:IsSetCard(0xc904)
end
......@@ -22,8 +22,6 @@ function s.initial_effect(c)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
......@@ -104,10 +102,8 @@ function s.pcop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,s.pcfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 and Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) and c:IsOnField() and c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
local rg=c:GetColumnGroup()
rg:AddCard(c)
Duel.Remove(rg:Select(tp,1,1,nil),POS_FACEUP,REASON_EFFECT)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function s.filter(c)
......
......@@ -36,7 +36,6 @@ if not cm.lblsz then
cm._sset=Duel.SSet
Duel.SSet=function (tp,cg,...)
local single=0
local sol=0
if aux.GetValueType(cg)=="Card" and cg:IsSetCard(0x17e) and cg:IsType(TYPE_TRAP) then
single=1
elseif aux.GetValueType(cg)=="Group" then
......@@ -48,16 +47,10 @@ if not cm.lblsz then
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
local tg=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,m)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
sol=1
return 0
else
cm._sset(tp,cg,...)
if aux.GetValueType(cg)=="Card" then
sol=1
elseif aux.GetValueType(cg)=="Group" then
sol=cg:GetCount()
end
return cm._sset(tp,cg,...)
end
return sol
end
end
function cm.indtg(e,c)
......
......@@ -6,6 +6,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
......
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