Commit 2b24dcf8 authored by POLYMER's avatar POLYMER

fix

parent c5205c7c
......@@ -30,7 +30,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.SelectMatchingCard(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(sg)
local tc1=sg:GetFirst()
local g=c:GetAttackableTarget()
local g=tc1:GetAttackableTarget()
if #g>0 and Duel.SelectOption(tp,1157,1117)==0 then
local tc2=g:Select(tp,1,1,nil):GetFirst()
if tc2 then
......
......@@ -15,7 +15,7 @@ function c12825613.initial_effect(c)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(1108)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,12825613)
......@@ -39,7 +39,7 @@ end
function c12825613.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP)
Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP_ATTACK)
Duel.SpecialSummonComplete()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
......
......@@ -19,18 +19,14 @@ function c22348306.thfilter(c)
end
function c22348306.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c22348306.thfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if chk==0 then return g:GetClassCount(c22348306.GetType)>1 end
if chk==0 then return g:GetClassCount(c22348306.jGetType)>1 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,0)
end
function c22348306.GetType(c)
if c:IsType(TYPE_TRAP) then return 1
elseif c:IsType(TYPE_MONSTER) then return 2
elseif c:IsType(TYPE_SPELL) then return 3
else return nil
end
function c22348306.jGetType(c)
return bit.band(c:GetType(),0x7)
end
function c22348306.tpcheck(g)
return g:GetClassCount(c22348306.GetType)==#g
return g:GetClassCount(c22348306.jGetType)==#g
end
function c22348306.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c22348306.thfilter),tp,LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
......
......@@ -39,13 +39,6 @@ function cm.initial_effect(c)
c:RegisterEffect(e4)
end
function c22348422.GetType(c)
if c:IsType(TYPE_TRAP) then return 1
elseif c:IsType(TYPE_MONSTER) then return 2
elseif c:IsType(TYPE_SPELL) then return 3
else return nil
end
end
function c22348422.thcfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x970a)
end
......@@ -62,7 +55,7 @@ end
function c22348422.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,1,REASON_EFFECT)
local tc=Duel.GetOperatedGroup():GetFirst()
if tc and re:GetHandler() and c22348422.GetType(tc)==c22348422.GetType(re:GetHandler()) and Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
if tc and re:GetHandler() and bit.band(tc:GetType(),0x7)==bit.band(re:GetHandler():GetType(),0x7) and Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
......
......@@ -8,6 +8,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetTarget(cm.regtg)
e1:SetOperation(cm.regop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
......@@ -23,6 +24,10 @@ function cm.initial_effect(c)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(function(e,ep,tp)return tp==ep end)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
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