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