Commit 68dc718b authored by mercury233's avatar mercury233

fix

parent 101f5c62
......@@ -25,29 +25,29 @@ function c100265054.efilter(e,te)
local c=te:GetHandler()
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89)
end
function c100265054.setfilter(c,tp,code)
return c:IsSetCard(0x4c,0x89) and c:GetType()==TYPE_TRAP and c:IsSSetable() and (code==nil or c:GetCode()~=code)
and (c:IsLocation(LOCATION_GRAVE) or Duel.IsExistingMatchingCard(c100265054.setfilter,tp,LOCATION_GRAVE,0,1,c,c:GetCode()))
function c100265054.setfilter(c)
return c:IsSetCard(0x4c,0x89) and c:GetType()==TYPE_TRAP and c:IsSSetable()
end
function c100265054.fselect(g)
return g:GetClassCount(Card.GetLocation)==g:GetCount() and aux.dncheck(g)
end
function c100265054.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c100265054.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>=2 and Duel.IsExistingMatchingCard(c100265054.setfilter,tp,LOCATION_DECK,0,1,nil,tp,nil) end
local g=Duel.GetMatchingGroup(c100265054.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>=2 and g:CheckSubGroup(c100265054.fselect,2,2) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
end
function c100265054.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<2 then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100265054.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g1=Duel.SelectMatchingCard(tp,c100265054.setfilter,tp,LOCATION_DECK,0,1,1,nil,tp,nil)
if #g1<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100265054.setfilter),tp,LOCATION_GRAVE,0,1,1,g1:GetFirst(),tp,g1:GetFirst():GetCode())
g1:Merge(g2)
if #g1==2 then
if Duel.SSet(tp,g1)==0 then return end
local tc=g1:GetFirst()
local sg=g:SelectSubGroup(tp,c100265054.fselect,false,2,2)
if sg and #sg==2 then
if Duel.SSet(tp,sg)==0 then return end
local tc=sg:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -56,7 +56,7 @@ function c100265054.setop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e1)
tc=g1:GetNext()
tc=sg:GetNext()
end
end
end
......@@ -30,7 +30,7 @@ function c100338001.initial_effect(c)
e3:SetRange(LOCATION_HAND)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetCountLimit(1,100338001)
e3:SetCondition(c100338001.atkcon)
e3:SetCondition(aux.dscon)
e3:SetCost(c100338001.atkcost)
e3:SetTarget(c100338001.atktg)
e3:SetOperation(c100338001.atkop)
......@@ -47,19 +47,16 @@ function c100338001.initial_effect(c)
e4:SetOperation(c100338001.thop)
c:RegisterEffect(e4)
end
function c100338001.fselect(g,tp)
return Duel.GetMZoneCount(tp,g)>0
end
function c100338001.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetReleaseGroup(tp)
return rg:CheckSubGroup(c100338001.fselect,3,3,tp)
return rg:CheckSubGroup(aux.mzctcheckrel,3,3,tp)
end
function c100338001.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetReleaseGroup(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:SelectSubGroup(tp,c100338001.fselect,true,3,3,tp)
local sg=rg:SelectSubGroup(tp,aux.mzctcheckrel,true,3,3,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
......@@ -71,9 +68,6 @@ function c100338001.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Release(g,REASON_COST)
g:DeleteGroup()
end
function c100338001.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c100338001.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
......
......@@ -48,7 +48,7 @@ function c100424001.initial_effect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e6:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e6:SetTargetRange(LOCATION_MZONE,0)
e6:SetTarget(c100424001.tgtg)
e6:SetValue(aux.tgoval)
......@@ -57,6 +57,7 @@ function c100424001.initial_effect(c)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e7:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e7:SetRange(LOCATION_MZONE)
e7:SetTargetRange(0,LOCATION_MZONE)
e7:SetValue(c100424001.tgtg)
......@@ -100,5 +101,5 @@ function c100424001.ttop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function c100424001.tgtg(e,c)
return not c:IsCode(100424001) and c:IsFaceup()
return not (c:IsCode(100424001) and c:IsFaceup())
end
......@@ -19,7 +19,7 @@ end
function c101101072.desfilter(c,tp,g)
local ft=math.min((Duel.GetMZoneCount(tp,c)),3)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
return c:IsFaceup() and c:IsSetCard(0x247) and c:IsType(TYPE_MONSTER)
return c:IsFaceup() and c:IsSetCard(0x247)
and (not g or ft>0 and g:CheckWithSumEqual(Card.GetLevel,9,1,ft))
end
function c101101072.spfilter(c,e,tp)
......@@ -28,7 +28,7 @@ function c101101072.spfilter(c,e,tp)
end
function c101101072.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c101101072.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
local g1=Duel.GetMatchingGroup(c101101072.desfilter,tp,LOCATION_MZONE,0,nil,tp,g)
local g1=Duel.GetMatchingGroup(c101101072.desfilter,tp,LOCATION_MZONE,0,nil,tp)
local b1=Duel.IsExistingMatchingCard(c101101072.rmfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,nil)
local b2=g:GetCount()>0 and Duel.IsExistingMatchingCard(c101101072.desfilter,tp,LOCATION_MZONE,0,1,nil,tp,g)
if chk==0 then return b1 or b2 end
......@@ -75,10 +75,10 @@ function c101101072.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(dg)
if Duel.Destroy(dg,REASON_EFFECT)~=0 then
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),3)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
g=Duel.GetMatchingGroup(c101101072.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if ft>0 and g:GetCount()>0 then
if ft>0 and g:CheckWithSumEqual(Card.GetLevel,9,1,ft) then
Duel.BreakEffect()
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c101101072.spcheck,false,1,ft)
if sg then
......
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