Commit ec164376 authored by mercury233's avatar mercury233

fix

parent db8ccf99
...@@ -7,6 +7,7 @@ function c101004061.initial_effect(c) ...@@ -7,6 +7,7 @@ function c101004061.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101004061+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101004061.target) e1:SetTarget(c101004061.target)
e1:SetOperation(c101004061.operation) e1:SetOperation(c101004061.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -27,6 +28,7 @@ function c101004061.initial_effect(c) ...@@ -27,6 +28,7 @@ function c101004061.initial_effect(c)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP) e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_DOUBLE_TRIBUTE) e4:SetCode(EFFECT_DOUBLE_TRIBUTE)
e4:SetValue(c101004061.condition)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c101004061.spfilter(c,e,tp) function c101004061.spfilter(c,e,tp)
...@@ -48,7 +50,7 @@ function c101004061.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +50,7 @@ function c101004061.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then return end if not Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then return end
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
--Add Equip limit --Add Equip limit
local e1=Effect.CreateEffect(tc) local e1=Effect.CreateEffect(tc)
...@@ -82,3 +84,6 @@ function c101004061.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,3 +84,6 @@ function c101004061.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
function c101004061.condition(e,c)
return c:IsType(TYPE_MONSTER)
end
...@@ -81,21 +81,22 @@ function c22159429.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,21 +81,22 @@ function c22159429.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
function c22159429.spcon(e,tp,eg,ep,ev,re,r,rp,chk) function c22159429.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:GetFirst()==e:GetHandler():GetEquipTarget() local cet=e:GetHandler():GetEquipTarget()
return ep~=tp and ((eg and eg:GetFirst() == cet) or (re and re:GetHandler() == cet))
end end
function c22159429.spfilter(c,e,tp) function c22159429.spfilter2(c,e,tp)
return c:IsSetCard(0xfb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xfb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c22159429.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c22159429.sptg(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(c22159429.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c22159429.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c22159429.spop(e,tp,eg,ep,ev,re,r,rp) function c22159429.spop(e,tp,eg,ep,ev,re,r,rp)
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,c22159429.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c22159429.spfilter2,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
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