Commit c2b2d9ca authored by wind2009's avatar wind2009

Fix 影霊翼騎 ウェンディクルフ

parent f6d11401
...@@ -3,7 +3,9 @@ local s,id,o=GetID() ...@@ -3,7 +3,9 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcShaddoll(c,ATTRIBUTE_WIND) -- using new function
-- aux.AddFusionProcShaddoll(c,ATTRIBUTE_WIND)
aux.AddFusionProcFun2(c,function (mc) return mc:IsFusionSetCard(0x9d) end, function (mc) return aux.FShaddollFilter2(mc,ATTRIBUTE_WIND) end, true)
--cannot spsummon --cannot spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -12,7 +14,7 @@ function s.initial_effect(c) ...@@ -12,7 +14,7 @@ function s.initial_effect(c)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_EXTRA)
e1:SetValue(s.splimit) e1:SetValue(s.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--poschange --poschange
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0)) e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_POSITION) e2:SetCategory(CATEGORY_POSITION)
...@@ -21,7 +23,7 @@ function s.initial_effect(c) ...@@ -21,7 +23,7 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetCondition(s.poscon) e2:SetCondition(s.poscon)
e2:SetTarget(s.postg) e2:SetTarget(s.postg)
e2:SetOperation(s.posop) e2:SetOperation(s.posop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -40,11 +42,10 @@ function s.splimit(e,se,sp,st) ...@@ -40,11 +42,10 @@ function s.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end end
function s.poscon(e,tp,eg,ep,ev,re,r,rp) function s.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsMainPhase() return Duel.IsMainPhase()
end end
function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) function s.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,0,PLAYER_ALL,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,0,PLAYER_ALL,0)
end end
function s.posop(e,tp,eg,ep,ev,re,r,rp) function s.posop(e,tp,eg,ep,ev,re,r,rp)
...@@ -56,12 +57,12 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,12 +57,12 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(fg) Duel.HintSelection(fg)
Duel.ChangePosition(fg,POS_FACEUP_DEFENSE) Duel.ChangePosition(fg,POS_FACEUP_DEFENSE)
end end
local fc=fg:FilterCount(Card.IsType,nil,TYPE_FLIP) local fct=fg:FilterCount(Card.IsType,nil,TYPE_FLIP)
if fc>0 then if fct>0 then
local tg=Duel.GetMatchingGroup(aux.AND(Card.IsFaceup,Card.IsCanTurnSet),tp,LOCATION_MZONE,LOCATION_MZONE,fg) local tg=Duel.GetMatchingGroup(aux.AND(Card.IsFaceup,Card.IsCanTurnSet),tp,LOCATION_MZONE,LOCATION_MZONE,fg)
if #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then if #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local sg=tg:Select(tp,1,fc,nil) local sg=tg:Select(tp,1,math.min(fct,#tg),nil)
if #sg>0 then if #sg>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.HintSelection(sg) Duel.HintSelection(sg)
......
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