Commit 45233c57 authored by Nemo Ma's avatar Nemo Ma

fix

parent 7330c3bd
...@@ -9,13 +9,13 @@ function cm.filter(c) ...@@ -9,13 +9,13 @@ function cm.filter(c)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp,g,fc) function cm.op(e,tp,eg,ep,ev,re,r,rp,g,fc)
Duel.NegateRelatedChain(fc,RESET_TURN_SET) Duel.NegateRelatedChain(fc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
fc:RegisterEffect(e1) fc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
...@@ -23,7 +23,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp,g,fc) ...@@ -23,7 +23,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp,g,fc)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
fc:RegisterEffect(e2) fc:RegisterEffect(e2)
if fc:IsType(TYPE_TRAPMONSTER) then if fc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
......
...@@ -8,7 +8,7 @@ function cm.filter(c) ...@@ -8,7 +8,7 @@ function cm.filter(c)
return c:IsLocation(LOCATION_MZONE)and c:IsFaceup() return c:IsLocation(LOCATION_MZONE)and c:IsFaceup()
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp,g,fc) function cm.op(e,tp,eg,ep,ev,re,r,rp,g,fc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
......
--奉神天使 基础 --奉神天使 基础
local s,m,o=GetID() local cm,m,o=GetID()
if not pcall(function() require("expansions/script/c20000350") end) then require("script/c20000350") end if not pcall(function() require("expansions/script/c20000350") end) then require("script/c20000350") end
function s.initial_effect(c) function cm.initial_effect(c)
local e = {fu_god.Counter(c,CATEGORY_TODECK,EVENT_TO_HAND,EFFECT_FLAG_DELAY,s.con,s.tg,s.op)} local e = {fu_god.Counter(c,CATEGORY_TODECK,EVENT_TO_HAND,EFFECT_FLAG_DELAY,cm.con,cm.tg,cm.op)}
end end
function s.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DRAW return Duel.GetCurrentPhase()~=PHASE_DRAW
end end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(Card.IsControler,nil,1-tp):Filter(Card.IsPreviousLocation,nil,LOCATION_DECK) local g=eg:Filter(Card.IsControler,nil,1-tp):Filter(Card.IsPreviousLocation,nil,LOCATION_DECK)
if chk==0 then return g:GetCount()>0 end if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0)
end end
function s.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(s.tgf,nil,tp) local g = eg:Filter(Card.IsControler,nil,1-tp):Filter(Card.IsPreviousLocation,nil,LOCATION_DECK)
if g:GetCount()>0 then if #g>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end end
fu_god.Reg(e,m,tp) fu_god.Reg(e,m,tp)
......
...@@ -89,11 +89,12 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -89,11 +89,12 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p1=e:GetHandlerPlayer()
local g=Duel.GetMatchingGroup(cm.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(cm.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
local c=g:GetCount() local c=g:GetCount()
if #g>=3 then c=2 end if #g>=3 then c=2 end
local sg=g:Select(p,1,c,nil) local sg=g:Select(p1,1,c,nil)
Duel.HintSelection(sg) Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
......
--归墟仲裁·沌涡 --归墟仲裁·沌涡
--归墟仲裁·沌涡
if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end if not pcall(function() require("expansions/script/c16199990") end) then require("script/c16199990") end
local m,cm=rk.set(30015100,"Overuins") local m,cm=rk.set(30015100,"Overuins")
function cm.initial_effect(c) function cm.initial_effect(c)
...@@ -59,17 +60,6 @@ function cm.initial_effect(c) ...@@ -59,17 +60,6 @@ function cm.initial_effect(c)
e21:SetTarget(cm.sptg) e21:SetTarget(cm.sptg)
e21:SetOperation(cm.spop) e21:SetOperation(cm.spop)
c:RegisterEffect(e21) c:RegisterEffect(e21)
local e22=Effect.CreateEffect(c)
e22:SetDescription(aux.Stringid(30015500,3))
e22:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SUMMON)
e22:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e22:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e22:SetCode(EVENT_LEAVE_FIELD)
e22:SetLabelObject(e20)
e22:SetCondition(cm.spcon1)
e22:SetTarget(cm.sptg1)
e22:SetOperation(cm.spop1)
c:RegisterEffect(e22)
end end
--summon proc --summon proc
function cm.otconfilter(c) function cm.otconfilter(c)
...@@ -317,12 +307,10 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -317,12 +307,10 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsFacedown() and (c:IsSummonable(true,nil) or c:IsMSetable(true,nil)) and c:IsAbleToHand() return c:IsFacedown() and (c:IsSummonable(true,nil) or c:IsMSetable(true,nil)) and c:IsAbleToHand()
end end
function cm.sum(c) function cm.sum(c)
return c:IsSummonable(true,nil) or c:IsMSetable(true,nil) return c:IsSummonable(true,nil) or c:IsMSetable(true,nil)
end end
function cm.val(e,re,ev,r,rp,rc)
return bit.band(r,REASON_EFFECT)~=0
end
\ No newline at end of file
...@@ -73,7 +73,7 @@ function cm.stfilter2(c) ...@@ -73,7 +73,7 @@ function cm.stfilter2(c)
return not c:IsAttribute(ATTRIBUTE_DARK) return not c:IsAttribute(ATTRIBUTE_DARK)
end end
function cm.stfilter(c,tc) function cm.stfilter(c,tc)
return c:IsLocation(LOCATION_GRAVE) and c:IsAbleToRemove() and c:IsSynchroType(TYPE_TUNER) and c:IsCanBeSynchroMaterial(tc,nil,LOCATION_GRAVE) return c:IsLocation(LOCATION_GRAVE) and c:IsAbleToRemove() and c:IsSynchroType(TYPE_TUNER) and c:IsCanBeSynchroMaterial(tc,c,LOCATION_GRAVE)
end end
function cm.stfilterg(g,tp,tc,lv,smat) function cm.stfilterg(g,tp,tc,lv,smat)
if smat then if smat then
......
...@@ -137,7 +137,7 @@ function cm.refilter(c,tp,re) ...@@ -137,7 +137,7 @@ function cm.refilter(c,tp,re)
return c:IsReleasable() or (c:IsType(TYPE_SPELL+TYPE_TRAP) and flag) return c:IsReleasable() or (c:IsType(TYPE_SPELL+TYPE_TRAP) and flag)
end end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,tp) and e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil,tp) and e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.refilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,cm.refilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil,tp)
......
...@@ -2,24 +2,24 @@ SNNM=SNNM or {} ...@@ -2,24 +2,24 @@ SNNM=SNNM or {}
local cm=SNNM local cm=SNNM
--53702700 alleffectreset --53702700 alleffectreset
function cm.AllGlobalCheck(c) function cm.AllGlobalCheck(c)
if not cm.global_check then if not cm.snnm_global_check then
cm.global_check=true cm.snnm_global_check=true
local x=c:GetOriginalCodeRule() local x=c:GetOriginalCodeRule()
if x>=53707000 and x<=53707099 then if c.main_peacecho then
local alle1=Effect.CreateEffect(c) local alle1=Effect.CreateEffect(c)
alle1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) alle1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
alle1:SetCode(EFFECT_SEND_REPLACE) alle1:SetCode(EFFECT_SEND_REPLACE)
alle1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) alle1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
alle1:SetTarget(cm.PeacechoToDeckTarget1) alle1:SetTarget(cm.PeacechoToDeckTarget1)
alle1:SetValue(function(e,c) return false end) alle1:SetValue(function(e,c) return false end)
Duel.RegisterEffect(alle1,0) --Duel.RegisterEffect(alle1,0)
local alle2=Effect.CreateEffect(c) local alle2=Effect.CreateEffect(c)
alle2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) alle2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
alle2:SetCode(EFFECT_SEND_REPLACE) alle2:SetCode(EFFECT_SEND_REPLACE)
alle2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) alle2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
alle2:SetTarget(cm.PeacechoToDeckTarget2) alle2:SetTarget(cm.PeacechoToDeckTarget2)
alle2:SetValue(function(e,c) return c:GetFlagEffect(53707099)>0 end) alle2:SetValue(function(e,c) return c:GetFlagEffect(53707099)>0 end)
Duel.RegisterEffect(alle2,0) --Duel.RegisterEffect(alle2,0)
cm[0]=Duel.GetDecktopGroup cm[0]=Duel.GetDecktopGroup
Duel.GetDecktopGroup=function(tp,ct) Duel.GetDecktopGroup=function(tp,ct)
Duel.RegisterFlagEffect(tp,53707000,RESET_CHAIN,0,0) Duel.RegisterFlagEffect(tp,53707000,RESET_CHAIN,0,0)
...@@ -38,7 +38,8 @@ function cm.AllGlobalCheck(c) ...@@ -38,7 +38,8 @@ function cm.AllGlobalCheck(c)
g=g:Select(player,min,max,reason) g=g:Select(player,min,max,reason)
Duel.SendtoGrave(g,reason) Duel.SendtoGrave(g,reason)
local ct=Duel.GetOperatedGroup():GetCount() local ct=Duel.GetOperatedGroup():GetCount()
if ct>0 then return 1 else return 0 end --if ct>0 then return 1 else return 0 end
return ct
end end
cm[3]=Duel.RemoveOverlayCard cm[3]=Duel.RemoveOverlayCard
Duel.RemoveOverlayCard=function(player,ints,into,min,max,reason) Duel.RemoveOverlayCard=function(player,ints,into,min,max,reason)
...@@ -51,18 +52,21 @@ function cm.AllGlobalCheck(c) ...@@ -51,18 +52,21 @@ function cm.AllGlobalCheck(c)
sg=sg:Select(player,min,max,reason) sg=sg:Select(player,min,max,reason)
Duel.SendtoGrave(sg,reason) Duel.SendtoGrave(sg,reason)
local ct=Duel.GetOperatedGroup():GetCount() local ct=Duel.GetOperatedGroup():GetCount()
if ct>0 then return 1 else return 0 end --if ct>0 then return 1 else return 0 end
return ct
end end
cm[4]=Duel.SendtoGrave cm[4]=Duel.SendtoGrave
Duel.SendtoGrave=function(target,reason) Duel.SendtoGrave=function(target,reason)
if reason&REASON_RULE==0 then
local tg=Group.__add(target,target) local tg=Group.__add(target,target)
local g=tg:Filter(function(c)return c:IsLocation(LOCATION_OVERLAY) and c:IsOriginalSetCard(0x3537) and not c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT) and c:GetOriginalType()&TYPE_PENDULUM+TYPE_LINK==0 and c:IsAbleToDeck()end,nil) local g=tg:Filter(function(c)return c:IsLocation(LOCATION_OVERLAY) and c.main_peacecho and not c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT) and c:IsAbleToDeck()end,nil)
for tc in aux.Next(g) do for tc in aux.Next(g) do
Duel.Hint(HINT_CARD,0,tc:GetOriginalCodeRule()) Duel.Hint(HINT_CARD,0,tc:GetOriginalCodeRule())
Duel.SendtoDeck(tc,nil,1,reason) Duel.SendtoDeck(tc,nil,1,reason)
tc:ReverseInDeck() tc:ReverseInDeck()
end end
cm[4](Group.__sub(tg,g),reason) return cm[4](Group.__sub(tg,g),reason)
else return cm[4](target,reason) end
end end
--cm[2]=Card.ReverseInDeck --cm[2]=Card.ReverseInDeck
--Card.ReverseInDeck=function(card) --Card.ReverseInDeck=function(card)
...@@ -70,21 +74,21 @@ function cm.AllGlobalCheck(c) ...@@ -70,21 +74,21 @@ function cm.AllGlobalCheck(c)
--return cm[2](card) --return cm[2](card)
--end --end
end end
if x>=53713000 and x<=53713099 then if c.alc_yaku then
local alle3=Effect.CreateEffect(c) local alle3=Effect.CreateEffect(c)
alle3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) alle3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
alle3:SetCode(EVENT_SSET) alle3:SetCode(EVENT_SSET)
alle3:SetOperation(cm.ALCYakuCheck) alle3:SetOperation(cm.ALCYakuCheck)
Duel.RegisterEffect(alle3,0) Duel.RegisterEffect(alle3,0)
end end
if x>=53703000 and x<=53703099 then if c.organic_saucer then
local alle4=Effect.CreateEffect(c) local alle4=Effect.CreateEffect(c)
alle4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) alle4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
alle4:SetCode(EVENT_SPSUMMON_SUCCESS) alle4:SetCode(EVENT_SPSUMMON_SUCCESS)
alle4:SetOperation(cm.OSCheck) alle4:SetOperation(cm.OSCheck)
Duel.RegisterEffect(alle4,0) Duel.RegisterEffect(alle4,0)
end end
if x>=53727004 and x<=53727007 then if c.cybern_numc then
local alle6=Effect.CreateEffect(c) local alle6=Effect.CreateEffect(c)
alle6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) alle6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
alle6:SetCode(EVENT_CHAINING) alle6:SetCode(EVENT_CHAINING)
...@@ -113,9 +117,20 @@ function cm.UpConfirm() ...@@ -113,9 +117,20 @@ function cm.UpConfirm()
if #UCg>0 then Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(53702500,2)) end if #UCg>0 then Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(53702500,2)) end
if #UCg==1 then UCg:Select(tp,1,1,nil) elseif #UCg>1 then Duel.ConfirmCards(tp,UCg) end if #UCg==1 then UCg:Select(tp,1,1,nil) elseif #UCg>1 then Duel.ConfirmCards(tp,UCg) end
end end
function cm.Peacecho(c) function cm.Peacecho(c,typ)
Duel.EnableGlobalFlag(GLOBALFLAG_DECK_REVERSE_CHECK) Duel.EnableGlobalFlag(GLOBALFLAG_DECK_REVERSE_CHECK)
if c:GetOriginalType()&TYPE_MONSTER~=0 then local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_SEND_REPLACE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(0xff)
e1:SetTarget(cm.RePeacechotg1)
e1:SetOperation(cm.RePeacechoop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetTarget(cm.RePeacechotg2)
c:RegisterEffect(e2)
if typ==TYPE_MONSTER then
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW) e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
...@@ -125,7 +140,7 @@ function cm.Peacecho(c) ...@@ -125,7 +140,7 @@ function cm.Peacecho(c)
e4:SetOperation(cm.PeacechoDrawOperation) e4:SetOperation(cm.PeacechoDrawOperation)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
if c:GetOriginalType()&0x20004~=0 then if typ==TYPE_CONTINUOUS then
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DRAW) e5:SetCategory(CATEGORY_DRAW)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
...@@ -135,7 +150,7 @@ function cm.Peacecho(c) ...@@ -135,7 +150,7 @@ function cm.Peacecho(c)
e5:SetOperation(cm.PeacechoDrawOperation2) e5:SetOperation(cm.PeacechoDrawOperation2)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
if c:GetOriginalType()&TYPE_FIELD~=0 then if typ==TYPE_FIELD then
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_DRAW) e6:SetCategory(CATEGORY_DRAW)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
...@@ -152,6 +167,36 @@ function cm.Peacecho(c) ...@@ -152,6 +167,36 @@ function cm.Peacecho(c)
e9:SetOperation(cm.UpRegi) e9:SetOperation(cm.UpRegi)
c:RegisterEffect(e9) c:RegisterEffect(e9)
end end
function cm.RePeacechotg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsLocation(LOCATION_DECK) and c:GetDestination()==LOCATION_GRAVE and not c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT) and c:IsAbleToDeck() end
return true
end
function cm.RePeacechotg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsLocation(LOCATION_DECK) and c:GetDestination()==LOCATION_GRAVE and not c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT) and Duel.GetFieldGroup(tp,LOCATION_DECK,0):GetMinGroup(Card.GetSequence):GetFirst()~=c end
return true
end
function cm.RePeacechoop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsFacedown() then Duel.ConfirmCards(1-tp,c) end
Duel.Hint(HINT_CARD,0,c:GetOriginalCode())
if c:IsLocation(LOCATION_DECK) then
if Duel.GetFlagEffect(tp,53707000)==0 then Duel.ShuffleDeck(tp) end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetOperation(cm.RePeacechorst)
e3:SetLabelObject(e)
Duel.RegisterEffect(e3,tp)
Duel.MoveSequence(c,1)
else Duel.SendtoDeck(c,nil,1,REASON_RULE) end
c:ReverseInDeck()
end
function cm.RePeacechorst(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ResetFlagEffect(tp,53707000)
e:Reset()
end
function cm.PeacechoRepFilter(c) function cm.PeacechoRepFilter(c)
return c:GetDestination()==LOCATION_GRAVE and c:IsOriginalSetCard(0x3537) and not c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT) and c:GetOriginalType()&TYPE_PENDULUM+TYPE_LINK==0 and c:IsAbleToDeck() return c:GetDestination()==LOCATION_GRAVE and c:IsOriginalSetCard(0x3537) and not c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT) and c:GetOriginalType()&TYPE_PENDULUM+TYPE_LINK==0 and c:IsAbleToDeck()
end end
...@@ -328,7 +373,7 @@ function cm.GraveActCostTarget(e,te,tp) ...@@ -328,7 +373,7 @@ function cm.GraveActCostTarget(e,te,tp)
return te:GetHandler()==e:GetHandler() and te:IsHasType(EFFECT_TYPE_ACTIVATE) return te:GetHandler()==e:GetHandler() and te:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function cm.GraveActCostOp(e,tp,eg,ep,ev,re,r,rp) function cm.GraveActCostOp(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,false)
end end
function cm.FanippetTrapSPCondition(e,tp,eg,ep,ev,re,r,rp) function cm.FanippetTrapSPCondition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp or ep==1-tp or re:GetHandler():IsCode(53716006) return rp==1-tp or ep==1-tp or re:GetHandler():IsCode(53716006)
...@@ -339,8 +384,19 @@ function cm.FanippetTrapSPCost(code) ...@@ -339,8 +384,19 @@ function cm.FanippetTrapSPCost(code)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetFlagEffect(tp,code)==0 and not c:IsLocation(LOCATION_ONFIELD) end if chk==0 then return Duel.GetFlagEffect(tp,code)==0 and not c:IsLocation(LOCATION_ONFIELD) end
Duel.RegisterFlagEffect(tp,code,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,code,RESET_CHAIN,0,1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetOperation(cm.Fanippetready)
e3:SetLabelObject(e)
Duel.RegisterEffect(e3,tp)
end end
end end
function cm.ready(e,tp)
e:GetLabelObject():GetHandler():SetStatus(STATUS_EFFECT_ENABLED,true)
e:GetLabelObject():Reset()
e:Reset()
end
function cm.FanippetTrapSPTarget(code,atk,def,rac,att) function cm.FanippetTrapSPTarget(code,atk,def,rac,att)
return return
function(e,tp,eg,ep,ev,re,r,rp,chk) function(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -349,7 +405,7 @@ function cm.FanippetTrapSPTarget(code,atk,def,rac,att) ...@@ -349,7 +405,7 @@ function cm.FanippetTrapSPTarget(code,atk,def,rac,att)
if not c:IsPreviousLocation(LOCATION_HAND) then if not c:IsPreviousLocation(LOCATION_HAND) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON) e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end else e:SetCategory(0) end
e:SetLabel(c:GetPreviousLocation()) e:SetLabel(c:GetPreviousLocation())
end end
end end
...@@ -2530,6 +2586,11 @@ function cm.AllEffectRstop(e,tp,eg,ep,ev,re,r,rp) ...@@ -2530,6 +2586,11 @@ function cm.AllEffectRstop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
if cm.IsInTable(53796002,rstt) then
if se:GetRange()==LOCATION_PZONE and se:GetProperty()&EFFECT_FLAG_UNCOPYABLE==0 then
_G["c"..sc:GetOriginalCode()].pend_effect=se
end
end
if cm.IsInTable(53799017,rstt) then if cm.IsInTable(53799017,rstt) then
if se:GetType()==EFFECT_TYPE_ACTIVATE then if se:GetType()==EFFECT_TYPE_ACTIVATE then
local tg=se:GetTarget() local tg=se:GetTarget()
......
local m=53703001 local m=53703001
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="圆盘生物 希尔巴布尔美" cm.name="圆盘生物 希尔巴布尔美"
cm.organic_saucer=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.OrganicSaucer(c,1,m) SNNM.OrganicSaucer(c,1,m)
......
local m=53703002 local m=53703002
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="圆盘生物 布莱克多姆" cm.name="圆盘生物 布莱克多姆"
cm.organic_saucer=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.OrganicSaucer(c,2,m) SNNM.OrganicSaucer(c,2,m)
......
local m=53703003 local m=53703003
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="圆盘生物 阿布索巴" cm.name="圆盘生物 阿布索巴"
cm.organic_saucer=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.OrganicSaucer(c,4,m) SNNM.OrganicSaucer(c,4,m)
......
local m=53703004 local m=53703004
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="圆盘生物 迪莫斯" cm.name="圆盘生物 迪莫斯"
cm.organic_saucer=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.AllGlobalCheck(c) SNNM.AllGlobalCheck(c)
......
local m=53703005 local m=53703005
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="圆盘生物 布莱克卡戎" cm.name="圆盘生物 布莱克卡戎"
cm.organic_saucer=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.OrganicSaucer(c,5,m) SNNM.OrganicSaucer(c,5,m)
......
local m=53703006 local m=53703006
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="圆盘生物 布里扎德" cm.name="圆盘生物 布里扎德"
cm.organic_saucer=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.OrganicSaucer(c,6,m) SNNM.OrganicSaucer(c,6,m)
......
local m=53703007 local m=53703007
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="圆盘生物 汉古拉" cm.name="圆盘生物 汉古拉"
cm.organic_saucer=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.OrganicSaucer(c,3,m) SNNM.OrganicSaucer(c,3,m)
......
local m=53703008 local m=53703008
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="圆盘生物 布莱克特琳娜" cm.name="圆盘生物 布莱克特琳娜"
cm.organic_saucer=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.AllGlobalCheck(c) SNNM.AllGlobalCheck(c)
...@@ -86,8 +87,8 @@ function cm.ntrfilter(c) ...@@ -86,8 +87,8 @@ function cm.ntrfilter(c)
return c:IsFaceup() and c:GetCounter(0x153a)>2 and c:IsControlerCanBeChanged() return c:IsFaceup() and c:GetCounter(0x153a)>2 and c:IsControlerCanBeChanged()
end end
function cm.ntrtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.ntrtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(cm.ntrfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(cm.ntrfilter,tp,0,LOCATION_MZONE,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end end
......
local m=53707001 local m=53707001
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="清响 失语华" cm.name="清响 失语华"
cm.main_peacecho=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.Peacecho(c) SNNM.Peacecho(c,TYPE_MONSTER)
SNNM.AllGlobalCheck(c) SNNM.AllGlobalCheck(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
...@@ -57,6 +58,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -57,6 +58,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(0) e:SetLabel(0)
return #g>0 and count>math.min(3,#g) and Duel.GetDecktopGroup(tp,math.min(3,count)):IsExists(Card.IsAbleToHand,1,nil) and Duel.GetDecktopGroup(tp,math.min(3,count)):IsExists(Card.IsAbleToRemove,1,nil,POS_FACEDOWN) return #g>0 and count>math.min(3,#g) and Duel.GetDecktopGroup(tp,math.min(3,count)):IsExists(Card.IsAbleToHand,1,nil) and Duel.GetDecktopGroup(tp,math.min(3,count)):IsExists(Card.IsAbleToRemove,1,nil,POS_FACEDOWN)
end end
SNNM.UpConfirm()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:SelectSubGroup(tp,cm.fselect,false,1,math.min(3,#g),count,tp) local rg=g:SelectSubGroup(tp,cm.fselect,false,1,math.min(3,#g),count,tp)
Duel.ConfirmCards(1-tp,rg) Duel.ConfirmCards(1-tp,rg)
...@@ -74,6 +76,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,6 +76,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(p,d) local g=Duel.GetDecktopGroup(p,d)
if g:GetCount()>0 then if g:GetCount()>0 then
if g:IsExists(cm.thfilter,1,nil) then if g:IsExists(cm.thfilter,1,nil) then
SNNM.UpConfirm()
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,cm.thfilter,1,1,nil) local sg=g:FilterSelect(tp,cm.thfilter,1,1,nil)
......
local m=53707002 local m=53707002
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="清响 量理奏" cm.name="清响 量理奏"
cm.main_peacecho=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.Peacecho(c) SNNM.Peacecho(c,TYPE_MONSTER)
SNNM.AllGlobalCheck(c) SNNM.AllGlobalCheck(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
......
local m=53707003 local m=53707003
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="清响 念星觉" cm.name="清响 念星觉"
cm.main_peacecho=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.Peacecho(c) SNNM.Peacecho(c,TYPE_MONSTER)
SNNM.AllGlobalCheck(c) SNNM.AllGlobalCheck(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
...@@ -35,7 +36,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,7 +36,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100) e:SetLabel(100)
if chk==0 then return true end if chk==0 then return true end
end end
--妈 的 ,脑 抽 忘 了 嵌 套 过 滤 器 了 --妈 的 ,脑 抽 忘 了 嵌 套 过 滤 器 了
function cm.rmfilter(c) function cm.rmfilter(c)
return c:IsRace(RACE_PLANT) and c:IsAbleToRemoveAsCost(POS_FACEDOWN) return c:IsRace(RACE_PLANT) and c:IsAbleToRemoveAsCost(POS_FACEDOWN)
end end
...@@ -61,6 +62,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,6 +62,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
return #tg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return #tg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end end
local tempg,ct=tg:GetMaxGroup(Card.GetLevel) local tempg,ct=tg:GetMaxGroup(Card.GetLevel)
SNNM.UpConfirm()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:SelectSubGroup(tp,cm.fselect,false,1,ct,e,tp,tg) local rg=g:SelectSubGroup(tp,cm.fselect,false,1,ct,e,tp,tg)
Duel.ConfirmCards(1-tp,rg) Duel.ConfirmCards(1-tp,rg)
......
local m=53707004 local m=53707004
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="清响 祈明蝶" cm.name="清响 祈明蝶"
cm.main_peacecho=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.Peacecho(c) SNNM.Peacecho(c,TYPE_MONSTER)
SNNM.AllGlobalCheck(c) SNNM.AllGlobalCheck(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
...@@ -44,6 +45,7 @@ function cm.rmfilter(c) ...@@ -44,6 +45,7 @@ function cm.rmfilter(c)
end end
function cm.tttg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_DECK,0,1,nil) end
SNNM.UpConfirm()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,cm.rmfilter,tp,LOCATION_DECK,0,1,1,nil) local rg=Duel.SelectMatchingCard(tp,cm.rmfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.ConfirmCards(1-tp,rg) Duel.ConfirmCards(1-tp,rg)
......
local m=53707005 local m=53707005
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="清响 旋虑刃" cm.name="清响 旋虑刃"
cm.main_peacecho=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.Peacecho(c) SNNM.Peacecho(c,TYPE_MONSTER)
SNNM.AllGlobalCheck(c) SNNM.AllGlobalCheck(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
......
local m=53707007 local m=53707007
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="清响 遗往镜" cm.name="清响 遗往镜"
cm.main_peacecho=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.Peacecho(c) SNNM.Peacecho(c,TYPE_MONSTER)
SNNM.AllGlobalCheck(c) SNNM.AllGlobalCheck(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
...@@ -33,6 +34,7 @@ function cm.spcfilter(c) ...@@ -33,6 +34,7 @@ function cm.spcfilter(c)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spcfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.spcfilter,tp,LOCATION_DECK,0,1,nil) end
SNNM.UpConfirm()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.spcfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.spcfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
local m=53707008 local m=53707008
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="清响 妍叙梦" cm.name="清响 妍叙梦"
cm.main_peacecho=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.Peacecho(c) SNNM.Peacecho(c,TYPE_MONSTER)
SNNM.AllGlobalCheck(c) SNNM.AllGlobalCheck(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
...@@ -57,6 +58,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -57,6 +58,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
SNNM.UpConfirm()
if e:GetLabel()==0 then if e:GetLabel()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g1=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
......
local m=53707009 local m=53707009
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="清响 沉水观" cm.name="清响 沉水观"
cm.main_peacecho=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.Peacecho(c) SNNM.Peacecho(c,TYPE_MONSTER)
SNNM.AllGlobalCheck(c) SNNM.AllGlobalCheck(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
local m=53707013 local m=53707013
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="清响 雨间美" cm.name="清响 雨间美"
cm.main_peacecho=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.Peacecho(c) SNNM.Peacecho(c,TYPE_MONSTER)
SNNM.AllGlobalCheck(c) SNNM.AllGlobalCheck(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
......
local m=53707014 local m=53707014
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="清响 霭占妆" cm.name="清响 霭占妆"
cm.main_peacecho=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.Peacecho(c) SNNM.Peacecho(c,TYPE_MONSTER)
SNNM.AllGlobalCheck(c) SNNM.AllGlobalCheck(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
......
local m=53707015 local m=53707015
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="清响 怅眠心" cm.name="清响 怅眠心"
cm.main_peacecho=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.Peacecho(c) SNNM.Peacecho(c,TYPE_MONSTER)
SNNM.AllGlobalCheck(c) SNNM.AllGlobalCheck(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
local m=53707016 local m=53707016
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="清响 抄染扉" cm.name="清响 抄染扉"
cm.main_peacecho=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.Peacecho(c) SNNM.Peacecho(c,TYPE_MONSTER)
SNNM.AllGlobalCheck(c) SNNM.AllGlobalCheck(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
......
local m=53707017 local m=53707017
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="幽谷清响" cm.name="幽谷清响"
cm.main_peacecho=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.Peacecho(c) SNNM.Peacecho(c,TYPE_FIELD)
SNNM.AllGlobalCheck(c) SNNM.AllGlobalCheck(c)
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
......
local m=53707020 local m=53707020
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="幽林清响" cm.name="幽林清响"
cm.main_peacecho=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.Peacecho(c) SNNM.Peacecho(c,TYPE_CONTINUOUS)
SNNM.AllGlobalCheck(c) SNNM.AllGlobalCheck(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
......
local m=53713001 local m=53713001
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="爱丽丝役 TRS" cm.name="爱丽丝役 TRS"
cm.alc_yaku=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.ALCYakuNew(c,m,cm.confirm,LOCATION_HAND,{1900,300,4,RACE_WARRIOR,ATTRIBUTE_DARK}) SNNM.ALCYakuNew(c,m,cm.confirm,LOCATION_HAND,{1900,300,4,RACE_WARRIOR,ATTRIBUTE_DARK})
......
local m=53713003 local m=53713003
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="爱丽丝役 TIS" cm.name="爱丽丝役 TIS"
cm.alc_yaku=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.ALCYakuNew(c,m,cm.confirm,LOCATION_DECK,{200,2200,4,RACE_WARRIOR,ATTRIBUTE_DARK}) SNNM.ALCYakuNew(c,m,cm.confirm,LOCATION_DECK,{200,2200,4,RACE_WARRIOR,ATTRIBUTE_DARK})
......
local m=53713005 local m=53713005
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="爱丽丝役 HNS" cm.name="爱丽丝役 HNS"
cm.alc_yaku=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.ALCYakuNew(c,m,cm.confirm,LOCATION_EXTRA,{1800,1800,4,RACE_WARRIOR,ATTRIBUTE_DARK}) SNNM.ALCYakuNew(c,m,cm.confirm,LOCATION_EXTRA,{1800,1800,4,RACE_WARRIOR,ATTRIBUTE_DARK})
......
local m=53713007 local m=53713007
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="爱丽丝役 ICG" cm.name="爱丽丝役 ICG"
cm.alc_yaku=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
SNNM.ALCYakuNew(c,m,cm.confirm,LOCATION_ONFIELD,{100,100,4,RACE_SPELLCASTER,ATTRIBUTE_LIGHT}) SNNM.ALCYakuNew(c,m,cm.confirm,LOCATION_ONFIELD,{100,100,4,RACE_SPELLCASTER,ATTRIBUTE_LIGHT})
......
local m=53727004 local m=53727004
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="空间撕裂" cm.name="空间撕裂"
cm.cybern_numc=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,53727003) aux.AddCodeList(c,53727003)
...@@ -88,8 +89,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,8 +89,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.distg1(e,c) function cm.distg1(e,c)
local tc=e:GetLabelObject() if c:IsType(TYPE_SPELL+TYPE_TRAP) then return c:IsOriginalCodeRule(e:GetLabelObject():GetOriginalCodeRule()) else return c:IsOriginalCodeRule(e:GetLabelObject():GetOriginalCodeRule()) and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0) end
if c:IsType(TYPE_SPELL+TYPE_TRAP) then return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) else return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0) end
end end
function cm.discon(e,tp,eg,ep,ev,re,r,rp) function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOriginalCodeRule(e:GetLabelObject():GetOriginalCodeRule()) return re:GetHandler():IsOriginalCodeRule(e:GetLabelObject():GetOriginalCodeRule())
......
local m=53727005 local m=53727005
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="信息对冲" cm.name="信息对冲"
cm.cybern_numc=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,53727003) aux.AddCodeList(c,53727003)
......
local m=53727006 local m=53727006
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="漏洞修复" cm.name="漏洞修复"
cm.cybern_numc=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,53727003) aux.AddCodeList(c,53727003)
......
local m=53727007 local m=53727007
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="循环感染" cm.name="循环感染"
cm.cybern_numc=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,53727003) aux.AddCodeList(c,53727003)
......
...@@ -26,72 +26,11 @@ function cm.initial_effect(c) ...@@ -26,72 +26,11 @@ function cm.initial_effect(c)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE) ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop) ex:SetOperation(cm.backop)
c:RegisterEffect(ex) c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end end
function cm.backop(e,tp,eg,ep,ev,re,r,rp) function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end if c:IsLocation(LOCATION_MZONE) then return end
local tcode=c.upside_code local tcode=c.upside_code
c:SetEntityCode(tcode) c:SetEntityCode(tcode)
if c:IsFacedown() then if c:IsFacedown() then
......
...@@ -27,72 +27,11 @@ function cm.initial_effect(c) ...@@ -27,72 +27,11 @@ function cm.initial_effect(c)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE) ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop) ex:SetOperation(cm.backop)
c:RegisterEffect(ex) c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end end
function cm.backop(e,tp,eg,ep,ev,re,r,rp) function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end if c:IsLocation(LOCATION_MZONE) then return end
local tcode=c.upside_code local tcode=c.upside_code
c:SetEntityCode(tcode) c:SetEntityCode(tcode)
if c:IsFacedown() then if c:IsFacedown() then
......
...@@ -32,72 +32,11 @@ function cm.initial_effect(c) ...@@ -32,72 +32,11 @@ function cm.initial_effect(c)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE) ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop) ex:SetOperation(cm.backop)
c:RegisterEffect(ex) c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end end
function cm.backop(e,tp,eg,ep,ev,re,r,rp) function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end if c:IsLocation(LOCATION_MZONE) then return end
local tcode=c.upside_code local tcode=c.upside_code
c:SetEntityCode(tcode) c:SetEntityCode(tcode)
if c:IsFacedown() then if c:IsFacedown() then
......
...@@ -36,72 +36,11 @@ function cm.initial_effect(c) ...@@ -36,72 +36,11 @@ function cm.initial_effect(c)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE) ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop) ex:SetOperation(cm.backop)
c:RegisterEffect(ex) c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end end
function cm.backop(e,tp,eg,ep,ev,re,r,rp) function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end if c:IsLocation(LOCATION_MZONE) then return end
local tcode=c.upside_code local tcode=c.upside_code
c:SetEntityCode(tcode) c:SetEntityCode(tcode)
if c:IsFacedown() then if c:IsFacedown() then
......
...@@ -32,72 +32,11 @@ function cm.initial_effect(c) ...@@ -32,72 +32,11 @@ function cm.initial_effect(c)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE) ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop) ex:SetOperation(cm.backop)
c:RegisterEffect(ex) c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end end
function cm.backop(e,tp,eg,ep,ev,re,r,rp) function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end if c:IsLocation(LOCATION_MZONE) then return end
local tcode=c.upside_code local tcode=c.upside_code
c:SetEntityCode(tcode) c:SetEntityCode(tcode)
if c:IsFacedown() then if c:IsFacedown() then
......
...@@ -29,72 +29,11 @@ function cm.initial_effect(c) ...@@ -29,72 +29,11 @@ function cm.initial_effect(c)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE) ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop) ex:SetOperation(cm.backop)
c:RegisterEffect(ex) c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end end
function cm.backop(e,tp,eg,ep,ev,re,r,rp) function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end if c:IsLocation(LOCATION_MZONE) then return end
local tcode=c.upside_code local tcode=c.upside_code
c:SetEntityCode(tcode) c:SetEntityCode(tcode)
if c:IsFacedown() then if c:IsFacedown() then
......
--甜心机仆 永恒的礼物 --甜心机仆 永恒的礼物
Duel.LoadScript("c9910550.lua") require("expansions/script/c9910550")
function c9910562.initial_effect(c) function c9910562.initial_effect(c)
--flag --flag
Txjp.AddTgFlag(c) Txjp.AddTgFlag(c)
......
...@@ -39,7 +39,7 @@ function c9910704.initial_effect(c) ...@@ -39,7 +39,7 @@ function c9910704.initial_effect(c)
end end
end end
function c9910704.regcon(e,tp,eg,ep,ev,re,r,rp) function c9910704.regcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentPhase()==PHASE_DRAW then return false end if Duel.GetCurrentPhase()==PHASE_DRAW or Duel.GetCurrentPhase()==0 then return false end
local v=0 local v=0
if eg:IsExists(Card.IsControler,1,nil,0) then v=v+1 end if eg:IsExists(Card.IsControler,1,nil,0) then v=v+1 end
if eg:IsExists(Card.IsControler,1,nil,1) then v=v+2 end if eg:IsExists(Card.IsControler,1,nil,1) then v=v+2 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