Commit d9eff121 authored by POLYMER's avatar POLYMER

fix

parent d8b37261
...@@ -16,6 +16,7 @@ function cm.initial_effect(c) ...@@ -16,6 +16,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e0) c:RegisterEffect(e0)
if not cm.global_check then if not cm.global_check then
cm.global_check=true cm.global_check=true
local _ChangeChainOperation=Duel.ChangeChainOperation
function Duel.ChangeChainOperation(ev,...) function Duel.ChangeChainOperation(ev,...)
local re=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT) local re=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT)
if aux.GetValueType(re)=="Effect" then if aux.GetValueType(re)=="Effect" then
......
...@@ -47,10 +47,12 @@ function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,10 +47,12 @@ function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_HAND,0,1,c) and Duel.IsExistingMatchingCard(cm.filter6,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) if chk then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_HAND,0,1,c) and Duel.IsExistingMatchingCard(cm.filter6,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
Duel.SetChainLimit(aux.FALSE) Duel.SetChainLimit(cm.chlimit)
end
end end
function cm.chlimit(e,ep,tp)
return tp==ep
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp) function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
......
...@@ -126,7 +126,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -126,7 +126,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,cm.filter1,1,1,REASON_COST+REASON_DISCARD,c) Duel.DiscardHand(tp,cm.filter1,1,1,REASON_COST+REASON_DISCARD,c)
end end
if op==2 then if op==2 then
local ta=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_HAND,0,1,1,c) local ta=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_HAND,0,1,1,c):GetFirst()
Duel.Remove(ta,POS_FACEUP,REASON_EFFECT) Duel.Remove(ta,POS_FACEUP,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
...@@ -46,18 +46,17 @@ function c67200823.filter(c) ...@@ -46,18 +46,17 @@ function c67200823.filter(c)
end end
function c67200823.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c67200823.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200823.filter,tp,LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c67200823.filter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function c67200823.spop(e,tp,eg,ep,ev,re,r,rp) function c67200823.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if Duel.Destroy(c,REASON_EFFECT)~=0 then
local g=Duel.SelectMatchingCard(tp,c67200823.filter,tp,LOCATION_EXTRA,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:GetFirst() local g=Duel.SelectMatchingCard(tp,c67200823.filter,tp,LOCATION_EXTRA,0,1,1,nil)
if tc then local tc=g:GetFirst()
if Duel.LinkSummon(tp,tc,nil)~=0 then if tc then
Duel.BreakEffect() Duel.LinkSummon(tp,tc,nil)
Duel.Destroy(c,REASON_EFFECT)
end end
end end
end end
...@@ -88,7 +87,7 @@ function c67200823.sumsuc(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,7 +87,7 @@ function c67200823.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND) local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local fg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) local fg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local g local g
if #hg>0 and (#fg==0 or Duel.SelectOption(tp,aux.Stringid(67200823,3),aux.Stringid(67200823,4))==0) then if #hg>0 and e:GetHandler():IsSummonType(TYPE_PENDULUM) and (#fg==0 or Duel.SelectOption(tp,aux.Stringid(67200823,3),aux.Stringid(67200823,4))==0) then
g=hg:RandomSelect(tp,1) g=hg:RandomSelect(tp,1)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
...@@ -46,18 +46,17 @@ function c67200827.xyzfilter(c) ...@@ -46,18 +46,17 @@ function c67200827.xyzfilter(c)
end end
function c67200827.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c67200827.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200827.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c67200827.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c67200827.spop(e,tp,eg,ep,ev,re,r,rp) function c67200827.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c67200827.xyzfilter,tp,LOCATION_EXTRA,0,nil) if Duel.Destroy(c,REASON_EFFECT)~=0 then
if g:GetCount()>0 then local g=Duel.GetMatchingGroup(c67200827.xyzfilter,tp,LOCATION_EXTRA,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if g:GetCount()>0 then
local tg=g:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if Duel.XyzSummon(tp,tg:GetFirst(),nil)~=0 then local tg=g:Select(tp,1,1,nil)
Duel.BreakEffect() Duel.XyzSummon(tp,tg:GetFirst(),nil)
Duel.Destroy(c,REASON_EFFECT)
end end
end end
end end
...@@ -84,6 +83,8 @@ function c67200827.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,6 +83,8 @@ function c67200827.thop(e,tp,eg,ep,ev,re,r,rp)
end end
-- --
function c67200827.sumsuc(e,tp,eg,ep,ev,re,r,rp) function c67200827.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT) if e:GetHandler():IsSummonType(TYPE_PENDULUM) then
Duel.Draw(tp,1,REASON_EFFECT)
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