Commit 36d2b889 authored by Tachibana's avatar Tachibana 🐟

md

parent 90b4b19b
Pipeline #26274 passed with stages
in 22 minutes and 35 seconds
No preview for this file type
--暴风军神·格尼姆尔
local m=17035150
local cm=_G["c"..m]
function cm.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99,cm.lcheck)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99,s.lcheck)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(cm.regcon)
e0:SetOperation(cm.regop)
e0:SetCondition(s.regcon)
e0:SetOperation(s.regop)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
......@@ -21,8 +20,8 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,17035150)
e1:SetCondition(cm.linkcon)
e1:SetOperation(cm.linkop)
e1:SetCondition(s.linkcon)
e1:SetOperation(s.linkop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
......@@ -33,53 +32,62 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.descon)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
e2:SetCondition(s.descon)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
if not cm.global_flag then
cm.global_flag=true
if not s.global_flag then
s.global_flag=true
s[0]=0
s[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(cm.risop)
ge1:SetOperation(s.risop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.risop(e,tp,eg,ep,ev,re,r,rp)
function s.risop(e,tp,eg,ep,ev,re,r,rp)
local turnp=Duel.GetTurnPlayer()
if Duel.GetTurnCount()~=s[2] then
s[0]=0
s[1]=0
s[2]=Duel.GetTurnCount()
end
for tc in aux.Next(eg) do
if tc:IsSummonType(SUMMON_TYPE_LINK) then
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),17035150,RESET_PHASE+PHASE_END,0,0)
local p=tc:GetSummonPlayer()
s[p]=s[p]+1
end
end
end
function cm.matfilter(c)
function s.matfilter(c)
return c:IsLinkAttribute(ATTRIBUTE_WIND)
end
function cm.lcheck(g,lc)
return g:IsExists(cm.matfilter,1,nil)
function s.lcheck(g,lc)
return g:IsExists(s.matfilter,1,nil)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(cm.splimit)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsCode(17035150) and bit.band(sumtype,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function cm.linkcon(e,tp,eg,ep,ev,re,r,rp)
function s.linkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.linkop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFlagEffect(tp,17035150)-1
function s.linkop(e,tp,eg,ep,ev,re,r,rp)
local ct=s[tp]
for i=e:GetHandler():GetFlagEffect(17035150),ct do
Duel.Damage(1-tp,400,REASON_EFFECT)
local dg=Group.CreateGroup()
......@@ -106,15 +114,15 @@ function cm.linkop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler()
if chk==0 then return rc:IsRelateToEffect(re) and rc:IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,rc,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT)
......
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