Commit f3b09661 authored by tsubaki's avatar tsubaki

1.999LA

parent 6b703d40
Pipeline #29047 passed with stage
in 1 minute and 42 seconds
No preview for this file type
......@@ -57,7 +57,7 @@ function Millux.penlimit(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(1,0)
e1:SetTarget(Millux.splimit)
......
......@@ -331,4 +331,9 @@
#setname 0x2141 魂之契源
!setname 0x6141 魂之契源
!setname 0x3e1f 飘零之城
!setname 0x5e1f 蝶翼幻想
!setname 0x6e1f 飘零之音
!setname 0x9e1f 飘零之秘
!setname 0xe39 2Pick技能
No preview for this file type
pics/401421.jpg

27.4 KB | W: | H:

pics/401421.jpg

51.7 KB | W: | H:

pics/401421.jpg
pics/401421.jpg
pics/401421.jpg
pics/401421.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/74562032.jpg

54.9 KB | W: | H:

pics/74562032.jpg

53.7 KB | W: | H:

pics/74562032.jpg
pics/74562032.jpg
pics/74562032.jpg
pics/74562032.jpg
  • 2-up
  • Swipe
  • Onion skin
--灵都·葬魂幽蝶
function c1110112.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,1110004,c1110112.filter,1,true,true)
--
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c1110112.tg1)
e1:SetOperation(c1110112.op1)
c:RegisterEffect(e1)
--
end
--
function c1110112.filter(c)
return c:IsCode(1110002)
end
--
function c1110112.tfilter1_1(c)
return c:IsAbleToDeck() and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c1110112.tfilter1_2(c,e,tp)
return c:IsSetCard(0x3e1f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end
function c1110112.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c1110112.tfilter1_1,tp,0,LOCATION_MZONE,1,nil)
local b2=Duel.IsExistingMatchingCard(c1110112.tfilter1_2,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0
if chk==0 then return (b1 or b2) end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(1110112,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(1110112,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
e:SetCategory(CATEGORY_TODECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_MZONE)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
end
function c1110112.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,c1110112.tfilter1_1,tp,0,LOCATION_MZONE,1,1,nil)
if sg:GetCount()<1 then return end
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
else
if Duel.GetMZoneCount(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c1110112.tfilter1_2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if sg:GetCount()<1 then return end
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local e1_3=Effect.CreateEffect(c)
e1_3:SetType(EFFECT_TYPE_SINGLE)
e1_3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1_3:SetCode(EFFECT_ADD_TYPE)
e1_3:SetValue(TYPE_SPIRIT)
e1_3:SetReset(RESET_EVENT+0x1fe0000)
sg:GetFirst():RegisterEffect(e1_3,true)
end
end
--
\ No newline at end of file
--飘零之城的瓶中天使
--
function c1110131.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,c1110131.Filter,1,1)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
c:RegisterEffect(e1)
local e4=e1:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
c:RegisterEffect(e4)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ATTACK_COST)
e2:SetCost(c1110131.cost2)
e2:SetOperation(c1110131.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(c1110131.op3)
c:RegisterEffect(e3)
--
end
--
function c1110131.Filter(c)
return c:IsSetCard(0x3e1f) and c:IsType(TYPE_MONSTER)
end
--
function c1110131.cost2(e,c,tp)
return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler())
end
function c1110131.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
if sg:GetCount()>0 then Duel.SendtoGrave(sg,REASON_COST) end
end
--
function c1110131.op3(e,tp,eg,ep,ev,re,r,rp)
local sg1=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local sg2=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if sg1:GetCount()<1 or sg2:GetCount()<1 then return end
local num1=sg1:GetSum(Card.GetBaseAttack)
local num2=sg2:GetSum(Card.GetBaseAttack)
local clj=math.abs(num1-num2)
if clj>0 then
local e5_1=Effect.CreateEffect(e:GetHandler())
e5_1:SetType(EFFECT_TYPE_SINGLE)
e5_1:SetCode(EFFECT_UPDATE_ATTACK)
e5_1:SetValue(clj)
e5_1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL)
e:GetHandler():RegisterEffect(e5_1)
end
end
--
\ No newline at end of file
--秘谈·彷徨的旅程
function c1111009.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1111009.tg1)
e1:SetOperation(c1111009.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_HAND)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c1111009.con2)
e2:SetTarget(c1111009.tg2)
e2:SetOperation(c1111009.op2)
c:RegisterEffect(e2)
--
end
--
function c1111009.tfilter1_1(c)
return c:IsSetCard(0x5e1f) and c:IsAbleToGrave()
end
function c1111009.tfilter1_2(c)
return c:IsSetCard(0x6e1f) and c:IsAbleToGrave()
end
function c1111009.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(c1111009.tfilter1_1,tp,LOCATION_DECK,0,1,nil,tp)
and Duel.IsExistingMatchingCard(c1111009.tfilter1_2,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK)
end
function c1111009.op1(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckOrExtraAsCost,tp,0,LOCATION_ONFIELD,1,1,nil)
if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,c1111009.tfilter1_1,tp,LOCATION_DECK,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg2=Duel.SelectMatchingCard(tp,c1111009.tfilter1_2,tp,LOCATION_DECK,0,1,1,sg)
sg:Merge(sg2)
if sg:GetCount()<1 then return end
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
--
function c1111009.cfilter2(c)
return c:IsPreviousLocation(LOCATION_GRAVE)
and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3e1f)
end
function c1111009.con2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1111009.cfilter2,1,nil)
end
function c1111009.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c1111009.op2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
--
\ No newline at end of file
......@@ -4,7 +4,7 @@
local cc=13940010
local this=_G["c"..cc]
this.searchCardList={14000260,14000270,14000273}
this.searchCardList={14000260,14001270,14002273}
function this.initial_effect(c)
aux.AddCodeList(c,14000260)
......@@ -30,9 +30,7 @@ function this.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Group.CreateGroup()
for i,v in ipairs(this.searchCardList) do
wyykak_reboot_code = v
g:AddCard(Duel.CreateToken(tp,v))
wyykak_reboot_code = nil
end
if Duel.SendtoHand(g,tp,REASON_EFFECT)>0 then
g=g:Filter(Card.IsLocation,nil,LOCATION_HAND)
......
......@@ -3,6 +3,7 @@ local m=14000556
local cm=_G["c"..m]
cm.named_with_ReDeath=1
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
......@@ -10,7 +11,6 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
......
--星态城·魔方领-0000
local m=14001270
local cm=_G["c"..m]
cm.card_code_list={14000260}
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--synchro
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_FZONE)
e2:SetHintTiming(0,0x1e0)
e2:SetCountLimit(1,14000260)
e2:SetTarget(cm.sctg)
e2:SetOperation(cm.scop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,14000260)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.syfilter(c)
return aux.IsCodeListed(c,14000260) and c:IsSynchroSummonable(nil)
end
function cm.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.syfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.scop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.syfilter,tp,LOCATION_EXTRA,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
end
end
function cm.cfilter(c,e,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(cm.cfilter,1,nil,e,tp) end
local g=eg:Filter(cm.cfilter,nil,e,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),tp,LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=eg:Filter(cm.cfilter,nil,e,tp)
if #g>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=g:GetFirst()
while tc do
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=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
end
\ No newline at end of file
--星坠之尘地
local m=14002273
local cm=_G["c"..m]
cm.card_code_list={14000260}
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--special summon from hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,14000260)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--special summon from GY
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_FZONE)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,14000260)
e3:SetCondition(cm.scon)
e3:SetTarget(cm.stg)
e3:SetOperation(cm.sop)
c:RegisterEffect(e3)
end
function cm.filter(c,e,tp)
return c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.scon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.sop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--魔彩光·上海人形
function c19500036.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),1,2,c19500036.ovfilter,aux.Stringid(19500036,3),99,c19500036.xyzop)
c:EnableReviveLimit()
--spsummon
-- local e1=Effect.CreateEffect(c)
--e1:SetDescription(aux.Stringid(19500036,0))
-- e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
-- e1:SetType(EFFECT_TYPE_IGNITION)
-- e1:SetCountLimit(1,19500036)
-- e1:SetRange(LOCATION_MZONE)
-- e1:SetCost(c19500036.cost)
-- e1:SetTarget(c19500036.sptg)
-- e1:SetOperation(c19500036.spop)
-- c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19500036,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,19500036)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c19500036.cost)
e2:SetTarget(c19500036.thtg)
e2:SetOperation(c19500036.thop)
c:RegisterEffect(e2)
end
function c19500036.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x186) and c:IsRace(RACE_MACHINE) and c:IsSummonType(SUMMON_TYPE_DUAL)
end
function c19500036.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,19500036)==0 end
Duel.RegisterFlagEffect(tp,19500036,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c19500036.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) or c.Mobius==999 end
if c.Mobius~=999 then e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) else end
end
--function c19500036.spfilter(c,e,tp)
-- return c:IsSetCard(0x186) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
--end
--function c19500036.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
-- if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
-- and Duel.IsExistingMatchingCard(c19500036.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
-- Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+--LOCATION_HAND)
--end
--function c19500036.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(c19500036.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
--if g:GetCount()>0 then
-- Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
-- end
--end
function c19500036.thfilter(c)
return c:IsSetCard(0x186) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c19500036.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19500036.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c19500036.tdfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x186)
end
function c19500036.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c19500036.tdfilter,tp,LOCATION_DECK,0,1,1,nil)
local g1=Duel.GetMatchingGroup(c19500036.tdfilter,tp,LOCATION_DECK,0,g:GetFirst())
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and #g1>0 and Duel.SelectYesNo(tp,aux.Stringid(19500036,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(19500036,4))
local sg=g1:Select(tp,1,1,nil)
local tc=sg:GetFirst()
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
end
\ No newline at end of file
--七色人形剧剧团
function c19500037.initial_effect(c)
c:SetUniqueOnField(1,0,19500037)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_DISCARD)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(c19500037.acop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_RELEASE)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_DESTROYED)
c:RegisterEffect(e4)
--counter
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(19500037,0))
e5:SetCategory(CATEGORY_COUNTER)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCountLimit(1)
e5:SetTarget(c19500037.coutg)
e5:SetOperation(c19500037.couop)
c:RegisterEffect(e5)
--search
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e6:SetDescription(aux.Stringid(19500037,1))
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_SZONE)
e6:SetCountLimit(1,19500037)
e6:SetCost(c19500037.thcost)
e6:SetTarget(c19500037.thtg)
e6:SetOperation(c19500037.thop)
c:RegisterEffect(e6)
end
function c19500037.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x186) and c:IsRace(RACE_MACHINE)
end
function c19500037.acop(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(c19500037.cfilter,nil)
if ct>0 then
e:GetHandler():AddCounter(0x128d,ct,true)
end
end
function c19500037.coufilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x128d,1)
end
function c19500037.coutg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c19500037.coufilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c19500037.coufilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x128d)
end
function c19500037.couop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
tc:AddCounter(0x128d,1)
end
end
function c19500037.spfilter1(c,e,tp)
return c:IsSetCard(0x186) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end
function c19500037.spfilter2(c,e,tp)
return c:IsSetCard(0x300) and c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c19500037.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsPlayerCanDraw(tp,1) and Duel.IsCanRemoveCounter(tp,1,1,0x128d,1,REASON_COST)
local b2=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_REMOVED,LOCATION_REMOVED,3,nil) and Duel.IsCanRemoveCounter(tp,1,1,0x128d,3,REASON_COST)
local b3=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c19500037.spfilter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,2,nil,e,tp) and Duel.IsCanRemoveCounter(tp,1,1,0x128d,5,REASON_COST)
local b4=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.IsExistingMatchingCard(c19500037.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsCanRemoveCounter(tp,1,1,0x128d,7,REASON_COST)
if chk==0 then return b1 or b2 or b3 or b4 end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(19500037,2)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(19500037,3)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(19500037,4)
opval[off-1]=3
off=off+1
end
if b4 then
ops[off]=aux.Stringid(19500037,5)
opval[off-1]=4
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
Duel.RemoveCounter(tp,1,0,0x128d,(sel*2)-1,REASON_COST)
end
function c19500037.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c19500037.thop(e,tp,eg,ep,ev,re,r,rp)
c=e:GetHandler()
local sel=e:GetLabel()
if sel==1 then
if Duel.Draw(tp,1,REASON_EFFECT)~=0 then
local g=Duel.GetOperatedGroup()
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc)
Duel.BreakEffect()
if tc:IsSetCard(0x186) then
local g1=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,c)
if #g1>0 and Duel.SelectYesNo(tp,aux.Stringid(19500037,8)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g1:Select(tp,1,1,c)
local disg=dg:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
disg:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
disg:RegisterEffect(e2)
if disg:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
disg:RegisterEffect(e3)
end
end
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(19500037,9)) then
Duel.Destroy(g,REASON_EFFECT)
end
else
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
Duel.ShuffleHand(tp)
end
elseif sel==2 then
local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
if #g2>2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g2:Select(tp,3,3,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
elseif sel==3 then
local g3=Duel.GetMatchingGroup(c19500037.spfilter1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if g3:GetCount()>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(19500037,6))
local sg1=g3:Select(tp,1,1,nil)
local tc1=sg1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(19500037,7))
local sg2=g3:Select(tp,1,1,tc1)
local tc2=sg2:GetFirst()
Duel.SpecialSummon(tc1,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(tc2,0,tp,1-tp,false,false,POS_FACEUP)
local fid=e:GetHandler():GetFieldID()
tc1:RegisterFlagEffect(19500037,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE_START+PHASE_END)
e4:SetCountLimit(1)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetLabel(fid)
e4:SetLabelObject(tc1)
e4:SetCondition(c19500037.descon)
e4:SetOperation(c19500037.desop)
Duel.RegisterEffect(e4,tp)
local fid=e:GetHandler():GetFieldID()
tc2:RegisterFlagEffect(19500037,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e5=e4:Clone()
e5:SetLabelObject(tc2)
Duel.RegisterEffect(e5,tp)
end
else
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g4=Duel.SelectMatchingCard(tp,c19500037.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g4:GetCount()>0 then
Duel.SpecialSummon(g4,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function c19500037.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(652362)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c19500037.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
--花开幻想·爱丽丝
function c19500038.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,nil,c19500038.mfilter,nil,aux.NonTuner(nil),1,1)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19500038,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,19500038)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c19500038.cost)
e1:SetOperation(c19500038.activate)
c:RegisterEffect(e1)
if not c19500038.global_check then
c19500038.global_check=true
c19500038[0]=0
c19500038[1]=0
--reflect damage
local ex1=Effect.CreateEffect(c)
ex1:SetType(EFFECT_TYPE_FIELD)
ex1:SetCode(EFFECT_REFLECT_DAMAGE)
ex1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ex1:SetTargetRange(1,0)
ex1:SetValue(c19500038.refcon)
Duel.RegisterEffect(ex1,0)
--negate
local ex2=Effect.CreateEffect(c)
ex2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex2:SetCode(EVENT_CHAIN_SOLVING)
ex2:SetCondition(c19500038.negcon)
ex2:SetOperation(c19500038.negop)
Duel.RegisterEffect(ex2,0)
end
end
function c19500038.refcon(e,re,val,r,rp,rc)
if c19500038[0]==0 then return end
c19500038[0]=c19500038[0]-1
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function c19500038.negcon(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandlerPlayer()
return rp==1-p and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) and c19500038[1]>0
end
function c19500038.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,17061490)
Duel.NegateEffect(ev)
c19500038[1]=c19500038[1]-1
end
function c19500038.mfilter(c,syncard,c1)
return c:IsSetCard(0x300) and (c:IsType(TYPE_TUNER) or c1:IsType(TYPE_TUNER))
end
function c19500038.cfilter(c)
return c:IsSetCard(0x186) and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_MACHINE) and c:IsAbleToRemoveAsCost()
end
function c19500038.spfilter(c,e,tp)
return c:IsSetCard(0x186) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c19500038.thfilter(c)
return c:IsSetCard(0x186) and c:IsAbleToHand()
end
function c19500038.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19500038.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c19500038.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local tc=g:GetFirst()
e:SetLabel(tc:GetAttribute())
end
function c19500038.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local att=e:GetLabel()
if att==ATTRIBUTE_EARTH then
local g1=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
if g1:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(19500038,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
Duel.SendtoDeck(sg1,nil,2,REASON_EFFECT)
end
elseif att==ATTRIBUTE_WATER then
c19500038[0]=c19500038[0]+1
elseif att==ATTRIBUTE_FIRE then
c19500038[1]=c19500038[1]+1
elseif att==ATTRIBUTE_WIND then
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(700)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
elseif att==ATTRIBUTE_LIGHT then
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(c19500038.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if g2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(19500038,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=g2:Select(tp,1,1,nil)
Duel.SpecialSummon(sg2,0,tp,tp,false,false,POS_FACEUP)
end
elseif att==ATTRIBUTE_DARK then
local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c19500038.thfilter),tp,LOCATION_GRAVE,0,nil)
if tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(19500038,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg3=tg:Select(tp,1,1,nil)
Duel.SendtoHand(sg3,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg3)
end
local tg2=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_DECK,0,nil,0x186)
if tg2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(19500038,4)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(19500038,5))
local sg4=tg2:Select(tp,1,1,nil)
local tc=sg4:GetFirst()
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
end
end
--Princess Lucia·Alice Margatroid
function c19500043.initial_effect(c)
-- c:SetSPSummonOnce(19500043)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,3,5,c19500043.lcheck)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.linklimit)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(c19500043.eqtg)
e2:SetOperation(c19500043.eqop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(19500043,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,19500043)
e3:SetTarget(c19500043.thtg)
e3:SetOperation(c19500043.thop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(19500043,2))
e4:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCondition(aux.bdocon)
e4:SetTarget(c19500043.tdtg)
e4:SetOperation(c19500043.tdop)
c:RegisterEffect(e4)
if not c19500043.global_check then
c19500043.global_check=true
c19500043[0]=0
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_TURN_END+PHASE_END)
ge2:SetOperation(c19500043.clear)
Duel.RegisterEffect(ge2,0)
end
end
function c19500043.clear(e,tp,eg,ep,ev,re,r,rp)
c19500043[0]=0
end
function c19500043.lcfilter1(c)
return c:IsSetCard(0x186) and c:IsRace(RACE_MACHINE)
end
function c19500043.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x186) and g:IsExists(c19500043.lcfilter1,1,nil)
end
function c19500043.filter(c)
return c:IsSetCard(0x186) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c19500043.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,19500043)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c19500043.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
Duel.RegisterFlagEffect(tp,19500043,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c19500043.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c19500043.filter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c19500043.eqlimit)
tc:RegisterEffect(e1)
end
end
function c19500043.eqlimit(e,c)
return e:GetOwner()==c
end
function c19500043.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEquipCount()>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c19500043.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
Duel.DisableShuffleCheck()
local dest=Duel.Destroy(g,REASON_EFFECT)
if dest>0 then
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsSetCard,nil,0x186)
if ct>0 then
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(ct*700)
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
--end
-- if ct>1 then
--extra attack
-- local e3=Effect.CreateEffect(c)
-- e3:SetType(EFFECT_TYPE_SINGLE)
-- e3:SetCode(EFFECT_EXTRA_ATTACK)
-- e3:SetValue(dest)
-- c:RegisterEffect(e3)
-- end
--if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local dis=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,ct,nil)
local sg=Group.CreateGroup()
for tc in aux.Next(dis) do
--disable
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DISABLE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_DISABLE_EFFECT)
e5:SetValue(RESET_TURN_SET)
e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e5)
if tc:IsType(TYPE_TRAPMONSTER) then
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e6:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e6)
end
end
Duel.BreakEffect()
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
for tc in aux.Next(dis) do
--battle damage
if tc:IsType(TYPE_MONSTER) and tc:IsFaceup() then
Duel.CalculateDamage(c,tc,true)
if c:GetAttack()>tc:GetAttack() then
Duel.Destroy(tc,REASON_BATTLE)
elseif c:GetAttack()==tc:GetAttack()then
local gr=Group.FromCards(c,tc)
Duel.Destroy(gr,REASON_BATTLE)
else
Duel.Destroy(c,REASON_BATTLE)
end
end
Duel.BreakEffect()
end
end
end
end
function c19500043.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not (c19500043[0]>0) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
c19500043[0]=c19500043[0]+1
end
function c19500043.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.SendtoDeck(g,nil,1,REASON_EFFECT)~=0 then
local des=Duel.GetMatchingGroup(nil,tp,LOCATION_DECK,0,nil)
if des:GetCount()>0 then
local sg=des:RandomSelect(tp,1)
Duel.Destroy(sg,REASON_EFFECT)
end
end
end
end
--七色人形剧·临场发挥
function c19500150.initial_effect(c)
--
-- local e1=Effect.CreateEffect(c)
-- e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
--e1:SetCode(EVENT_DESTROYED)
-- e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
-- e1:SetCountLimit(1,19500151)
-- e1:SetOperation(c19500150.op)
-- c:RegisterEffect(e1)
--disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(19500150,2))
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1,19500150)
e3:SetCondition(c19500150.condition2)
e3:SetTarget(c19500150.target2)
e3:SetOperation(c19500150.activate2)
c:RegisterEffect(e3)
end
--function c19500150.op(e,tp,eg,ep,ev,re,r,rp)
--inactivatable
-- local e4=Effect.CreateEffect(e:GetHandler())
--e4:SetType(EFFECT_TYPE_FIELD)
-- e4:SetCode(EFFECT_CANNOT_INACTIVATE)
--e4:SetValue(c19500150.effectfilter)
-- e4:SetReset(RESET_PHASE+PHASE_END)
-- Duel.RegisterEffect(e4,tp)
-- local e5=e4:Clone()
-- e5:SetCode(EFFECT_CANNOT_DISEFFECT)
-- Duel.RegisterEffect(e5,tp)
-- local e10=Effect.CreateEffect(e:GetHandler())
-- e10:SetType(EFFECT_TYPE_FIELD)
-- e10:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
-- e10:SetReset(RESET_PHASE+PHASE_END)
-- e10:SetTargetRange(1,0)
-- e10:SetDescription(aux.Stringid(19500150,0))
-- Duel.RegisterEffect(e10,tp)
--end
function c19500150.effectfilter(e,ct)
local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
local tc=te:GetHandler()
return p==tp and (tc:IsSetCard(0x186) or tc:IsSetCard(0x300)) and bit.band(loc,LOCATION_ONFIELD)~=0
end
function c19500150.condition2(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainDisablable(ev) then return false end
local te,p=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te and (te:GetHandler():IsSetCard(0x186) or te:GetHandler():IsSetCard(0x300)) and te:IsActiveType(TYPE_MONSTER) and p==tp
end
function c19500150.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ng=Group.CreateGroup()
local dg=Group.CreateGroup()
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(i) then
local tc=te:GetHandler()
ng:AddCard(tc)
end
end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0)
end
function c19500150.activate2(e,tp,eg,ep,ev,re,r,rp)
local dg=Group.CreateGroup()
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp then
Duel.NegateActivation(i)
end
end
end
\ No newline at end of file
--七曜魔术支援·七色人形剧融合
function c19500160.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,19500160+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c19500160.target)
e1:SetOperation(c19500160.activate)
c:RegisterEffect(e1)
end
function c19500160.filter0(c,e)
return not c:IsImmuneToEffect(e) and c:IsDestructable(e)
end
function c19500160.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c19500160.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsSetCard(0x300)
end
function c19500160.fiefil(c)
return c:IsFaceup() and (c:IsSetCard(0x186) or c:IsSetCard(0x300))
end
function c19500160.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c19500160.filter0,nil,e)
local mg2=Duel.GetMatchingGroup(c19500160.filter1,tp,LOCATION_GRAVE,0,nil,e)
if Duel.IsExistingMatchingCard(c19500160.fiefil,tp,LOCATION_MZONE,0,1,nil) and mg2:GetCount()>0 then
mg1:Merge(mg2)
end
local res=Duel.IsExistingMatchingCard(c19500160.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c19500160.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD)
end
function c19500160.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c19500160.filter0,nil,e)
local mg2=Duel.GetMatchingGroup(c19500160.filter1,tp,LOCATION_GRAVE,0,nil,e)
if Duel.IsExistingMatchingCard(c19500160.fiefil,tp,LOCATION_MZONE,0,1,nil) and mg2:GetCount()>0 then
mg1:Merge(mg2)
end
local sg1=Duel.GetMatchingGroup(c19500160.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c19500160.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
local res=false
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
local mat2=mat1:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
mat1:Sub(mat2)
if Duel.Destroy(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)==#mat1 and Duel.Remove(mat2,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)==#mat2 then
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
res=true
end
else
local mat3=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat3)
res=true
end
if res then
tc:CompleteProcedure()
end
end
end
\ No newline at end of file
--七曜魔术支援·帕秋莉诺蕾姬
function c19500170.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x300),c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x811),aux.FilterBoolFunction(Card.IsFusionSetCard,0x186),7,7,false)
--attribute change
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19500170,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,19500170)
e1:SetHintTiming(0,TIMING_DRAW_PHASE)
e1:SetTarget(c19500170.attg)
e1:SetOperation(c19500170.atop)
c:RegisterEffect(e1)
--qiyao effect
--wind
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c19500170.wind)
c:RegisterEffect(e2)
--fire
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetCondition(c19500170.fire)
e3:SetOperation(c19500170.fireop)
c:RegisterEffect(e3)
--water
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_DESTROYED)
e4:SetCondition(c19500170.water)
e4:SetOperation(c19500170.waterop)
c:RegisterEffect(e4)
--earth
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_CANNOT_MSET)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(0,1)
e5:SetCondition(c19500170.earth)
e5:SetTarget(aux.TRUE)
c:RegisterEffect(e5)
local e50=e5:Clone()
e50:SetCode(EFFECT_CANNOT_SSET)
c:RegisterEffect(e50)
local e51=e5:Clone()
e51:SetCode(EFFECT_CANNOT_TURN_SET)
c:RegisterEffect(e51)
local e52=e5:Clone()
e52:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e52:SetTarget(c19500170.sumlimit)
c:RegisterEffect(e52)
--dark
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_IMMUNE_EFFECT)
e6:SetTargetRange(LOCATION_MZONE,0)
e6:SetCondition(c19500170.dark)
e6:SetValue(c19500170.efilter)
c:RegisterEffect(e6)
local e60=e6:Clone()
e60:SetCode(EFFECT_UPDATE_ATTACK)
e60:SetValue(700)
c:RegisterEffect(e60)
--light
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetRange(LOCATION_MZONE)
e7:SetCode(EVENT_LEAVE_FIELD)
e7:SetCondition(c19500170.light)
e7:SetOperation(c19500170.lightop)
c:RegisterEffect(e7)
end
function c19500170.lightfil(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
end
function c19500170.lightop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,19500170)
local g=Duel.SelectMatchingCard(tp,c19500170.lightfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
function c19500170.efilter(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function c19500170.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0
end
function c19500170.fireop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,19500170)
local rc=re:GetHandler()
if Duel.Destroy(rc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,700,REASON_EFFECT)
end
end
function c19500170.waterop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,19500170)
if Duel.Draw(tp,1,REASON_EFFECT)~=0 then
Duel.Recover(tp,700,REASON_EFFECT)
end
end
function c19500170.attg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local rc1=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute())
--local rc2=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-e:GetHandler():GetAttribute()-rc1)
e:SetLabel(rc1)--(rc1-+rc2)
end
function c19500170.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local att=c:GetAttribute()+e:GetLabel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(att)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function c19500170.wind(e,c)
return e:GetHandler():IsAttribute(ATTRIBUTE_WIND)
end
function c19500170.dark(e,c)
return e:GetHandler():IsAttribute(ATTRIBUTE_DARK)
end
function c19500170.light(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetPreviousAttributeOnField(),ATTRIBUTE_LIGHT)==ATTRIBUTE_LIGHT and Duel.IsExistingMatchingCard(c19500170.lightfil,tp,LOCATION_DECK,0,1,nil)
end
function c19500170.waterconf(c,tp)
return c:GetPreviousControler()==tp and c:IsReason(REASON_EFFECT)
end
function c19500170.water(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsAttribute(ATTRIBUTE_WATER) and eg:IsExists(c19500170.waterconf,1,nil,tp)
end
function c19500170.fire(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsAttribute(ATTRIBUTE_FIRE) and rp==1-tp and re:IsActiveType(TYPE_SPELL)
end
function c19500170.earth(e,c)
return e:GetHandler():IsAttribute(ATTRIBUTE_EARTH)
end
\ No newline at end of file
--
function c22200168.initial_effect(c)
--link summon
c22200168.AddLinkProcedure(c,c22200168.matfilter,1,1)
c:EnableReviveLimit()
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22200168,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c22200168.seqtg)
e1:SetOperation(c22200168.seqop)
c:RegisterEffect(e1)
end
function c22200168.matfilter(c)
return c:IsReason(REASON_TEMPORARY) and c:IsLocation(LOCATION_REMOVED) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c22200168.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.Hint(HINT_ZONE,tp,fd)
local seq=math.log(fd,2)
e:SetLabel(seq)
end
function c22200168.seqfilter(c,tp,seq)
if c:IsControler(tp) then
return c:GetSequence()==seq
else
return c:GetSequence()==4-seq
end
end
function c22200168.seqop(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetLabel()
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or not c:IsControler(tp) or not Duel.CheckLocation(tp,LOCATION_MZONE,seq) then return end
local pseq=c:GetSequence()
Duel.MoveSequence(c,seq)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(c22200168.efilter)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
c:RegisterEffect(e2)
if pseq<5 and Duel.CheckLocation(tp,LOCATION_MZONE,pseq) and Duel.IsPlayerCanSpecialSummonMonster(tp,20046,0x208,0x4011,100,0,1,RACE_ZOMBIE,ATTRIBUTE_WIND) and Duel.SelectYesNo(tp,aux.Stringid(22200168,1)) then
Duel.BreakEffect()
local flag=0
flag=flag|(1<<(pseq))
local token=Duel.CreateToken(tp,20046)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP,flag)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c22200168.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
if not token:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e2,true)
end
token:SetTurnCounter(3)
Duel.SpecialSummonComplete()
end
end
function c22200168.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c22200168.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct-1
c:SetTurnCounter(ct)
if ct==0 then
Duel.BreakEffect()
Duel.Hint(HINT_CARD,tp,20046)
local g=c:GetColumnGroup()
g:AddCard(c)
Duel.Destroy(g,REASON_EFFECT)
e:Reset()
end
end
--Link Summon rule
function c22200168.AddLinkProcedure(c,f,min,max,gf)
local e1=Effect.CreateEffect(c)
e1:SetDescription(1166)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
if max==nil then max=c:GetLink() end
e1:SetCondition(c22200168.LinkCondition(f,min,max,gf))
e1:SetTarget(c22200168.LinkTarget(f,min,max,gf))
e1:SetOperation(c22200168.LinkOperation(f,min,max,gf))
e1:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e1)
end
function c22200168.LinkCondition(f,minc,maxc,gf)
return function(e,c,og,lmat,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(c22200168.LConditionFilter,nil,f,c)
else
mg=c22200168.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not c22200168.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=c22200168.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(c22200168.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(c22200168.LCheckGoal,minc,maxc,tp,c,gf,lmat)
end
end
function c22200168.LinkTarget(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,lmat,min,max)
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
local mg=nil
if og then
mg=og:Filter(c22200168.LConditionFilter,nil,f,c)
else
mg=c22200168.GetLinkMaterials(tp,f,c)
end
if lmat~=nil then
if not c22200168.LConditionFilter(lmat,f,c) then return false end
mg:AddCard(lmat)
end
local fg=c22200168.GetMustMaterialGroup(tp,EFFECT_MUST_BE_LMATERIAL)
Duel.SetSelectedCard(fg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local cancel=Duel.IsSummonCancelable()
local sg=mg:SelectSubGroup(tp,c22200168.LCheckGoal,cancel,minc,maxc,tp,c,gf,lmat)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
end
function c22200168.LinkOperation(f,minc,maxc,gf)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,lmat,min,max)
local g=e:GetLabelObject()
c:SetMaterial(g)
c22200168.LExtraMaterialCount(g,c,tp)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_LINK)
g:DeleteGroup()
end
end
function c22200168.LConditionFilter(c,f,lc)
return (c:IsFaceup() or not c:IsOnField()) and c:IsCanBeLinkMaterial(lc) and (not f or f(c))
end
function c22200168.GetLinkMaterials(tp,f,lc)
local mg=Duel.GetMatchingGroup(c22200168.LConditionFilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil,f,lc)
local mg2=Duel.GetMatchingGroup(c22200168.LExtraFilter,tp,LOCATION_HAND+LOCATION_SZONE,LOCATION_ONFIELD,nil,f,lc,tp)
if mg2:GetCount()>0 then mg:Merge(mg2) end
return mg
end
function c22200168.GetMustMaterialGroup(tp,code)
local g=Group.CreateGroup()
local ce={Duel.IsPlayerAffectedByEffect(tp,code)}
for _,te in ipairs(ce) do
local tc=te:GetHandler()
if tc then g:AddCard(tc) end
end
return g
end
function c22200168.LExtraFilter(c,f,lc,tp)
if c:IsLocation(LOCATION_ONFIELD) and not c:IsFaceup() then return false end
if not c:IsCanBeLinkMaterial(lc) or f and not f(c) then return false end
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local tf=te:GetValue()
local related,valid=tf(te,lc,nil,c,tp)
if related then return true end
end
return false
end
function c22200168.MustMaterialCounterFilter(c,g)
return not g:IsContains(c)
end
function c22200168.LCheckGoal(sg,tp,lc,gf,lmat)
return sg:CheckWithSumEqual(c22200168.GetLinkCount,lc:GetLink(),#sg,#sg)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0 and (not gf or gf(sg))
and not sg:IsExists(c22200168.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
end
function c22200168.LExtraMaterialCount(mg,lc,tp)
for tc in aux.Next(mg) do
local le={tc:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local sg=mg:Filter(aux.TRUE,tc)
local f=te:GetValue()
local related,valid=f(te,lc,sg,tc,tp)
if related and valid then
te:UseCountLimit(tp)
end
end
end
end
function c22200168.GetLinkCount(c)
if c:IsType(TYPE_LINK) and c:GetLink()>1 then
return 1+0x10000*c:GetLink()
else return 1 end
end
function c22200168.LUncompatibilityFilter(c,sg,lc,tp)
local mg=sg:Filter(aux.TRUE,c)
return not Auxiliary.LCheckOtherMaterial(c,mg,lc,tp)
end
\ No newline at end of file
......@@ -34,7 +34,7 @@ function c23246.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=c:GetOverlayGroup()
if chk==0 then return g:IsExists(Card.IsAbleToDeckAsCost,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:FilterSelect(tp,Card.IsAbleToDeckAsCost,1,1,nil)
local sg = g:Select(tp,1,1,nil)
Duel.SendtoDeck(sg,nil,1,REASON_COST)
end
function c23246.tfilter2(c)
......@@ -59,7 +59,7 @@ end
function c23246.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local cg=e:GetHandler():GetOverlayGroup()
if chk==0 then return cg:IsExists(c23246.cfilter, 1, nil) end
local g=cg:FilterSelect(tp,c23246.cfilter,1,1,nil)
local g=cg:Select(tp,1,1,nil)
Duel.SendtoGrave(g, REASON_COST)
e:SetLabelObject(g:GetFirst())
end
......
......@@ -43,20 +43,20 @@ c29053.DescSetName=0x826
--效果条件:其它卡的效果将这张卡加入手卡
function c29053.condition1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW) and re:GetHandler()~=e:GetHandler()
return not e:GetHandler():IsReason(REASON_DRAW)
end
--效果对象:这张卡
function c29053.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
--发动操作:特殊召唤这张卡
function c29053.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
......
......@@ -19,7 +19,7 @@ function c29056.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,29057)
e2:SetCountLimit(1,29054)
e2:SetCondition(c29056.condition2)
e2:SetTarget(c29056.target2)
e2:SetOperation(c29056.operation2)
......@@ -44,19 +44,19 @@ c29056.DescSetName=0x826
--效果条件:其它卡的效果将这张卡加入手卡
function c29056.condition1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW) and re:GetHandler()~=e:GetHandler()
return not e:GetHandler():IsReason(REASON_DRAW)
end
--效果对象:这张卡
function c29056.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
--发动操作:特殊召唤这张卡
function c29056.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
......
......@@ -19,20 +19,15 @@ function c29059.initial_effect(c)
--Effect Negate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DRAW)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetCondition(c29059.condition2)
e2:SetOperation(c29059.operation2)
c:RegisterEffect(e2)
end
--
c29059.DescSetName=0x826
--
function c29059.sfilter(c)
return c:GetAttack()<=1000 and c:IsSetCard(0x208)
end
end
function c29059.sfilter(c)
return c:GetAttack()<=1000 and c:IsSetCard(0x208)
end
--Effect 1
......@@ -71,7 +66,7 @@ end
--效果条件:这张卡在怪兽区域或墓地存在
function c29059.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DRAW and ep~=tp
return Duel.GetCurrentPhase()~=PHASE_DRAW
end
--发动操作:对方不能从手卡发动效果
......
......@@ -9,11 +9,11 @@ function c31081.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,31081)
e1:SetCost(c31081.cost)
e1:SetCost(c31081.cost)
e1:SetTarget(c31081.target1)
e1:SetOperation(c31081.operation1)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(31081,ACTIVITY_SPSUMMON,c31081.counterfilter)
Duel.AddCustomActivityCounter(31081,ACTIVITY_SPSUMMON,c31081.counterfilter)
--Return to Deck and Place "qinglan"
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
......@@ -21,57 +21,54 @@ function c31081.initial_effect(c)
e2:SetCost(c31081.cost2)
e2:SetOperation(c31081.operation2)
c:RegisterEffect(e2)
end
c31081.DescSetName=0x258
function c31081.counterfilter(c)
return c:IsRace(RACE_BEAST)
end
--Monster Effect 1
function c31081.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(31081,tp,ACTIVITY_SPSUMMON)==0
and e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(), nil, REASON_COST)
end
function c31081.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsRace(RACE_BEAST)
end
--效果条件:自己墓地的兽族怪兽或者「0x258」怪兽
function c31081.filter1b(c,e,tp)
end
function c31081.counterfilter(c)
return c:IsRace(RACE_BEAST)
end
--Monster Effect 1
function c31081.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(31081,tp,ACTIVITY_SPSUMMON)==0
and e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(), nil, REASON_COST)
end
function c31081.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsRace(RACE_BEAST)
end
--效果条件:自己墓地的兽族怪兽或者「0x258」怪兽
function c31081.filter1b(c,e,tp)
return (c:IsRace(RACE_BEAST) or c:IsSetCard(0x258)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c31081.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c31081.filter1b(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c31081.filter1b,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c31081.filter1b,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c31081.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
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(c31081.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--Monster Effect 2
function c31081.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,0,REASON_COST)
end
function c31081.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c31081.filter1b(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c31081.filter1b,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c31081.filter1b,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c31081.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
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(c31081.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--Monster Effect 2
function c31081.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,0,REASON_COST)
end
function c31081.operation2(e,tp,eg,ep,ev,re,r,rp)
local token=Duel.CreateToken(tp,200112)
Duel.MoveToField(token,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local token=Duel.CreateToken(tp,200112)
Duel.MoveToField(token,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end
......@@ -9,11 +9,11 @@ function c31084.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,31084)
e1:SetCost(c31084.cost)
e1:SetCost(c31084.cost)
e1:SetTarget(c31084.target1)
e1:SetOperation(c31084.operation1)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(31084,ACTIVITY_SPSUMMON,c31084.counterfilter)
Duel.AddCustomActivityCounter(31084,ACTIVITY_SPSUMMON,c31084.counterfilter)
--Return to Deck and Gain LP
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
......@@ -21,57 +21,56 @@ function c31084.initial_effect(c)
e2:SetCost(c31084.cost2)
e2:SetOperation(c31084.operation2)
c:RegisterEffect(e2)
end
c31084.DescSetName=0x258
function c31084.counterfilter(c)
return c:GetAttribute()==ATTRIBUTE_EARTH
end
--Monster Effect 1
function c31084.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(31084,tp,ACTIVITY_SPSUMMON)==0
and e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(), nil, REASON_COST)
end
function c31084.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:GetAttribute()~=ATTRIBUTE_EARTH
end
--效果条件:自己墓地的地属性怪兽或者「0x258」怪兽
function c31084.filter1b(c,e,tp)
end
function c31084.counterfilter(c)
return c:GetAttribute()==ATTRIBUTE_EARTH
end
--Monster Effect 1
function c31084.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(31084,tp,ACTIVITY_SPSUMMON)==0
and e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(), nil, REASON_COST)
end
function c31084.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:GetAttribute()==ATTRIBUTE_EARTH
end
--效果条件:自己墓地的地属性怪兽或者「0x258」怪兽
function c31084.filter1b(c,e,tp)
return (c:IsAttribute(ATTRIBUTE_EARTH) or c:IsSetCard(0x258)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c31084.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c31084.filter1b(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c31084.filter1b,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetMZoneCount(tp,e:GetHandler())>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c31084.filter1b,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c31084.operation1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
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(c31084.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--Monster Effect 2
--效果条件:游戏中除外的这张卡
function c31084.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,0,REASON_COST)
end
--发动操作:自己回复1000基本分。
function c31084.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c31084.filter1b(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c31084.filter1b,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c31084.filter1b,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c31084.operation1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
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(c31084.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--Monster Effect 2
--效果条件:游戏中除外的这张卡
function c31084.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,0,REASON_COST)
end
--发动操作:自己回复1000基本分。
function c31084.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,1000,REASON_EFFECT)
end
......@@ -13,7 +13,6 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TRUE)
e2:SetValue(100)
c:RegisterEffect(e2)
--②
......@@ -32,11 +31,8 @@ function s.initial_effect(c)
--③
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_DESTROYED)
e4:SetRange(LOCATION_HAND)
e4:SetCondition(s.spcon)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
......@@ -44,7 +40,7 @@ function s.initial_effect(c)
end
function s.thfilter(c)
return c:IsSetCard(0x275) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsCode(0x275) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -60,21 +56,21 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function s.spfilter(c,tp)
return c:IsPreviousControler(tp)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.spfilter,1,nil,tp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsLocation(LOCATION_HAND) and bc and bc:IsType(TYPE_MONSTER)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--深海栖舰-潜水栖姬
function c401115.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(401115,0))
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,40111501)
e1:SetCondition(c401115.spcondtion)
e1:SetTarget(c401115.sptarget)
e1:SetOperation(c401115.spoperation)
c:RegisterEffect(e1)
--sp from deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(401115,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,40111502)
e2:SetCost(c401115.cost)
e2:SetTarget(c401115.tg)
e2:SetOperation(c401115.op)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(401115,2))
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_REMOVE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,40111503)
e3:SetCondition(c401115.recon)
e3:SetTarget(c401115.retg)
e3:SetOperation(c401115.reop)
c:RegisterEffect(e3)
end
function c401115.spcondtion(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousLocation()==LOCATION_REMOVED
and c:IsPreviousPosition(POS_FACEDOWN) and c:GetReason()&REASON_RETURN
and c:GetTurnID()==Duel.GetTurnCount()
end
function c401115.sptarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c401115.spoperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,1,tp,tp,true,true,POS_FACEUP)>0 then
c:CompleteProcedure()
end
end
function c401115.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost(POS_FACEDOWN) end
Duel.Remove(e:GetHandler(),POS_FACEDOWN,REASON_COST)
end
function c401115.filter(c,e,tp)
return c:IsSetCard(0x911) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c401115.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c401115.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c401115.op(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,c401115.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c401115.refilter1(c,e,tp)
return c:IsControler(tp) and c:IsFacedown()
end
function c401115.recon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c401115.refilter1,1,e:GetHandler(),e,tp)
end
function c401115.refilter2(c)
return c:IsSetCard(0x911) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove(POS_FACEDOWN)
end
function c401115.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c401115.refilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c401115.reop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c401115.refilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--Is the order a rabbit?
function c411406.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(411406,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,411406+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c411406.target)
e1:SetOperation(c411406.activate)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(411406,4))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,411406+40)
e2:SetCost(c411406.descost)
e2:SetTarget(c411406.destg)
e2:SetOperation(c411406.desop)
c:RegisterEffect(e2)
end
function c411406.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup()
end
function c411406.cfilter(c)
return c:IsSetCard(0x405) and c:IsAbleToHand()
end
function c411406.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetMatchingGroup(c411406.filter,tp,LOCATION_ONFIELD,0,nil)
local g2=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c411406.cfilter,tp,LOCATION_DECK,0,1,nil)
and (g1:GetCount()<5 or g2:GetCount()>0) end
local cat=CATEGORY_SEARCH|CATEGORY_TOHAND
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if g1:GetCount()>4 and g2:GetCount()>0 then
cat=cat|CATEGORY_DESTROY|CATEGORY_DISABLE
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,g2,g2:GetCount(),1-tp,LOCATION_ONFIELD)
end
e:SetCategory(cat)
end
function c411406.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(c411406.filter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc1=Duel.SelectMatchingCard(tp,c411406.cfilter,tp,LOCATION_DECK,0,1,1,nil)
if tc1:GetCount()>0 then
Duel.SendtoHand(tc1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc1)
end
if g1:GetCount()>1 then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(411406,2))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetCondition(c411406.atkcon)
e1:SetOperation(c411406.atkop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
if g1:GetCount()>4 then
Duel.BreakEffect()
local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
if g2:GetCount()>0 then
local tc2=g2:GetFirst()
while tc2 do
Duel.NegateRelatedChain(tc2,RESET_TURN_SET)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc2:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetValue(RESET_TURN_SET)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc2:RegisterEffect(e3)
tc2=g2:GetNext()
end
end
Duel.BreakEffect()
local g3=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if g3:GetCount()>0 then
Duel.Destroy(g3,REASON_EFFECT)
end
end
end
function c411406.atkcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
local bc=Duel.GetAttackTarget()
if not bc then return false end
if bc:IsControler(1-tp) then
e:SetLabelObject(bc)
bc=tc
else
e:SetLabelObject(tc)
end
return bc:IsFaceup() and bc:IsRace(RACE_FAIRY)
end
function c411406.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsControler(1-tp) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(0)
e2:SetReset(RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e2,true)
end
end
function c411406.desfilter(c,tp,ec)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup()
and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(c,ec))
end
function c411406.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
function c411406.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c411406.desfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,c411406.desfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,Group.FromCards(g1:GetFirst(),c))
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
end
function c411406.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==2 then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -103,7 +103,7 @@ function c4114226.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingMatchingCard(c4114226.filter3,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c4114226.op3(e,tp,eg,ep,ev,re,r,rp)
function c4114226.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,c4114226.filter3,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
......
--
function c4114302.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--SetCard
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e1:SetValue(0x251)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114302,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,4114302)
e2:SetCondition(c4114302.spcon)
e2:SetTarget(c4114302.sptg)
e2:SetOperation(c4114302.spop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetOperation(c4114302.regop)
c:RegisterEffect(e3)
--adjust
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
ge1:SetCode(EVENT_CHAIN_END)
ge1:SetRange(LOCATION_PZONE)
ge1:SetCondition(c4114302.adjustcon1)
ge1:SetOperation(c4114302.adjustop1)
c:RegisterEffect(ge1)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ge2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
ge2:SetCode(EVENT_SUMMON_SUCCESS)
ge2:SetCondition(c4114302.adjustcon2)
ge2:SetOperation(c4114302.adjustcheck1)
c:RegisterEffect(ge2)
local ge3=ge2:Clone()
ge3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(ge3)
local ge4=ge2:Clone()
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_CHAIN_END)
ge4:SetRange(LOCATION_ONFIELD)
ge4:SetOperation(c4114302.adjustcheck2)
c:RegisterEffect(ge4)
local ge5=Effect.CreateEffect(c)
ge5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ge5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
ge5:SetCode(EVENT_LEAVE_FIELD)
ge5:SetCondition(c4114302.adjustcon3)
ge5:SetOperation(c4114302.adjustcheck3)
c:RegisterEffect(ge5)
--ChangePosition
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(4114302,2))
e4:SetCategory(CATEGORY_POSITION)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_CUSTOM+4114302)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCountLimit(1,4114303)
e4:SetTarget(c4114302.postg)
e4:SetOperation(c4114302.posop)
c:RegisterEffect(e4)
end
function c4114302.filter0(c)
return c:IsOnField() and c:GetOriginalType()&TYPE_PENDULUM~=0 and c:IsAbleToExtra()
end
function c4114302.filter1(c,e)
return c:IsOnField() and c:GetOriginalType()&TYPE_PENDULUM~=0 and c:IsAbleToExtra() and not c:IsImmuneToEffect(e)
end
function c4114302.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x251) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c4114302.filter3(c)
return c:GetOriginalType()&TYPE_PENDULUM~=0 and c:IsAbleToExtra() and c:IsCanBeFusionMaterial()
end
function c4114302.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c4114302.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c4114302.filter0,nil)
local mg2=Duel.GetMatchingGroup(c4114302.filter3,tp,LOCATION_PZONE,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c4114302.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c4114302.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_PZONE)
end
function c4114302.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c4114302.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c4114302.filter3,tp,LOCATION_PZONE,0,nil)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c4114302.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c4114302.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoExtraP(mat1,nil,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c4114302.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114302,1))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c4114302.destg)
e1:SetOperation(c4114302.desop)
e1:SetReset(RESET_EVENT+0xc6c0000)
c:RegisterEffect(e1)
end
function c4114302.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c4114302.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Destroy(c,REASON_EFFECT)
end
end
function c4114302.adjustcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(4114302)==0
end
function c4114302.adjustop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(4114302)==0 then
c:RegisterFlagEffect(4114302,RESET_EVENT+RESET_TODECK+RESET_TOHAND+RESET_TOGRAVE+RESET_REMOVE+RESET_OVERLAY+RESET_TURN_SET,0,1)
end
end
function c4114302.adjustcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsLocation(LOCATION_PZONE)
end
function c4114302.adjustcheck1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(4114302)~=0 then
if Duel.GetCurrentChain()==0 and not Duel.CheckEvent(EVENT_CHAIN_END) then
if c:IsPreviousLocation(LOCATION_PZONE) then
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+4114302,e,0,tp,0,0)
end
c:ResetFlagEffect(4114302)
end
end
end
function c4114302.adjustcheck2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(4114302)~=0 then
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+4114302,e,0,tp,0,0)
c:ResetFlagEffect(4114302)
end
end
function c4114302.adjustcon3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_PZONE)
end
function c4114302.adjustcheck3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPreviousLocation(LOCATION_PZONE) and not c:IsLocation(LOCATION_PZONE) then
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+4114302,e,0,tp,0,0)
end
end
function c4114302.posfilter(c)
return c:IsCanChangePosition()
end
function c4114302.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c4114302.posfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c4114302.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c4114302.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c4114302.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
\ No newline at end of file
--
function c4114306.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--SetCard
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e1:SetValue(0x251)
c:RegisterEffect(e1)
--specialsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114306,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,4114306)
e2:SetTarget(c4114306.sptg)
e2:SetOperation(c4114306.spop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetOperation(c4114306.regop)
c:RegisterEffect(e3)
--adjust
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
ge1:SetCode(EVENT_CHAIN_END)
ge1:SetRange(LOCATION_PZONE)
ge1:SetCondition(c4114306.adjustcon1)
ge1:SetOperation(c4114306.adjustop1)
c:RegisterEffect(ge1)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ge2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
ge2:SetCode(EVENT_SUMMON_SUCCESS)
ge2:SetCondition(c4114306.adjustcon2)
ge2:SetOperation(c4114306.adjustcheck1)
c:RegisterEffect(ge2)
local ge3=ge2:Clone()
ge3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(ge3)
local ge4=ge2:Clone()
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_CHAIN_END)
ge4:SetRange(LOCATION_ONFIELD)
ge4:SetOperation(c4114306.adjustcheck2)
c:RegisterEffect(ge4)
local ge5=Effect.CreateEffect(c)
ge5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ge5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
ge5:SetCode(EVENT_LEAVE_FIELD)
ge5:SetCondition(c4114306.adjustcon3)
ge5:SetOperation(c4114306.adjustcheck3)
c:RegisterEffect(ge5)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_CUSTOM+4114306)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCountLimit(1,4114307)
e4:SetTarget(c4114306.sptg2)
e4:SetOperation(c4114306.spop2)
c:RegisterEffect(e4)
end
function c4114306.spfilter1(c,e,tp)
return c:IsSetCard(0x251a) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsReleasableByEffect()
and Duel.IsExistingMatchingCard(c4114306.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetBaseAttack())
end
function c4114306.spfilter2(c,e,tp,atk1)
local atk2=c:GetBaseAttack()
return c:IsSetCard(0x251a) and c:IsType(TYPE_MONSTER) and math.abs(atk1-atk2)==100 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c4114306.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c4114306.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c4114306.spfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTarget(tp,c4114306.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c4114306.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.Release(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c4114306.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetBaseAttack())
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c4114306.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114306,1))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c4114306.destg)
e1:SetOperation(c4114306.desop)
e1:SetReset(RESET_EVENT+0xc6c0000)
c:RegisterEffect(e1)
end
function c4114306.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c4114306.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Destroy(c,REASON_EFFECT)
end
end
function c4114306.adjustcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(4114306)==0
end
function c4114306.adjustop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(4114306)==0 then
c:RegisterFlagEffect(4114306,RESET_EVENT+RESET_TODECK+RESET_TOHAND+RESET_TOGRAVE+RESET_REMOVE+RESET_OVERLAY+RESET_TURN_SET,0,1)
end
end
function c4114306.adjustcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsLocation(LOCATION_PZONE)
end
function c4114306.adjustcheck1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(4114306)~=0 then
if Duel.GetCurrentChain()==0 and not Duel.CheckEvent(EVENT_CHAIN_END) then
if c:IsPreviousLocation(LOCATION_PZONE) then
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+4114306,e,0,tp,0,0)
end
c:ResetFlagEffect(4114306)
end
end
end
function c4114306.adjustcheck2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(4114306)~=0 then
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+4114306,e,0,tp,0,0)
c:ResetFlagEffect(4114306)
end
end
function c4114306.adjustcon3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_PZONE)
end
function c4114306.adjustcheck3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPreviousLocation(LOCATION_PZONE) and not c:IsLocation(LOCATION_PZONE) then
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+4114306,e,0,tp,0,0)
end
end
function c4114306.spfilter3(c,e,tp)
return c:IsSetCard(0x251a,0x251b) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false)
end
function c4114306.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c4114306.spfilter3,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c4114306.spop2(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,c4114306.spfilter3,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_TYPE_PENDULUM,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--
function c4114308.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--SetCard
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e1:SetValue(0x251)
c:RegisterEffect(e1)
--specialsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114308,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,4114308)
e2:SetTarget(c4114308.tg)
e2:SetOperation(c4114308.op)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(4114308,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetRange(LOCATION_HAND+LOCATION_EXTRA)
e3:SetCountLimit(1,4114309)
e3:SetCondition(c4114308.spcon)
e3:SetTarget(c4114308.sptg)
e3:SetOperation(c4114308.spop)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c4114308.indtg)
e4:SetCountLimit(1)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c4114308.filter1(c,tp)
return c:IsSetCard(0x251a,0x251b) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
and Duel.IsExistingMatchingCard(c4114308.filter2,tp,LOCATION_DECK,0,1,nil,c:GetBaseAttack())
end
function c4114308.filter2(c,atk1)
local atk2=c:GetBaseAttack()
return c:IsSetCard(0x251a,0x251b) and c:IsType(TYPE_MONSTER) and math.abs(atk1-atk2)==100 and c:IsAbleToHand()
end
function c4114308.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c4114308.filter1(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c4114308.filter1,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c4114308.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c4114308.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c4114308.filter2,tp,LOCATION_DECK,0,1,1,nil,tc:GetBaseAttack())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c4114308.spfilter(c,tp,ec)
local b1=ec:IsLocation(LOCATION_HAND) and Duel.GetMZoneCount(tp,c)>0
local b2=ec:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,c,ec)>0
return c:IsSetCard(0x251a,0x251b) and c:IsFaceup() and (b1 or b2)
end
function c4114308.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c4114308.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c4114308.spfilter(chkc,tp,c) end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c4114308.spfilter,tp,LOCATION_ONFIELD,0,1,nil,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c4114308.spfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c4114308.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c4114308.inilter(c)
return c:IsSetCard(0x251b) and c:IsFaceup()
end
function c4114308.indtg(e,c)
if not c:GetEquipGroup() then return false end
return c:GetEquipCount()>0 and c:GetEquipGroup():IsExists(c4114308.inilter,1,nil)
end
--
function c4114312.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--SetCard
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e1:SetValue(0x251)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114312,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,4114312)
e2:SetTarget(c4114312.tg)
e2:SetOperation(c4114312.op)
c:RegisterEffect(e2)
--synchro limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetValue(c4114312.synlimit)
c:RegisterEffect(e3)
--set
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetCountLimit(1,4114313)
e4:SetCondition(c4114312.setcon)
e4:SetTarget(c4114312.settg)
e4:SetOperation(c4114312.setop)
c:RegisterEffect(e4)
end
function c4114312.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_ZOMBIE) and c:IsAttribute(ATTRIBUTE_WATER)
and c:IsSetCard(0x208) and c:IsAbleToGrave()
end
function c4114312.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4114312.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c4114312.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c4114312.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c4114312.synlimit(e,c)
if not c then return false end
return not c:IsSetCard(0x251)
end
function c4114312.setcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and r==REASON_SYNCHRO
end
function c4114312.setfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_EXTRA) and c:IsFaceup())
and c:IsSetCard(0x251a,0x251b) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c4114312.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c4114312.setfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) end
end
function c4114312.setop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c4114312.setfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if not tc then return end
if Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,false) then
tc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
end
\ No newline at end of file
--
function c4114314.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--SetCard
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e1:SetValue(0x251)
c:RegisterEffect(e1)
--special summon and equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114314,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,4114314)
e2:SetCondition(c4114314.spcon)
e2:SetTarget(c4114314.sptg)
e2:SetOperation(c4114314.spop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetOperation(c4114314.regop)
c:RegisterEffect(e3)
--adjust
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
ge1:SetCode(EVENT_CHAIN_END)
ge1:SetRange(LOCATION_PZONE)
ge1:SetCondition(c4114314.adjustcon1)
ge1:SetOperation(c4114314.adjustop1)
c:RegisterEffect(ge1)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ge2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
ge2:SetCode(EVENT_SUMMON_SUCCESS)
ge2:SetCondition(c4114314.adjustcon2)
ge2:SetOperation(c4114314.adjustcheck1)
c:RegisterEffect(ge2)
local ge3=ge2:Clone()
ge3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(ge3)
local ge4=ge2:Clone()
ge4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge4:SetCode(EVENT_CHAIN_END)
ge4:SetRange(LOCATION_ONFIELD)
ge4:SetOperation(c4114314.adjustcheck2)
c:RegisterEffect(ge4)
local ge5=Effect.CreateEffect(c)
ge5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ge5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
ge5:SetCode(EVENT_LEAVE_FIELD)
ge5:SetCondition(c4114314.adjustcon3)
ge5:SetOperation(c4114314.adjustcheck3)
c:RegisterEffect(ge5)
--set
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_CUSTOM+4114314)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCountLimit(1,4114315)
e4:SetTarget(c4114314.settg)
e4:SetOperation(c4114314.setop)
c:RegisterEffect(e4)
end
function c4114314.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c4114314.spfilter(c)
return c:IsSetCard(0x251a) and c:IsFaceup()
end
function c4114314.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c4114314.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c4114314.spfilter(chkc) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c4114314.spfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c4114314.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.BreakEffect()
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c4114314.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
end
end
end
function c4114314.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c4114314.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114314,1))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c4114314.destg)
e1:SetOperation(c4114314.desop)
e1:SetReset(RESET_EVENT+0xc6c0000)
c:RegisterEffect(e1)
end
function c4114314.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c4114314.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Destroy(c,REASON_EFFECT)
end
end
function c4114314.adjustcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(4114314)==0
end
function c4114314.adjustop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(4114314)==0 then
c:RegisterFlagEffect(4114314,RESET_EVENT+RESET_TODECK+RESET_TOHAND+RESET_TOGRAVE+RESET_REMOVE+RESET_OVERLAY+RESET_TURN_SET,0,1)
end
end
function c4114314.adjustcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsLocation(LOCATION_PZONE)
end
function c4114314.adjustcheck1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(4114314)~=0 then
if Duel.GetCurrentChain()==0 and not Duel.CheckEvent(EVENT_CHAIN_END) then
if c:IsPreviousLocation(LOCATION_PZONE) then
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+4114314,e,0,tp,0,0)
end
c:ResetFlagEffect(4114314)
end
end
end
function c4114314.adjustcheck2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(4114314)~=0 then
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+4114314,e,0,tp,0,0)
c:ResetFlagEffect(4114314)
end
end
function c4114314.adjustcon3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_PZONE)
end
function c4114314.adjustcheck3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPreviousLocation(LOCATION_PZONE) and not c:IsLocation(LOCATION_PZONE) then
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+4114314,e,0,tp,0,0)
end
end
function c4114314.setfilter(c)
return c:IsSetCard(0x251a,0x251b) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c4114314.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c4114314.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c4114314.setop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c4114314.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if not tc then return end
if Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,false) then
tc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
end
\ No newline at end of file
--
function c4114316.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--SetCard
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_MZONE+LOCATION_PZONE)
e1:SetValue(0x251)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114316,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,4114316)
e2:SetTarget(c4114316.sptg)
e2:SetOperation(c4114316.spop)
c:RegisterEffect(e2)
--equip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(4114316,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,4114317)
e3:SetTarget(c4114316.eqtg)
e3:SetOperation(c4114316.eqop)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_ONFIELD,0)
e4:SetTarget(c4114316.indtg)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c4114316.filter(c,e,tp)
return c:IsSetCard(0x251b) and c:IsFaceup() and c:GetOriginalType()&TYPE_MONSTER~=0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c4114316.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c4114316.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c4114316.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c4114316.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c4114316.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c4114316.eqfilter(c)
return c:IsSetCard(0x251b) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c4114316.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c4114316.eqfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end
end
function c4114316.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c4114316.eqfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c4114316.eqlimit)
tc:RegisterEffect(e1)
end
end
function c4114316.eqlimit(e,c)
return e:GetOwner()==c and not c:IsDisabled()
end
function c4114316.indtg(e,c)
return c:IsSetCard(0x251b) and c:IsFaceup()
end
\ No newline at end of file
--
function c4114320.initial_effect(c)
--link summon
Exlink.AddLinkProcedure(c,c4114320.matfilter,2,nil,c4114320.mattg,c4114320.matval,LOCATION_ONFIELD,0,nil,nil,c4114320.lcheck)
c:EnableReviveLimit()
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114320,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_CHANGE_POS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c4114320.poscon)
e1:SetTarget(c4114320.postg)
e1:SetOperation(c4114320.posop)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114320,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,4114320)
e2:SetCost(c4114320.cost)
e2:SetCondition(c4114320.con)
e2:SetTarget(c4114320.tg)
e2:SetOperation(c4114320.op)
c:RegisterEffect(e2)
end
function c4114320.matfilter(c)
return c:IsLinkSetCard(0x208)
end
function c4114320.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x251)
end
function c4114320.mattg(e,c)
return (c:IsType(TYPE_EQUIP) or c:IsLocation(LOCATION_PZONE) and c:GetEquipTarget())
and c:IsOnField() and c:IsFaceup() and c:GetOriginalType()&TYPE_MONSTER~=0
end
function c4114320.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end
return true,not mg or mg
end
function c4114320.posfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x251)
end
function c4114320.poscon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c4114320.posfilter,1,nil,tp)
end
function c4114320.eqfilter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()) and not c:IsForbidden()
end
function c4114320.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c4114320.eqfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
end
function c4114320.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c4114320.eqfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c4114320.eqlimit)
tc:RegisterEffect(e1)
end
end
function c4114320.eqlimit(e,c)
return e:GetOwner()==c and not c:IsDisabled()
end
function c4114320.filter(c,ec)
return c:IsSetCard(0x251b) and c:IsFaceup() and c:GetOriginalType()&TYPE_MONSTER~=0 and c:GetEquipTarget()==ec
end
function c4114320.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local fid=c:GetFieldID()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
c:RegisterFlagEffect(4114320,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabel(fid)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(c4114320.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c4114320.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
local fid=e:GetLabel()
if tc:GetFlagEffect(4114320)>0 and tc:GetFlagEffectLabel(4114320)==fid then
Duel.ReturnToField(tc)
end
end
function c4114320.con(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
local b2=Duel.GetTurnPlayer()==tp or Duel.GetTurnPlayer()~=tp and Duel.IsExistingMatchingCard(c4114320.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e:GetHandler())
return b1 and b2
end
function c4114320.tg(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(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c4114320.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--
function c4114322.initial_effect(c)
-- fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x251a),aux.FilterBoolFunction(Card.IsFusionSetCard,0x251b),true)
local e0=aux.AddContactFusionProcedure(c,c4114322.spfilter,LOCATION_ONFIELD,0,Duel.SendtoExtraP,nil,REASON_COST)
e0:SetCountLimit(1,4114322)
--ChangePosition
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114322,1))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c4114322.poscon)
e1:SetTarget(c4114322.postg)
e1:SetOperation(c4114322.posop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c4114322.cona)
e2:SetTarget(c4114322.indtg)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetCondition(c4114322.cond)
c:RegisterEffect(e3)
end
c4114322.hana_mat={
aux.FilterBoolFunction(Card.IsFusionSetCard,0x251a),
aux.FilterBoolFunction(Card.IsFusionSetCard,0x251b),
}
function c4114322.spfilter(c)
return c:GetOriginalType()&TYPE_PENDULUM~=0 and c:IsAbleToExtra()
end
function c4114322.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c4114322.posfilter(c)
return c:IsCanChangePosition()
end
function c4114322.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c4114322.posfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c4114322.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c4114322.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c4114322.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
function c4114322.cona(e)
return e:GetHandler():IsAttackPos()
end
function c4114322.cond(e)
return e:GetHandler():IsDefensePos()
end
function c4114322.indtg(e,c)
return c:IsSetCard(0x251) and c:IsFaceup() and not c:IsCode(4114322)
end
\ No newline at end of file
--
function c4114324.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(aux.FilterBoolFunction(Card.IsSetCard,0x251)),1)
c:EnableReviveLimit()
c:EnableCounterPermit(0x28d)
--choose effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114324,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,4114324)
e1:SetCondition(c4114324.con)
e1:SetTarget(c4114324.tg)
e1:SetOperation(c4114324.op)
c:RegisterEffect(e1)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4114324,3))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetOperation(c4114324.ctop)
c:RegisterEffect(e2)
end
function c4114324.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c4114324.thfilter(c)
return c:IsSetCard(0x252) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c4114324.spfilter(c,sync)
return c:IsControler(tp) and bit.band(c:GetReason(),0x80008)==0x80008
and (c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_EXTRA) and c:IsFaceup())
and c:GetReasonCard()==sync and not c:IsForbidden()
end
function c4114324.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=c:GetMaterial()
local ct=mg:GetCount()
local b1=Duel.IsExistingMatchingCard(c4114324.thfilter,tp,LOCATION_DECK,0,1,nil)
local b2=ct>0 and mg:FilterCount(c4114324.spfilter,nil,c)==ct
and Duel.GetLocationCount(tp,LOCATION_SZONE)>=ct
if chk==0 then return b1 or b2 end
local off=1
local ops,opval={},{}
if b1 then
ops[off]=aux.Stringid(4114324,1)
opval[off]=0
off=off+1
end
if b2 then
ops[off]=aux.Stringid(4114324,2)
opval[off]=1
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
e:SetLabel(sel)
if sel==0 then
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
else
e:SetCategory(CATEGORY_EQUIP)
Duel.SetTargetCard(mg)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,mg,ct,0,0)
end
end
function c4114324.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if sel==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c4114324.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
else
local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local g=mg:Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()<mg:GetCount() then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<g:GetCount() then return end
local tc=g:GetFirst()
while tc do
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c4114324.eqlimit)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
end
function c4114324.eqlimit(e,c)
return e:GetOwner()==c and not c:IsDisabled()
end
function c4114324.ctop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(aux.TRUE,1,nil) then
e:GetHandler():AddCounter(0x28d,1)
end
end
\ No newline at end of file
......@@ -30,7 +30,7 @@ function c431404.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c431404.shop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,91400,0,0x4011,0,0,2,RACE_BEAST,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,91400)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
......
--甘兔庵的万圣节前夜
local s,id=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
e1:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+40)
e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
--add setcode
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_PZONE)
e3:SetTargetRange(LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0)
e3:SetCode(EFFECT_ADD_SETCODE)
e3:SetTarget(s.addtg)
e3:SetValue(0x404)
c:RegisterEffect(e3)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_PZONE)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCountLimit(1)
e4:SetCondition(s.con)
e4:SetTarget(s.tg)
e4:SetOperation(s.op)
c:RegisterEffect(e4)
end
function s.fselect(g,tp)
return Duel.GetMZoneCount(tp,g,tp)>0
end
function s.spfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsReleasable() and c:IsRace(RACE_FAIRY)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE,0,nil)
return rg:CheckSubGroup(s.fselect,2,2,tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:SelectSubGroup(tp,s.fselect,true,2,2,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_COST)
g:DeleteGroup()
c:CompleteProcedure()
end
--
function s.filter1(c,e,tp)
local b1=not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
local b2=c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x404) and (b1 or b2)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)
and Duel.IsExistingTarget(s.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
if Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then
if c:IsType(TYPE_SYNCHRO) then
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
--
function s.addtg(e,c)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_FAIRY) and c:IsFaceup()
end
--
function s.filter2(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsSetCard(0x404)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.filter2,1,nil,tp)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,2,REASON_EFFECT)
end
\ No newline at end of file
......@@ -22,14 +22,14 @@ function c50252.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST)
end
function c50252.btg(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
and Duel.IsPlayerCanSpecialSummonMonster(tp,50652,0x250,0x4011,0,1600,1,RACE_PLANT,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c50252.bop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,50652,0x250,0x4011,0,1600,1,RACE_PLANT,ATTRIBUTE_WIND) then return end
if Duel.GetMZoneCount(tp)<0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,50652,0x250,0x4011,0,1600,1,RACE_PLANT,ATTRIBUTE_WIND) then return end
local token = Duel.CreateToken(tp,50652)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -21,12 +21,12 @@ function c51106.initial_effect(c)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetProperty(EFFECT_FLAG_REPEAT)
e4:SetRange(LOCATION_PZONE)
e4:SetCountLimit(1,5110601+EFFECT_COUNT_CODE_DUEL)
--e4:SetCountLimit(1,5110601+EFFECT_COUNT_CODE_DUEL)
e4:SetCondition(c51106.thcon3)
e4:SetTarget(c51106.thtg3)
e4:SetOperation(c51106.thop3)
c:RegisterEffect(e4)
end
end
function c51106.filter(c)
return c:IsSetCard(0x511) and c:IsAbleToHand() and c:IsFaceup() and c:GetCode()~=51106
end
......
--摇曳的礼物
function c51208.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(51208,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c51208.target)
e1:SetOperation(c51208.activate)
c:RegisterEffect(e1)
end
function c51208.thfilter1(c)
return c:IsSetCard(0x511) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c51208.thfilter2(c)
return c:IsCode(51107) and c:IsAbleToHand()
end
function c51208.thfilter3(c,e,tp)
return c:IsSetCard(0x511) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c51208.thfilter4(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c51208.target(e,tp,eg,ep,ev,re,r,rp,chk)
local off=1
local ops={}
local opval={}
if Duel.IsExistingMatchingCard(c51208.thfilter1,tp,LOCATION_DECK,0,1,nil) then
ops[off]=aux.Stringid(51208,1)
opval[off]=1
off=off+1
end
if Duel.IsExistingMatchingCard(c51208.thfilter2,tp,LOCATION_DECK,0,1,nil) then
ops[off]=aux.Stringid(51208,2)
opval[off]=2
off=off+1
end
if Duel.IsExistingMatchingCard(c51208.thfilter3,tp,LOCATION_PZONE,0,1,nil,e,tp) then
ops[off]=aux.Stringid(51208,3)
opval[off]=3
off=off+1
end
if Duel.IsExistingMatchingCard(c51208.thfilter4,tp,0,LOCATION_MZONE,1,nil) then
ops[off]=aux.Stringid(51208,4)
opval[off]=4
off=off+1
end
local Max=Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_PZONE,0,nil,0x511)
if chk==0 then return off>1 and Max>=1 end
local sel=Duel.SelectOption(tp,table.unpack(ops))+1
local op=opval[sel]
table.remove(ops,sel)
table.remove(opval,sel)
if off>2 and Max>=2 then
sel=Duel.SelectOption(tp,table.unpack(ops))+1
op=op+(opval[sel]<<4)
end
e:SetLabel(op)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,3,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_PZONE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_MZONE)
end
function c51208.activate(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
local op1=op&0xf
local op2=op>>4
if op1==1 or op2==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c51208.thfilter1,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
if op1==2 or op2==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c51208.thfilter2,tp,LOCATION_DECK,0,1,2,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
if op1==3 or op2==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c51208.thfilter3,tp,LOCATION_PZONE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.BreakEffect()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
if op1==4 or op2==4 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c51208.thfilter4,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
local rc=g:GetFirst()
Duel.HintSelection(g)
Duel.BreakEffect()
if Duel.Remove(rc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
rc:RegisterFlagEffect(51208,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(rc)
e1:SetCountLimit(1)
e1:SetCondition(c51208.retcon)
e1:SetOperation(c51208.retop)
Duel.RegisterEffect(e1,tp)
end
end
end
end
function c51208.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetFlagEffect(51208)~=0
end
function c51208.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
......@@ -13,6 +13,7 @@ function cCardno.initial_effect(c)
e9:SetCategory(CATEGORY_SPECIAL_SUMMON)
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e9:SetCode(EVENT_SPSUMMON_SUCCESS)
e9:SetProperty(EFFECT_FLAG_DELAY)
e9:SetCondition(cCardno.fdcon)
e9:SetCost(cCardno.fdcost)
e9:SetTarget(cCardno.fdtg)
......
......@@ -32,8 +32,8 @@ function cCardno.rfilter(c)
return c:IsLevel(2) and c:IsSetCard(0x208)
end
function cCardno.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cCardno.rfilter,1,REASON_COST,true,nil) end
local g=Duel.SelectReleaseGroupEx(tp,cCardno.rfilter,1,1,REASON_COST,true,nil)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cCardno.rfilter,1,nil) end
local g=Duel.SelectReleaseGroupEx(tp,cCardno.rfilter,1,1,nil)
local rc=g:GetFirst()
Duel.SetTargetCard(rc)
Duel.Release(rc,REASON_COST)
......
--雷云妖雾✿
require "expansions/script/nef/darksyn"
local Cardno=74561065
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
DS.DarkTunerLimit(c)
--summon,flip,special
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(cCardno.retreg)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_SPSUMMON_PROC)
e4:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e4:SetTargetRange(POS_FACEUP,0)
e4:SetRange(LOCATION_HAND)
e4:SetCondition(cCardno.spcon)
e4:SetCountLimit(1,Cardno)
e4:SetOperation(cCardno.spop)
c:RegisterEffect(e4)
--token
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(Cardno,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCost(cCardno.tkcost)
e5:SetTarget(cCardno.tktg)
e5:SetOperation(cCardno.tkop)
c:RegisterEffect(e5)
end
--token
function cCardno.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,nil,1,1,REASON_COST,nil)
end
function cCardno.spellfilter(c,e,tp)
return c:IsSetCard(0x201) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0x201,0x11,500,0,1,RACE_WARRIOR,ATTRIBUTE_LIGHT,POS_FACEUP)
end
function cCardno.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(cCardno.spellfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cCardno.tkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMZoneCount(tp)<1 then return end
local g=Duel.GetMatchingGroup(cCardno.spellfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tg=sg:GetFirst()
if tg then
tg:AddMonsterAttribute(TYPE_EFFECT+TYPE_SPIRIT,ATTRIBUTE_LIGHT,RACE_WARRIOR,1,500,0)
Duel.SpecialSummon(tg,0,tp,tp,true,false,POS_FACEUP)
end
Duel.BreakEffect()
if c:IsLocation(LOCATION_MZONE) and Duel.SelectYesNo(tp,aux.Stringid(Cardno,1)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
--special summon
function cCardno.spfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_SPIRIT) and c:IsReleasable()
end
function cCardno.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
end
function cCardno.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cCardno.spfilter,c:GetControler(),LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
--
function cCardno.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(aux.Stringid(20257,2))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_REPEAT)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e1:SetCondition(cCardno.retcon)
e1:SetTarget(cCardno.rettg)
e1:SetOperation(cCardno.retop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
c:RegisterEffect(e2)
end
function cCardno.retcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsHasEffect(EFFECT_SPIRIT_DONOT_RETURN) then return false end
if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then
return not c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN)
else return c:IsHasEffect(EFFECT_SPIRIT_MAYNOT_RETURN) end
end
function cCardno.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cCardno.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--芙兰朵露✿伯恩斯坦
require "expansions/script/nef/darksyn"
local Cardno=74561068
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
DS.DarkTunerLimit(c)
--Race
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EFFECT_ADD_RACE)
e0:SetRange(LOCATION_MZONE)
e0:SetValue(RACE_FIEND)
c:RegisterEffect(e0)
--SpecialSummon success
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_DUEL)
e1:SetOperation(cCardno.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e2)
--banyun
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(Cardno,11))
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,Cardno+1)
e3:SetTarget(cCardno.bytg)
e3:SetOperation(cCardno.byop)
c:RegisterEffect(e3)
end
--banyun
function cCardno.bytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(cCardno.byfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cCardno.byfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function cCardno.byfilter(c)
local left=Duel.GetFieldCard(c:GetControler(),LOCATION_MZONE,0)
local right=Duel.GetFieldCard(c:GetControler(),LOCATION_MZONE,4)
return not(left and right)
end
function cCardno.sfilter1(c)
return c:IsCode(74561071,74561072) and c:IsAbleToHand()
end
function cCardno.sfilter2(c)
local code = c:GetOriginalCode()
local mt = _G["c" .. code]
return mt and mt.DescSetName == 0xa3 and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToHand()
end
function cCardno.byop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local left=Duel.GetFieldCard(tc:GetControler(),LOCATION_MZONE,0)
local right=Duel.GetFieldCard(tc:GetControler(),LOCATION_MZONE,4)
if left and right then return end
if left then Duel.MoveSequence(tc,4)
elseif right then Duel.MoveSequence(tc,0)
else
if Duel.SelectOption(tp,aux.Stringid(Cardno,11),aux.Stringid(Cardno,12))==0 then Duel.MoveSequence(tc,0) else Duel.MoveSequence(tc,4) end
end
Duel.BreakEffect()
if tc:GetControler() ~= tp then
Duel.Destroy(tc,REASON_EFFECT)
if Duel.IsExistingMatchingCard(cCardno.sfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) then
local g=Duel.SelectMatchingCard(tp,cCardno.sfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.IsExistingMatchingCard(cCardno.sfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) then
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT,nil)
local g=Duel.SelectMatchingCard(tp,cCardno.sfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--SpecialSummon success
function cCardno.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_MOVE)
e1:SetCondition(cCardno.klcon)
e1:SetOperation(cCardno.klop)
Duel.RegisterEffect(e1,tp)
end
function cCardno.klfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsLocation(LOCATION_ONFIELD) and not c:IsCode(74561069)
end
function cCardno.klcon(e,tp,eg,ep,ev,re,r,rp)
local num=Nef.PLCounter.Get(tp, Cardno)
return num<10 and eg:IsExists(cCardno.klfilter,1,nil)
end
function cCardno.klop(e,tp,eg,ep,ev,re,r,rp)
Nef.PLCounter.Add(tp, Cardno, 1)
end
--八方搬运✿社长芙兰
require "expansions/script/nef/darksyn"
local Cardno=74561069
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
c:EnableReviveLimit()
--link summon
Nef.AddLinkProcedureWithDesc(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x208),2,6,cCardno.linkfilter,aux.Stringid(Cardno,0))
--dark synchro summon
DS.AddDarkSynchroProcedureWithDesc(c,aux.FilterBoolFunction(Card.IsSetCard,0x815),nil,6,aux.Stringid(Cardno,1))
--Race
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EFFECT_ADD_RACE)
e0:SetRange(LOCATION_MZONE)
e0:SetValue(RACE_FIEND)
c:RegisterEffect(e0)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(cCardno.efilter)
c:RegisterEffect(e1)
--bafang
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(Cardno,2))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(cCardno.bftg)
e2:SetOperation(cCardno.bfop)
c:RegisterEffect(e2)
--zongxiang
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(Cardno,3))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(cCardno.zxtg)
e3:SetOperation(cCardno.zxop)
c:RegisterEffect(e3)
end
--zongxiang
function cCardno.zxtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 end
local c=e:GetHandler()
c:RegisterFlagEffect(Cardno,RESET_CHAIN,0,1)
end
function cCardno.zxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>0 then
local zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
Duel.MoveSequence(c,math.log(zone,2))
Duel.BreakEffect()
local g=c:GetColumnGroup()
local tg=g:Filter(Card.IsControler,c,1-tp)
if tg:GetCount()>0 then
local num=Duel.Destroy(tg,REASON_EFFECT)
Duel.Damage(1-tp,num*500,REASON_EFFECT)
end
local klnum=Nef.PLCounter.Get(tp, 74561068)
if klnum>0 and klnum<10 then Nef.PLCounter.Add(tp, 74561068, 1) end
end
end
--bafang
function cCardno.bftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Group.CreateGroup()
g:AddCard(Duel.GetFieldCard(tp,LOCATION_MZONE,0))
g:AddCard(Duel.GetFieldCard(tp,LOCATION_MZONE,4))
g:AddCard(Duel.GetFieldCard(1-tp,LOCATION_MZONE,0))
g:AddCard(Duel.GetFieldCard(1-tp,LOCATION_MZONE,4))
if chk==0 then return g:IsExists(Card.IsAbleToGrave,1,c) end
local tg=g:Filter(Card.IsAbleToGrave,c)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,tg,tg:GetCount(),0,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
c:RegisterFlagEffect(Cardno,RESET_CHAIN,0,1)
end
function cCardno.bfop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local seq=c:GetSequence()
local zone=math.ldexp(1,seq)
local tempzone=0
local left1=Duel.GetFieldCard(tp,LOCATION_MZONE,0)
if left1 then
if left1~=c and Duel.SendtoGrave(left1,REASON_EFFECT) then
Duel.Damage(1-tp,500,REASON_EFFECT)
Duel.MoveSequence(c,0)
tempzone=0x1
end
else
tempzone=0x1
Duel.MoveSequence(c,0)
end
Duel.BreakEffect()
Duel.Hint(HINT_CARD,0,Cardno)
local right1=Duel.GetFieldCard(tp,LOCATION_MZONE,4)
if right1 then
if right1~=c and Duel.SendtoGrave(right1,REASON_EFFECT) then
Duel.Damage(1-tp,500,REASON_EFFECT)
Duel.MoveSequence(c,4)
tempzone=0x10
end
else
tempzone=0x10
Duel.MoveSequence(c,4)
end
Duel.BreakEffect()
Duel.Hint(HINT_CARD,0,Cardno)
local left2=Duel.GetFieldCard(1-tp,LOCATION_MZONE,4)
if left2 then
if left2~=c and Duel.SendtoGrave(left2,REASON_EFFECT) then
Duel.Damage(1-tp,500,REASON_EFFECT)
Duel.GetControl(c,1-tp,0,0,0x10) end
else
Duel.GetControl(c,1-tp,0,0,0x10)
end
Duel.BreakEffect()
Duel.Hint(HINT_CARD,0,Cardno)
local right2=Duel.GetFieldCard(1-tp,LOCATION_MZONE,0)
if right2 then
if right2~=c and Duel.SendtoGrave(right2,REASON_EFFECT) then
Duel.Damage(1-tp,500,REASON_EFFECT)
Duel.MoveSequence(c,0) end
else
Duel.MoveSequence(c,0)
end
Duel.Hint(HINT_CARD,0,Cardno)
if seq<5 then
Duel.GetControl(c,tp,0,0,zone)
else
if tempzone~=0 then Duel.GetControl(c,tp,0,0,tempzone)
else Duel.GetControl(c,tp) end
Duel.MoveSequence(c,seq)
end
local klnum=Nef.PLCounter.Get(tp, 74561068)
if klnum>0 and klnum<10 then Nef.PLCounter.Add(tp, 74561068, 1) end
end
--immune
function cCardno.efilter(e,te)
return e:GetHandler():GetFlagEffect(Cardno)>0 and te:GetHandler()~=e:GetHandler()
end
--link summon
function cCardno.linkfilter(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x813)
end
\ No newline at end of file
......@@ -5,7 +5,7 @@ function cCardno.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(Cardno,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......
--必杀『灭族切割』
local Cardno=74561072
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(Cardno,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cCardno.target)
e1:SetOperation(cCardno.activate)
c:RegisterEffect(e1)
end
--Activate
function cCardno.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(Cardno,0))
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+EVENT_CHAIN_END)
e1:SetValue(cCardno.efilter)
tc:RegisterEffect(e1,true)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300)
end
function cCardno.efilter(e,te)
return te:GetHandler()~=e:GetHandler()
end
function cCardno.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local num=Nef.PLCounter.Get(tp, 74561068)
local lp=Duel.GetLP(1-tp)
local dmg=lp*num/10
Duel.Damage(1-tp,dmg,REASON_EFFECT)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetTargetRange(1,0)
e3:SetValue(0)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,1-tp)
end
\ No newline at end of file
......@@ -89,24 +89,24 @@ function cCardno.spfilter(c,e,tp)
return c:IsSetCard(0x298) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cCardno.detg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local flag1 = Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
local flag1 = Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0
local flag2 = Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0
if chk==0 then return flag2 end
if flag1 then Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetFieldGroup(tp,LOCATION_MZONE,0),Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0),tp,LOCATION_MZONE) end
if flag2 then Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cCardno.deop(e,tp,eg,ep,ev,re,r,rp)
local flag1 = Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
local flag2 = Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0
if flag1 then
local g1=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
Duel.Destroy(g1,REASON_EFFECT)
end
if flag2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,cCardno.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
end
local flag1 = Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0
if flag1 then
local g1=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Destroy(g1,REASON_EFFECT)
end
end
--SPSUMMON_SUCCESS
function cCardno.sscon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -23,7 +23,7 @@ function cCardno.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
local ctp=tc:GetControler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPTION)
sel=Duel.SelectOption(tp,aux.Stringid(Cardno,0),aux.Stringid(Cardno,1))
sel=Duel.SelectOption(ctp,aux.Stringid(Cardno,0),aux.Stringid(Cardno,1))
local rec=tc:GetAttack()
if sel==1 then rec=tc:GetDefense() end
Duel.Release(tc,REASON_EFFECT)
......
......@@ -31,7 +31,7 @@ function c74563034.initial_effect(c)
--syn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_EXTRA_SYNCHRO_MATERIAL)
e2:SetCode(EFFECT_SYNCHRO_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
......@@ -72,7 +72,7 @@ function c74563034.slevel(e,c)
end
function c74563034.mtval(e,c)
if not c then return false end
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsControler(e:GetOwnerPlayer())
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c74563034.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -32,7 +32,7 @@ function c74563666.initial_effect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_REMOVED)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN+EFFECT_FLAG_UNCOPYABLE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_UNCOPYABLE)
e5:SetCondition(c74563666.con)
e5:SetOperation(c74563666.sprop1)
c:RegisterEffect(e5)
......
......@@ -77,6 +77,13 @@ function c86379005.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c86379005.eqlimit)
e1:SetLabelObject(sc)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetRange(LOCATION_SZONE)
e2:SetReset(RESET_EVENT+0x1fc0000)
tc:RegisterEffect(e2)
end
end
end
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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