Commit 99f0761a authored by GuGu's avatar GuGu

Update c25501.lua 上古八阿哥

parent 4f6c266a
Pipeline #26221 passed with stage
in 22 seconds
--花与妖的连结✿风见幽香
function c25501.initial_effect(c)
--link summon
Exlink.AddLinkProcedure(c,nil,7,nil,c25501.mattg,c25501.matval,0,LOCATION_MZONE)
c:EnableReviveLimit()
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c25501.atkval)
c:RegisterEffect(e2)
--cannot attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(c25501.atklimit)
c:RegisterEffect(e4)
--immune trap
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_IMMUNE_EFFECT)
e6:SetCondition(c25501.econ)
e6:SetValue(c25501.efilter)
c:RegisterEffect(e6)
end
function c25501.mattg(e,c)
local tp=e:GetHandler():GetControler()
local check1=c:IsType(TYPE_MONSTER) and (c:IsOnField() or c:IsFacedown())
return check1 and not (c:IsType(TYPE_LINK) and c:IsControler(1-tp))
end
function c25501.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end
return true,not mg or mg
end
function c25501.atkval(e,c)
return c:GetLinkedGroupCount()*1000
end
function c25501.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c25501.econ(e)
local tp=e:GetHandler():GetControler()
return Duel.GetLP(tp) > Duel.GetLP(1-tp)
end
function c25501.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
--花与妖的连结✿风见幽香
function c25501.initial_effect(c)
--link summon
Exlink.AddLinkProcedure(c,nil,7,nil,c25501.mattg,c25501.matval,0,LOCATION_MZONE)
c:EnableReviveLimit()
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c25501.atkval)
c:RegisterEffect(e2)
--cannot attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(c25501.atklimit)
c:RegisterEffect(e4)
--immune trap
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_IMMUNE_EFFECT)
e6:SetCondition(c25501.econ)
e6:SetValue(c25501.efilter)
c:RegisterEffect(e6)
end
function c25501.mattg(e,c)
local tp=e:GetHandler():GetControler()
local check1=c:IsType(TYPE_MONSTER) and c:IsOnField() and c:IsFaceup()
return check1 and not (c:IsType(TYPE_LINK) and c:IsControler(1-tp))
end
function c25501.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end
return true,not mg or mg
end
function c25501.atkval(e,c)
return c:GetLinkedGroupCount()*1000
end
function c25501.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c25501.econ(e)
local tp=e:GetHandler():GetControler()
return Duel.GetLP(tp) > Duel.GetLP(1-tp)
end
function c25501.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
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