Commit 083ff8e2 authored by Huangnan's avatar Huangnan

fix

parent 60b56db5
No preview for this file type
......@@ -38,8 +38,7 @@ function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) then
local og=Duel.GetOperatedGroup():Filter(cm.spfilter,nil,e,tp)
if #og<=0 then return end
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
......@@ -68,8 +67,8 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
end
Duel.SpecialSummonComplete()
local cg=spg:Filter(Card.IsFacedown,nil)
if #cg>0 then
Duel.ConfirmCards(1-tp,g)
if #cg>0 and cg:GetFirst():IsLocation(LOCATION_MZONE) then
Duel.ConfirmCards(1-tp,cg)
end
end
end
......
--妮蒂亚
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_QUICK_O)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e0:SetRange(LOCATION_HAND)
e0:SetCountLimit(1,id)
e0:SetCost(s.cost)
e0:SetOperation(s.operation)
c:RegisterEffect(e0)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
......@@ -17,18 +17,18 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetOperation(s.adjustop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,true)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_ADJUST)
e0:SetOperation(s.adjustop)
e0:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e0,true)
end
function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local ct=g:GetCount()-6
local g1=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local ct=g1:GetCount()-6
if ct>0 then
local sg=g:RandomSelect(1-tp,ct)
Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
local g2=g1:RandomSelect(1-tp,ct)
Duel.SendtoDeck(g2,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
\ No newline at end of file
--栖夜莉丝
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_QUICK_O)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e0:SetRange(LOCATION_HAND)
e0:SetCountLimit(1,id)
e0:SetCost(s.cost)
e0:SetOperation(s.operation)
c:RegisterEffect(e0)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
......@@ -23,76 +23,79 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
if opt==2 then ct=TYPE_XYZ end
if opt==3 then ct=TYPE_LINK end
local c=e:GetHandler()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetLabel(ct)
e0:SetCondition(s.con1)
e0:SetOperation(s.op1)
e0:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e0,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetLabel(ct)
e1:SetCondition(s.regcon)
e1:SetOperation(s.regop)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCode(EVENT_PREDRAW)
e1:SetCountLimit(1)
e1:SetCondition(s.con2)
e1:SetOperation(s.op2)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PREDRAW)
e2:SetCountLimit(1)
e2:SetCondition(s.spcon)
e2:SetOperation(s.spop)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
function s.filter(c,sp,tpe)
return c:IsSummonPlayer(sp) and c:IsType(tpe)
end
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
function s.con1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.filter,1,nil,1-tp,e:GetLabel())
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_EXTRA,nil,e:GetLabel())
if g:GetCount()>0 then
local rg=g:RandomSelect(1-tp,2)
local tc=rg:GetFirst()
function s.op1(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_EXTRA,nil,e:GetLabel())
if g1:GetCount()>0 then
local g2=g1:RandomSelect(1-tp,2)
local tc=g2:GetFirst()
while tc do
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
tc=rg:GetNext()
local c=e:GetHandler()
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e0)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
tc=g2:GetNext()
end
end
end
function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:GetFlagEffect(id)>0
end
function s.spfilter2(c)
function s.spfilter1(c)
return c:GetFlagEffect(id)>0
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
function s.spfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:GetFlagEffect(id)>0
end
function s.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,0,LOCATION_EXTRA,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.spfilter1,tp,0,LOCATION_EXTRA,1,nil,e,tp)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
function s.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_CARD,0,id)
local sg=Duel.GetMatchingGroup(s.spfilter2,tp,0,LOCATION_EXTRA,nil)
if sg:GetCount()>0 then
Duel.ConfirmCards(tp,sg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,0,LOCATION_EXTRA,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
Duel.Hint(HINT_CARD,0,id)
local g1=Duel.GetMatchingGroup(s.spfilter1,tp,0,LOCATION_EXTRA,nil)
if g1:GetCount()>0 then
Duel.ConfirmCards(tp,g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,s.spfilter2,tp,0,LOCATION_EXTRA,1,1,nil,e,tp)
if g2:GetCount()>0 then
Duel.SpecialSummon(g2,0,tp,tp,true,false,POS_FACEUP)
Duel.ShuffleExtra(1-tp)
local rg=Duel.GetMatchingGroup(s.spfilter2,tp,0,LOCATION_EXTRA,nil)
if rg:GetCount()>0 then
for tc in aux.Next(rg) do
tc:ResetFlagEffect(id)
end
end
end
end
end
s.skipop(e,tp)
end
function s.skipop(e,tp)
local g1=Duel.GetMatchingGroup(s.spfilter1,tp,0,LOCATION_EXTRA,nil)
if g1:GetCount()>0 then
for tc in aux.Next(g1) do
tc:ResetFlagEffect(id)
end
end
end
\ No newline at end of file
......@@ -82,7 +82,7 @@ end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.RegisterFlagEffect(tp,18700806,RESET_CHAIN,0,1)
Duel.RegisterFlagEffect(tp,18700806,0,0,1)
if re:GetHandler():IsDestructable() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
......@@ -122,7 +122,7 @@ function cm.mvcost(e,tp,eg,ep,ev,re,r,rp,chk)
else
e:SetLabel(0)
end
Duel.RegisterFlagEffect(tp,18700806,RESET_CHAIN,0,1)
Duel.RegisterFlagEffect(tp,18700806,0,0,1)
end
function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -71,7 +71,7 @@ end
-- Effect 2 functions --
function s.xyzfilter(c,tp)
return c:IsSetCard(0x694) and c:IsType(TYPE_XYZ) and c:IsSummonPlayer(tp) and c:GetOverlayGroup():Filter(s.mfilter,nil)
return c:IsSetCard(0x694) and c:IsType(TYPE_XYZ) and c:IsSummonPlayer(tp) and c:GetOverlayGroup():Filter(s.mfilter,nil):GetCount()>0
end
function s.mfilter(c)
return c:IsSetCard(0x694) and c:IsType(TYPE_MONSTER)
......
......@@ -48,9 +48,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
-- Operation function
function s.operation(e,tp)
function s.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local tc =e:GetLabelObject()
if (not tc:IsRelateToEffect(e)) or Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0)==0 then return end
if not tc:IsRelateToEffect(re) then return end
if not Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0)==0 then return end
if not Duel.SelectYesNo(tp,aux.Stringid(id,1)) then return end
Duel.BreakEffect()
if tc:IsPosition(POS_FACEUP_ATTACK) then
......@@ -86,7 +87,7 @@ function s.operation(e,tp)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetDescription(aux.Stringid(id,2))
e3:SetType(EFFECT_TYPE_FIELD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......
......@@ -86,6 +86,5 @@ function s.setop(e,tp)
end
function s.actcon(e)
Debug.Message(Duel.GetCurrentChain())
return Duel.GetCurrentChain()>=2
end
......@@ -15,9 +15,9 @@ function s.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(2)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
--e2:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN)
--e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetType(EFFECT_TYPE_IGNITION)
--e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_HAND)
--e3:SetCountLimit(1,id)
e3:SetCost(aux.bfgcost)
......
......@@ -21,6 +21,9 @@ function cm.initial_effect(c)
e2:SetTargetRange(1,1)
e2:SetTarget(s.sp)
c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
......
......@@ -42,6 +42,7 @@ function s.initial_effect(c)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(66)
e2:SetTarget(s.desreptg)
e2:SetOperation(s.desrepop)
c:RegisterEffect(e2)
......@@ -143,7 +144,7 @@ function s.chk(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.mfilter1(c,e,tp)
return c:IsLevel(10) and c:IsType(TYPE_SYNCHRO)
return c:IsLevel(10) and c:IsType(TYPE_SYNCHRO) and e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.mfilter2(c)
return not c:IsForbidden() and c:IsCode(5012730) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
......
......@@ -47,7 +47,7 @@ function cm.initial_effect(c)
end
--recover
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,Card.IsSetCard,1,REASON_COST,true,e:GetHandler(),0xef1) end
......
......@@ -116,12 +116,12 @@ function cm.mfilter(c)
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 e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)==0 then return end
if c:IsType(TYPE_XYZ)
and Duel.GetMatchingGroupCount(aux.NecroValleyFilter(cm.mfilter),tp,LOCATION_GRAVE,0,nil)>0
and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
......
......@@ -61,7 +61,7 @@ function cm.spdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=Duel.GetAttacker()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
if not Duel.GetFieldCard(tp,LOCATION_PZONE,0) and not Duel.GetFieldCard(tp,LOCATION_PZONE,1) then
Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,0,0)
......@@ -70,7 +70,7 @@ end
function cm.spdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetAttacker()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)==0 then return end
if tc and tc:IsRelateToBattle()
and not Duel.GetFieldCard(tp,LOCATION_PZONE,0) and not Duel.GetFieldCard(tp,LOCATION_PZONE,1)
and tc:IsControler(1-tp) and tc:IsFaceup()
......
......@@ -72,7 +72,7 @@ function cm.thfilter(c)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
......@@ -83,7 +83,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and c:IsRelateToEffect(e) then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
Duel.ResetFlagEffect(tp,m)
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -73,14 +73,14 @@ function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.tgtg(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
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2400)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
Duel.BreakEffect()
Duel.Recover(tp,2400,REASON_EFFECT)
end
......
......@@ -71,12 +71,12 @@ end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
......
......@@ -60,9 +60,9 @@ function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -122,7 +122,7 @@ function cm.adesop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(eg,REASON_EFFECT)
end
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
end
--handes
......
......@@ -70,7 +70,7 @@ end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.disfilter,tp,LOCATION_EXTRA,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
local sg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
......@@ -82,7 +82,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.disfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.HintSelection(g)
if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then
if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) end
if Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.BreakEffect()
......
......@@ -79,14 +79,14 @@ function cm.thfilter(c)
end
function cm.tgtg(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
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -55,13 +55,13 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
end
--pendulum set
......
......@@ -13,7 +13,7 @@ function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)--回手卡效果+检索卡组效果+含特殊召唤效果
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)--回手卡效果+检索卡组效果+含特殊召唤效果
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)--场上所有卡状态变化时触发+诱发选发效果
e1:SetCode(EVENT_ATTACK_ANNOUNCE)--攻击宣言时
e1:SetRange(LOCATION_PZONE)--灵摆区域
......@@ -35,9 +35,9 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCategory(CATEGORY_ATKCHANGE)--改变攻击效果
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)--自己状态变化时触发+诱发必发效果
e3:SetCode(EVENT_SPSUMMON_SUCCESS)--特殊召唤成功时
e3:SetTarget(cm.atktg)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
......@@ -52,7 +52,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end
if Duel.NegateAttack() then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
end
--pendulum set
......
......@@ -123,14 +123,14 @@ end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
local sg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) end
local sg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
......
......@@ -78,12 +78,12 @@ function cm.mfilter(c)
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 e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)==0 then return end
if c:IsType(TYPE_XYZ)
and Duel.GetMatchingGroupCount(aux.NecroValleyFilter(cm.mfilter),tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)>0
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
......
......@@ -117,14 +117,14 @@ function cm.filter(c,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,tp) then
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
Duel.BreakEffect()
Duel.Overlay(c,g)
end
......
......@@ -84,7 +84,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
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 e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 or Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>=5 end
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 or Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>=5 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
......@@ -101,7 +101,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
ac=Duel.AnnounceNumber(tp,table.unpack(t))
end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
Duel.BreakEffect()
Duel.SortDecktop(tp,tp,ac)
......
......@@ -119,13 +119,13 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
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 e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
......
......@@ -111,14 +111,14 @@ end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,nil) end
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,nil) end
local ct=Duel.GetMatchingGroup(cm.dfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,nil):GetClassCount(Card.GetCode)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) end
local ct=Duel.GetMatchingGroup(cm.dfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,nil):GetClassCount(Card.GetCode)
if ct>0 then
Duel.BreakEffect()
......
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