Commit b980e3ac authored by POLYMER's avatar POLYMER

fix

parent b0be69c2
...@@ -27,6 +27,7 @@ function c11771585.initial_effect(c) ...@@ -27,6 +27,7 @@ function c11771585.initial_effect(c)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,11771586) e2:SetCountLimit(1,11771586)
e2:SetCondition(c11771585.con2)
e2:SetTarget(c11771585.tg2) e2:SetTarget(c11771585.tg2)
e2:SetOperation(c11771585.op2) e2:SetOperation(c11771585.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -54,21 +55,23 @@ function c11771585.initial_effect(c) ...@@ -54,21 +55,23 @@ function c11771585.initial_effect(c)
end end
-- 记录效果发动 -- 记录效果发动
function c11771585.checkop(e,tp,eg,ep,ev,re,r,rp) function c11771585.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local loc=re:GetActivateLocation()
if rc:IsLocation(LOCATION_HAND) and re:IsActiveType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP) then if loc==LOCATION_HAND and re:IsActiveType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP) then
Duel.RegisterFlagEffect(rp,11771583,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(rp,11771583,RESET_PHASE+PHASE_END,0,1)
end end
if rc:IsLocation(LOCATION_GRAVE) and re:IsActiveType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP) then if loc==LOCATION_GRAVE and re:IsActiveType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP) then
Duel.RegisterFlagEffect(rp,11771584,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(rp,11771584,RESET_PHASE+PHASE_END,0,1)
end end
end end
-- 特殊召唤限制 -- 特殊召唤限制
function c11771585.limit(e,se,sp,st) function c11771585.limit(e,se,sp,st)
return se and se:IsActiveType(TYPE_MONSTER) and se:GetHandler():IsRace(RACE_WARRIOR) return se and se:IsActiveType(TYPE_MONSTER) and se:GetHandler() and se:GetHandler():IsRace(RACE_WARRIOR)
end end
-- 1 -- 1
function c11771585.con1(e,tp,eg,ep,ev,re,r,rp) function c11771585.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,11771583)>0 and Duel.GetFlagEffect(tp,11771584)>0 local hand_flag=Duel.GetFlagEffect(tp,11771583)>0 or Duel.GetFlagEffect(1-tp,11771583)>0
local grave_flag=Duel.GetFlagEffect(tp,11771584)>0 or Duel.GetFlagEffect(1-tp,11771584)>0
return hand_flag and grave_flag
end end
function c11771585.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c11771585.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -91,6 +94,9 @@ function c11771585.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,6 +94,9 @@ function c11771585.op1(e,tp,eg,ep,ev,re,r,rp)
end end
end end
-- 2 -- 2
function c11771585.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
end
function c11771585.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function c11771585.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
...@@ -116,29 +122,37 @@ function c11771585.op3(e,tp,eg,ep,ev,re,r,rp) ...@@ -116,29 +122,37 @@ function c11771585.op3(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND) local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local ct1=g1:GetCount() local ct1=g1:GetCount()
local ct2=g2:GetCount() local ct2=g2:GetCount()
local actual_ct1=0
local actual_ct2=0
if ct1>0 then if ct1>0 then
Duel.SendtoDeck(g1,nil,SEQ_DECKTOP,REASON_EFFECT) Duel.SendtoDeck(g1,nil,SEQ_DECKTOP,REASON_EFFECT)
Duel.SortDecktop(tp,tp,ct1) actual_ct1=g1:FilterCount(Card.IsLocation,nil,LOCATION_DECK)
for i=1,ct1 do if actual_ct1>0 then
local mg=Duel.GetDecktopGroup(tp,1) Duel.SortDecktop(tp,tp,actual_ct1)
Duel.MoveSequence(mg:GetFirst(),SEQ_DECKBOTTOM) for i=1,actual_ct1 do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),SEQ_DECKBOTTOM)
end
end end
end end
if ct2>0 then if ct2>0 then
Duel.SendtoDeck(g2,nil,SEQ_DECKTOP,REASON_EFFECT) Duel.SendtoDeck(g2,nil,SEQ_DECKTOP,REASON_EFFECT)
Duel.SortDecktop(1-tp,1-tp,ct2) actual_ct2=g2:FilterCount(Card.IsLocation,nil,LOCATION_DECK)
for i=1,ct2 do if actual_ct2>0 then
local mg=Duel.GetDecktopGroup(1-tp,1) Duel.SortDecktop(1-tp,1-tp,actual_ct2)
Duel.MoveSequence(mg:GetFirst(),SEQ_DECKBOTTOM) for i=1,actual_ct2 do
local mg=Duel.GetDecktopGroup(1-tp,1)
Duel.MoveSequence(mg:GetFirst(),SEQ_DECKBOTTOM)
end
end end
end end
if ct1>0 or ct2>0 then if actual_ct1>0 or actual_ct2>0 then
Duel.BreakEffect() Duel.BreakEffect()
if ct1>0 then if actual_ct1>0 then
Duel.Draw(tp,ct1,REASON_EFFECT) Duel.Draw(tp,actual_ct1,REASON_EFFECT)
end end
if ct2>0 then if actual_ct2>0 then
Duel.Draw(1-tp,ct2,REASON_EFFECT) Duel.Draw(1-tp,actual_ct2,REASON_EFFECT)
end end
end end
end end
\ No newline at end of file
--源于阴影 融入 --源于阴影 融入
local s,id,o=GetID() local s,id,o=GetID()
if not CATEGORY_SSET then CATEGORY_SSET=0 end
function s.initial_effect(c) function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
......
--源于阴影 诘问 --源于阴影 诘问
local s,id,o=GetID() local s,id,o=GetID()
if not CATEGORY_SSET then CATEGORY_SSET=0 end
function s.initial_effect(c) function s.initial_effect(c)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -19,7 +19,7 @@ function c67201107.initial_effect(c) ...@@ -19,7 +19,7 @@ function c67201107.initial_effect(c)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_DECK) e2:SetCode(EVENT_TO_DECK)
--e2:SetCountLimit(1,67201108) e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(c67201107.opcon) e2:SetCondition(c67201107.opcon)
e2:SetTarget(c67201107.optg) e2:SetTarget(c67201107.optg)
e2:SetOperation(c67201107.opop) e2:SetOperation(c67201107.opop)
......
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