Commit 4f68b25f authored by wind2009's avatar wind2009

Fix 星霜の魔術師-アストログラフ・マジシャン

parent 0d9d8eb2
Pipeline #43373 failed with stages
in 2 minutes and 24 seconds
...@@ -40,28 +40,28 @@ function s.initial_effect(c) ...@@ -40,28 +40,28 @@ function s.initial_effect(c)
e3:SetOperation(s.fspop) e3:SetOperation(s.fspop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.pfilter(c,ec) function s.pfilter(c,tp)
return c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and c:GetLeftScale()==1 return c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and c:GetLeftScale()==1
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function s.ptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.ptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsDestructable() if chk==0 then return c:IsDestructable()
and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,c) end and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0)
end end
function s.pop(e,tp,eg,ep,ev,re,r,rp) function s.pop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToChain() then return end if not c:IsRelateToChain() then return end
if Duel.Destroy(c,REASON_EFFECT)==0 then return end if Duel.Destroy(c,REASON_EFFECT)==0 then return end
if not Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,c) then return end if not Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,s.pfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,c) local g=Duel.SelectMatchingCard(tp,s.pfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)~=0 then if tc and Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)~=0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
end end
...@@ -88,6 +88,11 @@ function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -88,6 +88,11 @@ function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local desg=eg:Filter(s.desfilter,nil,tp) local desg=eg:Filter(s.desfilter,nil,tp)
Duel.SetTargetCard(desg) Duel.SetTargetCard(desg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
if desg:Filter(Card.IsLocation,nil,LOCATION_GRAVE):GetCount()>0 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
end
end end
function s.spop1(e,tp,eg,ep,ev,re,r,rp) function s.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -137,7 +142,6 @@ function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -137,7 +142,6 @@ function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_MZONE+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_MZONE+LOCATION_EXTRA)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function s.fspop(e,tp,eg,ep,ev,re,r,rp) function s.fspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
--[[message TEST]]
Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_TEST_MODE)
Debug.SetPlayerInfo(0,8000,0,0)
Debug.SetPlayerInfo(1,8000,0,0)
Debug.AddCard(100256015,0,0,LOCATION_HAND,3,POS_FACEDOWN_DEFENSE)
Debug.AddCard(100256015,0,0,LOCATION_HAND,3,POS_FACEDOWN_DEFENSE)
Debug.AddCard(100256015,0,0,LOCATION_HAND,3,POS_FACEDOWN_DEFENSE)
Debug.AddCard(100256015,0,0,LOCATION_HAND,3,POS_FACEDOWN_DEFENSE)
Debug.AddCard(43711255,0,0,LOCATION_HAND,3,POS_FACEDOWN_DEFENSE)
Debug.AddCard(16178681,0,0,LOCATION_MZONE,0,POS_FACEUP_ATTACK,true)
Debug.AddCard(16195942,0,0,LOCATION_MZONE,1,POS_FACEUP_ATTACK,true)
Debug.AddCard(82044279,0,0,LOCATION_MZONE,2,POS_FACEDOWN_DEFENSE,true)
Debug.AddCard(41209827,0,0,LOCATION_MZONE,3,POS_FACEUP_ATTACK,true)
Debug.AddCard(16178681,0,0,LOCATION_MZONE,5,POS_FACEUP_ATTACK,true)
Debug.AddCard(4178474,0,0,LOCATION_SZONE,1,POS_FACEDOWN,true)
Debug.AddCard(4178474,0,0,LOCATION_SZONE,2,POS_FACEDOWN,true)
Debug.AddCard(96227613,0,0,LOCATION_DECK,1,POS_FACEDOWN,true)
Debug.AddCard(14513273,0,0,LOCATION_DECK,2,POS_FACEDOWN,true)
Debug.AddCard(76794549,0,0,LOCATION_DECK,2,POS_FACEDOWN,true)
Debug.AddCard(16178681,1,1,LOCATION_MZONE,0,POS_FACEUP_ATTACK,true)
Debug.AddCard(41209827,1,1,LOCATION_MZONE,1,POS_FACEUP_ATTACK,true)
Debug.AddCard(13331639,0,0,LOCATION_EXTRA,3,POS_FACEDOWN)
Debug.AddCard(16195942,0,0,LOCATION_EXTRA,3,POS_FACEDOWN)
Debug.AddCard(82044279,0,0,LOCATION_EXTRA,3,POS_FACEDOWN)
Debug.AddCard(41209827,0,0,LOCATION_EXTRA,3,POS_FACEDOWN)
Debug.ReloadFieldEnd()
\ No newline at end of file
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