Commit c43799b8 authored by DailyShana's avatar DailyShana

fix

parent 6045d227
......@@ -31,6 +31,12 @@ function c15661378.initial_effect(c)
e3:SetTarget(c15661378.remtg)
e3:SetOperation(c15661378.remop)
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
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()))
......@@ -74,10 +80,16 @@ end
function c15661378.mfilter(c)
return c:GetOriginalRace()~=RACE_DRAGON
end
function c15661378.remcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
function c15661378.valcheck(e,c)
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
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)
......
......@@ -21,7 +21,8 @@ end
function c50696588.activate(e,tp,eg,ep,ev,re,r,rp)
local flag=e:GetLabel()
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)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -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_SPECIAL_SUMMON,nil,1,0,0)
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)
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()
while tc do
if tc:IsFaceup() then
......@@ -76,6 +80,7 @@ function c71645242.spop(e,tp,eg,ep,ev,re,r,rp)
end
tc=g:GetNext()
end
Duel.BreakEffect()
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
local token=Duel.CreateToken(tp,71645243)
......@@ -114,14 +119,10 @@ function c71645242.spop2(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end
local dg=Duel.GetMatchingGroup(c71645242.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
dg:AddCard(c)
Duel.Destroy(dg,REASON_EFFECT)
Duel.BreakEffect()
local og=Duel.GetOperatedGroup()
if not og:IsContains(c) then return end
og:RemoveCard(c)
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)
if Duel.Destroy(dg,REASON_EFFECT)==dg:GetCount() then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0x20,tp,tp,false,false,POS_FACEUP)
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