Commit bbe0f38c authored by VanillaSalt's avatar VanillaSalt

fix

parent 64d0b017
...@@ -17,7 +17,7 @@ function c13317419.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,7 +17,7 @@ function c13317419.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end end
function c13317419.filter(c) function c13317419.filter(c)
return c:IsFaceup() and c:IsAttackAbove(800) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttackAbove(800)
end end
function c13317419.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13317419.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c13317419.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c13317419.filter(chkc) end
...@@ -82,9 +82,8 @@ end ...@@ -82,9 +82,8 @@ end
function c13317419.desop(e,tp,eg,ep,ev,re,r,rp) function c13317419.desop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject() local ec=e:GetLabelObject()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0
Duel.Destroy(tc,REASON_EFFECT) and ec and ec:IsFaceup() and ec:IsLocation(LOCATION_MZONE) then
if ec then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
...@@ -97,5 +96,4 @@ function c13317419.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,5 +96,4 @@ function c13317419.desop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
ec:RegisterEffect(e2) ec:RegisterEffect(e2)
end end
end
end end
...@@ -16,8 +16,7 @@ function c70913714.initial_effect(c) ...@@ -16,8 +16,7 @@ function c70913714.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c70913714.eqcon(e,tp,eg,ep,ev,re,r,rp) function c70913714.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
return c:GetPreviousLocation()==LOCATION_MZONE
end end
function c70913714.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c70913714.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
...@@ -57,27 +56,23 @@ function c70913714.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,27 +56,23 @@ function c70913714.eqop(e,tp,eg,ep,ev,re,r,rp)
e4:SetCategory(CATEGORY_CONTROL) e4:SetCategory(CATEGORY_CONTROL)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_LEAVE_FIELD) e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c70913714.ctcon)
e4:SetTarget(c70913714.cttg) e4:SetTarget(c70913714.cttg)
e4:SetOperation(c70913714.ctop) e4:SetOperation(c70913714.ctop)
e4:SetReset(RESET_EVENT+0x1020000)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
end end
function c70913714.ctcon(e,tp,eg,ep,ev,re,r,rp) function c70913714.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
e:SetLabelObject(ec)
return ec and c:GetLocation()~=LOCATION_DECK and ec:IsLocation(LOCATION_MZONE) and ec:IsControler(1-tp)
end
function c70913714.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end if chk==0 then return true end
local ec=e:GetLabelObject() local ec=e:GetHandler():GetPreviousEquipTarget()
if ec:IsLocation(LOCATION_MZONE) and ec:IsControlerCanBeChanged() then
Duel.SetTargetCard(ec) Duel.SetTargetCard(ec)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,ec,1,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,ec,1,0,0)
end
end end
function c70913714.ctop(e,tp,eg,ep,ev,re,r,rp) function c70913714.ctop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject() local ec=Duel.GetFirstTarget()
if ec:IsRelateToEffect(e) and ec:IsFaceup() and not Duel.GetControl(ec,tp) then if ec and ec:IsRelateToEffect(e) and not Duel.GetControl(ec,tp) then
if not ec:IsImmuneToEffect(e) and ec:IsAbleToChangeControler() then if not ec:IsImmuneToEffect(e) and ec:IsAbleToChangeControler() then
Duel.Destroy(ec,REASON_EFFECT) Duel.Destroy(ec,REASON_EFFECT)
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