Commit 81148ba4 authored by TanakaKotoha's avatar TanakaKotoha

emergency reuproad

parent 454fd7d8
No preview for this file type
--白之堕天使·砂冢明音 --白之堕天使·砂冢明音
local m=81005016 local m=81005016
local cm=_G["c"..m] local cm=_G["c"..m]
xpcall(function() require("expansions/script/c1110198") end,function() require("script/c1110198") end)
cm.named_with_Urban=true
function cm.initial_effect(c) function cm.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
...@@ -41,6 +43,12 @@ function cm.initial_effect(c) ...@@ -41,6 +43,12 @@ function cm.initial_effect(c)
e3:SetCondition(cm.sumcon) e3:SetCondition(cm.sumcon)
e3:SetOperation(cm.sumsuc) e3:SetOperation(cm.sumsuc)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
end end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp) function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
...@@ -49,49 +57,58 @@ function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,49 +57,58 @@ function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,0)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,0))
end end
function cm.tffilter(c,tp) function cm.tffilter(c,tp)
return c:IsType(TYPE_CONTINUOUS) and not c:IsForbidden() and not Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode()) return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and not c:IsForbidden() and not Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
end end
function cm.dfilter(c,code) function cm.dfilter(c,code)
return c:IsFaceup() and c:IsCode(code) return c:IsFaceup() and c:IsCode(code)
end end
function cm.tftg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end and Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function cm.tfop(e,tp,eg,ep,ev,re,r,rp) function cm.tfop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tffilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,cm.tffilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler()) if not (muxu.check_set_Soul(tc) or muxu.check_set_Urban(tc)) then
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetCondition(cm.con) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetCondition(cm.con)
tc:RegisterEffect(e1,true) e1:SetReset(RESET_EVENT+0x1fe0000)
local e2=Effect.CreateEffect(e:GetHandler()) tc:RegisterEffect(e1,true)
e2:SetType(EFFECT_TYPE_SINGLE) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(cm.con) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetCondition(cm.con)
tc:RegisterEffect(e2,true) e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2,true)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,0)
e:GetHandler():SetCardTarget(tc)
end
end end
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
local sg=e:GetHandler():GetColumnGroup() local c=e:GetHandler()
sg:AddCard(e:GetHandler()) local sg=c:GetColumnGroup()
sg:AddCard(c)
return not sg:IsExists(cm.efilter,1,nil) return not sg:IsExists(cm.efilter,1,nil)
end end
function cm.efilter(c) function cm.efilter(c)
return c:IsFaceup() and c:IsCode(81011027) return c:IsFaceup() and c:IsCode(81011027)
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 rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) or rp==tp then return false end
if re:IsHasCategory(CATEGORY_NEGATE)
and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0
end end
function cm.vfilter(c) function cm.vfilter(c)
return (bit.band(c:GetOriginalType(),TYPE_SPELL)~=0 or bit.band(c:GetOriginalType(),TYPE_TRAP)~=0) and c:IsAbleToGraveAsCost() return (bit.band(c:GetOriginalType(),TYPE_SPELL)~=0 or bit.band(c:GetOriginalType(),TYPE_TRAP)~=0) and c:IsAbleToGraveAsCost()
...@@ -114,3 +131,13 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -114,3 +131,13 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(eg,REASON_EFFECT) Duel.SendtoGrave(eg,REASON_EFFECT)
end end
end end
function cm.desfilter(c,rc)
return rc:GetCardTarget():IsContains(c) and rc:GetFlagEffect(m)>0
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetCardTargetCount()>0 then
local dg=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,c)
Duel.Remove(dg,POS_FACEDOWN,REASON_EFFECT)
end
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