Commit dd21f325 authored by wind2009's avatar wind2009

Fix Salamandra with Chain

①效果是两个时点
①效果应该可以取对方的炎属性怪兽为对象
应该可以通过 善变的裁缝 转移给对方的炎属性怪兽
parent d7b3b2a3
...@@ -55,9 +55,9 @@ end ...@@ -55,9 +55,9 @@ 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:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
if chk==0 then return e:IsCostChecked() if chk==0 then return e:IsCostChecked()
and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function s.posfilter(c) function s.posfilter(c)
...@@ -68,7 +68,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,7 +68,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
if not c:IsLocation(LOCATION_SZONE) then return end if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and Duel.Equip(tp,c,tc)~=0 then if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Equip(tp,c,tc)~=0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
...@@ -83,8 +83,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,8 +83,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then if Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end end
...@@ -94,7 +96,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,7 +96,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function s.eqlimit(e,c) function s.eqlimit(e,c)
return e:GetHandler():GetEquipTarget()==c return e:GetHandler():GetEquipTarget()==c
or c:IsControler(e:GetHandlerPlayer()) and c:IsAttribute(ATTRIBUTE_FIRE) or c:IsAttribute(ATTRIBUTE_FIRE)
end end
function s.filter0(c) function s.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
...@@ -155,6 +157,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -155,6 +157,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local cg=mat1:Filter(s.fdfilter,nil) local cg=mat1:Filter(s.fdfilter,nil)
Duel.ConfirmCards(1-tp,cg) Duel.ConfirmCards(1-tp,cg)
end end
if mat1:IsExists(s.gdfilter,1,nil) then
local gg=mat1:Filter(s.gdfilter,nil)
Duel.HintSelection(gg)
end
Duel.SendtoDeck(mat1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.SendtoDeck(mat1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
...@@ -194,3 +200,6 @@ end ...@@ -194,3 +200,6 @@ end
function s.fdfilter(c) function s.fdfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsFacedown() or c:IsLocation(LOCATION_HAND) return c:IsLocation(LOCATION_MZONE) and c:IsFacedown() or c:IsLocation(LOCATION_HAND)
end end
function s.gdfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)
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