Commit 652d6e22 authored by Nemo Ma's avatar Nemo Ma

fix

parent f9a6e611
......@@ -5,6 +5,7 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetSPSummonOnce(m)
aux.AddSynchroProcedure(c,cm.tfilter,cm.ntfilter,1)
c:EnableReviveLimit()
--twist synchro
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
......@@ -195,22 +196,33 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:KeepAlive()
cm[0]=g
cm[1]=e
local _GetReasonCard=Card.GetReasonCard
function Card.GetReasonCard(gc)
local res=_GetReasonCard(gc)
local ref=c:GetReasonEffect()
if res==c and ref and ref:GetCode()==EFFECT_SPSUMMON_PROC_G then return bc end
return res
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetLabelObject(g)
e1:SetCountLimit(1)
e1:SetOperation(cm.adjustop2)
Duel.RegisterEffect(e1,tp)
end
end
function cm.adjustop2(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(cm[0],EVENT_BE_MATERIAL,cm[1],REASON_SYNCHRO,tp,tp,0)
for tc in aux.Next(cm[0]) do
Duel.RaiseSingleEvent(tc,EVENT_BE_MATERIAL,cm[1],REASON_SYNCHRO,tp,tp,0)
for tc in aux.Next(eg) do
tc:CompleteProcedure()
end
local g=e:GetLabelObject()
Duel.RaiseEvent(g,EVENT_BE_MATERIAL,nil,REASON_SYNCHRO,tp,tp,0)
for tc in aux.Next(g) do
Duel.RaiseSingleEvent(tc,EVENT_BE_MATERIAL,nil,REASON_SYNCHRO,tp,tp,0)
end
g:DeleteGroup()
end
function cm.sycon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
......
......@@ -2,6 +2,7 @@ local m=25000098
local cm=_G["c"..m]
cm.name="真爆裂模式"
function cm.initial_effect(c)
aux.EnableExtraDeckSummonCountLimit()
aux.AddCodeList(c,80280737)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
......@@ -2,27 +2,26 @@
local m=30005016
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--link summon
aux.AddLinkProcedure(c,cm.matfilter,2,4)
--cannot remove
c:EnableReviveLimit()
--link summon
aux.AddLinkProcedure(c,cm.matfilter,2,4)
--cannot remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
c:RegisterEffect(e2)
--destroy replace
--destroy replace
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(cm.desreptg)
e1:SetValue(cm.desrepval)
e1:SetOperation(cm.desrepop)
c:RegisterEffect(e1)
--activate
--activate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......@@ -87,11 +86,12 @@ function cm.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.actfilter,tp,LOCATION_GRAVE,0,1,nil) end
end
function cm.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.actfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.actfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
......@@ -9,7 +9,7 @@ end
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
......@@ -18,7 +18,6 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(cm.setcost)
......@@ -30,59 +29,46 @@ function cm.cost(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,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.tgfilter1(c)
function cm.filter1(c)
return cm.Diablotherhood(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function cm.spfilter(c,e,tp)
function cm.filter2(c,e,tp)
return cm.Diablotherhood(c) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.dfilter(c)
return c:IsFaceup() and c:IsCode(40010230)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0
local b2=Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil)
--local b2=true
if chk==0 then return b2 end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end
local op=0
if b1 then
if b1 and b2 then
if (Duel.GetFlagEffect(tp,40009560)>0 or Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_MZONE,0,1,nil)) then
op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1),aux.Stringid(m,2))
else
op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
end
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(m,0))
else
op=Duel.SelectOption(tp,aux.Stringid(m,1))+1
end
e:SetLabel(op)
if op~=0 then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
--Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_DECK)
if op==1 then
e:SetCategory(CATEGORY_TOGRAVE)
else
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_DECK)
end
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_DECK)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
local res=0
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if op~=1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 then
local tg=g:Select(tp,1,1,nil)
res=Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
if op~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
if op~=0 then
local g1=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local g1=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
if op==2 and res~=0 then Duel.BreakEffect() end
Duel.SendtoGrave(g1,REASON_EFFECT)
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
end
end
......
......@@ -6,29 +6,39 @@ function cm.initial_effect(c)
SNNM.GreatCircle(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(cm.inmop)
e3:SetOperation(cm.inmop1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetLabelObject(e3)
e4:SetOperation(cm.inmop2)
c:RegisterEffect(e4)
end
cm[0]=0
function cm.inmop(e,tp,eg,ep,ev,re,r,rp)
function cm.inmop1(e,tp,eg,ep,ev,re,r,rp)
if rp==tp then return end
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.IsSetCard,0x3531))
e1:SetValue(cm.efilter)
e1:SetLabelObject(re)
e1:SetReset(RESET_EVENT+RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
e:SetLabelObject(e1)
end
function cm.inmop2(e,tp,eg,ep,ev,re,r,rp)
if rp==tp then return end
local cg=Duel.GetMatchingGroup(nil,tp,LOCATION_GRAVE,0,nil)
local g,id=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS,CHAININFO_CHAIN_ID)
if #cg>0 and not cg:IsExists(function(c)return not c:IsSetCard(0x3531)end,1,nil) and rp==1-tp and id~=cm[0] and ((not g) or (not g:IsExists(function(c,tp)return c:IsControler(tp) and c:IsOnField()end,1,nil,tp))) and Duel.IsPlayerCanDiscardDeck(tp,1) then
if #cg>0 and not cg:IsExists(function(c)return not c:IsSetCard(0x3531)end,1,nil) and id~=cm[0] and ((not g) or (not g:IsExists(function(c,tp)return c:IsControler(tp) and c:IsOnField()end,1,nil,tp))) and Duel.IsPlayerCanDiscardDeck(tp,1) then
cm[0]=id
Duel.Hint(HINT_CARD,0,m)
Duel.DiscardDeck(tp,1,REASON_EFFECT)
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.IsSetCard,0x3531))
e1:SetValue(cm.efilter)
e1:SetLabelObject(re)
e1:SetReset(RESET_EVENT+RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
end
else e:GetLabelObject():GetLabelObject():Reset() end
end
function cm.efilter(e,re)
return re==e:GetLabelObject()
......
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