Commit 6b60e0c4 authored by mercury233's avatar mercury233

new card

parent 97e47de9
#created by ...
#main
100236107
100236108
100236109
100236110
100236111
100236112
100236113
100236115
100236116
100236117
100412002
100412003
100412019
100412029
100236101
100236102
100236103
100236104
100236105
100236106
100236114
100236118
100412016
100412028
100412030
......@@ -40,7 +22,6 @@
100412009
100412011
100200158
100236100
100412007
100412100
100308040
......
#created by ...
#main
100236101
100236102
100236103
100236104
100236105
100236106
100236107
100236108
100236109
100236110
100236111
100236112
100236113
100236114
100236115
100236116
100236117
100236118
100236119
#extra
100236100
!side
--運命の一枚
--
--Script by mercury233
function c100236119.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100236119+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100236119.target)
e1:SetOperation(c100236119.activate)
c:RegisterEffect(e1)
end
function c100236119.filter(c)
return c:IsAbleToHand()
end
function c100236119.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100236119.filter,tp,LOCATION_DECK,0,5,nil)
and Duel.IsExistingMatchingCard(c100236119.filter,1-tp,LOCATION_DECK,0,5,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,PLAYER_ALL,LOCATION_DECK)
end
function c100236119.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<5 or Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)<5
or not Duel.IsExistingMatchingCard(c100236119.filter,tp,LOCATION_DECK,0,1,nil)
or not Duel.IsExistingMatchingCard(c100236119.filter,1-tp,LOCATION_DECK,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100236119,0))
local g1=Duel.SelectMatchingCard(tp,c100236119.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(100236119,0))
local g2=Duel.SelectMatchingCard(1-tp,c100236119.filter,1-tp,LOCATION_DECK,0,1,1,nil)
Duel.BreakEffect()
--[[ need Duel.RandomSelect to be updated for manually select
local tg1=Duel.GetMatchingGroup(nil,tp,LOCATION_DECK,0,g1:GetFirst())
local tg2=Duel.GetMatchingGroup(nil,1-tp,LOCATION_DECK,0,g2:GetFirst())
local og2=tg2:RandomSelect(tp,4)
local og1=tg1:RandomSelect(1-tp,4)
g1:Merge(og1)
g2:Merge(og2)
local sg1=g1:RandomSelect(tp,1)
local sg2=g2:RandomSelect(1-tp,1)
]]--
Duel.ShuffleDeck(tp)
Duel.ShuffleDeck(1-tp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100236119,1))
local og2=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_DECK,4,4,g2:GetFirst())
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(100236119,1))
local og1=Duel.SelectMatchingCard(1-tp,nil,1-tp,0,LOCATION_DECK,4,4,g1:GetFirst())
g1:Merge(og1)
g2:Merge(og2)
Duel.ShuffleDeck(tp)
Duel.ShuffleDeck(1-tp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100236119,2))
local sg2=g2:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(100236119,2))
local sg1=g1:Select(1-tp,1,1,nil)
--
Duel.SendtoHand(sg1,tp,REASON_EFFECT)
Duel.SendtoHand(sg2,1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,sg2)
Duel.ConfirmCards(1-tp,sg1)
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