Commit 2cb4a4b2 authored by wind2009's avatar wind2009

Fix VS ホーリー・スー

parent 574fd25a
Pipeline #35184 passed with stages
in 1 minute and 35 seconds
No preview for this file type
...@@ -8,6 +8,7 @@ function s.initial_effect(c) ...@@ -8,6 +8,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon1) e1:SetCondition(s.spcon1)
e1:SetCost(s.spcost) e1:SetCost(s.spcost)
...@@ -42,7 +43,7 @@ function s.initial_effect(c) ...@@ -42,7 +43,7 @@ function s.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.spcon1(e,tp,eg,ep,ev,re,r,rp) function s.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 return Duel.IsMainPhase()
end end
function s.spcostfilter(c) function s.spcostfilter(c)
return c:IsSetCard(0x195) and c:IsType(TYPE_MONSTER) and not c:IsPublic() return c:IsSetCard(0x195) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
...@@ -53,6 +54,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,6 +54,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c) local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.RaiseEvent(g,EVENT_CUSTOM+9091064,e,REASON_COST,tp,tp,0)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -64,7 +66,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,7 +66,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -81,21 +83,22 @@ function s.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -81,21 +83,22 @@ function s.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function s.ctfilter(c) function s.ctfilter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged() return c:IsFaceup()
end end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.ctfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(s.ctfilter,tp,0,LOCATION_MZONE,nil)
return g:GetCount()>0 and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0 and Duel.GetFlagEffect(tp,id)==0 local tg=g:GetMinGroup(Card.GetAttack):Filter(Card.IsControlerCanBeChanged,nil)
return tg:GetCount()>0 and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0 and Duel.GetFlagEffect(tp,id)==0
end end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE)
end end
function s.ctop(e,tp,eg,ep,ev,re,r,rp) function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(s.ctfilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()<=0 or Duel.GetMZoneCount(tp,nil,tp,LOCATION_REASON_CONTROL)<=0 then return end local tg=g:GetMinGroup(Card.GetAttack):Filter(Card.IsControlerCanBeChanged,nil)
local tg=g:GetMinGroup(Card.GetAttack) if tg:GetCount()<=0 or Duel.GetMZoneCount(tp,nil,tp,LOCATION_REASON_CONTROL)<=0 then return end
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tg:GetCount()>1 then if tg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
......
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