Commit 5ab60cdc authored by wind2009's avatar wind2009

Fix サイバース・コード・マジシャン

parent 7682b99d
Pipeline #42550 canceled with stages
in 4 seconds
No preview for this file type
--ガガガマジシャンガガガマジック --ガガガマジシャンガガガマジック
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--summon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
...@@ -98,4 +98,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,4 +98,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end end
\ No newline at end of file
--星読みの魔術師ーホロスコープ•マジシャン --星読みの魔術師-ホロスコープ・マジシャン
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--pendulum summon --pendulum summon
...@@ -126,4 +126,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -126,4 +126,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
end end
\ No newline at end of file
--サイバース•コード•マジシャン --サイバース・コード・マジシャン
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,34767865) aux.AddCodeList(c,34767865)
...@@ -36,21 +36,32 @@ function s.matval(e,lc,mg,c,tp) ...@@ -36,21 +36,32 @@ function s.matval(e,lc,mg,c,tp)
return true,not mg or mg:IsExists(s.mfilter,1,nil,tp) and not mg:IsExists(s.exmfilter,1,nil) return true,not mg or mg:IsExists(s.mfilter,1,nil,tp) and not mg:IsExists(s.exmfilter,1,nil)
end end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp) function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD) local c=e:GetHandler()
e:SetLabel(0)
if c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) then
if c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_RITUAL) then
e:SetLabel(1)
c:RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
return true
else
return false
end
end end
function s.tgfilter(c,e,tp,el) function s.tgfilter(c,e,tp,label)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return c:IsRace(RACE_CYBERSE) and (c:IsAbleToGrave() return c:IsRace(RACE_CYBERSE) and (c:IsAbleToGrave()
or el==100 and ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) or label>0 and ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_RITUAL) then local label=e:GetLabel()
e:SetLabel(100) if label>0 then
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
else else
e:SetLabel(0) e:SetCategory(CATEGORY_TOGRAVE)
end end
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,e,tp,e:GetLabel()) end if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,e,tp,label) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
...@@ -59,9 +70,10 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,9 +70,10 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
if tc:IsAbleToGrave() and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) or ft<=0 or Duel.SelectOption(tp,1191,1152)==0) then local spchk=e:GetLabel()>0 and ft>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
if tc:IsAbleToGrave() and (not spchk or Duel.SelectOption(tp,1191,1152)==0) then
Duel.SendtoGrave(tc,REASON_EFFECT) Duel.SendtoGrave(tc,REASON_EFFECT)
else elseif spchk then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -76,4 +88,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,4 +88,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.splimit(e,c) function s.splimit(e,c)
return not c:IsRace(RACE_CYBERSE) return not c:IsRace(RACE_CYBERSE)
end end
\ No newline at end of file
#The first line is used for comment #The first line is used for comment
!setname 0x206f 英豪冠军
!setname 0x2db 妖精传姬 !setname 0x2db 妖精传姬
!setname 0x2dc 道化之一座 !setname 0x2dc 道化之一座
!setname 206f 英豪冠军
!counter 0x73 T指示物 !counter 0x73 T指示物
\ 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