Commit 3824fd4f authored by Huangnan's avatar Huangnan

fix

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