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