Commit e9d923c5 authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:alstroemeria-silentlove/ygopro-222DIY-cards

parents 114c8f49 1697645e
No preview for this file type
......@@ -48,14 +48,14 @@ function c11200031.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c11200031.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200031.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c11200031.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c11200031.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11200031,0))
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local g=Duel.SelectMatchingCard(tp,c11200031.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
local g=Duel.SelectMatchingCard(tp,c11200031.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
Duel.ResetFlagEffect(tp,15248873)
local tc=g:GetFirst()
if tc then
......
......@@ -34,7 +34,7 @@ function c1156012.con1(e,tp,eg,ep,ev,re,r,rp)
end
--
function c1156012.tfilter1(c)
return c:IsAbleToGrave() and c:IsType(TYPE_MONSTER) and not (c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_ZOMBIE))
return c:IsAbleToGrave() and c:IsType(TYPE_MONSTER) and not c:IsAttribute(ATTRIBUTE_WATER)
end
function c1156012.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -2,7 +2,7 @@
function c12031011.initial_effect(c)
c:SetSPSummonOnce(12031011)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2,c12031011.ovfilter,aux.Stringid(12031011,0))
aux.AddXyzProcedure(c,c12031011.ovfilter1,4,4,c12031011.ovfilter,aux.Stringid(12031011,0))
c:EnableReviveLimit()
--effect
local e1=Effect.CreateEffect(c)
......@@ -47,6 +47,9 @@ end
function c12031011.ovfilter(c)
return c:IsFaceup() and c:IsCode(12031000)
end
function c12031011.ovfilter1(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK)
end
function c12031011.discon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
......
......@@ -27,7 +27,7 @@ function c26801005.filter(c,e,tp,m)
return m:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
end
function c26801005.matfilter(c)
return bit.band(c:GetType(),0x81)~=0x81 and c:IsAbleToGrave()
return bit.band(c:GetType(),0x81)==0x81 and c:IsAbleToGrave()
end
function c26801005.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......
......@@ -70,33 +70,6 @@ function c26807032.initial_effect(c)
e6:SetTarget(c26807032.tdtg)
e6:SetOperation(c26807032.tdop)
c:RegisterEffect(e6)
if scard.counter==nil then
scard.counter=true
scard[0]=0
scard[1]=0
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ea:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ea:SetOperation(scard.resetcount)
Duel.RegisterEffect(ea,0)
local eb=Effect.CreateEffect(c)
eb:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
eb:SetCode(EVENT_RELEASE)
eb:SetOperation(scard.addcount)
Duel.RegisterEffect(eb,0)
end
end
function scard.resetcount(e,tp,eg,ep,ev,re,r,rp)
scard[0]=0
scard[1]=0
end
function scard.addcount(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
local p=tc:GetReasonPlayer()
scard[p]=scard[p]+1
tc=eg:GetNext()
end
end
function c26807032.cfilter(c,tp)
return c:GetOwner()==1-tp and c:IsAbleToRemoveAsCost()
......
......@@ -32,7 +32,7 @@ function c30556807.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
-- Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
......
......@@ -26,8 +26,11 @@ function c33400257.refilter(c)
return (c:IsSetCard(0x341) or c:IsSetCard(0x340)) and c:IsReleasable()
end
function c33400257.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33400257.refilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) and Duel.IsExistingMatchingCard(c33400257.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local g=Duel.SelectMatchingCard(tp,c33400257.refilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local loc=LOCATION_ONFIELD
if ft==0 then loc=LOCATION_MZONE end
if chk==0 then return Duel.IsExistingMatchingCard(c33400257.refilter,tp,loc,0,1,e:GetHandler(),e,tp) and Duel.IsExistingMatchingCard(c33400257.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local g=Duel.SelectMatchingCard(tp,c33400257.refilter,tp,loc,0,1,1,e:GetHandler())
Duel.Release(g,REASON_COST)
end
function c33400257.filter(c,e,tp)
......
......@@ -95,6 +95,7 @@ function c47535020.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c47535020.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c47535020.scfilter,tp,LOCATION_EXTRA,0,nil,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -32,9 +32,9 @@ function c65071106.initial_effect(c)
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_COUNTER)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetTarget(c65071106.contg)
e5:SetOperation(c65071106.conop)
c:RegisterEffect(e5)
--tograve
......@@ -64,21 +64,18 @@ function c65071106.eqop(e,tp,eg,ep,ev,re,r,rp)
end
function c65071106.confil(c,e)
return c:GetCounter(0x1da0)==0
end
function c65071106.contg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65071106.confil,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),e) and Duel.IsExistingMatchingCard(c65071106.confil,tp,0,LOCATION_ONFIELD,1,nil,e) end
return c:GetCounter(0x1da0)==0 and c:IsFaceup()
end
function c65071106.conop(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.IsExistingMatchingCard(c65071106.confil,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),e) and Duel.IsExistingMatchingCard(c65071106.confil,tp,0,LOCATION_ONFIELD,1,nil,e)) then return end
if not e:GetHandler():IsRelateToEffect(e) then return end
local g1=Duel.SelectMatchingCard(tp,c65071106.confil,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),e)
Duel.HintSelection(g1)
local g2=Duel.SelectMatchingCard(c65071106.confil,tp,0,LOCATION_ONFIELD,1,1,nil,e)
local g2=Duel.SelectMatchingCard(tp,c65071106.confil,tp,0,LOCATION_ONFIELD,1,1,nil,e)
Duel.HintSelection(g2)
local tc1=g1:GetFirst()
local tc2=g1:GetFirst()
local tc2=g2:GetFirst()
tc1:AddCounter(0x1da0,1)
tc2:AddCounter(0x1da0,1)
end
......
local scard = c77702002
local id = 77702002
local scard=c77702002
local id=77702002
local m=id
local cm=scard
function scard.initial_effect(c)
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(scard.regtg)
e1:SetOperation(function()
Duel.Hint(HINT_MUSIC,0,id*16+math.random(0,1))
end)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetTarget(scard.regtg)
e0:SetOperation(function()
Duel.Hint(HINT_MUSIC,0,id*16+math.random(0,1))
end)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_FZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
--cannot set/activate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SSET)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(1)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.setlimit)
c:RegisterEffect(e2)
--Cannot activate
local e3 = Effect.CreateEffect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_CANNOT_NEGATE)
e3:SetTargetRange(1, 0)
e3:SetValue(scard.efilter)
e3:SetTargetRange(1,0)
e3:SetValue(cm.actlimit)
c:RegisterEffect(e3)
local e3 = Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SSET)
e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_CANNOT_NEGATE)
e3:SetTargetRange(1, 0)
e3:SetValue(function(e,c) return c:IsType(TYPE_FIELD) end)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,m)
e1:SetCost(scard.cost)
e1:SetTarget(scard.target)
e1:SetOperation(scard.activate)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(m*16+2)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_FZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_FZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCountLimit(1,m)
e4:SetCost(scard.cost)
e4:SetTarget(scard.target)
e4:SetOperation(scard.activate)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(m*16+2)
e5:SetCategory(CATEGORY_DRAW)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCountLimit(1)
e5:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
e5:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return scard[tp]>0 and Duel.IsPlayerCanDraw(tp,scard[tp]) end
local ct=scard[tp]
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end)
e1:SetOperation(scard.activate)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(aux.bfgcost)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_RITUAL))
e1:SetValue(function(e,re)
e5:SetOperation(scard.activate)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_GRAVE)
e6:SetCost(aux.bfgcost)
e6:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local e7=Effect.CreateEffect(e:GetHandler())
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetCode(EFFECT_IMMUNE_EFFECT)
e7:SetTargetRange(LOCATION_MZONE,0)
e7:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_RITUAL))
e7:SetValue(function(e,re)
return e:GetOwner()~=re:GetOwner() and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end)
e1:SetReset(RESET_PHASE+PHASE_MAIN2)
Duel.RegisterEffect(e1,tp)
e7:SetReset(RESET_PHASE+PHASE_MAIN2)
Duel.RegisterEffect(e7,tp)
end)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(m*16+4)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCondition(cm.descon)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
c:RegisterEffect(e6)
--local e8=Effect.CreateEffect(c)
--e8:SetDescription(m*16+4)
--e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
--e8:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
--e8:SetRange(LOCATION_FZONE)
--e8:SetCountLimit(1)
--e8:SetCode(EVENT_PHASE+PHASE_END)
--e8:SetCondition(cm.descon)
--e8:SetOperation(cm.desop)
--c:RegisterEffect(e8)
if scard.counter==nil then
scard.counter=true
scard[0]=0
scard[1]=0
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e2:SetOperation(scard.resetcount)
Duel.RegisterEffect(e2,0)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_RELEASE)
e3:SetOperation(scard.addcount)
Duel.RegisterEffect(e3,0)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e9:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e9:SetOperation(scard.resetcount)
Duel.RegisterEffect(e9,0)
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ea:SetCode(EVENT_RELEASE)
ea:SetOperation(scard.addcount)
Duel.RegisterEffect(ea,0)
end
end
function scard.resetcount(e,tp,eg,ep,ev,re,r,rp)
......@@ -138,48 +138,56 @@ function scard.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function scard.efilter(e, re, tp)
return re:GetHandler():IsType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function scard.regtg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
function scard.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return true
end
local c = e:GetHandler()
local c=e:GetHandler()
--to grave
local e1 = Effect.CreateEffect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(m*16+3)
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE + PHASE_END)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_FZONE)
e1:SetCondition(scard.gycon)
e1:SetOperation(scard.gyop)
e1:SetReset(RESET_EVENT + RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:SetTurnCounter(0)
c:RegisterEffect(e1)
end
function scard.gycon(e, tp, eg, ep, ev, re, r, rp)
return Duel.GetTurnPlayer() == tp
function scard.gycon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function scard.gyop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
local ct = c:GetTurnCounter()
ct = ct + 1
function scard.gyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct == 7 then
Duel.SendtoGrave(c, REASON_RULE)
if ct==3 then
Duel.SendtoGrave(c,REASON_RULE)
else if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(m,5)) then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
else
Duel.SendtoGrave(c,REASON_COST)
end
end
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
--function cm.descon(e,tp,eg,ep,ev,re,r,rp)
--local c=e:GetHandler()
--return Duel.GetTurnPlayer()==tp and
--end
--function cm.desop(e,tp,eg,ep,ev,re,r,rp)
--local c=e:GetHandler()
--Duel.HintSelection(Group.FromCards(c))
--if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(m,5)) then
--Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
--else Duel.SendtoGrave(c,REASON_COST) end
--end
function cm.setlimit(e,c,tp)
return c:IsType(TYPE_FIELD)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.HintSelection(Group.FromCards(c))
if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(m,5)) then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
else Duel.SendtoGrave(c,REASON_COST) end
function cm.actlimit(e,re,tp)
return re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
......@@ -3,13 +3,6 @@ function c81011502.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
--spsummon bgm
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(c81011502.sumcon)
e0:SetOperation(c81011502.sumsuc)
c:RegisterEffect(e0)
--pendulum set
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
......@@ -42,12 +35,6 @@ function c81011502.initial_effect(c)
e4:SetOperation(c81011502.disop)
c:RegisterEffect(e4)
end
function c81011502.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) or e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c81011502.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(81011502,0))
end
function c81011502.penfilter(c)
return c:IsType(TYPE_RITUAL) and not c:IsCode(81011502) and not c:IsForbidden()
end
......
......@@ -76,33 +76,6 @@ function c81014000.initial_effect(c)
e6:SetTarget(c81014000.negtg)
e6:SetOperation(c81014000.negop)
c:RegisterEffect(e6)
if scard.counter==nil then
scard.counter=true
scard[0]=0
scard[1]=0
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e2:SetOperation(scard.resetcount)
Duel.RegisterEffect(e2,0)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_RELEASE)
e3:SetOperation(scard.addcount)
Duel.RegisterEffect(e3,0)
end
end
function scard.resetcount(e,tp,eg,ep,ev,re,r,rp)
scard[0]=0
scard[1]=0
end
function scard.addcount(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
local p=tc:GetReasonPlayer()
scard[p]=scard[p]+1
tc=eg:GetNext()
end
end
function c81014000.setlimit(e,c,tp)
return c:IsType(TYPE_FIELD)
......
......@@ -65,33 +65,6 @@ function c81014034.initial_effect(c)
e5:SetCondition(c81014034.drcon)
e5:SetOperation(c81014034.drop)
c:RegisterEffect(e5)
if scard.counter==nil then
scard.counter=true
scard[0]=0
scard[1]=0
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e2:SetOperation(scard.resetcount)
Duel.RegisterEffect(e2,0)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_RELEASE)
e3:SetOperation(scard.addcount)
Duel.RegisterEffect(e3,0)
end
end
function scard.resetcount(e,tp,eg,ep,ev,re,r,rp)
scard[0]=0
scard[1]=0
end
function scard.addcount(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
local p=tc:GetReasonPlayer()
scard[p]=scard[p]+1
tc=eg:GetNext()
end
end
function c81014034.setlimit(e,c,tp)
return c:IsType(TYPE_FIELD)
......
......@@ -30,9 +30,9 @@ function c81021005.initial_effect(c)
e2:SetCode(EVENT_PAY_LPCOST)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,81021905)
e2:SetCondition(c81021011.tgcon)
e2:SetTarget(c81021011.tdtg)
e2:SetOperation(c81021011.tdop)
e2:SetCondition(c81021005.tgcon)
e2:SetTarget(c81021005.tdtg)
e2:SetOperation(c81021005.tdop)
c:RegisterEffect(e2)
end
function c81021005.matfilter(c)
......@@ -77,16 +77,16 @@ function c81021005.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g1)
end
end
function c81021011.tgcon(e,tp,eg,ep,ev,re,r,rp)
function c81021005.tgcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function c81021011.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
function c81021005.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function c81021011.tdop(e,tp,eg,ep,ev,re,r,rp)
function c81021005.tdop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment