Commit c4c41831 authored by POLYMER's avatar POLYMER

fix

parent ef2127c3
......@@ -87,10 +87,8 @@ function c28315443.lvop(e,tp,eg,ep,ev,re,r,rp)
tc=g:Select(tp,1,1,nil):GetFirst()
end
Duel.HintSelection(Group.FromCards(tc))
local op=aux.SelectFromOptions(tp,
{true,aux.Stringid(28315443,2)},
{true,aux.Stringid(28315443,3)})
local lv=op==1 and tc:GetLevel() or tc:GetLevel()1
local op=Duel.SelectOption(tp,aux.Stringid(28315443,2),aux.Stringid(28315443,3))
local lv=op==0 and tc:GetLevel() or tc:GetLevel()+1
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CHANGE_LEVEL)
......
......@@ -88,10 +88,8 @@ function c28315548.lvop(e,tp,eg,ep,ev,re,r,rp)
tc=g:Select(tp,1,1,nil):GetFirst()
end
Duel.HintSelection(Group.FromCards(tc))
local op=aux.SelectFromOptions(tp,
{true,aux.Stringid(28315548,2)},
{true,aux.Stringid(28315548,3)})
local lv=op==1 and tc:GetLevel() or tc:GetLevel()1
local op=Duel.SelectOption(tp,aux.Stringid(28315548,2),aux.Stringid(28315548,3))
local lv=op==0 and tc:GetLevel() or tc:GetLevel()+1
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CHANGE_LEVEL)
......
......@@ -87,10 +87,8 @@ function c28315746.lvop(e,tp,eg,ep,ev,re,r,rp)
tc=g:Select(tp,1,1,nil):GetFirst()
end
Duel.HintSelection(Group.FromCards(tc))
local op=aux.SelectFromOptions(tp,
{true,aux.Stringid(28315746,2)},
{true,aux.Stringid(28315746,3)})
local lv=op==1 and tc:GetLevel() or tc:GetLevel()1
local op=Duel.SelectOption(tp,aux.Stringid(28315746,2),aux.Stringid(28315746,3))
local lv=op==0 and tc:GetLevel() or tc:GetLevel()+1
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CHANGE_LEVEL)
......
......@@ -116,36 +116,48 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_PZONE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g_ome=Duel.SelectMatchingCard(tp,s.omepzfilter,tp,LOCATION_PZONE,0,1,1,nil)
if g_ome:GetCount()>0 and Duel.Destroy(g_ome,REASON_EFFECT)~=0 then
local c=e:GetHandler()
local ct=1
function s.desop(e, tp, eg, ep, ev, re, r, rp)
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
local g_ome = Duel.SelectMatchingCard(tp, s.omepzfilter, tp, LOCATION_PZONE, 0, 1, 1, nil)
if g_ome:GetCount() > 0 and Duel.Destroy(g_ome, REASON_EFFECT) ~= 0 then
local c = e:GetHandler()
local ct = 1
if c:IsRelateToEffect(e) then
ct=ct+c:GetMaterialCount()
ct = ct + c:GetMaterialCount()
end
local g_opp=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if g_opp:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g_opp:Select(tp,1,ct,nil)
if sg:GetCount()>0 then
local g_opp = Duel.GetMatchingGroup(aux.TRUE, tp, 0, LOCATION_ONFIELD, nil)
if g_opp:GetCount() > 0 then
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
local sg = g_opp:Select(tp, 1, ct, nil)
if sg:GetCount() > 0 then
Duel.HintSelection(sg)
local tc=sg:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=sg:GetNext()
if Duel.Destroy(sg, REASON_EFFECT) > 0 then
local og = Duel.GetOperatedGroup()
local tc = og:GetFirst()
while tc do
if tc:IsLocation(LOCATION_GRAVE + LOCATION_REMOVED) then
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT + RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT + RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3 = Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT + RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
tc = og:GetNext()
end
end
Duel.Destroy(sg,REASON_EFFECT)
end
end
end
......
......@@ -67,7 +67,7 @@ function s.chcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(sg,REASON_COST)
end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,rp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
......
......@@ -27,7 +27,7 @@ function s.initial_effect(c)
KRO_COPIED[p]=s.stringToTable(Duel.GetRegistryValue(s.getplayername(p)))
else
KRO_COPIED[p]={}
--KRO_COPIED[p]={{code=55144522,id={1}}}
--KRO_COPIED[p]={{code=54631665,id={3}}}
end
end
local e1=Effect.CreateEffect(c)
......@@ -82,17 +82,17 @@ function s.costop(e,tp,eg,ep,ev,re,r,rp)
if s[0] or te:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) then return end
s[0]=true
local bool=false
if KOISHI_CHECK then
local effects={tc:GetCardRegistered(nil,GETEFFECT_INITIAL)}
for _,ce in ipairs(effects) do
if s.issameeffect(te,ce) then
bool=true
break
end
end
else
--if KOISHI_CHECK then
-- local effects={tc:GetCardRegistered(nil,GETEFFECT_INITIAL)}
-- for _,ce in ipairs(effects) do
-- if s.issameeffect(te,ce) then
-- bool=true
-- break
-- end
-- end
--else
bool=true
end
--end
if bool and not KRO_COPY[tp][te] then
table.insert(KRO_COPY[tp],te)
end
......@@ -138,6 +138,7 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp)
table.insert(afilter,OPCODE_OR)
end
end
Duel.Hint(HINT_CODE,1-p,id)
::cancel::
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(p,table.unpack(afilter))
......@@ -237,7 +238,7 @@ function s.issamefunc(f1,f2,bool)
local d2=string.dump(f2)
if d1==d2 then
--Debug.Message(f1)
--Debug.Message(f2)
--Debug.Message(f2)
return true
elseif bool then
f1(e,tp,eg,ep,ev,re,r,rp,1)
......@@ -520,8 +521,11 @@ function s.setcheffect(c,te,code,desc)
local desc=s.getdesc(ce)
ce:SetDescription(desc)
local ctype=ce:GetType()
if ctype&EFFECT_TYPE_TRIGGER_F>0 then ce:SetType(ctype-EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_TRIGGER_O) end
if ctype&EFFECT_TYPE_QUICK_F>0 then ce:SetType(ctype-EFFECT_TYPE_QUICK_F+EFFECT_TYPE_QUICK_O) end
--if ctype&EFFECT_TYPE_TRIGGER_F>0 then ce:SetType(ctype-EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_TRIGGER_O) end
--if ctype&EFFECT_TYPE_QUICK_F>0 then ce:SetType(ctype-EFFECT_TYPE_QUICK_F+EFFECT_TYPE_QUICK_O) end
if ce:IsHasRange(LOCATION_FZONE) and not ce:IsHasRange(LOCATION_MZONE) then
ce:SetRange(LOCATION_SZONE)
end
ce:SetProperty(ce:GetProperty()|EFFECT_FLAG_UNCOPYABLE)
ce:SetCondition(s.chcon(te,code))
ce:SetCost(s.chcost(te,code))
......
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