Commit e83433ba authored by salix5's avatar salix5

id fix

parent 3f5b187a
--同胞の絆
function c40540317.initial_effect(c)
function c40450317.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c40540317.cost)
e1:SetTarget(c40540317.target)
e1:SetOperation(c40540317.activate)
e1:SetCost(c40450317.cost)
e1:SetTarget(c40450317.target)
e1:SetOperation(c40450317.activate)
c:RegisterEffect(e1)
end
function c40540317.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function c40450317.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,2000) and Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end
Duel.PayLPCost(tp,2000)
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -22,27 +22,27 @@ function c40540317.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c40540317.filter(c,e,tp)
function c40450317.filter(c,e,tp)
if not c:IsFaceup() or not c:IsLevelBelow(4) then return false end
local g=Duel.GetMatchingGroup(c40540317.filter2,tp,LOCATION_DECK,0,nil,e,tp,c)
local g=Duel.GetMatchingGroup(c40450317.filter2,tp,LOCATION_DECK,0,nil,e,tp,c)
return g:GetClassCount(Card.GetCode)>1
end
function c40540317.filter2(c,e,tp,tc)
function c40450317.filter2(c,e,tp,tc)
return c:GetLevel()==tc:GetLevel() and c:IsRace(tc:GetRace()) and c:IsAttribute(tc:GetAttribute())
and not c:IsCode(tc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40540317.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40540317.filter(chkc,e,tp) end
function c40450317.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c40450317.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingTarget(c40540317.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
and Duel.IsExistingTarget(c40450317.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c40540317.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SelectTarget(tp,c40450317.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function c40540317.activate(e,tp,eg,ep,ev,re,r,rp)
function c40450317.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c40540317.filter2,tp,LOCATION_DECK,0,nil,e,tp,tc)
local g=Duel.GetMatchingGroup(c40450317.filter2,tp,LOCATION_DECK,0,nil,e,tp,tc)
if ft>1 and g:GetClassCount(Card.GetCode)>1 and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=g:Select(tp,1,1,nil)
......
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