Commit 09428720 authored by mercury233's avatar mercury233

update

parent f9a4b012
......@@ -36,23 +36,6 @@ function c32617464.initial_effect(c)
e3:SetTarget(c32617464.negtg)
e3:SetOperation(c32617464.negop)
c:RegisterEffect(e3)
--
if not Card.GetMutualLinkedGroup then
function aux.mutuallinkfilter(c,mc)
local lg=c:GetLinkedGroup()
return lg and lg:IsContains(mc)
end
function Card.GetMutualLinkedGroup(c)
local lg=c:GetLinkedGroup()
if not lg then return nil end
return lg:Filter(aux.mutuallinkfilter,nil,c)
end
function Card.GetMutualLinkedCount(c)
local lg=c:GetLinkedGroup()
if not lg then return 0 end
return lg:FilterCount(aux.mutuallinkfilter,nil,c)
end
end
end
function c32617464.matfilter(c)
return not c:IsLinkType(TYPE_TOKEN)
......@@ -66,7 +49,7 @@ function c32617464.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2)
end
function c32617464.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetMutualLinkedCount()>=2
return e:GetHandler():GetMutualLinkedGroupCount()>=2
end
function c32617464.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
......@@ -83,7 +66,7 @@ function c32617464.rmop(e,tp,eg,ep,ev,re,r,rp)
end
function c32617464.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and c:GetMutualLinkedCount()>=3
return not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and c:GetMutualLinkedGroupCount()>=3
end
function c32617464.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsAbleToRemove() end
......
......@@ -39,30 +39,13 @@ function c5043010.initial_effect(c)
e4:SetTarget(c5043010.sptg)
e4:SetOperation(c5043010.spop)
c:RegisterEffect(e4)
--
if not Card.GetMutualLinkedGroup then
function aux.mutuallinkfilter(c,mc)
local lg=c:GetLinkedGroup()
return lg and lg:IsContains(mc)
end
function Card.GetMutualLinkedGroup(c)
local lg=c:GetLinkedGroup()
if not lg then return nil end
return lg:Filter(aux.mutuallinkfilter,nil,c)
end
function Card.GetMutualLinkedCount(c)
local lg=c:GetLinkedGroup()
if not lg then return 0 end
return lg:FilterCount(aux.mutuallinkfilter,nil,c)
end
end
end
function c5043010.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c5043010.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local ct=c:GetMutualLinkedCount()
local ct=c:GetMutualLinkedGroupCount()
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c5043010.thfilter(chkc) end
if chk==0 then return ct>0 and Duel.IsExistingTarget(c5043010.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
......
......@@ -27,23 +27,6 @@ function c79016563.initial_effect(c)
e2:SetTarget(c79016563.atktg)
e2:SetOperation(c79016563.atkop)
c:RegisterEffect(e2)
--
if not Card.GetMutualLinkedGroup then
function aux.mutuallinkfilter(c,mc)
local lg=c:GetLinkedGroup()
return lg and lg:IsContains(mc)
end
function Card.GetMutualLinkedGroup(c)
local lg=c:GetLinkedGroup()
if not lg then return nil end
return lg:Filter(aux.mutuallinkfilter,nil,c)
end
function Card.GetMutualLinkedCount(c)
local lg=c:GetLinkedGroup()
if not lg then return 0 end
return lg:FilterCount(aux.mutuallinkfilter,nil,c)
end
end
end
function c79016563.matfilter(c)
return not c:IsLinkType(TYPE_TOKEN)
......@@ -65,7 +48,7 @@ function c79016563.recop(e,tp,eg,ep,ev,re,r,rp)
end
function c79016563.atkcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
and e:GetHandler():GetMutualLinkedCount()>=2
and e:GetHandler():GetMutualLinkedGroupCount()>=2
end
function c79016563.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() 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