Commit f4bb37d5 authored by POLYMER's avatar POLYMER

fix

parent 3cc4a48c
No preview for this file type
...@@ -84,11 +84,14 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,11 +84,14 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
c:SetTurnCounter(0) c:SetTurnCounter(0)
end end
function cm.spfilter(c,e,p,zone) function cm.spfilter(c,e,p,zone)
return c:IsCanBeSpecialSummoned(e,0,p,false,false,POS_FACEUP+POS_FACEDOWN_DEFENSE,p)--,zone) return c:IsCanBeSpecialSummoned(e,0,p,false,false,POS_FACEUP+POS_FACEDOWN_DEFENSE,p,zone)
end end
function cm.ssfilter(c) function cm.ssfilter(c)
return c:IsSSetable() and not c:IsType(TYPE_FIELD) return c:IsSSetable() and not c:IsType(TYPE_FIELD)
end end
function cm.ntfilter(c,p)
return c:IsControler(p) and not c:IsType(TYPE_TOKEN)
end
local A=1103515245 local A=1103515245
local B=12345 local B=12345
local M=32767 local M=32767
...@@ -106,6 +109,7 @@ function cm.roll(min,max) ...@@ -106,6 +109,7 @@ function cm.roll(min,max)
end end
return cm.r return cm.r
end end
if Duel.GetRandomNumber then cm.roll=Duel.GetRandomNumber end
function cm.evoperation(e,tp,eg,ep,ev,re,r,rp) function cm.evoperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ct=c:GetTurnCounter() local ct=c:GetTurnCounter()
...@@ -165,9 +169,13 @@ function cm.evoperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -165,9 +169,13 @@ function cm.evoperation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
local g12=g1+g2
local g123=g1+g2+g3 local g123=g1+g2+g3
--if #g1>0 then Duel.Destroy(g1,REASON_RULE) end --if #g1>0 then Duel.Destroy(g1,REASON_RULE) end
if #g123>0 then Duel.Destroy(g123,REASON_EFFECT) end if #g123>0 then Duel.Destroy(g123,REASON_EFFECT) end
local ct={}
ct[0]=g3:FilterCount(Card.IsControler,nil,0)+g12:FilterCount(cm.ntfilter,nil,0)
ct[1]=g3:FilterCount(Card.IsControler,nil,1)+g12:FilterCount(cm.ntfilter,nil,1)
for i=0,4 do for i=0,4 do
for j=0,4 do for j=0,4 do
--sequence? --sequence?
...@@ -196,7 +204,7 @@ function cm.evoperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -196,7 +204,7 @@ function cm.evoperation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
token:RegisterEffect(e1,true) token:RegisterEffect(e1,true)
elseif (j==1 or j==3) and Duel.IsPlayerCanSpecialSummonMonster(tp,tokenid,nil,0x4011,0,0,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_ATTACK,p) then --and (not Duel.IsPlayerAffectedByEffect(tp,59822133) or #g1<=1) then elseif (j==1 or j==3) and Duel.IsPlayerCanSpecialSummonMonster(tp,tokenid,nil,0x4011,0,0,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_ATTACK,p) and (not Duel.IsPlayerAffectedByEffect(tp,59822133) or ct[tp]<=1) then
local token=Duel.CreateToken(tp,tokenid) local token=Duel.CreateToken(tp,tokenid)
--if tc then Duel.Destroy(tc,REASON_RULE) end --if tc then Duel.Destroy(tc,REASON_RULE) end
if p==tp then if p==tp then
...@@ -218,53 +226,55 @@ function cm.evoperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -218,53 +226,55 @@ function cm.evoperation(e,tp,eg,ep,ev,re,r,rp)
local p,loc,seq=cm.zone2seq(tp,zone) local p,loc,seq=cm.zone2seq(tp,zone)
local tc=cm.GetCardsInZone(tp,zone) local tc=cm.GetCardsInZone(tp,zone)
local g=Group.CreateGroup() local g=Group.CreateGroup()
if loc==LOCATION_MZONE then if Duel.CheckLocation(p,loc,seq) then
local zone2=zone if loc==LOCATION_MZONE then
if zone>=1<<16 then zone2=zone>>16 end local zone2=zone
g=Duel.GetMatchingGroup(cm.spfilter,p,LOCATION_DECK,0,g3,e,p)--,zone2) if zone>=1<<16 then zone2=zone>>16 end
if #g>0 then --and (not Duel.IsPlayerAffectedByEffect(tp,59822133) or #g3<=1) then g=Duel.GetMatchingGroup(cm.spfilter,p,LOCATION_DECK,0,g123,e,p,zone2)
if p==tp then if #g>0 and (not Duel.IsPlayerAffectedByEffect(tp,59822133) or ct[tp]<=1) then
local zone2=zone if p==tp then
if zone>=1<<16 then zone2=zone>>16 else zone2=zone<<16 end local zone2=zone
Duel.Hint(HINT_ZONE,1-tp,zone2) if zone>=1<<16 then zone2=zone>>16 else zone2=zone<<16 end
else Duel.Hint(HINT_ZONE,1-tp,zone2)
Duel.Hint(HINT_ZONE,tp,zone) else
end Duel.Hint(HINT_ZONE,tp,zone)
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(m,2)) end
local tg=g:Select(p,1,1,nil) Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(m,2))
--if tc then Duel.Destroy(tc,REASON_RULE) end local tg=g:Select(p,1,1,nil)
if p==tp then --if tc then Duel.Destroy(tc,REASON_RULE) end
Duel.SpecialSummonStep(tg:GetFirst(),0,p,p,false,false,POS_FACEUP+POS_FACEDOWN_DEFENSE,zone) if p==tp then
if tg:GetFirst():IsFacedown() then Duel.ConfirmCards(1-p,tg) end Duel.SpecialSummonStep(tg:GetFirst(),0,p,p,false,false,POS_FACEUP+POS_FACEDOWN_DEFENSE,zone)
else if tg:GetFirst():IsFacedown() then Duel.ConfirmCards(1-p,tg) end
Duel.SpecialSummonStep(tg:GetFirst(),0,p,p,false,false,POS_FACEUP+POS_FACEDOWN_DEFENSE,zone>>16) else
if tg:GetFirst():IsFacedown() then Duel.ConfirmCards(1-p,tg) end Duel.SpecialSummonStep(tg:GetFirst(),0,p,p,false,false,POS_FACEUP+POS_FACEDOWN_DEFENSE,zone>>16)
if tg:GetFirst():IsFacedown() then Duel.ConfirmCards(1-p,tg) end
end
end end
end elseif loc==LOCATION_SZONE then
elseif loc==LOCATION_SZONE then g=Duel.GetMatchingGroup(cm.ssfilter,p,LOCATION_DECK,0,g123)
g=Duel.GetMatchingGroup(cm.ssfilter,p,LOCATION_DECK,0,g3) if #g>0 then
if #g>0 then if p==tp then
if p==tp then local zone2=zone
local zone2=zone if zone>=1<<16 then zone2=zone>>16 else zone2=zone<<16 end
if zone>=1<<16 then zone2=zone>>16 else zone2=zone<<16 end Duel.Hint(HINT_ZONE,1-tp,zone2)
Duel.Hint(HINT_ZONE,1-tp,zone2) else
else Duel.Hint(HINT_ZONE,tp,zone)
Duel.Hint(HINT_ZONE,tp,zone) end
end Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(m,3))
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(m,3)) local tg=g:Select(p,1,1,nil)
local tg=g:Select(p,1,1,nil) --if tc then Duel.Destroy(tc,REASON_RULE) end
--if tc then Duel.Destroy(tc,REASON_RULE) end cm.mv=true
cm.mv=true if p==tp then
if p==tp then Duel.MoveToField(tg:GetFirst(),p,p,LOCATION_SZONE,POS_FACEDOWN,false,zone>>8)
Duel.MoveToField(tg:GetFirst(),p,p,LOCATION_SZONE,POS_FACEDOWN,false,zone>>8) --Duel.SSet(p,tg:GetFirst())
--Duel.SSet(p,tg:GetFirst()) Duel.RaiseEvent(tg:GetFirst(),EVENT_SSET,e,REASON_EFFECT,p,p,0)
Duel.RaiseEvent(tg:GetFirst(),EVENT_SSET,e,REASON_EFFECT,p,p,0) Duel.ConfirmCards(1-p,tg)
Duel.ConfirmCards(1-p,tg) else
else Duel.MoveToField(tg:GetFirst(),p,p,LOCATION_SZONE,POS_FACEDOWN,false,zone>>24)
Duel.MoveToField(tg:GetFirst(),p,p,LOCATION_SZONE,POS_FACEDOWN,false,zone>>24) --Duel.SSet(p,tg:GetFirst())
--Duel.SSet(p,tg:GetFirst()) Duel.RaiseEvent(tg:GetFirst(),EVENT_SSET,e,REASON_EFFECT,p,p,0)
Duel.RaiseEvent(tg:GetFirst(),EVENT_SSET,e,REASON_EFFECT,p,p,0) Duel.ConfirmCards(1-p,tg)
Duel.ConfirmCards(1-p,tg) end
end end
end end
end end
......
...@@ -158,10 +158,6 @@ function cm.initial_effect(c) ...@@ -158,10 +158,6 @@ function cm.initial_effect(c)
end end
local KOISHI_CHECK=false local KOISHI_CHECK=false
if Card.SetCardData then KOISHI_CHECK=true end if Card.SetCardData then KOISHI_CHECK=true end
if Duel.GetRandomNumber then Debug.Message("You can use Duel.GetRandomNumber."..Duel.GetRandomNumber(1,20))
else Debug.Message("You cannot use Duel.GetRandomNumber.") end
if debug and debug.getregistry then Debug.Message("You can use debug.getregistry.")
else Debug.Message("You cannot use debug.getregistry.") end
function cm.filter(g,f,nc,...) function cm.filter(g,f,nc,...)
if aux.GetValueType(f)=="function" then return g:Filter(f,nc,...) end if aux.GetValueType(f)=="function" then return g:Filter(f,nc,...) end
local ng=g:Clone() local ng=g:Clone()
...@@ -206,6 +202,7 @@ function cm.roll(min,max) ...@@ -206,6 +202,7 @@ function cm.roll(min,max)
end end
return cm.r return cm.r
end end
if Duel.GetRandomNumber then cm.roll=Duel.GetRandomNumber end
function cm.list(code) function cm.list(code)
for _,codes in pairs(cm.blacklist) do for _,codes in pairs(cm.blacklist) do
if codes==code then return true end if codes==code then return true end
......
--闪刀姬-灵线 --闪刀姬-灵线
local m=11451430 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetSPSummonOnce(m) c:SetSPSummonOnce(m)
--xyz summon --xyz summon
...@@ -97,7 +96,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,7 +96,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg) Duel.HintSelection(sg)
if Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then if Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 and sg:GetFirst():IsLocation(LOCATION_HAND) then
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -60,7 +60,7 @@ end ...@@ -60,7 +60,7 @@ end
function cm.adop(e,tp,eg,ep,ev,re,r,rp) function cm.adop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,1,nil)
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
......
...@@ -40,30 +40,38 @@ function c22348083.spfilter2(c,e,tp) ...@@ -40,30 +40,38 @@ function c22348083.spfilter2(c,e,tp)
return c:IsSetCard(0x3703) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x3703) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c22348083.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c22348083.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tep=nil local tep=nil
if Duel.GetCurrentChain()>1 then tep=Duel.GetChainInfo(Duel.GetCurrentChain()-1,CHAININFO_TRIGGERING_PLAYER) end if chk==0 then
if tep and tep==1-tp then if Duel.GetCurrentChain()>0 then tep=Duel.GetChainInfo(Duel.GetCurrentChain(),CHAININFO_TRIGGERING_PLAYER) end
if chk==0 then return Duel.IsExistingMatchingCard(c22348083.spfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if tep and tep==1-tp then
e:SetLabel(1) return Duel.IsExistingMatchingCard(c22348083.spfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
else
if chk==0 then return Duel.IsExistingMatchingCard(c22348083.spfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end else
e:SetLabel(0) return Duel.IsExistingMatchingCard(c22348083.spfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end end
end
if Duel.GetCurrentChain()>1 then tep=Duel.GetChainInfo(Duel.GetCurrentChain()-1,CHAININFO_TRIGGERING_PLAYER) end
if tep and tep==1-tp then
e:SetLabel(1)
else
e:SetLabel(0)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function c22348083.operation(e,tp,eg,ep,ev,re,r,rp) function c22348083.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if e:GetLabel()==1 then if e:GetLabel()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c22348083.spfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c22348083.spfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c22348083.spfilter1),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c22348083.spfilter1),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
end end
function c22348083.spcostfilter(c,tp) function c22348083.spcostfilter(c,tp)
......
--方舟骑士-苇草·焰影
function c29008292.initial_effect(c)
We're no strangers to love
你我对于爱情均非陌生之人
You know the rules and so do I
你对规则知根晓底我也如此
A full commitment's what I'm thinking of
我想给的就是一份真心忠贞
You wouldn't get this from any other guy
这你将不会从其他人那得到
I just wanna tell you how I'm feeling
我只想告诉你我的感受体会
Gotta make you understand
渴望让你也能懂得我的心意
Never gonna give you up
永远不会将你放弃
Never gonna let you down
永远不会让你失望
Never gonna run around and desert you
永远不会四处招摇将你抛弃
Never gonna make you cry
绝对不会让你哭泣
Never gonna say goodbye
绝对不会说出再见
Never gonna tell a lie and hurt you
绝对不会口出谎言将你伤害
We've known each other for so long
我们相识相知已然太长太久
Your heart's been aching but you're too shy to say it
你心一直作痛你却羞于出口
Inside we both know what's been going on
内心你我都清楚发生着什么
We know the game and we're gonna play it
我们深谙这场游戏将要继续
And if you ask me how I'm feeling
而若你问我此刻我是何情感
Don't tell me you're too blind to see
别告诉我你已盲目视而不见
Never gonna give you up
永远不会将你放弃
Never gonna let you down
永远不会让你失望
Never gonna run around and desert you
永远不会四处招摇将你抛弃
Never gonna make you cry
绝对不会让你哭泣
Never gonna say goodbye
绝对不会说出再见
Never gonna tell a lie and hurt you
绝对不会口出谎言将你伤害
No I'm never gonna give you up
永远不会将你放弃
No I'm never gonna let you down
永远不会让你失望
No I'll never run around and hurt you
永远不会四处招摇将你伤害
Never ever desert you
永远不会将你抛弃
We've known each other for so long
我们相识相知已然太长太久
Your heart's been aching but
你的心一直隐隐作痛你却是
Never gonna give you up
永远不会将你放弃
Never gonna let you down
永远不会让你失望
Never gonna run around and desert you
永远不会寻花问柳将你抛弃
Never gonna make you cry
绝对不会让你哭泣
Never gonna say goodbye
绝对不会说出再见
Never gonna tell a lie and hurt you
绝对不会对你欺瞒将你伤害
No I'm never gonna give you up
永远不会将你放弃
No I'm never gonna let you down
永远不会让你失望
No I'll never run around and hurt you
永远不会寻花问柳将你伤害
I'll never, ever desert you
我将永不将你抛弃
end
--方舟骑士将火照影
c29091651.named_with_Arknight=1
function c29091651.initial_effect(c)
aux.AddCodeList(c,29008292)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c29091651.target)
e1:SetOperation(c29091651.activate)
c:RegisterEffect(e1)
end
function c29091651.filter(c,e,tp)
return c:IsCode(29008292)
end
function c29091651.filter2(c,e,tp)
return bit.band(c:GetType(),0x81)==0x81 and c:IsCode(29008292) and Duel.GetLP(tp)>c:GetLevel()*400
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true)
end
function c29091651.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
local b1=Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,c29091651.filter,e,tp,mg,nil,Card.GetLevel,"Greater")
local b2=Duel.IsExistingMatchingCard(c29091651.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
return b1 or b2
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c29091651.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
local mg=Duel.GetRitualMaterial(tp)
local g1=Duel.GetMatchingGroup(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,c29091651.filter,e,tp,mg,nil,Card.GetLevel,"Greater")
local g2=Duel.GetMatchingGroup(c29091651.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
g:Merge(g1)
g:Merge(g2)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst()
if g1:IsContains(tc) and (not g2:IsContains(tc) or Duel.SelectOption(tp,aux.Stringid(29091651,0),aux.Stringid(29091651,1))==0) then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
else
local dam=tc:GetLevel()*400
if Duel.Damage(tp,dam,REASON_EFFECT)~=dam then return end
tc:SetMaterial(nil)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
local m=53798001
local cm=_G["c"..m]
cm.name="手塚琳"
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.rmtg)
e1:SetOperation(cm.rmop)
c:RegisterEffect(e1)
local sg=Group.CreateGroup()
sg:KeepAlive()
e1:SetLabelObject(sg)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(cm.desop)
e2:SetLabelObject(sg)
c:RegisterEffect(e2)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if g:GetCount()==0 then return false end
local tc=g:GetMinGroup(Card.GetSequence):GetFirst()
return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,POS_FACEDOWN) and tc:IsAbleToRemove(POS_FACEDOWN)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,POS_FACEDOWN)
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function cm.tffilter(c,tp)
return c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if g:GetCount()==0 then return end
local tc1=g:GetMinGroup(Card.GetSequence):GetFirst()
local tc2=Duel.GetTargetsRelateToChain():GetFirst()
Duel.DisableShuffleCheck()
if Duel.Remove(tc1,POS_FACEDOWN,REASON_EFFECT)==0 or not tc1:IsLocation(LOCATION_REMOVED) or not tc2 then return end
Duel.ConfirmCards(tp,Group.FromCards(tc1,tc2))
Duel.ConfirmCards(1-tp,Group.FromCards(tc1,tc2))
if not tc1:IsCode(tc2:GetCode()) or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,cm.tffilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
if not tc:IsType(TYPE_CONTINUOUS) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
Duel.ShuffleDeck(tp)
if c:IsRelateToEffect(e) then
local sg=e:GetLabelObject()
if c:GetFlagEffect(m)==0 then
sg:Clear()
c:RegisterFlagEffect(m,RESET_EVENT+0x1020000,0,1)
end
sg:AddCard(tc)
tc:CreateRelation(c,RESET_EVENT+RESETS_STANDARD)
end
end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject():Filter(Card.IsRelateToCard,nil,e:GetHandler())
e:GetHandler():ResetFlagEffect(m)
e:GetLabelObject():Clear()
Duel.Destroy(g,REASON_EFFECT)
end
...@@ -2,18 +2,18 @@ ...@@ -2,18 +2,18 @@
function c88882039.initial_effect(c) function c88882039.initial_effect(c)
--cannot remove --cannot remove
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88880039,0)) e1:SetDescription(aux.Stringid(88882039,0))
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,88880039) e1:SetCountLimit(1,88882039)
e1:SetCost(c88882039.cost) e1:SetCost(c88882039.cost)
e1:SetTarget(c88882039.target) e1:SetTarget(c88882039.target)
e1:SetOperation(c88882039.operation) e1:SetOperation(c88882039.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--cannot remove --cannot remove
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88880039,1)) e3:SetDescription(aux.Stringid(88882039,1))
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_HAND) e3:SetRange(LOCATION_HAND)
......
...@@ -57,7 +57,7 @@ function c98920026.stg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -57,7 +57,7 @@ function c98920026.stg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c98920026.sop(e,tp,eg,ep,ev,re,r,rp) function c98920026.sop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98920026.srfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c98920026.sfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
...@@ -25,7 +25,7 @@ function c98950003.cfilter(c) ...@@ -25,7 +25,7 @@ function c98950003.cfilter(c)
return c:IsFaceup() and c:IsAttackAbove(1) return c:IsFaceup() and c:IsAttackAbove(1)
end end
function c98950003.condition(e,tp,eg,ep,ev,re,r,rp) function c98950003.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c98950001.cfilter,tp,LOCATION_MZONE,0,1,nil) return not Duel.IsExistingMatchingCard(c98950003.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c98950003.thfilter(c,tp) function c98950003.thfilter(c,tp)
return c:IsCode(4779091,78371393,98950001,98950004) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsCode(4779091,78371393,98950001,98950004) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
...@@ -41,10 +41,10 @@ function c98950003.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,10 +41,10 @@ function c98950003.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c98950003.tgfilter,tp,LOCATION_DECK,0,1,1,nil) local tg=Duel.SelectMatchingCard(tp,c98950003.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local tgc=tg:GetFirst() local tgc=tg:GetFirst()
if Duel.SendtoGrave(tgc,REASON_EFFECT)~=0 and tgc:IsLocation(LOCATION_GRAVE) then if Duel.SendtoGrave(tgc,REASON_EFFECT)~=0 and tgc:IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98950003.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,c98950003.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
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