Commit c1063373 authored by 未闻皂名's avatar 未闻皂名

2025/11/17 新增:超级战狮新卡,修改特殊召唤的主要阶段的条件

parent ab00c46d
Pipeline #41683 passed with stages
in 9 minutes and 31 seconds
No preview for this file type
......@@ -30,6 +30,11 @@ end
function RushDuel.IsSpecialSummonTurn(card)
return card:IsReason(REASON_SPSUMMON) and card:IsStatus(STATUS_SPSUMMON_TURN) and card:GetFlagEffect(FLAG_SUMMON_TURN) ~= 0
end
-- 条件: 这张卡特殊召唤的自己主要阶段
function RushDuel.IsSpecialSummonMainPhase(card,type)
return card:IsReason(REASON_SPSUMMON) and card:IsStatus(STATUS_SPSUMMON_TURN) and card:GetFlagEffect(FLAG_SUMMON_MAIN_PHASE) ~= 0
and (not type or card:IsSummonType(type))
end
-- 条件: 这张卡召唤·特殊召唤的自己主要阶段
function RushDuel.IsSummonOrSpecialSummonMainPhase(card)
return card:IsReason(REASON_SUMMON + REASON_SPSUMMON) and card:IsStatus(STATUS_SUMMON_TURN + STATUS_SPSUMMON_TURN)
......
......@@ -24,8 +24,7 @@ function cm.spfilter(c,e,tp)
return c:IsLevel(7) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_FUSION)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
......
......@@ -25,8 +25,7 @@ function cm.filter(c)
return c:IsFacedown() and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_FUSION)
end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,2,2,nil,nil,function(g)
return g:FilterCount(cm.exfilter,nil)
......
......@@ -26,8 +26,7 @@ function cm.spfilter(c,e,tp)
return c:IsLevel(9) and c:IsRace(RACE_SPELLCASTER) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_FUSION)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -20,7 +20,7 @@ end
function cm.condition(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_HAND+LOCATION_GRAVE)
and RD.IsSpecialSummonTurn(c)
and RD.IsSpecialSummonMainPhase(c)
and Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_GRAVE,0,4,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -21,8 +21,7 @@ function cm.spfilter(c,e,tp)
return c:IsRace(RACE_FIEND) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_FUSION)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
......
......@@ -21,7 +21,7 @@ function cm.setfilter(c)
return c:IsCode(list[3],list[4]) and c:IsSSetable()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
......@@ -25,7 +25,7 @@ function cm.thfilter(c)
return c:IsCode(list[3],list[4],list[5]) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp,chk)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
cm.cost=RD.CostSendGraveToDeckTop(cm.costfilter,4,4)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -24,7 +24,7 @@ function cm.thfilter(c)
return c:IsCode(list[3],list[4]) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -20,7 +20,7 @@ function cm.desfilter(c)
return c:IsFaceup() and c:IsLevelBelow(8)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
and Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_GRAVE,0,8,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -26,7 +26,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,1000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.AttachEffectIndes(e,c,cm.indval,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if RD.IsSpecialSummonTurn(c) and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then
if RD.IsSpecialSummonMainPhase(c) then
RD.CanSelectAndDoAction(aux.Stringid(m,2),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg)
RD.SendToHandAndExists(sg,e,tp,REASON_EFFECT)
end)
......
......@@ -24,7 +24,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachPierce(e,c,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if RD.IsSpecialSummonTurn(c) and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then
if RD.IsSpecialSummonMainPhase(c) then
RD.CanSelectAndDoAction(aux.Stringid(m,2),HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
Duel.Destroy(sg,REASON_EFFECT)
end)
......
......@@ -24,7 +24,7 @@ function cm.exfilter(c)
return c:IsType(TYPE_SPELL)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
......
......@@ -22,7 +22,7 @@ function cm.spfilter(c,e,tp)
return c:IsLevel(8) and c:IsRace(RACE_GALAXY) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
......
......@@ -32,8 +32,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.AttachEffectIndes(e,c,cm.indval,aux.Stringid(m,1),reset)
RD.AttachPierce(e,c,aux.Stringid(m,2),reset)
local atk=e:GetLabel()*1000
if RD.IsSpecialSummonTurn(c) and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
and atk>0 and Duel.SelectEffectYesNo(tp,c,aux.Stringid(m,3)) then
if RD.IsSpecialSummonMainPhase(c) and atk>0 and Duel.SelectEffectYesNo(tp,c,aux.Stringid(m,3)) then
RD.AttachAtkDef(e,c,atk,0,reset)
end
end
......
......@@ -14,7 +14,7 @@ function cm.costfilter(c)
return not c:IsRace(RACE_MAGICALKNIGHT) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp,chk)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,1,1)
--Direct Attack
......
......@@ -35,7 +35,7 @@ end
--Attack Thrice
function cm.atkcon(e)
local c=e:GetHandler()
return RD.IsSpecialSummonTurn(c) and c:GetFlagEffect(20257041)~=0
return RD.IsSpecialSummonMainPhase(c) and c:GetFlagEffect(20257041)~=0
end
--Fusion Success
function cm.regfilter(c,code)
......
......@@ -25,7 +25,7 @@ function cm.setfilter(c)
return c:IsCode(list[2],list[3]) and c:IsSSetable()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
......@@ -22,8 +22,7 @@ function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_FUSION)
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,3,3)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -23,7 +23,7 @@ function cm.posfilter(c,e,tp)
return c:IsFaceup() and RD.IsCanChangePosition(c,e,tp,REASON_EFFECT) and c:IsCanTurnSet()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.posfilter,tp,0,LOCATION_MZONE,1,nil,e,tp) end
......
......@@ -23,7 +23,7 @@ function cm.check(g)
return g:IsExists(Card.IsFaceup,1,nil) and g:IsExists(Card.IsFacedown,1,nil)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
......
......@@ -23,8 +23,7 @@ function cm.filter(c)
return c:IsFaceup() and c:IsAbleToDeck()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_FUSION)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -30,7 +30,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
RD.SelectAndDoAction(HINTMSG_DESTROY,Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
if Duel.Destroy(g,REASON_EFFECT)~=0
and c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
and RD.IsSpecialSummonMainPhase(c,SUMMON_TYPE_FUSION)
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
and c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,2600,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......
......@@ -53,7 +53,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e)
and RD.IsSpecialSummonTurn(c) and e:GetLabel()==1 then
and RD.IsSpecialSummonMainPhase(c) and e:GetLabel()==1 then
RD.AttachExtraAttack(e,c,2,aux.Stringid(m,3),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
......@@ -22,7 +22,7 @@ function cm.spfilter(c,e,tp,lv)
return c:IsLevelBelow(lv) and c:IsAttribute(ATTRIBUTE_LIGHT) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -20,8 +20,7 @@ function cm.initial_effect(c)
end
--To Grave
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_FUSION)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,nil) end
......
......@@ -28,7 +28,7 @@ function cm.spfilter(c,e,tp)
return c:IsLevelAbove(5) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEDOWN_DEFENSE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3)
......
......@@ -27,8 +27,7 @@ function cm.exfilter(c)
return c:IsAbleToDeck()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_FUSION)
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,3,3)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -31,8 +31,7 @@ function cm.spfilter(c,e,tp)
return c:IsCode(list[2]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_FUSION)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,0,LOCATION_ONFIELD,1,nil) end
......
......@@ -27,5 +27,5 @@ function cm.exfilter(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
\ No newline at end of file
......@@ -40,8 +40,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if RD.IsSpecialSummonTurn(c)
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then
if RD.IsSpecialSummonMainPhase(c) then
RD.CanSelectAndDoAction(aux.Stringid(m,2),HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
......
......@@ -31,7 +31,7 @@ function cm.exfilter(c)
return c:IsCode(list[2])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.posfilter,tp,0,LOCATION_MZONE,1,nil,e,tp) end
......
......@@ -28,8 +28,7 @@ function cm.thfilter(c)
return c:IsCode(list[2]) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_FUSION)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -26,8 +26,7 @@ function cm.exfilter(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_FUSION)
end
function cm.limit(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,m)~=0 then return end
......
......@@ -42,8 +42,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.AttachEffectIndes(e,tc,cm.indval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
end)
local c=e:GetHandler()
if c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then
if RD.IsSpecialSummonMainPhase(c,SUMMON_TYPE_FUSION) then
RD.CanRecover(aux.Stringid(m,3),tp,2000,true)
end
end)
......
......@@ -19,7 +19,7 @@ function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -22,8 +22,7 @@ function cm.spfilter(c,e,tp)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_RITUAL) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_RITUAL)
and Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_GRAVE,0,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -22,7 +22,7 @@ function cm.exfilter(c)
return c:IsCode(list[1])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -20,7 +20,7 @@ function cm.exfilter(c)
return c:IsCode(list[1])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -21,9 +21,9 @@ end
function cm.exfilter(c)
return RD.IsPreviousMaximumMode(c)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,mat,fc)
function cm.operation(e,tp,eg,ep,ev,re,r,rp,mat,rc)
if mat:IsExists(cm.exfilter,1,nil) then
RD.AttachAtkDef(e,fc,2000,2000,RESET_EVENT+RESETS_STANDARD,true)
RD.AttachEffectIndes(e,fc,cm.indval,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD)
RD.AttachAtkDef(e,rc,2000,2000,RESET_EVENT+RESETS_STANDARD,true)
RD.AttachEffectIndes(e,rc,cm.indval,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD)
end
end
\ No newline at end of file
......@@ -24,7 +24,7 @@ function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
......@@ -21,8 +21,7 @@ function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_RITUAL) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_RITUAL)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end
......
......@@ -21,8 +21,7 @@ function cm.setfilter(c,g)
return (g:IsContains(c) or c:IsCode(list[3],list[4])) and c:IsSSetable()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_FUSION)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end
......
......@@ -24,8 +24,7 @@ function cm.spfilter(c,e,tp)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_RITUAL) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_RITUAL)
end
cm.cost=RD.CostSendMZoneToGrave(cm.costfilter,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -28,7 +28,7 @@ function cm.spfilter(c,e,tp)
return c:IsCode(list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -16,8 +16,7 @@ end
--Draw
function cm.condition(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_RITUAL) and RD.IsSpecialSummonTurn(c)
and c:GetMaterialCount()>=2
return RD.IsSpecialSummonMainPhase(c,SUMMON_TYPE_RITUAL) and c:GetMaterialCount()>=2
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
......
......@@ -27,7 +27,7 @@ end
function cm.spfilter(c)
return c:IsCode(list[1])
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,mat,fc)
function cm.operation(e,tp,eg,ep,ev,re,r,rp,mat,rc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
......
......@@ -29,7 +29,7 @@ function cm.blast(c)
return c:GetFlagEffect(20293043)~=0 and ct>=9
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
return RD.IsSpecialSummonMainPhase(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -31,8 +31,7 @@ function cm.thfilter(c)
return c:IsCode(list[1]) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_FUSION)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
......
......@@ -21,8 +21,7 @@ function cm.initial_effect(c)
end
--Draw
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_FUSION)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
local cm,m=GetID()
local list={120294057,120294058}
cm.name="狮子的依代"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--To Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--To Hand
function cm.filter(c)
return c:IsCode(list[1],list[2]) and c:IsAbleToHand()
end
function cm.check(g)
return g:GetClassCount(Card.GetCode)==g:GetCount()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>3 end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<4 then return end
local sg=RD.RevealDeckTopAndCanSelectGroup(tp,4,aux.Stringid(m,1),HINTMSG_ATOHAND,cm.filter,cm.check,1,2)
if sg:GetCount()>0 then
Duel.DisableShuffleCheck()
RD.SendToHandAndExists(sg,e,tp,REASON_EFFECT)
Duel.ShuffleHand(tp)
end
local ct=g:GetCount()
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
RD.SendDeckTopToBottom(tp,ct)
end
end
\ No newline at end of file
local cm,m=GetID()
local list={120294066}
cm.name="竹林的杀人熊猫"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon
function cm.costfilter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsRace(RACE_BEAST)
and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function cm.spfilter(c,e,tp)
return not c:IsType(TYPE_EFFECT) and c:IsRace(RACE_BEAST)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.exfilter(c)
return c:IsCode(list[1])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_RITUAL)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (e:IsCostChecked() or Duel.GetMZoneCount(tp)>0)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)~=0
and RD.IsOperatedGroupExists(cm.exfilter,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,nil,tp,0,LOCATION_MZONE,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
end
end
\ No newline at end of file
local cm,m=GetID()
local list={120294057,120294058}
cm.name="金毛的魔兽狮子王"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Summon Procedure
RD.AddSummonProcedureZero(c,aux.Stringid(m,0),cm.sumcon)
--To Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Summon Procedure
function cm.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_BEAST)
end
function cm.sumcon(c,e,tp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
end
--To Hand
function cm.thfilter(c)
return c:IsCode(list[1],list[2]) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
RD.SendToHandAndExists(g,e,tp,REASON_EFFECT)
end)
end
\ No newline at end of file
local cm,m=GetID()
local list={120294066}
cm.name="翼之魔兽加尔瓦斯"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.target1)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--Pierce
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_PIERCE)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.target2)
c:RegisterEffect(e2)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
--Atk Up
function cm.filter(c)
return c:IsFaceup() and not c:IsType(TYPE_EFFECT) and c:IsRace(RACE_BEAST)
end
function cm.target1(e,c)
return c:IsFaceup() and c:IsRace(RACE_BEAST)
end
function cm.atkval(e)
return Duel.GetMatchingGroupCount(cm.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)*500
end
--Pierce
function cm.target2(e,c)
return c:IsFaceup() and c:IsCode(list[1])
end
\ No newline at end of file
local cm,m=GetID()
cm.name="狐狸茶茶"
function cm.initial_effect(c)
--To Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--To Deck
function cm.tdfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) and c:IsAbleToDeck()
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_RITUAL) and c:IsLevel(7,8,9) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
cm.cost=RD.CostSendSelfToGrave()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,function(g)
if RD.SendToDeckAndExists(g,e,tp,REASON_EFFECT) then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP,true)
end
end)
end
\ No newline at end of file
local cm,m=GetID()
local list={120294066}
cm.name="狮子的仪式"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=RD.CreateRitualEffect(c,RITUAL_ORIGINAL_LEVEL_GREATER,nil,cm.spfilter)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
end
--Activate
function cm.spfilter(c)
return c:IsCode(list[1])
end
\ No newline at end of file
local cm,m=GetID()
local list={120294066}
cm.name="狮子的强袭"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=RD.CreateRitualEffect(c,RITUAL_ORIGINAL_LEVEL_GREATER,cm.matfilter,cm.spfilter,nil,0,0,nil,RD.RitualToGrave,nil,cm.operation)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
end
--Activate
function cm.matfilter(c)
return c:IsFaceup() and c:IsOnField() and c:IsRace(RACE_BEAST)
end
function cm.spfilter(c)
return c:IsCode(list[1])
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,mat,rc)
RD.AttachAtkDef(e,rc,2000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,true)
end
\ No newline at end of file
local cm,m=GetID()
local list={120294058,120294066}
cm.name="狮子的战域"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Change Code
RD.EnableChangeCode(c,list[1],LOCATION_GRAVE)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.confilter(c)
return c:IsFaceup() and c:IsCode(list[2])
end
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_BEAST)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),Card.IsFaceup,tp,LOCATION_MZONE,0,1,3,nil,function(g)
g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,1000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end)
end
\ No newline at end of file
local cm,m=GetID()
cm.name="超级战狮"
function cm.initial_effect(c)
RD.AddRitualProcedure(c)
end
\ No newline at end of file
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