Commit 7aaac411 authored by POLYMER's avatar POLYMER

fix

parent d6b51e18
...@@ -29,7 +29,7 @@ function c10150065.initial_effect(c) ...@@ -29,7 +29,7 @@ function c10150065.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c10150065.lcheck(g,lc) function c10150065.lcheck(g,lc)
return g:IsExists(Card.IsSetCard,1,nil,0xd3) return g:IsExists(Card.IsLinkSetCard,1,nil,0xd3)
end end
function c10150065.thfilter(c) function c10150065.thfilter(c)
return c:IsSetCard(0xd3) and c:IsFaceup() and c:IsAbleToHand() return c:IsSetCard(0xd3) and c:IsFaceup() and c:IsAbleToHand()
......
...@@ -191,6 +191,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...) ...@@ -191,6 +191,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
end end
end end
end end
if check then return false end
--classification is essential for efficiency, and this part is only for backup --classification is essential for efficiency, and this part is only for backup
else else
iter={1} iter={1}
......
...@@ -187,6 +187,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...) ...@@ -187,6 +187,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
end end
end end
end end
if check then return false end
--classification is essential for efficiency, and this part is only for backup --classification is essential for efficiency, and this part is only for backup
else else
iter={1} iter={1}
......
...@@ -222,6 +222,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...) ...@@ -222,6 +222,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
end end
end end
end end
if check then return false end
--classification is essential for efficiency, and this part is only for backup --classification is essential for efficiency, and this part is only for backup
else else
iter={1} iter={1}
......
...@@ -206,6 +206,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...) ...@@ -206,6 +206,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
end end
end end
end end
if check then return false end
--classification is essential for efficiency, and this part is only for backup --classification is essential for efficiency, and this part is only for backup
else else
iter={1} iter={1}
......
...@@ -226,6 +226,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...) ...@@ -226,6 +226,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
end end
end end
end end
if check then return false end
--classification is essential for efficiency, and this part is only for backup --classification is essential for efficiency, and this part is only for backup
else else
iter={1} iter={1}
......
...@@ -229,6 +229,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...) ...@@ -229,6 +229,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
end end
end end
end end
if check then return false end
--classification is essential for efficiency, and this part is only for backup --classification is essential for efficiency, and this part is only for backup
else else
iter={1} iter={1}
......
...@@ -160,6 +160,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...) ...@@ -160,6 +160,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
end end
end end
end end
if check then return false end
--classification is essential for efficiency, and this part is only for backup --classification is essential for efficiency, and this part is only for backup
else else
iter={1} iter={1}
......
...@@ -175,6 +175,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...) ...@@ -175,6 +175,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
end end
end end
end end
if check then return false end
--classification is essential for efficiency, and this part is only for backup --classification is essential for efficiency, and this part is only for backup
else else
iter={1} iter={1}
...@@ -260,6 +261,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -260,6 +261,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
tg:Merge(tg2) tg:Merge(tg2)
Duel.SetTargetCard(tg) Duel.SetTargetCard(tg)
end end
local KOISHI_CHECK=false
if Duel.DisableActionCheck then KOISHI_CHECK=true end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
...@@ -277,26 +280,36 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -277,26 +280,36 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
ge2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) ge2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(ge2,true) tc:RegisterEffect(ge2,true)
end end
local e5=Effect.CreateEffect(c) if not KOISHI_CHECK then
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) local e5=Effect.CreateEffect(c)
e5:SetCode(EVENT_ADJUST) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetLabel(fid) e5:SetCode(EVENT_ADJUST)
e5:SetCondition(function() return not pnfl_adjusting end) e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetOperation(cm.acop) e5:SetLabel(fid)
Duel.RegisterEffect(e5,tp) e5:SetCondition(function() return not pnfl_adjusting end)
local e6=e5:Clone() e5:SetOperation(cm.acop)
e6:SetCode(EVENT_CHAIN_SOLVED) Duel.RegisterEffect(e5,tp)
e6:SetCondition(aux.TRUE) local e6=e5:Clone()
e6:SetOperation(cm.acop2) e6:SetCode(EVENT_CHAIN_SOLVED)
Duel.RegisterEffect(e6,tp) e6:SetCondition(aux.TRUE)
e6:SetOperation(cm.acop2)
Duel.RegisterEffect(e6,tp)
end
end end
function cm.chkval(e,te) function cm.chkval(e,te)
if te and te:GetHandler() and not te:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) and (te:GetCode()<0x10000 or te:IsHasType(EFFECT_TYPE_ACTIONS)) then if te and te:GetHandler() and not te:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) and (te:GetCode()<0x10000 or te:IsHasType(EFFECT_TYPE_ACTIONS)) and e:GetHandler():IsAbleToHand() then
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET,0,1,e:GetLabel()) if KOISHI_CHECK then
Duel.DisableActionCheck(true)
pcall(Duel.SendtoHand,e:GetHandler(),nil,REASON_EFFECT)
Duel.DisableActionCheck(false)
else
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET,0,1,e:GetLabel())
end
--Duel.AdjustAll() --Duel.AdjustAll()
--Duel.Readjust() --Duel.Readjust()
e:SetValue(aux.FALSE) e:SetValue(aux.FALSE)
e:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e:SetDescription(0)
if Duel.GetFlagEffect(tp,0xffff+m)==0 then if Duel.GetFlagEffect(tp,0xffff+m)==0 then
Duel.RegisterFlagEffect(tp,0xffff+m,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,0xffff+m,RESET_CHAIN,0,1)
if SetCardData then if SetCardData then
......
...@@ -28,6 +28,7 @@ function s.initial_effect(c) ...@@ -28,6 +28,7 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e3:SetCost(s.rmcost) e3:SetCost(s.rmcost)
e3:SetTarget(s.rmtg) e3:SetTarget(s.rmtg)
e3:SetOperation(s.rmop) e3:SetOperation(s.rmop)
...@@ -62,16 +63,22 @@ function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -62,16 +63,22 @@ function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,1000) Duel.PayLPCost(tp,1000)
end end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_HAND,nil)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_HAND)
end end
function s.rmop(e,tp,eg,ep,ev,re,r,rp) function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil) local hg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 then local fg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
local g
if #hg>0 and (#fg==0 or Duel.SelectOption(tp,aux.Stringid(id,3),aux.Stringid(id,4))==0) then
g=hg:RandomSelect(tp,1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil) g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(sg) end
local tc=sg:GetFirst() if g:GetCount()~=0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) then if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) then
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)
...@@ -103,7 +110,7 @@ end ...@@ -103,7 +110,7 @@ end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
local g=c:GetOverlayGroup() local g=c:GetOverlayGroup():Filter(function(c) return c.fantasy_mountains_and_rivers end,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil) local tg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
if tg:GetCount()>0 then if tg:GetCount()>0 then
......
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