Commit d9eff121 authored by POLYMER's avatar POLYMER

fix

parent d8b37261
......@@ -16,6 +16,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e0)
if not cm.global_check then
cm.global_check=true
local _ChangeChainOperation=Duel.ChangeChainOperation
function Duel.ChangeChainOperation(ev,...)
local re=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT)
if aux.GetValueType(re)=="Effect" then
......
......@@ -47,10 +47,12 @@ function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
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)
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
Duel.SetChainLimit(cm.chlimit)
end
function cm.chlimit(e,ep,tp)
return tp==ep
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
......
......@@ -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)
end
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)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
......@@ -46,18 +46,17 @@ function c67200823.filter(c)
end
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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c67200823.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c67200823.filter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if Duel.LinkSummon(tp,tc,nil)~=0 then
Duel.BreakEffect()
Duel.Destroy(c,REASON_EFFECT)
if Duel.Destroy(c,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c67200823.filter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.LinkSummon(tp,tc,nil)
end
end
end
......@@ -88,7 +87,7 @@ function c67200823.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local fg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
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)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
......@@ -46,18 +46,17 @@ function c67200827.xyzfilter(c)
end
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
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_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c67200827.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c67200827.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
if Duel.XyzSummon(tp,tg:GetFirst(),nil)~=0 then
Duel.BreakEffect()
Duel.Destroy(c,REASON_EFFECT)
if Duel.Destroy(c,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(c67200827.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
end
......@@ -84,6 +83,8 @@ function c67200827.thop(e,tp,eg,ep,ev,re,r,rp)
end
--
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
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