Commit 22eb9cf5 authored by Tachibana's avatar Tachibana

ndyd

parent 9e6a8c28
...@@ -67,7 +67,8 @@ function cm.link(c,sc,code,tc) ...@@ -67,7 +67,8 @@ function cm.link(c,sc,code,tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetOwnerPlayer(tc:GetControler())
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and rp==tp and Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):IsExists(Card.IsControler,1,nil,1-tp) return re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and rp==tp and Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):IsExists(Card.IsControler,1,nil,1-tp)
end) end)
......
--异端的降临者 阿比盖尔 --异端的降临者 阿比盖尔
local m=16160006
local cm=_G["c"..m]
function c16160006.initial_effect(c) function c16160006.initial_effect(c)
aux.AddCodeList(c,16160006) aux.AddCodeList(c,16160006)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -98,9 +100,13 @@ function c16160006.choperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,9 +100,13 @@ function c16160006.choperation(e,tp,eg,ep,ev,re,r,rp)
if tf(ce,cp,ceg,cep,cev,cre,cr,crp,0,tc) then if tf(ce,cp,ceg,cep,cev,cre,cr,crp,0,tc) then
Duel.ChangeTargetCard(ev,tg) Duel.ChangeTargetCard(ev,tg)
else else
Duel.NegateEffect(ev) e:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
Duel.ChangeChainOperation(ev,cm.opa)
end end
end end
function cm.opa(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c16160006.tkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c16160006.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,3000) end if chk==0 then return Duel.CheckLPCost(tp,3000) end
Duel.PayLPCost(tp,3000) Duel.PayLPCost(tp,3000)
...@@ -111,35 +117,72 @@ function c16160006.tktg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -111,35 +117,72 @@ function c16160006.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
end end
function c16160006.tkop(e,tp,eg,ep,ev,re,r,rp) function c16160006.tkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.IsPlayerCanSpecialSummonMonster(tp,16160010,nil,0x4011,3500,3500,10,RACE_FIEND,ATTRIBUTE_DARK) then if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.IsPlayerCanSpecialSummonMonster(tp,16160010,nil,0x4011,3500,3500,10,RACE_FIEND,ATTRIBUTE_DARK) then
for i=1,2 do for i=1,2 do
local token=Duel.CreateToken(tp,16160010) local token=Duel.CreateToken(tp,16160010)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler()) token:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,2))
e1:SetDescription(aux.Stringid(16160006,2)) local e2=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_DESTROYED)
e1:SetCode(EVENT_DESTROYED) e2:SetCondition(cm.spcona)
e1:SetRange(LOCATION_MZONE) e2:SetLabelObject(token)
e1:SetOperation(c16160006.desop) e2:SetOperation(c16160006.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) Duel.RegisterEffect(e2,tp)
token:RegisterEffect(e1,true) local e3=e2:Clone()
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetCondition(cm.spcon1)
e3:SetLabelObject(token)
Duel.RegisterEffect(e3,tp)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
if c:GetFlagEffect(m)==0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(cm.spcona)
e2:SetLabelObject(c)
e2:SetOperation(c16160006.desop)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetCondition(cm.spcon1)
e3:SetLabelObject(c)
Duel.RegisterEffect(e3,tp)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,2))
end
end end
end end
function c16160006.filter(c,sc) function cm.cfilter(c,tp,flag,r,ac)
if c:GetReasonCard() and sc then if not c:IsPreviousControler(1-tp) then return false end
return c:GetReasonCard()==sc if flag==1 and r&REASON_EFFECT~=0 then
elseif c:GetReasonEffect():GetHandler() and sc then local ce=c:GetReasonEffect()
return c:GetReasonEffect():GetHandler()==sc if ce then
local rc=ce:GetHandler()
if rc and aux.GetValueType(rc)=="Card" then
return rc==ac and rc:IsControler(tp)
end
end
elseif flag==2 then
local rc=c:GetReasonCard()
return rc:IsControler(tp) and rc==ac
else else
return false return false
end end
end end
function cm.spcona(e,tp,eg,ep,ev,re,r,rp)
if not e:GetLabelObject() or not e:GetLabelObject():IsLocation(LOCATION_ONFIELD) or e:GetLabelObject():GetFlagEffect(m)==0 then e:Reset() return false end
local c=e:GetLabelObject()
return eg:IsExists(cm.cfilter,1,nil,tp,1,r,c)
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetLabelObject() or not e:GetLabelObject():IsLocation(LOCATION_ONFIELD) or e:GetLabelObject():GetFlagEffect(m)==0 then e:Reset() return false end
local c=e:GetLabelObject()
return eg:IsExists(cm.cfilter,1,nil,tp,2,r,c)
end
function c16160006.desop(e,tp,eg,ep,ev,re,r,rp) function c16160006.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=eg:Filter(c16160006.filter,nil,e:GetHandler()) if not e:GetLabelObject() or not e:GetLabelObject():IsLocation(LOCATION_ONFIELD) or e:GetLabelObject():GetFlagEffect(m)==0 then e:Reset() return end
if sg:GetCount()==0 then return end
Duel.Damage(1-tp,1000,REASON_EFFECT) Duel.Damage(1-tp,1000,REASON_EFFECT)
end end
---- ----
......
...@@ -64,7 +64,7 @@ function c29065607.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,7 @@ function c29065607.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(c) e1:SetLabelObject(c)
e1:SetValue(c29065605.eqlimit) e1:SetValue(c29065607.eqlimit)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
tc=g:GetNext() tc=g:GetNext()
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