Commit 27e5a261 authored by nanahira's avatar nanahira

Merge branch 'master' of git.mycard.moe:alstroemeria-silentlove/ygopro-222DIY-cards

parents 08e4696f 756f6137
Pipeline #35807 passed with stages
in 39 minutes and 15 seconds
...@@ -104,8 +104,8 @@ end ...@@ -104,8 +104,8 @@ end
function s.drop(e,tp,eg,ep,ev,re,r,rp) function s.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil):GetFirst()
Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
if tc:IsLocation(LOCATION_EXTRA) and tc:GetControler()==tp then if tc:GetControler()==tp then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
......
...@@ -73,8 +73,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -73,8 +73,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
local mg1=Group.CreateGroup() local mg1=Group.CreateGroup()
local mg4=Group.CreateGroup()
local mg3=Duel.GetMatchingGroup(s.filter3,tp,LOCATION_HAND,0,c) local mg3=Duel.GetMatchingGroup(s.filter3,tp,LOCATION_HAND,0,c)
if #mg3>0 and Duel.GetFlagEffect(1-tp,id)>0 then if #mg3>0 and Duel.GetFlagEffect(1-tp,id)>0 then
mg1:Merge(mg3) mg1:Merge(mg3)
...@@ -95,20 +94,6 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -95,20 +94,6 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if #mg7>0 and Duel.GetFlagEffect(1-tp,id+4)>0 then if #mg7>0 and Duel.GetFlagEffect(1-tp,id+4)>0 then
mg1:Merge(mg7) mg1:Merge(mg7)
end end
local ge=c:IsHasEffect(EFFECT_TO_GRAVE_REDIRECT)
if ge and ge:GetValue()&LOCATION_DECK and c:IsCanBeFusionMaterial()
and c:IsAbleToGrave() and Duel.GetFlagEffect(1-tp,id+1)>0 then
mg4:AddCard(c)
end
if not ge and c:IsCanBeFusionMaterial()
and c:IsAbleToRemove() and Duel.GetFlagEffect(1-tp,id+3)>0 then
mg4:AddCard(c)
end
if ge and ge:GetValue()&LOCATION_REMOVED and c:IsCanBeFusionMaterial()
and c:IsAbleToDeck() and Duel.GetFlagEffect(1-tp,id+4)>0 then
mg4:AddCard(c)
end
if #mg4>0 then mg1:Merge(mg4) end
Auxiliary.FCheckAdditional=s.fcheck Auxiliary.FCheckAdditional=s.fcheck
Auxiliary.GCheckAdditional=s.gcheck Auxiliary.GCheckAdditional=s.gcheck
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
......
...@@ -4,13 +4,13 @@ local cm=_G["c"..m] ...@@ -4,13 +4,13 @@ local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,nil,2,2,cm.lcheck) aux.AddLinkProcedure(c,nil,2,2,cm.lcheck)
c:EnableReviveLimit() c:EnableReviveLimit()
--cannot link material --cannot link material
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetTarget(cm.lklimit) e1:SetValue(cm.lklimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atklimit --atklimit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
......
...@@ -38,7 +38,8 @@ end ...@@ -38,7 +38,8 @@ end
function cm.atktg(e,c) function cm.atktg(e,c)
return c:IsSetCard(0x829) and c:IsLevelAbove(7) return c:IsSetCard(0x829) and c:IsLevelAbove(7)
end end
function cm.atkval(e,c,tp) function cm.atkval(e,c)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroupCount(cm.atkfilter,tp,LOCATION_MZONE,0,nil)*100+Duel.GetFlagEffect(tp,m)*50 return Duel.GetMatchingGroupCount(cm.atkfilter,tp,LOCATION_MZONE,0,nil)*100+Duel.GetFlagEffect(tp,m)*50
end end
......
--甜甜圆骑士饱藏 --甜甜圆骑士饱藏
local cm, m, o = GetID() local cm, m, o = GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,18700935)
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_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
......
--永远的家人 --永远的家人
local s,id=GetID() local s,id=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER+CATEGORY_TOEXTRA) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER+CATEGORY_TOEXTRA)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
...@@ -27,7 +27,8 @@ function s.filter2(c,e,tp) ...@@ -27,7 +27,8 @@ function s.filter2(c,e,tp)
return c:IsSetCard(0xc342) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xc342) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp) local g=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1500) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1500)
......
...@@ -41,17 +41,22 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,17 +41,22 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
-- --
function s.desfilter(c) function s.desfilter(c,tc,tp)
return c:IsSetCard(0x9341) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() local mg=Group.CreateGroup()
mg:AddCard(tc)
mg:AddCard(c)
return c:IsSetCard(0x9341) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,mg)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return false end local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil) if chkc then return false end
and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,c,c,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil) local g1=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,c,c,tp)
g1:AddCard(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil) local g2=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,g1)
g1:Merge(g2) g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,1000)
......
...@@ -20,6 +20,7 @@ function s.initial_effect(c) ...@@ -20,6 +20,7 @@ function s.initial_effect(c)
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_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,id) e3:SetCountLimit(1,id)
e3:SetTarget(s.sptg) e3:SetTarget(s.sptg)
e3:SetOperation(s.spop) e3:SetOperation(s.spop)
......
...@@ -66,7 +66,9 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) ...@@ -66,7 +66,9 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA,0,1,c) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA,0,1,c) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA,0,c) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA,0,c)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,g,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,g,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA)
Duel.SetChainLimit(aux.FALSE) if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c) function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA,0,c) local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA,0,c)
......
--神选士 苍穹 --神选士 苍穹
local s,id=GetID() local s,id=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:SetSPSummonOnce(id) c:SetSPSummonOnce(id)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,3)) e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon) e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg) e1:SetTarget(s.sptg)
e1:SetOperation(s.spop) e1:SetOperation(s.spop)
e1:SetValue(SUMMON_VALUE_SELF) e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -135,7 +135,6 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -135,7 +135,6 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=Duel.IsPlayerAffectedByEffect(tp,92600250) local res=Duel.IsPlayerAffectedByEffect(tp,92600250)
for tc in aux.Next(g) do for tc in aux.Next(g) do
typ=bit.bor(typ,bit.band(tc:GetType(),0x7)) typ=bit.bor(typ,bit.band(tc:GetType(),0x7))
tc=g:GetNext()
end end
local b1=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,typ) local b1=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,typ)
local b2=Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,typ) local b2=Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,typ)
...@@ -150,7 +149,8 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -150,7 +149,8 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c = cg:Select(tp,1,1,nil):GetFirst() local c = cg:Select(tp,1,1,nil):GetFirst()
local typ2 = c:GetType() & 7 local typ2 = c:GetType() & 7
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
if res and c:IsOriginalCodeRule(92600250) and Duel.SelectYesNo(tp,aux.Stringid(92600250,0)) then if res and c:IsOriginalCodeRule(92600250) and (not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND,0,1,c,typ)
or Duel.SelectYesNo(tp,aux.Stringid(92600250,0))) then
c:RegisterFlagEffect(92600251,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) c:RegisterFlagEffect(92600251,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0)
local b1=g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) local b1=g:IsExists(Card.IsType,1,nil,TYPE_MONSTER)
local b2=g:IsExists(Card.IsType,1,nil,TYPE_SPELL) local b2=g:IsExists(Card.IsType,1,nil,TYPE_SPELL)
......
--神选士 阿波罗 --神选士 阿波罗
local s,id=GetID() local s,id=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:SetSPSummonOnce(id) c:SetSPSummonOnce(id)
...@@ -21,7 +21,7 @@ function s.initial_effect(c) ...@@ -21,7 +21,7 @@ function s.initial_effect(c)
e2:SetOperation(s.regop) e2:SetOperation(s.regop)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,5)) e3:SetDescription(aux.Stringid(id,5))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
...@@ -139,7 +139,6 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -139,7 +139,6 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=Duel.IsPlayerAffectedByEffect(tp,92600250) local res=Duel.IsPlayerAffectedByEffect(tp,92600250)
for tc in aux.Next(g) do for tc in aux.Next(g) do
typ=bit.bor(typ,bit.band(tc:GetType(),0x7)) typ=bit.bor(typ,bit.band(tc:GetType(),0x7))
tc=g:GetNext()
end end
local b1=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,typ) local b1=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,typ)
local b2=Duel.IsExistingMatchingCard(s.checkfilter1,tp,LOCATION_HAND,0,1,nil,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,nil) local b2=Duel.IsExistingMatchingCard(s.checkfilter1,tp,LOCATION_HAND,0,1,nil,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,nil)
...@@ -154,7 +153,8 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -154,7 +153,8 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c = cg:Select(tp,1,1,nil):GetFirst() local c = cg:Select(tp,1,1,nil):GetFirst()
local typ2 = c:GetType() & 7 local typ2 = c:GetType() & 7
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
if res and c:IsOriginalCodeRule(92600250) and Duel.SelectYesNo(tp,aux.Stringid(92600250,0)) then if res and c:IsOriginalCodeRule(92600250) and (not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND,0,1,c,typ)
or Duel.SelectYesNo(tp,aux.Stringid(92600250,0))) then
c:RegisterFlagEffect(92600251,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) c:RegisterFlagEffect(92600251,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0)
local b1=g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) local b1=g:IsExists(Card.IsType,1,nil,TYPE_MONSTER)
local b2=g:IsExists(Card.IsType,1,nil,TYPE_SPELL) local b2=g:IsExists(Card.IsType,1,nil,TYPE_SPELL)
......
...@@ -139,7 +139,6 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -139,7 +139,6 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local res=Duel.IsPlayerAffectedByEffect(tp,92600250) local res=Duel.IsPlayerAffectedByEffect(tp,92600250)
for tc in aux.Next(g) do for tc in aux.Next(g) do
typ=bit.bor(typ,bit.band(tc:GetType(),0x7)) typ=bit.bor(typ,bit.band(tc:GetType(),0x7))
tc=g:GetNext()
end end
local b1=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,typ) local b1=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,typ)
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(s.checkfilter1,tp,LOCATION_HAND,0,1,nil,tp) local b2=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(s.checkfilter1,tp,LOCATION_HAND,0,1,nil,tp)
...@@ -154,7 +153,8 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -154,7 +153,8 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c = cg:Select(tp,1,1,nil):GetFirst() local c = cg:Select(tp,1,1,nil):GetFirst()
local typ2 = c:GetType() & 7 local typ2 = c:GetType() & 7
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
if res and c:IsOriginalCodeRule(92600250) and Duel.SelectYesNo(tp,aux.Stringid(92600250,0)) then if res and c:IsOriginalCodeRule(92600250) and (not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND,0,1,c,typ)
or Duel.SelectYesNo(tp,aux.Stringid(92600250,0))) then
c:RegisterFlagEffect(92600251,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) c:RegisterFlagEffect(92600251,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0)
local b1=g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) local b1=g:IsExists(Card.IsType,1,nil,TYPE_MONSTER)
local b2=g:IsExists(Card.IsType,1,nil,TYPE_SPELL) local b2=g:IsExists(Card.IsType,1,nil,TYPE_SPELL)
......
...@@ -124,7 +124,8 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -124,7 +124,8 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c = cg:Select(tp,1,1,nil):GetFirst() local c = cg:Select(tp,1,1,nil):GetFirst()
local typ2 = c:GetType() & 7 local typ2 = c:GetType() & 7
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
if res and c:IsOriginalCodeRule(92600250) and Duel.SelectYesNo(tp,aux.Stringid(92600250,0)) then if res and c:IsOriginalCodeRule(92600250) and (not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND,0,1,c,typ)
or Duel.SelectYesNo(tp,aux.Stringid(92600250,0))) then
c:RegisterFlagEffect(92600251,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) c:RegisterFlagEffect(92600251,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0)
local b1=re:GetActiveType()==TYPE_MONSTER local b1=re:GetActiveType()==TYPE_MONSTER
local b2=re:GetActiveType()==TYPE_SPELL local b2=re:GetActiveType()==TYPE_SPELL
......
...@@ -60,15 +60,14 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -60,15 +60,14 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local res=Duel.IsPlayerAffectedByEffect(tp,92600250) local res=Duel.IsPlayerAffectedByEffect(tp,92600250)
for tc2 in aux.Next(g2) do for tc2 in aux.Next(g2) do
typ=bit.bor(typ,bit.band(tc2:GetType(),0x7)) typ=bit.bor(typ,bit.band(tc2:GetType(),0x7))
tc2=g2:GetNext()
end end
if chk==0 then return res or Duel.IsExistingMatchingCard(s.comcheck,tp,LOCATION_HAND,0,1,e:GetHandler(),tp,e) end if chk==0 then return res or Duel.IsExistingMatchingCard(s.comcheck,tp,LOCATION_HAND,0,1,e:GetHandler(),tp,e) end
local cg=Duel.GetMatchingGroup(function(c,tp,typ) return c:IsType(typ) or (c:IsOriginalCodeRule(92600250) and Duel.IsPlayerAffectedByEffect(tp,92600250)) end,tp,LOCATION_HAND,0,nil,tp,typ) local cg=Duel.GetMatchingGroup(function(c,tp,typ) return c:IsType(typ) or (c:IsOriginalCodeRule(92600250) and Duel.IsPlayerAffectedByEffect(tp,92600250)) end,tp,LOCATION_HAND,0,e:GetHandler(),tp,typ)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local c = cg:Select(tp,1,1,nil):GetFirst() local c = cg:Select(tp,1,1,nil):GetFirst()
local typ2 = c:GetType() & 7 local typ2 = c:GetType() & 7
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
if res and c:IsOriginalCodeRule(92600250) and Duel.SelectYesNo(tp,aux.Stringid(92600250,0)) then if res and c:IsOriginalCodeRule(92600250) and (not Duel.IsExistingMatchingCard(s.comcheck,tp,LOCATION_HAND,0,1,c,tp,e) or Duel.SelectYesNo(tp,aux.Stringid(92600250,0))) then
c:RegisterFlagEffect(92600251,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) c:RegisterFlagEffect(92600251,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0)
local b1=g2:IsExists(Card.IsType,1,nil,TYPE_MONSTER) local b1=g2:IsExists(Card.IsType,1,nil,TYPE_MONSTER)
local b2=g2:IsExists(Card.IsType,1,nil,TYPE_SPELL) local b2=g2:IsExists(Card.IsType,1,nil,TYPE_SPELL)
......
...@@ -8,20 +8,19 @@ function s.initial_effect(c) ...@@ -8,20 +8,19 @@ function s.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetCondition(s.con1)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Activate local e2=e1:Clone()
local e2=Effect.CreateEffect(c) e2:SetCondition(s.con2)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(s.hancon)
e2:SetTarget(s.target)
e2:SetOperation(s.activate)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--act trap in hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e3)
--todeck --todeck
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(1193) e4:SetDescription(1193)
...@@ -35,38 +34,18 @@ function s.initial_effect(c) ...@@ -35,38 +34,18 @@ function s.initial_effect(c)
e4:SetOperation(s.thop) e4:SetOperation(s.thop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.hancon(e,tp,eg,ep,ev,re,r,rp) function s.con1(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) return not e:GetHandler():IsLocation(LOCATION_HAND) or Duel.IsPlayerAffectedByEffect(tp,EFFECT_TRAP_ACT_IN_HAND)
end
function s.con2(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():IsLocation(LOCATION_HAND)
end end
function s.filter(c,e,tp) function s.filter(c,e,tp)
return c:IsSetCard(0x3921) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x3921) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local res=e:GetDescription()+1==aux.Stringid(id,1)+1
local c=e:GetHandler() local c=e:GetHandler()
if res and chk==0 then if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local b1=c:GetActivateEffect():IsActivatable(tp,true)
e:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_ACTIVATE)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCountLimit(1)
e1:SetLabelObject(e)
e1:SetCondition(s.regcon)
e1:SetOperation(s.regop)
e1:SetLabel(tp)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAINING)
Duel.RegisterEffect(e2,tp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and b1 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
if (not res) and chk==0 then
return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1,e:GetFieldID())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end end
function s.regcon(e,tp,eg,ep,ev,re,r,rp) function s.regcon(e,tp,eg,ep,ev,re,r,rp)
......
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