Commit 9bf36993 authored by 聖園ミカ's avatar 聖園ミカ 🐟

vme50

parent a9c2d540
...@@ -4,12 +4,12 @@ local cm=_G["c"..m] ...@@ -4,12 +4,12 @@ local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua") Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--tohand --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_REMOVE) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetCondition(cm.drcon) e1:SetCondition(cm.drcon)
e1:SetTarget(cm.drtg) e1:SetTarget(cm.drtg)
...@@ -30,34 +30,27 @@ end ...@@ -30,34 +30,27 @@ end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp) function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end end
function cm.filter(c,e) function cm.tdfilter(c,e,tp)
return c:IsSetCard(0x81c) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) return c:IsSetCard(0x81c) and c:IsFaceupEx() and c:IsAbleToDeck()
end end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and cm.filter(chkc,e) end local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil):Filter(Card.IsCanBeEffectTarget,nil,e)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e) if chkc then return false end
if chk==0 then return g:GetClassCount(Card.GetCode)>=5 and Duel.IsPlayerCanDraw(tp,2) end if chk==0 then return Duel.IsPlayerCanDraw(tp,2)
local sg=Group.CreateGroup() and g:GetClassCount(Card.GetCode)>=5 end
for i=1,5 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=g:Select(tp,1,1,nil):GetFirst() local tg=g:SelectSubGroup(tp,aux.dncheck,false,5,5)
if tc then Duel.SetTargetCard(tg)
sg:AddCard(tc) Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,5,0,0)
g:Remove(Card.IsCode,nil,tc:GetCode())
end
end
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end end
function cm.drop(e,tp,eg,ep,ev,re,r,rp) function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end if tg:GetCount()<=0 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup() local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then
if ct>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT) Duel.Draw(tp,2,REASON_EFFECT)
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