Commit ca847b46 authored by POLYMER's avatar POLYMER

fix

parent 82133bb0
......@@ -25,25 +25,22 @@ function c9910576.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c9910576.tgfilter(c,tp,res)
function c9910576.tgfilter(c)
return c:IsType(TYPE_FLIP) and c:IsAbleToGrave()
and (c:IsLocation(LOCATION_HAND) or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=2 or res)
end
function c9910576.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910576.tgfilter,tp,loc,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
local loc=LOCATION_HAND
local chain=Duel.GetCurrentChain()
Debug.Message("chain=")
Debug.Message(chain)
if chain>0 then
local te=Duel.GetChainInfo(chain,CHAININFO_TRIGGERING_EFFECT)
if te:GetHandler()==e:GetHandler() then loc=LOCATION_HAND+LOCATION_DECK end
if chain>1 then
local te=Duel.GetChainInfo(chain-1,CHAININFO_TRIGGERING_EFFECT)
if te and te:GetHandler()==e:GetHandler() then
loc=LOCATION_HAND+LOCATION_DECK
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES+CATEGORY_DRAW)
end
end
Debug.Message("loc=")
Debug.Message(loc)
if chk==0 then return Duel.IsExistingMatchingCard(c9910576.tgfilter,tp,loc,0,1,nil,tp,false) and Duel.IsPlayerCanDraw(tp,1) end
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
if loc==LOCATION_HAND+LOCATION_DECK then e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES+CATEGORY_DRAW) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,loc)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c9910576.operation(e,tp,eg,ep,ev,re,r,rp)
......@@ -54,7 +51,7 @@ function c9910576.operation(e,tp,eg,ep,ev,re,r,rp)
if te:GetHandler()==e:GetHandler() then loc=LOCATION_HAND+LOCATION_DECK end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c9910576.tgfilter,tp,loc,0,1,1,nil,tp,true)
local g=Duel.SelectMatchingCard(tp,c9910576.tgfilter,tp,loc,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.Draw(tp,1,REASON_EFFECT)
end
......
......@@ -6,7 +6,7 @@ function c9910615.initial_effect(c)
--position
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910615,0))
e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_MSET+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
......
......@@ -2,7 +2,7 @@
function c9910618.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_MSET+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
......
......@@ -22,7 +22,7 @@ function c9910626.initial_effect(c)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SUMMON)
e3:SetCategory(CATEGORY_SSET)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
......
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