Commit 3824fd4f authored by Huangnan's avatar Huangnan

fix

parent a4f52f9e
No preview for this file type
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
function c22231002.initial_effect(c) function c22231002.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,222310021+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,222310021+EFFECT_COUNT_CODE_OATH)
...@@ -33,9 +34,9 @@ function c22231002.cfilter(c) ...@@ -33,9 +34,9 @@ function c22231002.cfilter(c)
return c22231002.IsDarkest(c) return c22231002.IsDarkest(c)
end end
function c22231002.activate(e,tp,eg,ep,ev,re,r,rp) function c22231002.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return false end
local g=Duel.GetDecktopGroup(tp,3)
Duel.ConfirmDecktop(tp,3) Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
if g:IsExists(c22231002.cfilter,1,nil) then if g:IsExists(c22231002.cfilter,1,nil) then
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
...@@ -8,7 +8,7 @@ function c22231202.initial_effect(c) ...@@ -8,7 +8,7 @@ function c22231202.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--pos --pos
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_POSITION) e6:SetCategory(CATEGORY_POSITION+CATEGORY_DRAW)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET) e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetType(EFFECT_TYPE_IGNITION) e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_SZONE) e6:SetRange(LOCATION_SZONE)
...@@ -36,7 +36,7 @@ function c22231202.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -36,7 +36,7 @@ function c22231202.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN)
local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DRAW,0,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end end
function c22231202.posop(e,tp,eg,ep,ev,re,r,rp) function c22231202.posop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -10,8 +10,7 @@ function c22231501.initial_effect(c) ...@@ -10,8 +10,7 @@ function c22231501.initial_effect(c)
e6:SetDescription(aux.Stringid(22231501,0)) e6:SetDescription(aux.Stringid(22231501,0))
e6:SetCategory(CATEGORY_TOGRAVE) e6:SetCategory(CATEGORY_TOGRAVE)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET) e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetType(EFFECT_TYPE_QUICK_O) e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_FZONE) e6:SetRange(LOCATION_FZONE)
e6:SetCountLimit(1) e6:SetCountLimit(1)
e6:SetTarget(c22231501.tgtg) e6:SetTarget(c22231501.tgtg)
...@@ -20,7 +19,7 @@ function c22231501.initial_effect(c) ...@@ -20,7 +19,7 @@ function c22231501.initial_effect(c)
--Draw --Draw
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(22231501,2)) e6:SetDescription(aux.Stringid(22231501,2))
e6:SetCategory(CATEGORY_POSITION+CATEGORY_DRAW) e6:SetCategory(CATEGORY_POSITION)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET) e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetType(EFFECT_TYPE_IGNITION) e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_FZONE) e6:SetRange(LOCATION_FZONE)
...@@ -74,7 +73,7 @@ function c22231501.posfilter(c) ...@@ -74,7 +73,7 @@ function c22231501.posfilter(c)
end end
function c22231501.dtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c22231501.dtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c22231501.posfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c22231501.posfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22231501.posfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsExistingTarget(c22231501.posfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c22231501.posfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c22231501.posfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
...@@ -84,9 +83,7 @@ function c22231501.dop(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,9 +83,7 @@ function c22231501.dop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return false end if not e:GetHandler():IsRelateToEffect(e) then return false end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanTurnSet() then if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsCanTurnSet() then
if Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
Duel.Draw(tp,1,REASON_EFFECT)
end
end end
end end
function c22231501.econ(e,tp,eg,ep,ev,re,r,rp) function c22231501.econ(e,tp,eg,ep,ev,re,r,rp)
......
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