Commit e7a59006 authored by Tachibana's avatar Tachibana

eme

parent 6dd2fd69
Pipeline #8397 passed with stages
in 26 minutes and 45 seconds
No preview for this file type
......@@ -35,7 +35,7 @@ end)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12030007,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c12030007.drcon)
e3:SetTarget(c12030007.drtg)
......@@ -132,8 +132,9 @@ function c12030007.cfilter(c)
return c:IsFaceup() and c:IsDisabled() and c:IsAbleToChangeControler()
end
function c12030007.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c12030007.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -26,7 +26,7 @@ function c12030009.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
......@@ -81,7 +81,7 @@ function cm.spfilter1(c,e,tp)
return c:CheckSetCard("yatori") and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.cfilter2(c,tp)
......
......@@ -35,7 +35,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_LEAVE_FIELD)
......
......@@ -21,6 +21,8 @@ function cm.initial_effect(c)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e2)
cm.deadrose_effect_onfield_splimit=e1
cm.deadrose_effect_onfield_slimit=e2
--cannot remove
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
......@@ -30,6 +32,7 @@ function cm.initial_effect(c)
e3:SetTargetRange(1,1)
e3:SetTarget(cm.crtg)
c:RegisterEffect(e3)
cm.deadrose_effect_onfield=e3
--fusion!
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
......@@ -39,6 +42,7 @@ function cm.initial_effect(c)
e4:SetTarget(cm.tgtg)
e4:SetOperation(cm.tgop)
c:RegisterEffect(e4)
cm.deadrose_effect_three=e4
end
function cm.splimcon(e)
return not e:GetHandler():IsForbidden()
......@@ -67,7 +71,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=g:SelectSubGroup(tp,cm.fselect,false,2,2)
if g1:GetCount()==2 and Duel.SendtoGrave(g1,REASON_EFFECT)==2 then
if g1 and g1:GetCount()==2 and Duel.SendtoGrave(g1,REASON_EFFECT)==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g3=Duel.SelectMatchingCard(tp,cm.tg3filter,tp,LOCATION_EXTRA,0,1,1,nil)
if g3:GetCount()~=0 then
......
......@@ -21,6 +21,8 @@ function cm.initial_effect(c)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e2)
cm.deadrose_effect_onfield_splimit=e1
cm.deadrose_effect_onfield_slimit=e2
--change effect type
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
......@@ -29,6 +31,7 @@ function cm.initial_effect(c)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(1,0)
c:RegisterEffect(e3)
cm.deadrose_effect_onfield=e3
--synchro!
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOGRAVE)
......@@ -39,6 +42,7 @@ function cm.initial_effect(c)
e4:SetTarget(cm.tgtg)
e4:SetOperation(cm.tgop)
c:RegisterEffect(e4)
cm.deadrose_effect_three=e4
end
function cm.splimcon(e)
return not e:GetHandler():IsForbidden()
......@@ -66,7 +70,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_HAND,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=g:SelectSubGroup(tp,cm.fselect,false,2,2)
if g1:GetCount()==2 and Duel.SendtoGrave(g1,REASON_EFFECT)==2 then
if g1 and g1:GetCount()==2 and Duel.SendtoGrave(g1,REASON_EFFECT)==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g3=Duel.SelectMatchingCard(tp,cm.tg3filter,tp,LOCATION_EXTRA,0,1,1,nil)
if g3:GetCount()~=0 then
......
......@@ -21,6 +21,8 @@ function cm.initial_effect(c)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e2)
cm.deadrose_effect_onfield_splimit=e1
cm.deadrose_effect_onfield_slimit=e2
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
......@@ -40,6 +42,7 @@ function cm.initial_effect(c)
e4:SetTarget(cm.tgtg)
e4:SetOperation(cm.tgop)
c:RegisterEffect(e4)
cm.deadrose_effect_three=e4
end
function cm.splimcon(e)
return not e:GetHandler():IsForbidden()
......@@ -86,7 +89,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_HAND,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=g:SelectSubGroup(tp,cm.fselect,false,2,2)
if g1:GetCount()==2 and Duel.SendtoGrave(g1,REASON_EFFECT)==2 then
if g1 and g1:GetCount()==2 and Duel.SendtoGrave(g1,REASON_EFFECT)==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g3=Duel.SelectMatchingCard(tp,cm.tg3filter,tp,LOCATION_EXTRA,0,1,1,nil)
if g3:GetCount()~=0 then
......
......@@ -207,7 +207,7 @@ function cm.aop(e,tp)
e1:SetOwnerPlayer(tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetTargetRange(LOCATION_HAND,0)
e2:SetTargetRange(LOCATION_HAND+LOCATION_ONFIELD,0)
e2:SetTarget(cm.advtg)
e2:SetLabelObject(e1)
e2:SetReset(RESET_PHASE+PHASE_END,2)
......@@ -221,7 +221,7 @@ function cm.aop(e,tp)
Duel.RegisterEffect(e3,tp)
end
function cm.rtg(e,rc)
return rc:IsLocation(LOCATION_SZONE) or ( rc:IsFaceup() and rc:IsType(TYPE_SPELL+TYPE_TRAP) )
return (rc:IsLocation(LOCATION_SZONE) or ( rc:IsFaceup() and rc:IsType(TYPE_SPELL+TYPE_TRAP) )) and rc~=e:GetHandler()
end
function cm.advtg(e,c)
return c:IsLevelAbove(5)
......
......@@ -25,7 +25,7 @@ end
--e1
function c33200508.filter(c)
return (aux.IsCodeListed(c,33200501) or c:IsCode(33200501)) and c:IsAbleToHand()
return (aux.IsCodeListed(c,33200501) or c:IsCode(33200501) or aux.IsCodeListed(c,33200511) or c:IsCode(33200511)) and c:IsAbleToHand()
end
function c33200508.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
......
......@@ -111,7 +111,12 @@ function c33200516.tzop(e,tp,eg,ep,ev,re,r,rp)
Duel.ShuffleHand(1-tp)
local opt=e:GetLabel()
if (opt==0 and sgc:IsType(TYPE_MONSTER)) or (opt==1 and sgc:IsType(TYPE_SPELL)) or (opt==2 and sgc:IsType(TYPE_TRAP)) then
op=Duel.SelectOption(1-tp,aux.Stringid(33200516,2),aux.Stringid(33200516,3))
local op=nil
if c:IsRelateToEffect(e) then
op=Duel.SelectOption(1-tp,aux.Stringid(33200516,2),aux.Stringid(33200516,3))
else
op=0
end
if op==0 then
Duel.SendtoGrave(sgc,REASON_EFFECT)
else
......
......@@ -28,6 +28,7 @@ function c33200520.initial_effect(c)
c:RegisterEffect(e2)
end
--e1
function c33200520.coffilter(c)
return c:GetFlagEffect(33200507)>0 and not c:IsDisabled()
......@@ -45,6 +46,7 @@ end
function c33200520.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local rtype=bit.band(re:GetActiveType(),0x7)
if chk==0 then return Duel.IsExistingMatchingCard(c33200520.shfilter,tp,LOCATION_HAND,0,1,nil,rtype) end
Duel.Hint(24,0,aux.Stringid(33200520,1))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c33200520.shfilter,tp,LOCATION_HAND,0,1,1,nil,rtype)
Duel.ConfirmCards(1-tp,g)
......
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