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