Commit 38800954 authored by Tachibana's avatar Tachibana

eme

parent 02d1e1ca
...@@ -6,7 +6,7 @@ function cm.initial_effect(c) ...@@ -6,7 +6,7 @@ function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.ffilter,27,true) aux.AddFusionProcFunRep(c,cm.ffilter,27,true)
local e1=rscf.SetSpecialSummonProduce(c,LOCATION_EXTRA,cm.con,cm.op) local e1=rscf.SetSpecialSummonProduce(c,LOCATION_EXTRA,cm.con,cm.op)
local e2=rsef.I(c,{m,0},{1,m},"tg,th,se",nil,LOCATION_MZONE,nil,nil,cm.tg2,cm.op2) local e2=rsef.I(c,{m,0},{1},"tg,th,se",nil,LOCATION_MZONE,nil,nil,cm.tg2,cm.op2)
end end
function cm.con(e,c) function cm.con(e,c)
if not c then return true end if not c then return true end
......
...@@ -38,7 +38,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
local check=Duel.IsExistingMatchingCard(cm.checkfilter,tp,LOCATION_MZONE,0,1,nil) local check=Duel.IsExistingMatchingCard(cm.checkfilter,tp,LOCATION_MZONE,0,1,nil)
if check and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if check and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,check) local g=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK,0,1,1,nil,check)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
...@@ -46,10 +46,13 @@ end ...@@ -46,10 +46,13 @@ end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end end
function cm.discheck(c)
return c:IsSetCard(0x769) and c:IsType(TYPE_MONSTER) and c:IsDiscardable()
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)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(cm.discheck,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST,e:GetHandler()) Duel.DiscardHand(tp,cm.discheck,1,1,REASON_COST,e:GetHandler())
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -13,8 +13,8 @@ function cm.initial_effect(c) ...@@ -13,8 +13,8 @@ function cm.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,m) e3:SetCountLimit(1,m)
e3:SetCost(cm.thcost) e3:SetCost(cm.thcost)
e3:SetTarget(cm.thtg) e3:SetTarget(cm.thtg2)
e3:SetOperation(cm.thop) e3:SetOperation(cm.thop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter) Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end end
...@@ -22,11 +22,11 @@ cm.add_juesishi=true ...@@ -22,11 +22,11 @@ cm.add_juesishi=true
function cm.counterfilter(c) function cm.counterfilter(c)
return c:IsRace(RACE_FIEND) return c:IsRace(RACE_FIEND)
end end
function cm.thfilter(c) function cm.thfilter1(c)
return c:IsSetCard(0x769) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsSetCard(0x769) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function cm.thop(e,tp) function cm.thop(e,tp)
rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK,0,1,1,nil,{}) rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter1),tp,LOCATION_DECK,0,1,1,nil,{})
end end
function cm.costfilter(c) function cm.costfilter(c)
return c:IsRace(RACE_FIEND) and c:IsFaceup() and c:IsReleasable() return c:IsRace(RACE_FIEND) and c:IsFaceup() and c:IsReleasable()
...@@ -48,14 +48,14 @@ end ...@@ -48,14 +48,14 @@ end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand() and c:IsSetCard(0x46) return c:IsType(TYPE_SPELL) and c:IsAbleToHand() and c:IsSetCard(0x46)
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(cm.costfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(cm.costfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectTarget(tp,cm.costfilter,tp,LOCATION_MZONE,0,1,1,nil) local sg=Duel.SelectTarget(tp,cm.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Release(sg,REASON_COST) Duel.Release(sg,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
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.thfilter,tp,LOCATION_DECK,0,1,1,nil)
......
...@@ -94,7 +94,7 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -94,7 +94,7 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
return e:GetHandler():IsReleasable() return e:GetHandler():IsReleasable()
end end
Duel.Release(e:GetHandler():IsReleasable(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function cm.tdfilter(c) function cm.tdfilter(c)
return c:IsAbleToDeck() return c:IsAbleToDeck()
......
...@@ -15,7 +15,7 @@ function cm.initial_effect(c) ...@@ -15,7 +15,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--immune --immune
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
......
...@@ -65,8 +65,15 @@ function c9310011.spcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,8 +65,15 @@ function c9310011.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,30013020) return Duel.IsPlayerAffectedByEffect(tp,30013020)
end end
function c9310011.rscost(e,tp,eg,ep,ev,re,r,rp,chk) function c9310011.rscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end local c=e:GetHandler()
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) if chk==0 then return c:IsDiscardable()
or (Duel.IsPlayerAffectedByEffect(tp,9310027) and not c:IsPublic()) end
if Duel.IsPlayerAffectedByEffect(tp,9310027) and not c:IsPublic()
and (not c:IsDiscardable() or Duel.SelectOption(tp,aux.Stringid(9310027,0),aux.Stringid(9310027,1))==0) then
Duel.ConfirmCards(1-tp,c)
else
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
end end
function c9310011.matfilter(c,e,tp,chk) function c9310011.matfilter(c,e,tp,chk)
return c:IsCanBeRitualMaterial(nil) and (not chk or c~=e:GetHandler()) return c:IsCanBeRitualMaterial(nil) and (not chk or c~=e:GetHandler())
......
...@@ -35,8 +35,15 @@ function c9310024.initial_effect(c) ...@@ -35,8 +35,15 @@ function c9310024.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c9310024.rscost(e,tp,eg,ep,ev,re,r,rp,chk) function c9310024.rscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end local c=e:GetHandler()
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) if chk==0 then return c:IsDiscardable()
or (Duel.IsPlayerAffectedByEffect(tp,9310027) and not c:IsPublic()) end
if Duel.IsPlayerAffectedByEffect(tp,9310027) and not c:IsPublic()
and (not c:IsDiscardable() or Duel.SelectOption(tp,aux.Stringid(9310027,0),aux.Stringid(9310027,1))==0) then
Duel.ConfirmCards(1-tp,c)
else
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
end end
function c9310024.filter(c,e,tp) function c9310024.filter(c,e,tp)
return aux.AtkEqualsDef(c) and c:IsType(TYPE_TUNER) return aux.AtkEqualsDef(c) and c:IsType(TYPE_TUNER)
......
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