Commit 59a62912 authored by Nemo Ma's avatar Nemo Ma

fix

parent 4e386dec
...@@ -62,11 +62,14 @@ function cm.initial_effect(c) ...@@ -62,11 +62,14 @@ function cm.initial_effect(c)
e7:SetCategory(CATEGORY_SPECIAL_SUMMON) e7:SetCategory(CATEGORY_SPECIAL_SUMMON)
e7:SetType(EFFECT_TYPE_QUICK_O) e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetCode(EVENT_FREE_CHAIN) e7:SetCode(EVENT_FREE_CHAIN)
e7:SetRange(LOCATION_REMOVED+LOCATION_GRAVE) e7:SetRange(LOCATION_REMOVED)
e7:SetCost(cm.spco1) e7:SetCost(cm.spco1)
e7:SetTarget(cm.sptg1) --e7:SetTarget(cm.sptg1)
e7:SetOperation(cm.spop1) e7:SetOperation(cm.spop1)
c:RegisterEffect(e7) c:RegisterEffect(e7)
local e11=e7:Clone()
e11:SetRange(LOCATION_GRAVE)
c:RegisterEffect(e11)
--remove --remove
local e8=Effect.CreateEffect(c) local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(m,3)) e8:SetDescription(aux.Stringid(m,3))
...@@ -158,9 +161,7 @@ function cm.activate2(e,tp,eg,ep,ev,re,r,rp) ...@@ -158,9 +161,7 @@ function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.cosfilter(c,tp) function cm.cosfilter(c,tp)
return c:GetOwner()==1-tp and return c:GetOwner()==1-tp and c:IsType(TYPE_MONSTER) and c:IsReleasable()
c:IsType(TYPE_MONSTER)
and c:IsReleasable()
and (c:IsSummonType(SUMMON_TYPE_SPECIAL) or c:IsSummonType(SUMMON_TYPE_NORMAL)) and (c:IsSummonType(SUMMON_TYPE_SPECIAL) or c:IsSummonType(SUMMON_TYPE_NORMAL))
end end
...@@ -179,7 +180,8 @@ end ...@@ -179,7 +180,8 @@ end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
Duel.SetChainLimit(cm.chlimit) Duel.SetChainLimit(cm.chlimit)
end end
...@@ -219,12 +221,18 @@ end ...@@ -219,12 +221,18 @@ end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp) function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TOGRAVE-RESET_REMOVE,0,1,Duel.GetTurnCount()) c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,Duel.GetTurnCount())
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetLabel(Duel.GetTurnCount()) if Duel.GetTurnPlayer()==c:GetOwner() and Duel.GetCurrentPhase()==PHASE_END then
e1:SetLabel(Duel.GetTurnCount()+2)
elseif Duel.GetTurnPlayer()==c:GetOwner() then
e1:SetLabel(Duel.GetTurnCount())
else
e1:SetLabel(Duel.GetTurnCount()+1)
end
e1:SetLabelObject(c) e1:SetLabelObject(c)
e1:SetCondition(cm.spspcon) e1:SetCondition(cm.spspcon)
e1:SetOperation(cm.spspop) e1:SetOperation(cm.spspop)
...@@ -235,7 +243,7 @@ end ...@@ -235,7 +243,7 @@ end
function cm.spspcon(e,tp,eg,ep,ev,re,r,rp) function cm.spspcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject() local c=e:GetLabelObject()
return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()==tp and c:GetFlagEffectLabel(m)==e:GetLabel() return Duel.GetTurnCount()==e:GetLabel() and Duel.GetTurnPlayer()==tp
end end
function cm.spspop(e,tp,eg,ep,ev,re,r,rp) function cm.spspop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -26,16 +26,16 @@ function c33300362.initial_effect(c) ...@@ -26,16 +26,16 @@ function c33300362.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:IsCanTurnSet() return c:IsCanChangePosition()
end end
function cm.filter2(c) function cm.filter2(c)
return c:IsSetCard(0x563) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x563) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.filter(chkc) and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.filter(chkc) and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
...@@ -47,8 +47,18 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,8 +47,18 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) if tc:IsPosition(POS_FACEDOWN_DEFENSE) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
elseif tc:IsPosition(POS_FACEUP_DEFENSE) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
elseif tc:IsPosition(POS_FACEUP_ATTACK) then
if Duel.SelectOption(tp,aux.Stringid(23912837,2),aux.Stringid(23912837,3))==0 then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
else
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
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