Commit 10ba1e55 authored by Nemo Ma's avatar Nemo Ma

Merge card fix

parent 77465098
...@@ -6,7 +6,7 @@ function c33700056.initial_effect(c) ...@@ -6,7 +6,7 @@ function c33700056.initial_effect(c)
e1:SetCountLimit(1,33700056+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,33700056+EFFECT_COUNT_CODE_OATH)
e1:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(11,0,33700056*16) Duel.Hint(HINT_MUSIC,0,33700056*16)
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Activate --Activate
......
...@@ -100,7 +100,7 @@ function c33700067.con(e) ...@@ -100,7 +100,7 @@ function c33700067.con(e)
if g:GetClassCount(Card.GetCode)==5 then if g:GetClassCount(Card.GetCode)==5 then
if e:GetHandler():GetFlagEffect(33700067)==0 then if e:GetHandler():GetFlagEffect(33700067)==0 then
e:GetHandler():RegisterFlagEffect(33700067,0x1fe1000,0,1) e:GetHandler():RegisterFlagEffect(33700067,0x1fe1000,0,1)
Duel.Hint(11,0,aux.Stringid(33700067,0)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(33700067,0))
end end
return true return true
else else
......
...@@ -97,15 +97,15 @@ function c33700069.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,15 +97,15 @@ function c33700069.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
else else
local tc=g:GetFirst()
while tc do
Duel.MoveSequence(tc,1)
tc=g:GetNext()
end
if c:IsRelateToEffect(e) and c:IsAbleToDeck() then if c:IsRelateToEffect(e) and c:IsAbleToDeck() then
g:AddCard(c) Duel.SendtoDeck(c,nil,1,REASON_EFFECT)
local tg=g:GetFirst() end
while tg do end
Duel.MoveSequence(tg,1)
tg=g:GetNext()
end end
end end
end
end
end
end end
\ No newline at end of file
...@@ -53,7 +53,7 @@ function c33700082.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,7 +53,7 @@ function c33700082.target(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<hg then return false end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<hg then return false end
return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0
end end
Duel.Hint(12,0,aux.Stringid(33700082,3)) Duel.Hint(HINT_SOUND,0,aux.Stringid(33700082,3))
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end end
function c33700082.spfilter(c,e,tp) function c33700082.spfilter(c,e,tp)
......
...@@ -68,7 +68,7 @@ function c33700083.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -68,7 +68,7 @@ function c33700083.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local tg=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,nil) local tg=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return sg:GetCount()>0 and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,sg:GetCount(),nil) and not Duel.IsExistingMatchingCard(c33700083.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return sg:GetCount()>0 and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,sg:GetCount(),nil) and not Duel.IsExistingMatchingCard(c33700083.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(12,0,aux.Stringid(33700083,3)) Duel.Hint(HINT_SOUND,0,aux.Stringid(33700083,3))
Duel.SetOperationInfo(0,CATEGORY_HANDES,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_HANDES,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,sg:GetCount(),0,0)
end end
......
...@@ -55,7 +55,7 @@ end ...@@ -55,7 +55,7 @@ end
function c33700084.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c33700084.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp) if chk==0 then return Duel.IsPlayerCanDraw(tp)
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) end and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(12,0,aux.Stringid(33700084,5)) Duel.Hint(HINT_SOUND,0,aux.Stringid(33700084,5))
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end end
......
...@@ -35,7 +35,7 @@ function c33700085.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,7 +35,7 @@ function c33700085.target(e,tp,eg,ep,ev,re,r,rp,chk)
local result=g:FilterCount(Card.IsAbleToHand,nil)>0 local result=g:FilterCount(Card.IsAbleToHand,nil)>0
return result return result
end end
Duel.Hint(12,0,aux.Stringid(33700093,2)) Duel.Hint(HINT_SOUND,0,aux.Stringid(33700093,2))
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end end
......
...@@ -36,7 +36,7 @@ function c33700093.thfilter(c) ...@@ -36,7 +36,7 @@ function c33700093.thfilter(c)
end end
function c33700093.target(e,tp,eg,ep,ev,re,r,rp,chk) function c33700093.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700093.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c33700093.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(12,0,aux.Stringid(33700093,0)) Duel.Hint(HINT_SOUND,0,aux.Stringid(33700093,0))
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c33700093.operation(e,tp,eg,ep,ev,re,r,rp) function c33700093.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -89,7 +89,7 @@ end ...@@ -89,7 +89,7 @@ end
function c33700098.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33700098.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and aux.disfilter1(chkc) end if chkc then return chkc:IsOnField() and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(12,0,aux.Stringid(33700098,5)) Duel.Hint(HINT_SOUND,0,aux.Stringid(33700098,5))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
...@@ -127,7 +127,7 @@ function c33700098.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -127,7 +127,7 @@ function c33700098.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(12,0,aux.Stringid(33700098,6)) Duel.Hint(HINT_SOUND,0,aux.Stringid(33700098,6))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end end
......
...@@ -126,7 +126,7 @@ function c33700104.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -126,7 +126,7 @@ function c33700104.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c33700104.ctg(e,tp,eg,ep,ev,re,r,rp,chk) function c33700104.ctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanAddCounter(0x442,1) end if chk==0 then return e:GetHandler():IsCanAddCounter(0x442,1) end
Duel.Hint(12,0,aux.Stringid(33700104,4)) Duel.Hint(HINT_SOUND,0,aux.Stringid(33700104,4))
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x442) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x442)
end end
function c33700104.cop(e,tp,eg,ep,ev,re,r,rp) function c33700104.cop(e,tp,eg,ep,ev,re,r,rp)
...@@ -139,7 +139,7 @@ end ...@@ -139,7 +139,7 @@ end
function c33700104.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33700104.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(12,0,aux.Stringid(33700104,4)) Duel.Hint(HINT_SOUND,0,aux.Stringid(33700104,4))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
local tg=Duel.GetMatchingGroup(c33700104.refilter,tp,0,LOCATION_GRAVE,nil,g:GetFirst():GetCode()) local tg=Duel.GetMatchingGroup(c33700104.refilter,tp,0,LOCATION_GRAVE,nil,g:GetFirst():GetCode())
......
--霓火特警 --霓火特警
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function c33700137.initial_effect(c) function c33700137.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure2(c,nil,aux.NonTuner(nil)) aux.AddSynchroProcedure2(c,nil,aux.NonTuner(nil))
...@@ -9,11 +10,13 @@ function c33700137.initial_effect(c) ...@@ -9,11 +10,13 @@ function c33700137.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_TO_HAND) e1:SetCode(EVENT_TO_HAND)
e1:SetLabel(1)
e1:SetCondition(c33700137.condition) e1:SetCondition(c33700137.condition)
e1:SetOperation(c33700137.activate) e1:SetOperation(c33700137.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_TO_DECK) e2:SetCode(EVENT_TO_DECK)
e2:SetLabel(2)
e2:SetCondition(c33700137.condition2) e2:SetCondition(c33700137.condition2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
...@@ -27,22 +30,36 @@ function c33700137.desfilter(c,eg) ...@@ -27,22 +30,36 @@ function c33700137.desfilter(c,eg)
return eg:IsExists(c33700137.tyfilter,1,nil,c) return eg:IsExists(c33700137.tyfilter,1,nil,c)
end end
function c33700137.tyfilter(c,g) function c33700137.tyfilter(c,g)
return c:GetType()==g:GetType() return (c:GetType() & g:GetType() & 0x7)>0
end
function c33700137.GroupCheck(g,hg)
return Senya.CheckGroup(hg,c33700137.GroupCheck2,nil,g:GetCount(),g:GetCount(),g)
end
function c33700137.GroupCheck2(g,sg)
for i=0,2 do
local ty=0x1 << i
if g:FilterCount(Card.IsType,nil,ty)<sg:FilterCount(Card.IsType,nil,ty) then return false end
end
return true
end end
function c33700137.activate(e,tp,eg,ep,ev,re,r,rp) function c33700137.activate(e,tp,eg,ep,ev,re,r,rp)
if eg:GetCount()>0 then if eg:GetCount()>0 then
local f=e:GetLabel()==1 and c33700137.cfilter or c33700137.cfilter2
local dg=eg:Filter(f,nil,1-tp)
local hg=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,nil)
Duel.Hint(HINT_CARD,0,33700137) Duel.Hint(HINT_CARD,0,33700137)
Duel.ConfirmCards(tp,eg) Duel.ConfirmCards(tp,dg)
if not Duel.IsExistingMatchingCard(c33700137.desfilter,tp,LOCATION_HAND,0,1,nil,eg) then return end if not Senya.CheckGroup(dg,c33700137.GroupCheck,nil,1,63,hg) then return end
if Duel.SelectYesNo(tp,aux.Stringid(33700137,1)) then if Duel.SelectYesNo(tp,aux.Stringid(33700137,1)) then
local tg=Duel.SelectMatchingCard(tp,c33700137.desfilter,tp,LOCATION_HAND,0,1,1,nil,eg) local sg=Senya.SelectGroup(tp,HINTMSG_DESTROY,dg,c33700137.GroupCheck,nil,1,63,hg)
local tg=Senya.SelectGroup(tp,HINTMSG_TOGRAVE,hg,c33700137.GroupCheck2,nil,sg:GetCount(),sg:GetCount(),sg)
Duel.SendtoGrave(tg,REASON_EFFECT) Duel.SendtoGrave(tg,REASON_EFFECT)
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end
end end
end
end end
function c33700137.cfilter2(c,tp) function c33700137.cfilter2(c,tp)
return c:IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) and c:GetReasonPlayer(tp) return c:IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) and c:GetReasonPlayer()==tp
end end
function c33700137.condition2(e,tp,eg,ep,ev,re,r,rp) function c33700137.condition2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c33700137.cfilter2,1,nil,1-tp) return eg:IsExists(c33700137.cfilter2,1,nil,1-tp)
......
...@@ -38,7 +38,7 @@ function c33700173.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,7 +38,7 @@ function c33700173.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c33700173.cgfilter,tp,LOCATION_MZONE,0,nil) local ct=Duel.GetMatchingGroupCount(c33700173.cgfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end end
Duel.Hint(12,0,aux.Stringid(33700173,3)) Duel.Hint(HINT_SOUND,0,aux.Stringid(33700173,3))
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,ct,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,ct,0,0)
end end
function c33700173.op(e,tp,eg,ep,ev,re,r,rp) function c33700173.op(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -6,7 +6,7 @@ function c33700174.initial_effect(c) ...@@ -6,7 +6,7 @@ function c33700174.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(12,0,aux.Stringid(33700174,1)) Duel.Hint(HINT_SOUND,0,aux.Stringid(33700174,1))
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--set --set
......
...@@ -6,7 +6,7 @@ function c33700175.initial_effect(c) ...@@ -6,7 +6,7 @@ function c33700175.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(12,0,aux.Stringid(33700175,1)) Duel.Hint(HINT_SOUND,0,aux.Stringid(33700175,1))
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--set --set
......
...@@ -6,7 +6,7 @@ function c33700176.initial_effect(c) ...@@ -6,7 +6,7 @@ function c33700176.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(12,0,aux.Stringid(33700176,1)) Duel.Hint(HINT_SOUND,0,aux.Stringid(33700176,1))
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--set --set
......
...@@ -6,7 +6,7 @@ function c33700177.initial_effect(c) ...@@ -6,7 +6,7 @@ function c33700177.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(12,0,aux.Stringid(33700177,1)) Duel.Hint(HINT_SOUND,0,aux.Stringid(33700177,1))
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--set --set
......
...@@ -63,7 +63,7 @@ end ...@@ -63,7 +63,7 @@ end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(12,0,aux.Stringid(m,2)) Duel.Hint(HINT_SOUND,0,aux.Stringid(m,2))
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -63,7 +63,7 @@ end ...@@ -63,7 +63,7 @@ end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(12,0,aux.Stringid(m,3)) Duel.Hint(HINT_SOUND,0,aux.Stringid(m,3))
end end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp) function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return false end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return false end
...@@ -73,7 +73,7 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +73,7 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local b1=g:IsExists(Card.IsAbleToHand,1,nil) local b1=g:IsExists(Card.IsAbleToHand,1,nil)
local b2=e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsDiscardable() and e:GetHandler():IsLocation(LOCATION_HAND) and g:IsExists(function(c) return c:IsSetCard(0x442) and c:IsAbleToHand() end,1,nil) local b2=e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsDiscardable() and e:GetHandler():IsLocation(LOCATION_HAND) and g:IsExists(function(c) return c:IsSetCard(0x442) and c:IsAbleToHand() end,1,nil)
if b2 and Duel.SelectYesNo(tp,m*16+2) then if b2 and Duel.SelectYesNo(tp,m*16+2) then
Duel.Hint(12,0,aux.Stringid(m,5)) Duel.Hint(HINT_SOUND,0,aux.Stringid(m,5))
local tg=g:Filter(function(c) return c:IsSetCard(0x442) and c:IsAbleToHand() end,nil) local tg=g:Filter(function(c) return c:IsSetCard(0x442) and c:IsAbleToHand() end,nil)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD)
...@@ -83,7 +83,7 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,7 +83,7 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
elseif b1 then elseif b1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil) local tg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
Duel.Hint(12,0,aux.Stringid(m,4)) Duel.Hint(HINT_SOUND,0,aux.Stringid(m,4))
Duel.BreakEffect() Duel.BreakEffect()
Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.SendtoHand(tg,nil,REASON_EFFECT)
g:Sub(Duel.GetOperatedGroup()) g:Sub(Duel.GetOperatedGroup())
......
...@@ -3,21 +3,16 @@ local m=33700188 ...@@ -3,21 +3,16 @@ local m=33700188
local cm=_G["c"..m] local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end) xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c) function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,3,3,cm.lcheck)
c:EnableReviveLimit() c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.linkcon)
e0:SetOperation(cm.linkop)
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE) e1:SetProperty(0x14000)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end) e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end)
e1:SetTarget(cm.rmtg) e1:SetTarget(cm.rmtg)
e1:SetOperation(cm.rmop) e1:SetOperation(cm.rmop)
...@@ -27,31 +22,13 @@ function cm.initial_effect(c) ...@@ -27,31 +22,13 @@ function cm.initial_effect(c)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetLabelObject(e1)
e2:SetTargetRange(1,0) e2:SetTargetRange(1,0)
e2:SetCondition(cm.splimcon) e2:SetCondition(cm.splimcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.mfilter(c,lc) function cm.lcheck(g,lc)
return c:IsFaceup() and c:IsLinkType(TYPE_RITUAL) and c:IsCanBeLinkMaterial(lc) return g:GetClassCount(Card.GetCode)==g:GetCount()
end
function cm.lcheck(g,tp,lc)
return Duel.GetLocationCountFromEx(tp,tp,g,lc)>0 and not g:IsExists(cm.lfilter,1,nil,g)
end
function cm.lfilter(c,g)
return g:IsExists(Card.IsCode,1,c,c:GetCode())
end
function cm.linkcon(e,c)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_MZONE,0,nil)
return g:GetCount()>=3 and Senya.CheckGroup(g,cm.lcheck,nil,3,3,tp,c)
end
function cm.linkop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_MZONE,0,nil)
local g1=Senya.SelectGroup(tp,HINTMSG_LMATERIAL,g,cm.lcheck,nil,3,3,tp,c)
c:SetMaterial(g1)
Duel.SendtoGrave(g1,REASON_MATERIAL+REASON_LINK)
end end
function cm.rmfilter(c,e,tp,zone) function cm.rmfilter(c,e,tp,zone)
return zone>0 and c:IsFacedown() and c:IsCanBeSpecialSummoned(e,0,tp,true,true,POS_FACEUP,tp,zone) and Duel.GetLocationCountFromEx(tp)>0 return zone>0 and c:IsFacedown() and c:IsCanBeSpecialSummoned(e,0,tp,true,true,POS_FACEUP,tp,zone) and Duel.GetLocationCountFromEx(tp)>0
...@@ -73,5 +50,6 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,5 +50,6 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.splimcon(e) function cm.splimcon(e)
return e:GetHandler():GetCardTarget():IsContains(e:GetLabelObject()) local tc=e:GetLabelObject():GetLabelObject()
return tc and e:GetHandler():GetCardTarget():IsContains(tc)
end end
...@@ -3,6 +3,7 @@ local m=33700501 ...@@ -3,6 +3,7 @@ local m=33700501
local cm=_G["c"..m] local cm=_G["c"..m]
cm.dfc_front_side=m+1 cm.dfc_front_side=m+1
cm.card_code_list={33700056} cm.card_code_list={33700056}
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c) function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
...@@ -56,17 +57,14 @@ function cm.initial_effect(c) ...@@ -56,17 +57,14 @@ function cm.initial_effect(c)
end) end)
e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c.dfc_front_side end if chk==0 then return Senya.IsDFCTransformable(c) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end) end)
e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp,chk) e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() or c:IsImmuneToEffect(e) then return end if not c:IsRelateToEffect(e) or c:IsFacedown() or c:IsImmuneToEffect(e) then return end
local tcode=c.dfc_front_side Duel.Hint(HINT_MUSIC,0,m*16+3)
c:SetEntityCode(tcode,true) Senya.TransformDFCCard(c)
c:ReplaceEffect(tcode,0,0)
Duel.SetMetatable(c,_G["c"..tcode])
Duel.Hint(11,0,m*16+3)
end) end)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
......
...@@ -3,7 +3,9 @@ local m=33700502 ...@@ -3,7 +3,9 @@ local m=33700502
local cm=_G["c"..m] local cm=_G["c"..m]
cm.dfc_back_side=m-1 cm.dfc_back_side=m-1
cm.card_code_list={33700056} cm.card_code_list={33700056}
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c) function cm.initial_effect(c)
Senya.DFCBackSideCommonEffect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -11,25 +13,6 @@ function cm.initial_effect(c) ...@@ -11,25 +13,6 @@ function cm.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST) e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_HAND+LOCATION_EXTRA)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c.dfc_back_side
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tcode=c.dfc_back_side
c:SetEntityCode(tcode)
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
c:ReplaceEffect(tcode,0,0)
Duel.SetMetatable(c,_G["c"..tcode])
end)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
......
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