Commit 527fd867 authored by GuGu's avatar GuGu

Update c11016.lua

parent 650879c0
Pipeline #34308 passed with stage
in 9 seconds
...@@ -22,6 +22,7 @@ function c11016.initial_effect(c) ...@@ -22,6 +22,7 @@ function c11016.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e3:SetCondition(c11016.condition) e3:SetCondition(c11016.condition)
e3:SetTarget(c11016.target) e3:SetTarget(c11016.target)
e3:SetOperation(c11016.operation) e3:SetOperation(c11016.operation)
...@@ -40,15 +41,14 @@ function c11016.initial_effect(c) ...@@ -40,15 +41,14 @@ function c11016.initial_effect(c)
end end
function c11016.condition(e,tp,eg,ep,ev,re,r,rp) function c11016.condition(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return Duel.IsChainNegatable(ev) and e:GetHandler():GetAttack()>=600 and re:GetHandler()~=e:GetHandler() return Duel.IsChainNegatable(ev) and re:GetHandler()~=e:GetHandler()
end end
function c11016.target(e,tp,eg,ep,ev,re,r,rp,chk) function c11016.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(11016)==0 and c:GetFlagEffect(1101600)==0 end if chk==0 then return c:GetFlagEffect(11016)==0 and c:GetAttack()>=600 end
if c:IsHasEffect(EFFECT_REVERSE_UPDATE) then if c:IsHasEffect(EFFECT_REVERSE_UPDATE) then
c:RegisterFlagEffect(11016,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(11016,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end end
c:RegisterFlagEffect(1101600,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
...@@ -56,28 +56,28 @@ function c11016.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,28 +56,28 @@ function c11016.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c11016.operation(e,tp,eg,ep,ev,re,r,rp) function c11016.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and c:GetAttack()>=600 then if c:IsRelateToEffect(e) and c:IsFaceup() and c:GetAttack()>=600
Duel.NegateActivation(ev) and not c:IsStatus(STATUS_BATTLE_DESTROYED) then
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-600) e1:SetValue(-600)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not c:IsHasEffect(EFFECT_REVERSE_UPDATE) and Duel.GetCurrentChain()==ev+1 then
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
end end
end end
function c11016.ctltg(e,tp,eg,ep,ev,re,r,rp,chk) function c11016.ctltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsControlerCanBeChanged() end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0)
end end
function c11016.ctlop(e,tp,eg,ep,ev,re,r,rp) function c11016.ctlop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and not Duel.GetControl(c,1-tp) then if c:IsRelateToEffect(e) then
if not c:IsImmuneToEffect(e) and c:IsAbleToChangeControler() then Duel.GetControl(c,1-tp)
Duel.Destroy(c,REASON_EFFECT)
end
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