Commit a1145be1 authored by POLYMER's avatar POLYMER

fix

parent 8e183438
......@@ -163,11 +163,6 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
c:SetEntityCode(m,false)
Duel.ShuffleHand(tp)
Duel.ConfirmCards(1-tp,c)
Effect.IsActiveType=_IsActiveType
Effect.GetActiveType=_GetActiveType
Card.IsType=_IsType
Card.GetType=_GetType
Card.GetOriginalType=_GetOriginalType
end)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
......
......@@ -127,12 +127,14 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
if op==2 then
local g=Duel.GetDecktopGroup(tp,5)
Duel.ConfirmDecktop(tp,5)
if Duel.SendtoDeck(g,1-tp,2,REASON_EFFECT)==5 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
if op==3 then
local g=Duel.GetDecktopGroup(tp,10)
Duel.ConfirmDecktop(tp,10)
if Duel.SendtoDeck(g,1-tp,2,REASON_EFFECT)==10 then
Duel.Draw(tp,2,REASON_EFFECT)
end
......
......@@ -92,13 +92,13 @@ function cm.damop(e,tp,eg,ep,ev,re,r,rp)
--Debug.Message(ct)
if ct>0 then
Duel.Damage(1-tp,ct*400,REASON_EFFECT,true)
Duel.Damage(1-tp,ct*400,REASON_EFFECT)
end
else
if Duel.IsPlayerAffectedByEffect(tp,40010592) and seq<3 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+2) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.MoveSequence(c,seq+2)
if ct>0 then
Duel.Damage(1-tp,ct*400,REASON_EFFECT,true)
Duel.Damage(1-tp,ct*400,REASON_EFFECT)
end
else
Duel.SendtoHand(c,nil,REASON_EFFECT)
......
......@@ -99,7 +99,7 @@ function cm.sumop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.ShuffleHand(tp)
end
function cm.counterfilter(c)
return not c:IsType(TYPE_SPIRIT)
return c:IsType(TYPE_SPIRIT)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
......@@ -130,15 +130,34 @@ function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.Summon(tp,c,true,nil)~=0 then
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1)
e1:SetOperation(cm.adjustop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_NEGATED)
e2:SetLabelObject(e1)
e2:SetOperation(cm.adjustop2)
Duel.RegisterEffect(e2,tp)
end
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,c)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.Summon(tp,sg,true,nil)
end
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
function cm.adjustop2(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te and aux.GetValueType(te)=="Effect" then te:Reset() end
end
function cm.desfilter(c)
return c:IsType(TYPE_MONSTER)
end
......
......@@ -142,8 +142,8 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then
Duel.MoveSequence(c,seq+1)
if ct1>0 then
c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
c:RegisterFlagEffect(m+2,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2,1,ct1)
c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(m,2))
c:RegisterFlagEffect(m+2,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2,ct1)
end
else
if Duel.IsPlayerAffectedByEffect(tp,40010592) and seq<3 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+2) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
......@@ -88,7 +88,7 @@ function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
end
--------
function cm.cfilter2(c,tp)
return c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0 and c:IsType(TYPE_SYNCHRO)
return c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0 and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_TUNER)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_ONFIELD,0,1,nil,tp) end
......
......@@ -113,13 +113,14 @@ if not cm.start then
while tc do
local code=tc:GetOriginalCode()
local ccode=_G["c"..code]
if not cm.initial_effect then cm.initial_effect=aux.TRUE end
tc:ReplaceEffect(82209156,0)
if ccode.initial_effect then ccode.initial_effect(tc) end
tc=g:GetNext()
end
Debug.Message("此卡会爆不明红字,但仍然可以正常使用")
Debug.Message("至少目前暂未发现实质性bug,无需反馈")
Debug.Message("如有能力进行修复也可联系作者")
--Debug.Message("此卡会爆不明红字,但仍然可以正常使用")
--Debug.Message("至少目前暂未发现实质性bug,无需反馈")
--Debug.Message("如有能力进行修复也可联系作者")
end
function cm.initial_effect(c)
......
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