Commit 35302aa5 authored by wind2009's avatar wind2009

Fix

parent fa3859a7
Pipeline #42071 canceled with stages
in 2 seconds
No preview for this file type
......@@ -3,6 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -30,7 +31,7 @@ end
function s.filter2(c,tc,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
and c:IsSetCard(0x10c0,0xbf)
and c:GetAttribute()==tc:GetAttribute()
and c:IsAttribute(tc:GetAttribute())
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) and s.filter1(chkc,e,tp) end
......@@ -50,7 +51,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
and tc:IsFaceup() and tc:IsCanTurnSet()
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.HintSelection(tc)
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
......@@ -66,7 +66,7 @@ function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:IsRelateToChain() then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
......@@ -20,14 +20,14 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.filter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
and c:GetOriginalLevel()>0
and c:GetLevel()>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function s.spfilter(c,e,tp,tc)
return c:IsAttribute(tc:GetAttribute())
and c:IsRace(tc:GetRace())
and c:GetOriginalLevel()>0
and c:GetOriginalLevel()~=tc:GetOriginalLevel()
and c:GetLevel()>0
and c:GetLevel()~=tc:GetLevel()
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......@@ -57,7 +57,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local fc=g:GetFirst()
if tc and Duel.SpecialSummonStep(fc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
......
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