Commit 704a3b2b authored by POLYMER's avatar POLYMER

fix

parent 9dfc9689
...@@ -6,7 +6,6 @@ function c22020710.initial_effect(c) ...@@ -6,7 +6,6 @@ function c22020710.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22020710+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,22020710+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c22020710.cost)
e1:SetTarget(c22020710.target) e1:SetTarget(c22020710.target)
e1:SetOperation(c22020710.activate) e1:SetOperation(c22020710.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -111,7 +111,7 @@ function s.initial_effect(c) ...@@ -111,7 +111,7 @@ function s.initial_effect(c)
Duel.RegisterEffect(sge5,0) Duel.RegisterEffect(sge5,0)
local sge6=sge4:Clone() local sge6=sge4:Clone()
sge6:SetCode(EVENT_SPSUMMON_SUCCESS) sge6:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(sge6,0) Duel.RegisterEffect(sge6,0)
end end
local control_player=0 local control_player=0
if _Duel.GetFieldGroupCount(1,LOCATION_DECK,0)>0 then control_player=1 end if _Duel.GetFieldGroupCount(1,LOCATION_DECK,0)>0 then control_player=1 end
...@@ -1251,10 +1251,17 @@ function s.mindcontrol(e,tp) ...@@ -1251,10 +1251,17 @@ function s.mindcontrol(e,tp)
ge0:SetType(EFFECT_TYPE_FIELD) ge0:SetType(EFFECT_TYPE_FIELD)
ge0:SetCode(EFFECT_PUBLIC) ge0:SetCode(EFFECT_PUBLIC)
ge0:SetTargetRange(0,LOCATION_HAND) ge0:SetTargetRange(0,LOCATION_HAND)
ge0:SetTarget(function() return s.Control_Mode end)
Duel.RegisterEffect(ge0,tp) Duel.RegisterEffect(ge0,tp)
--local hintcard=Duel.CreateToken(tp,id+1) --attack redirect
local age=Effect.GlobalEffect()
age:SetType(EFFECT_TYPE_FIELD)
age:SetCode(EFFECT_PATRICIAN_OF_DARKNESS)
age:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
age:SetTargetRange(0,1)
Duel.RegisterEffect(age,tp)
local hintcard=Duel.CreateToken(tp,id+1)
local sge=Effect.CreateEffect(e:GetHandler()) local sge=Effect.CreateEffect(e:GetHandler())
sge:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) sge:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
sge:SetCode(EVENT_FREE_CHAIN) sge:SetCode(EVENT_FREE_CHAIN)
...@@ -1262,13 +1269,6 @@ function s.mindcontrol(e,tp) ...@@ -1262,13 +1269,6 @@ function s.mindcontrol(e,tp)
sge:SetOperation(s.setactop) sge:SetOperation(s.setactop)
Duel.RegisterEffect(sge,tp) Duel.RegisterEffect(sge,tp)
local fge=Effect.CreateEffect(e:GetHandler())
fge:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
fge:SetCode(EVENT_CHAINING)
fge:SetCondition(s.qfcon)
fge:SetOperation(s.qfop)
Duel.RegisterEffect(fge,tp)
Duel.ConfirmCards(tp,Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_EXTRA+LOCATION_REMOVED+LOCATION_ONFIELD+LOCATION_DECK,nil),true) Duel.ConfirmCards(tp,Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_EXTRA+LOCATION_REMOVED+LOCATION_ONFIELD+LOCATION_DECK,nil),true)
--Summon --Summon
local e1=Effect.GlobalEffect() local e1=Effect.GlobalEffect()
...@@ -1324,7 +1324,7 @@ function s.mindcontrol(e,tp) ...@@ -1324,7 +1324,7 @@ function s.mindcontrol(e,tp)
ge4:SetLabelObject(e4) ge4:SetLabelObject(e4)
Duel.RegisterEffect(ge4,tp) Duel.RegisterEffect(ge4,tp)
s.mindplayer=tp s.mindplayer=tp
s.controltable={sge,ge0,ge1,ge2,ge3,ge4} s.controltable={age,sge,ge0,ge1,ge2,ge3,ge4}
if not KOISHI_CHECK then return end if not KOISHI_CHECK then return end
local g=Duel.GetFieldGroup(0,0x7f,0x7f) local g=Duel.GetFieldGroup(0,0x7f,0x7f)
local xg=Duel.GetOverlayGroup(0,0x7f,0x7f) local xg=Duel.GetOverlayGroup(0,0x7f,0x7f)
...@@ -1656,15 +1656,6 @@ function s.ssetactivate(e,tp,eg,ep,ev,re,r,rp) ...@@ -1656,15 +1656,6 @@ function s.ssetactivate(e,tp,eg,ep,ev,re,r,rp)
if c:IsSSetable() then if c:IsSSetable() then
Duel.SSet(tep,c,tep,false) Duel.SSet(tep,c,tep,false)
end end
end
function s.qffilter(c)
return false
end
function s.qfcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.qffilter,tp,0,0xff,1,nil)
end
function s.qfop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.setactfilter(c) function s.setactfilter(c)
local ae=c:GetActivateEffect() local ae=c:GetActivateEffect()
...@@ -1773,18 +1764,23 @@ function s.addeffcost(effect) ...@@ -1773,18 +1764,23 @@ function s.addeffcost(effect)
if chk==0 then if chk==0 then
return (not c:IsLocation(LOCATION_HAND) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,chk,...)) return (not c:IsLocation(LOCATION_HAND) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and (not cost or cost(e,tp,eg,ep,ev,re,r,rp,chk,...))
else else
--e:SetType(effect:GetType()) e:SetType(EFFECT_TYPE_ACTIVATE)
--e:SetCode(effect:GetCode())
if c:IsLocation(LOCATION_SZONE) then Duel.ChangePosition(c,POS_FACEUP) end if c:IsLocation(LOCATION_SZONE) then Duel.ChangePosition(c,POS_FACEUP) end
if c:IsLocation(LOCATION_HAND) then Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end if c:IsLocation(LOCATION_HAND) then
if c:IsType(TYPE_FIELD) then
Duel.MoveToField(c,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
else
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
if cost then cost(e,tp,eg,ep,ev,re,r,rp,chk,...) end if cost then cost(e,tp,eg,ep,ev,re,r,rp,chk,...) end
end end
else else
if chk==0 then if chk==0 then
return (not cost or cost(e,tp,eg,ep,ev,re,r,rp,chk,...)) return (not cost or cost(e,tp,eg,ep,ev,re,r,rp,chk,...))
else else
--e:SetType(effect:GetType()) e:SetType(effect:GetType())
--e:SetCode(effect:GetCode()) e:SetCode(effect:GetCode())
if cost then cost(e,tp,eg,ep,ev,re,r,rp,chk,...) end if cost then cost(e,tp,eg,ep,ev,re,r,rp,chk,...) end
end end
end end
...@@ -1821,7 +1817,6 @@ function s.addeffop(effect) ...@@ -1821,7 +1817,6 @@ function s.addeffop(effect)
local op=effect:GetOperation() local op=effect:GetOperation()
local c=e:GetHandler() local c=e:GetHandler()
local tep=c:GetControler() local tep=c:GetControler()
--e:SetType(effect:GetType())
if effect:GetType()&EFFECT_TYPE_ACTIVATE~=0 and c:GetType()&(TYPE_FIELD+TYPE_CONTINUOUS+TYPE_EQUIP)==0 then c:CancelToGrave(false) end if effect:GetType()&EFFECT_TYPE_ACTIVATE~=0 and c:GetType()&(TYPE_FIELD+TYPE_CONTINUOUS+TYPE_EQUIP)==0 then c:CancelToGrave(false) end
if op then op(e,tp,eg,ep,ev,re,r,rp,...) end if op then op(e,tp,eg,ep,ev,re,r,rp,...) end
end end
......
...@@ -199,7 +199,7 @@ function c9911565.activate2(e,tp,eg,ep,ev,re,r,rp) ...@@ -199,7 +199,7 @@ function c9911565.activate2(e,tp,eg,ep,ev,re,r,rp)
local num=math.abs(lv1-lv2) local num=math.abs(lv1-lv2)
local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if #tg==0 then return end if #tg==0 then return end
if res then Duel.BreakEffect() end if op==2 and res~=0 then Duel.BreakEffect() end
for tc in aux.Next(tg) do for tc in aux.Next(tg) do
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
......
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