Commit 6b435f23 authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:alstroemeria-silentlove/ygopro-222DIY-cards

parents 80fecbf1 b3a3f64a
No preview for this file type
...@@ -18,8 +18,8 @@ function cm.initial_effect(c) ...@@ -18,8 +18,8 @@ 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_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(cm.target)
e2:SetOperation(cm.activate) e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -53,9 +53,6 @@ end ...@@ -53,9 +53,6 @@ end
function cm.rmfilter(c) function cm.rmfilter(c)
return not c:IsSetCard(0x47f2) return not c:IsSetCard(0x47f2)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_DECK,0,1,nil) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_DECK,0,nil)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
......
...@@ -7,6 +7,7 @@ function c33400114.initial_effect(c) ...@@ -7,6 +7,7 @@ function c33400114.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(c33400114.cost)
e1:SetTarget(c33400114.target) e1:SetTarget(c33400114.target)
e1:SetOperation(c33400114.activate) e1:SetOperation(c33400114.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -22,17 +23,17 @@ end ...@@ -22,17 +23,17 @@ end
function c33400114.chkfilter(c) function c33400114.chkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3341) return c:IsFaceup() and c:IsSetCard(0x3341)
end end
function c33400114.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33400114.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_HAND) and c33400114.chkfilter(chkc) end if chk==0 then return Duel.IsExistingMatchingCard(c33400114.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c33400114.filter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c33400114.filter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c33400114.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c33400114.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c33400114.tfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c33400114.activate(e,tp,eg,ep,ev,re,r,rp) function c33400114.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if Duel.SendtoGrave(tc,REASON_EFFECT)==0 then return end
if Duel.GetLocationCountFromEx(tp)<=0 then return end if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c33400114.tfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local sg=Duel.SelectMatchingCard(tp,c33400114.tfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
...@@ -68,8 +69,8 @@ function c33400114.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,8 +69,8 @@ function c33400114.tgop(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(c33400114.ss,tp,LOCATION_GRAVE,0,nil,e,tp) local dg=Duel.GetMatchingGroup(c33400114.ss,tp,LOCATION_GRAVE,0,nil,e,tp)
if dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(33400114,0)) then if dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(33400114,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c33400114.ss,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c33400114.ss,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
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