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