Commit f3def031 authored by TanakaKotoha's avatar TanakaKotoha

micro

parent e80e3ca1
......@@ -92,7 +92,7 @@ function c16101103.thop(e,tp,eg,ep,ev,re,r,rp)
g=Duel.SelectMatchingCard(tp,c16101103.tgfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_RULE)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
g=Duel.SelectMatchingCard(tp,c16101103.tgfilter,1-tp,LOCATION_HAND,0,1,1,nil)
g=Duel.SelectMatchingCard(1-tp,c16101103.tgfilter,1-tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_RULE)
end
end
\ No newline at end of file
......@@ -23,13 +23,13 @@ function c33310210.initial_effect(c)
-- c:RegisterEffect(e1)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetDescription(aux.Stringid(33310210,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
e1:SetTarget(c33310210.thtg)
e1:SetOperation(c33310210.thop)
c:RegisterEffect(e1)
--special summon
local e5=Effect.CreateEffect(c)
......@@ -45,17 +45,17 @@ function c33310210.initial_effect(c)
c:RegisterEffect(e5)
end
function cm.thfilter(c)
return c:IsAbleToHand()
function c33310210.thfilter(c)
return c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
function c33310210.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c33310210.thfilter(chkc) and e:GetHandler():GetFlagEffect(33310210)==0 end
if chk==0 then return Duel.IsExistingTarget(c33310210.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
local g=Duel.SelectTarget(tp,c33310210.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
function c33310210.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
......
......@@ -80,6 +80,7 @@ function c33310214.costfil(c)
end
function c33310214.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c33310214.costfil,tp,LOCATION_HAND,0,e:GetHandler())
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(33310214,0)) then
local sg=g:Select(tp,1,1,nil)
......
......@@ -44,12 +44,12 @@ function c33310215.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c33310210.pubfil1(c)
function c33310215.pubfil1(c)
return not c:IsPublic()
end
function c33310215.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33310210.pubfil1,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c33310210.pubfil1,tp,LOCATION_HAND,0,1,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c33310215.pubfil1,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c33310215.pubfil1,tp,LOCATION_HAND,0,1,1,nil)
local gc=g:GetFirst()
if gc:IsSetCard(0x551) then e:SetLabel(1) end
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -57,12 +57,12 @@ function c33310215.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
gc:RegisterEffect(e1)
gc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(33310210,1))
gc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(33310215,1))
end
function c33310215.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsFaceup() and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SelectTarget(tp,nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
end
function c33310215.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
--MiXPeed Action
function c33330082.initial_effect(c)
local e1=Effect.CreateEffect(e:GetHandler())
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetTarget(c33330082.regtg)
e0:SetOperation(c33330082.bgmop)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetTarget(c33330082.fztg)
e1:SetRange(LOCATION_FZONE)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e2:SetCountLimit(1)
e2:SetCondition(c33330082.drcon)
e2:SetTarget(c33330082.drtg)
e2:SetOperation(c33330082.drop)
c:RegisterEffect(e2)
--inactivatable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
......@@ -21,6 +41,56 @@ function c33330082.initial_effect(c)
e5:SetValue(c33330082.effectfilter)
c:RegisterEffect(e5)
end
function c33330082.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return true
end
local c=e:GetHandler()
--to grave
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_FZONE)
e1:SetCondition(c33330082.gycon)
e1:SetOperation(c33330082.gyop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:SetTurnCounter(0)
c:RegisterEffect(e1)
end
function c33330082.gycon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c33330082.gyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==4 then
Duel.SendtoGrave(c,REASON_RULE)
end
end
function c33330082.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(33330082,0))
end
function c33330082.drcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
end
function c33330082.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,nil,e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0 and Duel.IsPlayerCanDraw(tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c33330082.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetMZoneCount(tp)<=0 then return end
local g=Duel.SelectMatchingCard(tp,Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,1,nil,e,0,tp,false,false)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c33330082.fztg(e,c)
return c:GetSummonPlayer()~=Duel.GetTurnPlayer()
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