Commit ecc5af57 authored by wind2009's avatar wind2009

Merge branch 'patch-1' into 'master'

Fix ユーカリ・モール

See merge request mycard/pre-release-database-cdb!178
parents d20c0781 5d408eae
-- --ユーカリ・モール
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--spsummon --spsummon
...@@ -17,13 +17,14 @@ function s.initial_effect(c) ...@@ -17,13 +17,14 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--special summon --special summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id+o*2) e3:SetCountLimit(1,id+o*2)
e3:SetTarget(s.sptg) e3:SetTarget(s.sptg2)
e3:SetOperation(s.spop) e3:SetOperation(s.spop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
...@@ -35,31 +36,31 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,31 +36,31 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
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:GetHandlerPlayer() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0 if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0
and c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) then and c:IsRelateToChain() and c:IsPosition(POS_FACEUP_ATTACK) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.ChangePosition(c,POS_FACEUP_DEFENSE) Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
end end
end end
function s.spfilter(c,e,tp) function s.spfilter2(c,e,tp)
return c:Iss(0x2cf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x2cf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.sptg(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 Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandlerPlayer() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTargetRange(LOCATION_MZONE,0)
...@@ -73,5 +74,5 @@ function s.atktg(e,c) ...@@ -73,5 +74,5 @@ function s.atktg(e,c)
return not c:IsType(TYPE_EFFECT) and c:IsRace(RACE_BEAST) return not c:IsType(TYPE_EFFECT) and c:IsRace(RACE_BEAST)
end end
function s.atkval(e,c) function s.atkval(e,c)
return c:IsType(TYPE_SYNCHRO) return c:GetBaseDefense()
end end
\ 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