Commit 74e0ecf7 authored by nekrozar's avatar nekrozar

fix

parent 3a7260be
...@@ -13,17 +13,24 @@ function c39122311.initial_effect(c) ...@@ -13,17 +13,24 @@ function c39122311.initial_effect(c)
--destroy --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(c39122311.desop) e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetOperation(c39122311.checkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy2
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c39122311.descon2) e3:SetOperation(c39122311.desop)
e3:SetOperation(c39122311.desop2) e3:SetLabelObject(e2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--destroy2
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c39122311.descon2)
e4:SetOperation(c39122311.desop2)
c:RegisterEffect(e4)
end end
function c39122311.filter(c,e,tp) function c39122311.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -40,17 +47,29 @@ function c39122311.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,17 +47,29 @@ function c39122311.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)==0 then return end if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then return end
c:SetCardTarget(tc) c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE) e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(RACE_WYRM) e1:SetValue(RACE_WYRM)
e1:SetCondition(c39122311.rcon)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end end
end end
function c39122311.rcon(e)
return e:GetOwner():IsHasCardTarget(e:GetHandler())
end
function c39122311.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c39122311.desop(e,tp,eg,ep,ev,re,r,rp) function c39122311.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetLabel()~=0 then return end
local tc=e:GetHandler():GetFirstCardTarget() local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then if tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
......
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