Commit 8fcce001 authored by mercury233's avatar mercury233

update scripts

parent 92a3e52d
--竜魔導の守護者
--Keeper of Dragonian Magic
--Scripted by Eerie Code
function c100200143.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100200143,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,100200143)
e1:SetCost(c100200143.thcost)
e1:SetTarget(c100200143.thtg)
e1:SetOperation(c100200143.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100200143,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100200143+100)
e3:SetCost(c100200143.spcost)
e3:SetTarget(c100200143.sptg)
e3:SetOperation(c100200143.spop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(100200143,ACTIVITY_SPSUMMON,c100200143.counterfilter)
end
function c100200143.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsType(TYPE_FUSION)
end
function c100200143.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(100200143,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c100200143.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100200143.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
end
function c100200143.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil)
and c100200143.cost(e,tp,eg,ep,ev,re,r,rp,0) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
c100200143.cost(e,tp,eg,ep,ev,re,r,rp,1)
end
function c100200143.thfilter(c)
return c:GetType()==TYPE_SPELL and c:IsSetCard(0x46) and c:IsAbleToHand()
end
function c100200143.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100200143.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100200143.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100200143.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c100200143.filter1(c,e,tp)
return c.material and Duel.IsExistingMatchingCard(c100200143.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp,c)
end
function c100200143.filter2(c,e,tp,fc)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and c:IsCode(table.unpack(fc.material))
end
function c100200143.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c100200143.cost(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.IsExistingMatchingCard(c100200143.filter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c100200143.filter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
Duel.ConfirmCards(1-tp,g)
e:SetLabelObject(g:GetFirst())
c100200143.cost(e,tp,eg,ep,ev,re,r,rp,1)
end
function c100200143.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c100200143.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local fc=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100200143.filter2),tp,LOCATION_GRAVE,0,1,1,nil,e,tp,fc)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,g)
end
end
--交血鬼-ヴァンパイア・シェリダン
--Al Dhampir – Vampire Sheridan
--Scripted by Eerie Code
function c100408007.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,6,2,nil,nil,99)
--lv change
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetProperty(EFFECT_FLAG_SET_AVAIABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c100408007.lvtg)
e1:SetValue(c100408007.lvval)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100408007,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c100408007.cost)
e2:SetTarget(c100408007.tgtg)
e2:SetOperation(c100408007.tgop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100408007,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c100408007.cost)
e3:SetTarget(c100408007.sptg)
e3:SetOperation(c100408007.spop)
c:RegisterEffect(e3)
end
function c100408007.lvtg(e,c)
return c:IsLevelAbove(1) and c:GetOwner()~=e:GetHandlerPlayer()
end
function c100408007.lvval(e,c,rc)
local lv=c:GetLevel()
if rc==e:GetHandler() then return 6
else return lv end
end
function c100408007.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c100408007.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c100408007.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function c100408007.spfilter(c,e,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsControler(1-tp) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsLocation(LOCATION_GRAVE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100408007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and eg:IsExists(c100408007.spfilter,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg,1,0,0)
end
function c100408007.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local sg=nil
local g=eg:Filter(c100408007.spfilter,nil,e,tp)
if g:GetCount()==0 then return end
if g:GetCount()==1 then
sg=g
else
sg=g:Select(tp,1,1,nil)
end
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
...@@ -32,7 +32,7 @@ function c100408026.initial_effect(c) ...@@ -32,7 +32,7 @@ function c100408026.initial_effect(c)
e2:SetOperation(c100408026.spop) e2:SetOperation(c100408026.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c100408026.spfilter1(c,e,tp) function c100408026.spfilter1(c,e,tp,rp)
local lv=c:GetLevel() local lv=c:GetLevel()
return (c:IsReason(REASON_BATTLE) or (rp~=tp and c:IsReason(REASON_EFFECT))) return (c:IsReason(REASON_BATTLE) or (rp~=tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousSetCard(0x214) and c:IsType(TYPE_MONSTER) and c:IsPreviousSetCard(0x214) and c:IsType(TYPE_MONSTER)
...@@ -44,11 +44,11 @@ function c100408026.spfilter2(c,e,tp,lv) ...@@ -44,11 +44,11 @@ function c100408026.spfilter2(c,e,tp,lv)
return c:GetLevel()<lv and c:IsSetCard(0x214) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:GetLevel()<lv and c:IsSetCard(0x214) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c100408026.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100408026.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c100408026.spfilter1(chkc,e,tp) end if chkc then return eg:IsContains(chkc) and c100408026.spfilter1(chkc,e,tp,rp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and eg:IsExists(c100408026.spfilter1,1,nil,e,tp) end and eg:IsExists(c100408026.spfilter1,1,nil,e,tp,rp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=eg:FilterSelect(tp,c100408026.spfilter1,1,1,nil,e,tp) local g=eg:FilterSelect(tp,c100408026.spfilter1,1,1,nil,e,tp,rp)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -37,21 +37,21 @@ function c101003081.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,21 +37,21 @@ function c101003081.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
end end
function c101003081.tgfilter(c,tp) function c101003081.tgfilter(c,tp)
return Duel.IsExistingMatchingCard(c101003081.gyfilter,tp,0,LOCATION_SZONE,1,nil,c:GetColumnGroup()) return Duel.IsExistingMatchingCard(c101003081.gyfilter,tp,0,LOCATION_ONFIELD,1,nil,c:GetColumnGroup())
end end
function c101003081.gyfilter(c,g) function c101003081.gyfilter(c,g)
return g:IsContains(c) return c:IsType(TYPE_SPELL+TYPE_TRAP) and g:IsContains(c)
end end
function c101003081.gytg(e,tp,eg,ep,ev,re,r,rp,chk) function c101003081.gytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101003081.tgfilter,tp,LOCATION_PZONE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c101003081.tgfilter,tp,LOCATION_PZONE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_SZONE) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_ONFIELD)
end end
function c101003081.gyop(e,tp,eg,ep,ev,re,r,rp) function c101003081.gyop(e,tp,eg,ep,ev,re,r,rp)
local pg=Duel.GetMatchingGroup(c101003081.tgfilter,tp,LOCATION_PZONE,0,nil,tp) local pg=Duel.GetMatchingGroup(c101003081.tgfilter,tp,LOCATION_PZONE,0,nil,tp)
if pg:GetCount()==0 then return end if pg:GetCount()==0 then return end
local g=Group.CreateGroup() local g=Group.CreateGroup()
for pc in aux.Next(pg) do for pc in aux.Next(pg) do
g:Merge(Duel.GetMatchingGroup(c101003081.gyfilter,tp,0,LOCATION_SZONE,nil,pc:GetColumnGroup())) g:Merge(Duel.GetMatchingGroup(c101003081.gyfilter,tp,0,LOCATION_ONFIELD,nil,pc:GetColumnGroup()))
end end
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
...@@ -12,15 +12,14 @@ function c101003084.initial_effect(c) ...@@ -12,15 +12,14 @@ function c101003084.initial_effect(c)
e1:SetOperation(c101003084.activate) e1:SetOperation(c101003084.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c101003084.cfilter(c,ft) function c101003084.cfilter(c,tp)
return c:IsRace(RACE_ZOMBIE) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToGraveAsCost() return c:IsRace(RACE_ZOMBIE) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToGraveAsCost()
and (ft>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) and Duel.GetMZoneCount(tp,c)>0
end end
function c101003084.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c101003084.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if chk==0 then return Duel.IsExistingMatchingCard(c101003084.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end
if chk==0 then return ft>-1 and Duel.IsExistingMatchingCard(c101003084.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101003084.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,ft) local g=Duel.SelectMatchingCard(tp,c101003084.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c101003084.filter(c,e,tp) function c101003084.filter(c,e,tp)
...@@ -31,7 +30,7 @@ function c101003084.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,7 +30,7 @@ function c101003084.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c101003084.activate(e,tp,eg,ep,ev,re,r,rp) function c101003084.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101003084.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c101003084.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -41,20 +41,17 @@ function c101003085.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -41,20 +41,17 @@ function c101003085.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c101003085.thfilter,tp,LOCATION_GRAVE,0,1,nil) end and Duel.IsExistingTarget(c101003085.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c101003085.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g1=Duel.SelectTarget(tp,c101003085.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
e:SetLabelObject(g1) e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectTarget(tp,c101003085.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g2=Duel.SelectTarget(tp,c101003085.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,1,0,0)
end end
function c101003085.activate(e,tp,eg,ep,ev,re,r,rp) function c101003085.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local tc1,tc2=Duel.GetFirstTarget()
if g:GetCount()~=2 then return end if tc1~=e:GetLabelObject() then tc1,tc2=tc2,tc1 end
local spc=g:GetFirst() if tc1:IsRelateToEffect(e) and Duel.SpecialSummon(tc1,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 and tc2:IsRelateToEffect(e) then
local thc=g:GetNext() Duel.SendtoHand(tc2,REASON_EFFECT)
if spc~=e:GetLabelObject() then spc,thc=thc,spc end
if Duel.SpecialSummon(spc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
Duel.SendtoHand(thc,REASON_EFFECT)
end end
end end
function c101003085.drfilter(c) function c101003085.drfilter(c)
...@@ -62,7 +59,7 @@ function c101003085.drfilter(c) ...@@ -62,7 +59,7 @@ function c101003085.drfilter(c)
end end
function c101003085.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101003085.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101003085.drfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101003085.drfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c101003085.drfilter,tp,LOCATION_REMOVED,0,5,nil) end and Duel.IsExistingTarget(c101003085.drfilter,tp,LOCATION_REMOVED,0,5,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c101003085.drfilter,tp,LOCATION_REMOVED,0,5,5,nil) local g=Duel.SelectTarget(tp,c101003085.drfilter,tp,LOCATION_REMOVED,0,5,5,nil)
......
...@@ -43,7 +43,7 @@ end ...@@ -43,7 +43,7 @@ end
function c101004005.rmfilter(c,atk) function c101004005.rmfilter(c,atk)
return c:IsFaceup() and c:GetAttack()>atk and c:IsAbleToRemove() return c:IsFaceup() and c:GetAttack()>atk and c:IsAbleToRemove()
end end
function c101004005.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101004005.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local atk=e:GetHandler():GetAttack() local atk=e:GetHandler():GetAttack()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c101004005.rmfilter(chkc,atk) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c101004005.rmfilter(chkc,atk) end
if chk==0 then return Duel.IsExistingTarget(c101004005.rmfilter,tp,0,LOCATION_MZONE,1,nil,atk) end if chk==0 then return Duel.IsExistingTarget(c101004005.rmfilter,tp,0,LOCATION_MZONE,1,nil,atk) end
......
...@@ -27,12 +27,39 @@ function c101004014.initial_effect(c) ...@@ -27,12 +27,39 @@ function c101004014.initial_effect(c)
e3:SetOperation(c101004014.spop2) e3:SetOperation(c101004014.spop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(101004014,ACTIVITY_SPSUMMON,c101004014.counterfilter) Duel.AddCustomActivityCounter(101004014,ACTIVITY_SPSUMMON,c101004014.counterfilter)
if not c101004014.global_check then
c101004014.global_check=true
local ex1=Effect.GlobalEffect()
ex1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex1:SetCode(EVENT_CHAINING)
ex1:SetCondition(c101004014.regcon)
ex1:SetOperation(c101004014.regop)
Duel.RegisterEffect(ex1,0)
local ex2=Effect.GlobalEffect()
ex2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex2:SetCode(EVENT_CHAIN_NEGATED)
ex2:SetCondition(c101004014.regcon)
ex2:SetOperation(c101004014.regop2)
Duel.RegisterEffect(ex2,0)
end
end
function c101004014.regcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP)
end
function c101004014.regop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
c101004014[cid]=true
end
function c101004014.regop2(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
c101004014[cid]=false
end end
function c101004014.counterfilter(c) function c101004014.counterfilter(c)
return c:IsSetCard(0x103) return c:IsSetCard(0x103)
end end
function c101004014.spcon1(e,tp,eg,ep,ev,re,r,rp) function c101004014.spcon1(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
return c101004014[cid] and rp==tp
end end
function c101004014.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function c101004014.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -79,7 +79,7 @@ function c101004017.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +79,7 @@ function c101004017.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
end end
function c101004017.splimit(e,c,tp,sumtp,sumpos) function c101004017.splimit(e,c,sump,sumtype,sumpos,targetp)
return not c:IsType(TYPE_LINK) return not c:IsType(TYPE_LINK)
end end
function c101004017.condition(e,tp,eg,ep,ev,re,r,rp) function c101004017.condition(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -50,7 +50,7 @@ function c101004019.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,7 +50,7 @@ function c101004019.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(tc,REASON_COST) Duel.SendtoGrave(tc,REASON_COST)
end end
function c101004019.spfilter(c,e,tp) function c101004019.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and not c:IsCode(101004019) and (c:IsSetCard(0x400d) or c:IsSetCard(0x212)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsType(TYPE_MONSTER) and not c:IsCode(101004019) and (c:IsSetCard(0x400d) or c:IsSetCard(0x113)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end end
function c101004019.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101004019.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101004019.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101004019.spfilter(chkc,e,tp) end
......
...@@ -50,7 +50,7 @@ function c101004020.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,7 +50,7 @@ function c101004020.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(tc,REASON_COST) Duel.SendtoGrave(tc,REASON_COST)
end end
function c101004020.thfilter(c) function c101004020.thfilter(c)
return c:IsType(TYPE_MONSTER) and not c:IsCode(101004020) and (c:IsSetCard(0x400d) or c:IsSetCard(0x212)) and c:IsAbleToHand() return c:IsType(TYPE_MONSTER) and not c:IsCode(101004020) and (c:IsSetCard(0x400d) or c:IsSetCard(0x113)) and c:IsAbleToHand()
end end
function c101004020.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101004020.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101004020.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101004020.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -50,7 +50,7 @@ function c101004021.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,7 +50,7 @@ function c101004021.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(tc,REASON_COST) Duel.SendtoGrave(tc,REASON_COST)
end end
function c101004021.thfilter(c) function c101004021.thfilter(c)
return (c:IsSetCard(0x400d) or c:IsSetCard(0x212)) and c:IsType(TYPE_MONSTER) and not c:IsCode(101004021) and c:IsAbleToHand() return (c:IsSetCard(0x400d) or c:IsSetCard(0x113)) and c:IsType(TYPE_MONSTER) and not c:IsCode(101004021) and c:IsAbleToHand()
end end
function c101004021.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101004021.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101004021.thfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101004021.thfilter(chkc) end
......
...@@ -49,7 +49,7 @@ function c101004022.sgcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,7 +49,7 @@ function c101004022.sgcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(tc,REASON_COST) Duel.SendtoGrave(tc,REASON_COST)
end end
function c101004022.filter(c) function c101004022.filter(c)
return (c:IsSetCard(0x400d) or c:IsSetCard(0x212)) and not c:IsCode(101004022) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() return (c:IsSetCard(0x400d) or c:IsSetCard(0x113)) and not c:IsCode(101004022) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end end
function c101004022.sgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101004022.sgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c101004022.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101004022.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -104,5 +104,5 @@ function c101004025.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,5 +104,5 @@ function c101004025.regop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c101004025.immtg(e,c) function c101004025.immtg(e,c)
return c:IsSetCard(0x400d) or c:IsSetCard(0x212) return c:IsSetCard(0x400d) or c:IsSetCard(0x113)
end end
...@@ -17,25 +17,28 @@ function c101004036.initial_effect(c) ...@@ -17,25 +17,28 @@ function c101004036.initial_effect(c)
e1:SetOperation(c101004036.rmop) e1:SetOperation(c101004036.rmop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c101004036.cfilter(c,g) function c101004036.cfilter(c,ec)
return g:IsContains(c) if c:IsLocation(LOCATION_MZONE) then
return ec:GetLinkedGroup():IsContains(c)
else
return bit.band(ec:GetLinkedZone(c:GetPreviousControler()),bit.lshift(0x1,c:GetPreviousSequence()))~=0
end
end end
function c101004036.rmcon(e,tp,eg,ep,ev,re,r,rp) function c101004036.rmcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup() return eg:IsExists(c101004036.cfilter,1,nil,e:GetHandler())
return lg and eg:IsExists(c101004036.cfilter,1,nil,lg)
end end
function c101004036.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101004036.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=eg:Filter(c101004036.cfilter,nil,e:GetHandler():GetLinkedGroup()) local g=eg:Filter(c101004036.cfilter,nil,e:GetHandler())
local tg=g:Filter(Card.IsLocation,nil,LOCATION_MZONE)
Duel.SetTargetCard(tg)
local g2=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) local g2=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
g:Merge(g2) g:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
function c101004036.rmop(e,tp,eg,ep,ev,re,r,rp) function c101004036.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local lg=c:GetLinkedGroup() local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if not c:IsRelateToEffect(e) or not lg then return end
local g=eg:Filter(c101004036.cfilter,nil,lg)
local g2=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) local g2=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
g:Merge(g2) g:Merge(g2)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
......
...@@ -31,7 +31,7 @@ function c101004043.initial_effect(c) ...@@ -31,7 +31,7 @@ function c101004043.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c101004043.matfilter(c) function c101004043.matfilter(c)
return c:IsLinkSetCard(0x213) and not c:IsLinkCode(101004043) return c:IsLinkSetCard(0x112) and not c:IsLinkCode(101004043)
end end
function c101004043.spcon(e,tp,eg,ep,ev,re,r,rp) function c101004043.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
...@@ -41,7 +41,7 @@ function c101004043.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,7 +41,7 @@ function c101004043.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function c101004043.spfilter(c,e,tp) function c101004043.spfilter(c,e,tp)
return c:IsSetCard(0x213) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x112) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101004043.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101004043.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -65,7 +65,7 @@ function c101004047.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,7 @@ function c101004047.tdop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c101004047.drfilter(c) function c101004047.drfilter(c)
return c:IsFaceup() and c:IsSetCard(0x213) and c:GetMutualLinkedGroupCount()>0 return c:IsFaceup() and c:IsSetCard(0x112) and c:GetMutualLinkedGroupCount()>0
end end
function c101004047.drval(e) function c101004047.drval(e)
local g=Duel.GetMatchingGroup(c101004047.drfilter,e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c101004047.drfilter,e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,nil)
......
...@@ -64,7 +64,7 @@ function c101004048.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,7 @@ function c101004048.setop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+0x17a0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
if e:GetLabel()==1 and Duel.IsPlayerCanDraw(tp,1) if e:GetLabel()==1 and Duel.IsPlayerCanDraw(tp,1)
and Duel.SelectYesNo(tp,aux.Stringid(101004048,1)) then and Duel.SelectYesNo(tp,aux.Stringid(101004048,1)) then
......
...@@ -31,14 +31,14 @@ function c101004059.efilter(e,c) ...@@ -31,14 +31,14 @@ function c101004059.efilter(e,c)
return c:GetMutualLinkedGroupCount()>0 return c:GetMutualLinkedGroupCount()>0
end end
function c101004059.mvfilter1(c) function c101004059.mvfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x213) return c:IsFaceup() and c:IsSetCard(0x112)
end end
function c101004059.mvfilter2(c,tp) function c101004059.mvfilter2(c,tp)
return c:IsFaceup() and c:IsSetCard(0x213) and c:GetSequence()<5 return c:IsFaceup() and c:IsSetCard(0x112) and c:GetSequence()<5
and Duel.IsExistingMatchingCard(c101004059.mvfilter3,tp,LOCATION_MZONE,0,1,c) and Duel.IsExistingMatchingCard(c101004059.mvfilter3,tp,LOCATION_MZONE,0,1,c)
end end
function c101004059.mvfilter3(c) function c101004059.mvfilter3(c)
return c:IsFaceup() and c:IsSetCard(0x213) and c:GetSequence()<5 return c:IsFaceup() and c:IsSetCard(0x112) and c:GetSequence()<5
end end
function c101004059.mvtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101004059.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c101004059.mvfilter1,tp,LOCATION_MZONE,0,1,nil) local b1=Duel.IsExistingMatchingCard(c101004059.mvfilter1,tp,LOCATION_MZONE,0,1,nil)
......
...@@ -86,7 +86,7 @@ function c101004074.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -86,7 +86,7 @@ function c101004074.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c101004074.thfilter(c) function c101004074.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x212) and c:IsAbleToHand() return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x113) and c:IsAbleToHand()
end end
function c101004074.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101004074.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
......
...@@ -30,12 +30,19 @@ function c101004100.initial_effect(c) ...@@ -30,12 +30,19 @@ function c101004100.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--extra material --extra material
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EXTRA_RELEASE_SUM) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetRange(LOCATION_MZONE) e3:SetCode(EFFECT_ADD_EXTRA_TRIBUTE)
e3:SetTargetRange(0,LOCATION_MZONE) e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_ZOMBIE)) e3:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_ZOMBIE))
c:RegisterEffect(e3) e3:SetValue(POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_HAND,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_MONSTER))
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end end
function c101004100.spfilter(c,e,tp) function c101004100.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-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