Commit 947e3e43 authored by wind2009's avatar wind2009

Update ジュラック

parent de1c9214
--ジュラック・メガロ --ジュラック・メガロ
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,id)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
...@@ -63,15 +64,15 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -63,15 +64,15 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end end
function s.gselect(g) function s.gselect(g)
return g:IsExists(Card.IsSetCard,1,nil,0x22) return g:IsExists(Card.IsSetCard,1,nil,0x22) and g:FilterCount(Card.IsDiscardable,nil)==2
end end
function s.drop(e,tp,eg,ep,ev,re,r,rp) function s.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local g=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,nil) local g=Duel.GetFieldGroup(p,LOCATION_HAND,0)
if #g>=2 and g:IsExists(Card.IsSetCard,1,nil,0x22) and g:CheckSubGroup(s.gselect,2,2) then if #g>=2 and g:CheckSubGroup(s.gselect,2,2) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DISCARD)
local g1=g:SelectSubGroup(tp,s.gselect,false,2,2) local g1=g:SelectSubGroup(tp,s.gselect,false,2,2)
if Duel.SendtoGrave(g1,REASON_DISCARD+REASON_EFFECT)~=0 then if g1 and g1:GetCount()>0 and Duel.SendtoGrave(g1,REASON_DISCARD+REASON_EFFECT)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
......
...@@ -8,7 +8,6 @@ function s.initial_effect(c) ...@@ -8,7 +8,6 @@ function s.initial_effect(c)
--set --set
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_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
...@@ -50,12 +49,12 @@ function s.setfilter(c) ...@@ -50,12 +49,12 @@ function s.setfilter(c)
end end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.SSet(tp,tc) Duel.SSet(tp,tc)
...@@ -86,11 +85,11 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,11 +85,11 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsRace(RACE_DINOSAUR) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x22) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,c) end if chk==0 then return c:IsSetCard(0x22) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,c) end
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,1,1,c) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,1,1,c)
g:AddCard(c) g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
......
...@@ -80,7 +80,7 @@ function s.cfilter(c,tp) ...@@ -80,7 +80,7 @@ function s.cfilter(c,tp)
return c:IsSummonPlayer(1-tp) return c:IsSummonPlayer(1-tp)
end end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp) function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp) and Duel.GetFlagEffect(1-tp,id)>=4 return eg:IsExists(s.cfilter,1,nil,tp)
end end
function s.spfilter2(c,e,tp) function s.spfilter2(c,e,tp)
return c:IsCode(17548456) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) return c:IsCode(17548456) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
...@@ -88,6 +88,7 @@ function s.spfilter2(c,e,tp) ...@@ -88,6 +88,7 @@ function s.spfilter2(c,e,tp)
end end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.GetFlagEffect(1-tp,id)>=4
and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
......
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