Commit 5015f641 authored by mercury233's avatar mercury233 Committed by DailyShana

update Swords of Concealing Light (#551)

parent 6e1d3e46
...@@ -9,13 +9,13 @@ function c12923641.initial_effect(c) ...@@ -9,13 +9,13 @@ function c12923641.initial_effect(c)
e1:SetOperation(c12923641.activate) e1:SetOperation(c12923641.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--cannot change position --cannot change position
local e1=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTargetRange(0,LOCATION_MZONE) e2:SetTargetRange(0,LOCATION_MZONE)
c:RegisterEffect(e1) c:RegisterEffect(e2)
end end
function c12923641.target(e,tp,eg,ep,ev,re,r,rp,chk) function c12923641.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -23,23 +23,25 @@ function c12923641.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,23 +23,25 @@ function c12923641.target(e,tp,eg,ep,ev,re,r,rp,chk)
c:SetTurnCounter(0) c:SetTurnCounter(0)
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
Duel.SetTargetCard(g)
--destroy --destroy
local e2=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1) e1:SetCountLimit(1)
e2:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e2:SetCondition(c12923641.descon) e1:SetCondition(c12923641.descon)
e2:SetOperation(c12923641.desop) e1:SetOperation(c12923641.desop)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
c:RegisterEffect(e2) c:RegisterEffect(e1)
end end
function c12923641.activate(e,tp,eg,ep,ev,re,r,rp) function c12923641.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) if sg:GetCount()>0 then
Duel.ChangePosition(sg,POS_FACEDOWN_DEFENSE)
end end
end end
function c12923641.descon(e,tp,eg,ep,ev,re,r,rp) function c12923641.descon(e,tp,eg,ep,ev,re,r,rp)
......
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