Commit 22367cbb authored by mercury233's avatar mercury233

new cards 18sp+vjmp

parent ebfaf1b7
--デーモンの顕現
function c32775808.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,70781052,aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_DARK),1,true,true)
--code
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(70781052)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsCode,70781052))
e2:SetValue(500)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(32775808,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c32775808.spcon)
e3:SetTarget(c32775808.sptg)
e3:SetOperation(c32775808.spop)
c:RegisterEffect(e3)
end
function c32775808.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION)
and rp==1-tp and c:GetPreviousControler()==tp
end
function c32775808.spfilter(c,e,tp)
return c:IsCode(70781052) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c32775808.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c32775808.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c32775808.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c32775808.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--魔界の警邏課デスポリス
function c99011763.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,2)
--counter
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c99011763.regcon)
e1:SetOperation(c99011763.regop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c99011763.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(99011763,0))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,99011763)
e3:SetCondition(c99011763.ctcon)
e3:SetCost(c99011763.ctcost)
e3:SetTarget(c99011763.cttg)
e3:SetOperation(c99011763.ctop)
c:RegisterEffect(e3)
end
function c99011763.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabel()==1
end
function c99011763.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(99011763,RESET_EVENT+RESETS_STANDARD,0,0)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(99011763,1))
end
function c99011763.valcheck(e,c)
local g=c:GetMaterial()
if g:GetClassCount(Card.GetLinkCode)==g:GetCount() and g:IsExists(Card.IsLinkAttribute,2,nil,ATTRIBUTE_DARK) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c99011763.ctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(99011763)~=0
end
function c99011763.cfilter(c)
return Duel.IsExistingTarget(Card.IsCanAddCounter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,0x1049,1)
end
function c99011763.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c99011763.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c99011763.cfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c99011763.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsCanAddCounter(0x1049,1) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,0x1049,1)
end
function c99011763.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
tc:AddCounter(0x1049,1)
if tc:GetFlagEffect(99011764)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetTarget(c99011763.reptg)
e1:SetOperation(c99011763.repop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(99011764,RESET_EVENT+RESETS_STANDARD,0,0)
end
end
function c99011763.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and c:IsCanRemoveCounter(tp,0x1049,1,REASON_EFFECT) end
return true
end
function c99011763.repop(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveCounter(tp,0x1049,1,REASON_EFFECT)
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