Commit f4791658 authored by mercury233's avatar mercury233

add new card

parent 828f27dc
#created by ...
#main
100270023
101104020
100274203
100273002
......@@ -10,19 +9,6 @@
100273001
100273006
100273012
100270009
100270014
100270018
100270019
100270041
100270042
100270043
100270044
100270045
100270046
100270047
100270048
100270049
100272001
100272002
100272003
......@@ -34,32 +20,12 @@
101104207
101104208
101104209
100270201
100270202
100270204
100270206
100270207
100270208
100270209
100270217
100270218
#extra
100274201
100274202
100273007
100273008
100273009
100270008
100270024
101104204
101104205
100270203
100270205
!side
100270210
100270211
100270212
100270213
100270214
100270215
100270216
#created by ...
#main
100270001
100270204
100270009
100270201
100270202
100270014
100270018
100270019
100270023
100270206
100270207
100270208
100270209
100270217
100270218
100270041
100270042
100270043
100270044
100270045
100270046
100270047
100270048
100270049
#extra
100270205
100270008
100270203
100270024
100270210
100270211
100270212
100270213
100270214
100270215
100270216
!side
--竜血公ヴァンパイア
--Draculea Vampire
--LUA by Kohana Sonogami
function c100270001.initial_effect(c)
--Special Summon up to 2 Zombie monsters
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,100270001)
e1:SetTarget(c100270001.sptg1)
e1:SetOperation(c100270001.spop1)
c:RegisterEffect(e1)
--Negate the activation with the same name
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100270001,1))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100270101)
e2:SetCondition(c100270001.negcon)
e2:SetTarget(c100270001.negtg)
e2:SetOperation(c100270001.negop)
c:RegisterEffect(e2)
--Special Summon this card from your GY
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100270001,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,100270102)
e3:SetCondition(c100270001.spcon2)
e3:SetCost(c100270001.spcost2)
e3:SetTarget(c100270001.sptg2)
e3:SetOperation(c100270001.spop2)
c:RegisterEffect(e3)
end
function c100270001.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100270001.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and c100270001.spfilter(chkc,e,tp) end
if chk==0 then return ct>0
and Duel.IsExistingTarget(c100270001.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
if ct>2 then ct=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100270001.spfilter,tp,0,LOCATION_GRAVE,1,ct,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
end
function c100270001.spop1(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct<1 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==0 then return end
if g:GetCount()>ct or (g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=g:Select(tp,1,1,nil)
end
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
function c100270001.negcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,re:GetHandler():GetCode())
end
function c100270001.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c100270001.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
function c100270001.cfilter(c,tp)
return c:GetSummonLocation()==LOCATION_GRAVE and c:GetPreviousControler()==1-tp
end
function c100270001.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100270001.cfilter,1,nil,tp)
end
function c100270001.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetReleaseGroup(tp)
if chk==0 then return rg:CheckSubGroup(aux.mzctcheckrel,2,2,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=rg:SelectSubGroup(tp,aux.mzctcheckrel,false,2,2,tp)
Duel.Release(g,REASON_COST)
end
function c100270001.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100270001.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -81,7 +81,7 @@ function c100274201.desop2(e,tp,eg,ep,ev,re,r,rp)
end
function c100274201.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetOverlayGroup() and c:IsPreviousLocation(LOCATION_MZONE)
return c:GetOverlayCount()>0 and c:IsPreviousLocation(LOCATION_MZONE)
and rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp
end
function c100274201.spfilter(c,e,tp)
......
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