Commit 72953e3b authored by POLYMER's avatar POLYMER

fix

parent 83e07c86
...@@ -17,6 +17,8 @@ function cm.sptg(ct) ...@@ -17,6 +17,8 @@ function cm.sptg(ct)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetReleaseGroup(tp,true):Filter(Card.IsLevelAbove,c,7) local g=Duel.GetReleaseGroup(tp,true):Filter(Card.IsLevelAbove,c,7)
if chk==0 then return #g>=ct and g:CheckSubGroup(cm.gfilter,ct,ct,tp) end if chk==0 then return #g>=ct and g:CheckSubGroup(cm.gfilter,ct,ct,tp) end
Duel.Hint(HINT_SELECTMSG,tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,ct,tp,LOCATION_HAND+LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,ct,tp,LOCATION_HAND+LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
if ct==3 then if ct==3 then
......
...@@ -12,6 +12,7 @@ function s.initial_effect(c) ...@@ -12,6 +12,7 @@ function s.initial_effect(c)
--search --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,12845004) e2:SetCountLimit(1,12845004)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
......
...@@ -41,11 +41,12 @@ end ...@@ -41,11 +41,12 @@ end
function c37629203.stop(e,tp,eg,ep,ev,re,r,rp) function c37629203.stop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c37629203.stfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c37629203.stfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
local sg=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) if g:GetCount()>0 and Duel.SSet(tp,g:GetFirst())>0 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(37629203,2)) then
if g:GetCount()>0 and Duel.SSet(tp,g:GetFirst())>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(37629203,2)) then
Duel.BreakEffect() Duel.BreakEffect()
--local sg=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=sg:Select(tp,1,1,nil) --local sg=sg:Select(tp,1,1,nil)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(sg) Duel.HintSelection(sg)
Duel.SendtoGrave(sg,REASON_EFFECT) Duel.SendtoGrave(sg,REASON_EFFECT)
end end
......
--白银之城的纤茶壶 --白银之城的纤茶壶
local cm,m,o=GetID() local cm,m,o=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
--position
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
...@@ -15,7 +15,7 @@ function cm.initial_effect(c) ...@@ -15,7 +15,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand or spsummon --to hand or spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1)) e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
...@@ -26,19 +26,10 @@ function cm.initial_effect(c) ...@@ -26,19 +26,10 @@ function cm.initial_effect(c)
e2:SetTarget(cm.tstg) e2:SetTarget(cm.tstg)
e2:SetOperation(cm.tsop) e2:SetOperation(cm.tsop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to hand local e3=e2:Clone()
local e2=Effect.CreateEffect(c) e3:SetCode(EVENT_LEAVE_FIELD)
e2:SetDescription(aux.Stringid(m,2)) e3:SetCondition(cm.thcon)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON) c:RegisterEffect(e3)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.tstg)
e2:SetOperation(cm.tsop)
c:RegisterEffect(e2)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -49,15 +40,17 @@ function cm.stfilter(c) ...@@ -49,15 +40,17 @@ function cm.stfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x17e) and c:IsSSetable() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x17e) and c:IsSSetable()
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.stfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.stfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local gg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local gg=Duel.SelectMatchingCard(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if gg:GetFirst():IsFaceup() and gg:GetFirst():IsRelateToEffect(e) then if #gg>0 then
Duel.HintSelection(gg)
if Duel.ChangePosition(gg,POS_FACEDOWN_DEFENSE)~=0 then if Duel.ChangePosition(gg,POS_FACEDOWN_DEFENSE)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.stfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.stfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst()) Duel.SSet(tp,g:GetFirst())
end end
......
...@@ -26,7 +26,7 @@ end ...@@ -26,7 +26,7 @@ end
function c65840045.spcon(e,c) function c65840045.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65840045.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) or Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and (Duel.IsExistingMatchingCard(c65840045.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) or Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0)
end end
function c65840045.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c65840045.target2(e,tp,eg,ep,ev,re,r,rp,chk)
......
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