Commit 22eb9cf5 authored by Tachibana's avatar Tachibana

ndyd

parent 9e6a8c28
......@@ -64,10 +64,11 @@ function cm.link(c,sc,code,tc)
sc:SetCardTarget(tc)
--tc:SetCardTarget(c)
--cannot material
local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
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)
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)
......
--异端的降临者 阿比盖尔
local m=16160006
local cm=_G["c"..m]
function c16160006.initial_effect(c)
aux.AddCodeList(c,16160006)
c:EnableReviveLimit()
......@@ -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
Duel.ChangeTargetCard(ev,tg)
else
Duel.NegateEffect(ev)
e:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
Duel.ChangeChainOperation(ev,cm.opa)
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)
if chk==0 then return Duel.CheckLPCost(tp,3000) end
Duel.PayLPCost(tp,3000)
......@@ -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)
end
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
for i=1,2 do
local token=Duel.CreateToken(tp,16160010)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(16160006,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c16160006.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
token:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,2))
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(cm.spcona)
e2:SetLabelObject(token)
e2:SetOperation(c16160006.desop)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetCondition(cm.spcon1)
e3:SetLabelObject(token)
Duel.RegisterEffect(e3,tp)
end
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
function c16160006.filter(c,sc)
if c:GetReasonCard() and sc then
return c:GetReasonCard()==sc
elseif c:GetReasonEffect():GetHandler() and sc then
return c:GetReasonEffect():GetHandler()==sc
function cm.cfilter(c,tp,flag,r,ac)
if not c:IsPreviousControler(1-tp) then return false end
if flag==1 and r&REASON_EFFECT~=0 then
local ce=c:GetReasonEffect()
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
return false
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)
local sg=eg:Filter(c16160006.filter,nil,e:GetHandler())
if sg:GetCount()==0 then return end
if not e:GetLabelObject() or not e:GetLabelObject():IsLocation(LOCATION_ONFIELD) or e:GetLabelObject():GetFlagEffect(m)==0 then e:Reset() return end
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
----
......
......@@ -64,7 +64,7 @@ function c29065607.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(c)
e1:SetValue(c29065605.eqlimit)
e1:SetValue(c29065607.eqlimit)
tc:RegisterEffect(e1)
tc=g:GetNext()
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