Commit e01168c5 authored by mercury233's avatar mercury233

fix

parent f71174ca
......@@ -18,7 +18,7 @@ function c100270218.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100270218)
e2:SetCountLimit(1,100270218+100)
e2:SetCondition(c100270218.atkcon)
e2:SetTarget(c100270218.atktg)
e2:SetOperation(c100270218.atkop)
......@@ -57,18 +57,18 @@ function c100270218.actop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c100270218.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetAttacker(),Duel.GetAttackTarget()
return (a:IsControler(tp) and a:IsRace(RACE_PLANT) and a:IsType(TYPE_LINK))
or (not d or (d:IsControler(tp) and d:IsRace(RACE_PLANT) and d:IsType(TYPE_LINK)))
local tc=Duel.GetBattleMonster(tp)
return tc:IsRace(RACE_PLANT) and tc:IsType(TYPE_LINK)
end
function c100270218.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
local tc=Duel.GetBattleMonster(tp)
local lg=tc:GetLinkedGroup():Filter(Card.IsFaceup,nil)
if chk==0 then return #lg>0 and lg:GetSum(Card.GetAttack)>0 end
end
function c100270218.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
local lg=tc:GetLinkedGroup()
local tc=Duel.GetBattleMonster(tp)
if not tc:IsRelateToBattle() then return end
local lg=tc:GetLinkedGroup():Filter(Card.IsFaceup,nil)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
......@@ -84,11 +84,12 @@ function c101102094.sptgfilter(c,e,tp,attr)
return c:GetOriginalAttribute()~=attr and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101102094.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetEquipTarget()
if chk==0 then
local tc=e:GetHandler():GetEquipTarget()
e:SetLabelObject(tc)
return tc and tc:IsAbleToGrave() and Duel.IsExistingMatchingCard(c101102094.sptgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,tc:GetOriginalAttribute())
end
local tc=e:GetLabelObject()
tc:CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
end
......
......@@ -71,7 +71,7 @@ function c101103061.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,0,1,nil)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
......
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