Commit ec164376 authored by mercury233's avatar mercury233

fix

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