Commit 38800954 authored by Tachibana's avatar Tachibana

eme

parent 02d1e1ca
Pipeline #8777 passed with stages
in 40 minutes and 15 seconds
......@@ -6,7 +6,7 @@ function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.ffilter,27,true)
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
function cm.con(e,c)
if not c then return true end
......
......@@ -38,7 +38,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
local check=Duel.IsExistingMatchingCard(cm.checkfilter,tp,LOCATION_MZONE,0,1,nil)
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
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
......@@ -46,10 +46,13 @@ end
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
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)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST,e:GetHandler())
if chk==0 then return Duel.IsExistingMatchingCard(cm.discheck,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,cm.discheck,1,1,REASON_COST,e:GetHandler())
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -13,8 +13,8 @@ function cm.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,m)
e3:SetCost(cm.thcost)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
e3:SetTarget(cm.thtg2)
e3:SetOperation(cm.thop2)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
......@@ -22,11 +22,11 @@ cm.add_juesishi=true
function cm.counterfilter(c)
return c:IsRace(RACE_FIEND)
end
function cm.thfilter(c)
function cm.thfilter1(c)
return c:IsSetCard(0x769) and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
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
function cm.costfilter(c)
return c:IsRace(RACE_FIEND) and c:IsFaceup() and c:IsReleasable()
......@@ -48,14 +48,14 @@ end
function cm.thfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand() and c:IsSetCard(0x46)
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectTarget(tp,cm.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Release(sg,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
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)
if chk==0 then
return e:GetHandler():IsReleasable()
end
Duel.Release(e:GetHandler():IsReleasable(),REASON_COST)
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.tdfilter(c)
return c:IsAbleToDeck()
......
......@@ -15,7 +15,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
......
......@@ -65,8 +65,15 @@ function c9310011.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,30013020)
end
function c9310011.rscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
local c=e:GetHandler()
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
function c9310011.matfilter(c,e,tp,chk)
return c:IsCanBeRitualMaterial(nil) and (not chk or c~=e:GetHandler())
......
......@@ -35,8 +35,15 @@ function c9310024.initial_effect(c)
c:RegisterEffect(e3)
end
function c9310024.rscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
local c=e:GetHandler()
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
function c9310024.filter(c,e,tp)
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