Commit cf5d318a authored by Tachibana's avatar Tachibana

tnndx

parent c069f177
No preview for this file type
......@@ -37,13 +37,15 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
if c:IsLocation(LOCATION_GRAVE) then
return Duel.GetMatchingGroupCount(cm.gravefilter,tp,LOCATION_MZONE,0,nil)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
c:CreateEffectRelation(e)
return Duel.GetMatchingGroupCount(cm.gravefilter,tp,LOCATION_MZONE,0,nil)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
else
return true
end
end
if c:IsLocation(LOCATION_GRAVE) then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
c:CreateEffectRelation(e)
end
end
function cm.gravefilter(c)
return (c:IsRankAbove(10) or c:IsLevelAbove(10)) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
......
......@@ -58,7 +58,7 @@ function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
end
-------------
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler():IsType(TYPE_MONSTER) and (re:GetHandler():IsLocation(LOCATION_GRAVE) or re:GetHandler():IsLocation(LOCATION_REMOVED))
return re:GetHandler():IsType(TYPE_MONSTER) and (re:GetHandler():IsLocation(LOCATION_MZONE) or re:GetHandler():IsLocation(LOCATION_GRAVE)) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.spfilter(c)
return c.setname=="Devildiocese" and (c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_FUSION))
......
......@@ -18,13 +18,17 @@ function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cm.regcon)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(cm.spcon1)
e2:SetCountLimit(1,m+10000)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.regop)
c:RegisterEffect(e2)
end
cm.setname="Devildiocese"
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.xyzfilter(c)
return c.setname=="Devildiocese"
end
......@@ -85,18 +89,15 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
tc:CompleteProcedure()
end
end
------------
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.filter(c)
return c:IsRace(RACE_FIEND)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_DECK+LOCATION_REMOVED,1,nil,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil,tp) end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -111,13 +111,13 @@ function cm.thfil(c,ec)
return c.setname=="Devildiocese" and (c:IsAbleToGrave() or c:IsAbleToHand()) and c:IsType(TYPE_MONSTER)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.thfil,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
if tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
......
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