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