Commit 7aaac411 authored by POLYMER's avatar POLYMER

fix

parent d6b51e18
......@@ -29,7 +29,7 @@ function c10150065.initial_effect(c)
c:RegisterEffect(e1)
end
function c10150065.lcheck(g,lc)
return g:IsExists(Card.IsSetCard,1,nil,0xd3)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xd3)
end
function c10150065.thfilter(c)
return c:IsSetCard(0xd3) and c:IsFaceup() and c:IsAbleToHand()
......
......@@ -191,6 +191,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
end
end
end
if check then return false end
--classification is essential for efficiency, and this part is only for backup
else
iter={1}
......
......@@ -187,6 +187,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
end
end
end
if check then return false end
--classification is essential for efficiency, and this part is only for backup
else
iter={1}
......
......@@ -222,6 +222,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
end
end
end
if check then return false end
--classification is essential for efficiency, and this part is only for backup
else
iter={1}
......
......@@ -206,6 +206,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
end
end
end
if check then return false end
--classification is essential for efficiency, and this part is only for backup
else
iter={1}
......
......@@ -226,6 +226,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
end
end
end
if check then return false end
--classification is essential for efficiency, and this part is only for backup
else
iter={1}
......
......@@ -229,6 +229,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
end
end
end
if check then return false end
--classification is essential for efficiency, and this part is only for backup
else
iter={1}
......
......@@ -160,6 +160,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
end
end
end
if check then return false end
--classification is essential for efficiency, and this part is only for backup
else
iter={1}
......
......@@ -175,6 +175,7 @@ function cm.SelectSubGroup(g,tp,f,cancelable,min,max,...)
end
end
end
if check then return false end
--classification is essential for efficiency, and this part is only for backup
else
iter={1}
......@@ -260,6 +261,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
tg:Merge(tg2)
Duel.SetTargetCard(tg)
end
local KOISHI_CHECK=false
if Duel.DisableActionCheck then KOISHI_CHECK=true end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
......@@ -277,9 +280,11 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
ge2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(ge2,true)
end
if not KOISHI_CHECK then
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_ADJUST)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetLabel(fid)
e5:SetCondition(function() return not pnfl_adjusting end)
e5:SetOperation(cm.acop)
......@@ -289,14 +294,22 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
e6:SetCondition(aux.TRUE)
e6:SetOperation(cm.acop2)
Duel.RegisterEffect(e6,tp)
end
end
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
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.Readjust()
e:SetValue(aux.FALSE)
e:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e:SetDescription(0)
if Duel.GetFlagEffect(tp,0xffff+m)==0 then
Duel.RegisterFlagEffect(tp,0xffff+m,RESET_CHAIN,0,1)
if SetCardData then
......
......@@ -28,6 +28,7 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e3:SetCost(s.rmcost)
e3:SetTarget(s.rmtg)
e3:SetOperation(s.rmop)
......@@ -62,16 +63,22 @@ function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,1000)
end
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
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD)
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+LOCATION_HAND)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
local hg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
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)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local tc=sg:GetFirst()
g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
end
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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -103,7 +110,7 @@ end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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)
local tg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
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