Commit c43799b8 authored by DailyShana's avatar DailyShana

fix

parent 6045d227
...@@ -31,6 +31,12 @@ function c15661378.initial_effect(c) ...@@ -31,6 +31,12 @@ function c15661378.initial_effect(c)
e3:SetTarget(c15661378.remtg) e3:SetTarget(c15661378.remtg)
e3:SetOperation(c15661378.remop) e3:SetOperation(c15661378.remop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c15661378.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end end
function c15661378.ffilter(c,fc,sub,mg,sg) function c15661378.ffilter(c,fc,sub,mg,sg)
return c:IsControler(fc:GetControler()) and c:IsLocation(LOCATION_MZONE+LOCATION_HAND) and (not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode())) return c:IsControler(fc:GetControler()) and c:IsLocation(LOCATION_MZONE+LOCATION_HAND) and (not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode()))
...@@ -74,10 +80,16 @@ end ...@@ -74,10 +80,16 @@ end
function c15661378.mfilter(c) function c15661378.mfilter(c)
return c:GetOriginalRace()~=RACE_DRAGON return c:GetOriginalRace()~=RACE_DRAGON
end end
function c15661378.remcon(e,tp,eg,ep,ev,re,r,rp) function c15661378.valcheck(e,c)
local c=e:GetHandler()
local mg=c:GetMaterial() local mg=c:GetMaterial()
return mg and not mg:IsExists(c15661378.mfilter,1,nil) if not mg:IsExists(c15661378.mfilter,1,nil) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c15661378.remcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabel()==1
end end
function c15661378.remtg(e,tp,eg,ep,ev,re,r,rp,chk) function c15661378.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil)
......
...@@ -21,7 +21,8 @@ end ...@@ -21,7 +21,8 @@ end
function c50696588.activate(e,tp,eg,ep,ev,re,r,rp) function c50696588.activate(e,tp,eg,ep,ev,re,r,rp)
local flag=e:GetLabel() local flag=e:GetLabel()
local seq=math.log(bit.rshift(flag,16),2) local seq=math.log(bit.rshift(flag,16),2)
if not Duel.CheckLocation(1-tp,LOCATION_MZONE,seq) then return end if not Duel.CheckLocation(1-tp,LOCATION_MZONE,seq)
or Duel.GetFlagEffect(tp,50696588)~=0 then return end
Duel.RegisterFlagEffect(tp,50696588,0,0,0) Duel.RegisterFlagEffect(tp,50696588,0,0,0)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -61,9 +61,13 @@ function c71645242.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,9 +61,13 @@ function c71645242.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function c71645242.opfilter(c,e)
return c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e)
end
function c71645242.spop(e,tp,eg,ep,ev,re,r,rp) function c71645242.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local g=eg:Filter(Card.IsRelateToEffect,nil,e) local g=eg:Filter(c71645242.opfilter,nil,e)
if g:GetCount()==0 then return end
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
if tc:IsFaceup() then if tc:IsFaceup() then
...@@ -76,6 +80,7 @@ function c71645242.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,6 +80,7 @@ function c71645242.spop(e,tp,eg,ep,ev,re,r,rp)
end end
tc=g:GetNext() tc=g:GetNext()
end end
Duel.BreakEffect()
if bit.extract(ev,tp)~=0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 if bit.extract(ev,tp)~=0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,71645243,0,0x4011,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,1-tp) then and Duel.IsPlayerCanSpecialSummonMonster(tp,71645243,0,0x4011,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,1-tp) then
local token=Duel.CreateToken(tp,71645243) local token=Duel.CreateToken(tp,71645243)
...@@ -114,14 +119,10 @@ function c71645242.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -114,14 +119,10 @@ function c71645242.spop2(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local dg=Duel.GetMatchingGroup(c71645242.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local dg=Duel.GetMatchingGroup(c71645242.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
dg:AddCard(c) dg:AddCard(c)
Duel.Destroy(dg,REASON_EFFECT) if Duel.Destroy(dg,REASON_EFFECT)==dg:GetCount() then
Duel.BreakEffect() local tc=Duel.GetFirstTarget()
local og=Duel.GetOperatedGroup() if tc:IsRelateToEffect(e) then
if not og:IsContains(c) then return end Duel.SpecialSummon(tc,0x20,tp,tp,false,false,POS_FACEUP)
og:RemoveCard(c) end
local atk=og:GetSum(Card.GetPreviousAttackOnField)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsAttack(atk) then
Duel.SpecialSummon(tc,0x20,tp,tp,false,false,POS_FACEUP)
end end
end 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