Commit 08d20863 authored by 未闻皂名's avatar 未闻皂名

2022/3/15 新增:银河族新卡,KP04部分卡模块化

parent 9d04f589
No preview for this file type
...@@ -39,7 +39,7 @@ function RushDuel._private_action_send_grave(reason, hint_selection, confirm, se ...@@ -39,7 +39,7 @@ function RushDuel._private_action_send_grave(reason, hint_selection, confirm, se
RushDuel.SetLabelAndObject(e, g, set_label_before, set_object_before) RushDuel.SetLabelAndObject(e, g, set_label_before, set_object_before)
if Duel.SendtoGrave(g, reason) ~= 0 and (set_label_after ~= nil or set_object_after ~= nil) then if Duel.SendtoGrave(g, reason) ~= 0 and (set_label_after ~= nil or set_object_after ~= nil) then
local og = Duel.GetOperatedGroup() local og = Duel.GetOperatedGroup()
RushDuel.SetLabelAndObject(e, g, set_label_after, set_object_after) RushDuel.SetLabelAndObject(e, og, set_label_after, set_object_after)
end end
end end
end end
...@@ -49,7 +49,7 @@ function RushDuel._private_action_send_deck_sort(sequence, reason, hint_selectio ...@@ -49,7 +49,7 @@ function RushDuel._private_action_send_deck_sort(sequence, reason, hint_selectio
RushDuel.HintOrConfirm(g, hint_selection, confirm, 1 - tp) RushDuel.HintOrConfirm(g, hint_selection, confirm, 1 - tp)
RushDuel.SetLabelAndObject(e, g, set_label_before, set_object_before) RushDuel.SetLabelAndObject(e, g, set_label_before, set_object_before)
local og, ct = RushDuel.SendToDeckSort(g, sequence, reason, tp, tp) local og, ct = RushDuel.SendToDeckSort(g, sequence, reason, tp, tp)
RushDuel.SetLabelAndObject(e, g, set_label_after, set_object_after) RushDuel.SetLabelAndObject(e, og, set_label_after, set_object_after)
end end
end end
......
...@@ -28,7 +28,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +28,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if tc and tc:IsRelateToBattle() and tc:IsFaceup() then if tc and tc:IsRelateToBattle() and tc:IsFaceup() then
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
local lv=g:GetFirst():GetLevel() local lv=g:GetFirst():GetLevel()
RD.AttachAtkDef(e,tc,-100*lv,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,tc,lv*-100,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
Duel.BreakEffect() Duel.BreakEffect()
RD.SendToDeckAndExists(g) RD.SendToDeckAndExists(g)
end) end)
......
local m=120109014
local cm=_G["c"..m]
cm.name="星战骑 佩流安"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
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
--Atk Up
function cm.check(g)
return g:GetClassCount(Card.GetControler)==2
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chk==0 then return g:CheckSubGroup(cm.check,2,2) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectGroupAndDoAction(aux.Stringid(m,1),Card.IsFaceup,cm.check,tp,LOCATION_MZONE,LOCATION_MZONE,2,2,nil,function(g)
g:ForEach(function(tc)
RD.AttachLevel(e,tc,2,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.AttachAtkDef(e,tc,500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end)
end
\ No newline at end of file
...@@ -23,7 +23,7 @@ end ...@@ -23,7 +23,7 @@ end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1,nil,Group.GetFirst) cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1,nil,Group.GetFirst)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local cc=e:GetLabelObject() local cc=e:GetLabelObject()
local down=-300*cc:GetLevel() local down=cc:GetLevel()*-300
local g=Duel.GetMatchingGroup(cm.adfilter,tp,0,LOCATION_MZONE,nil,cc:GetAttribute()) local g=Duel.GetMatchingGroup(cm.adfilter,tp,0,LOCATION_MZONE,nil,cc:GetAttribute())
g:ForEach(function(tc) g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,down,down,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,tc,down,down,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......
...@@ -19,7 +19,7 @@ end ...@@ -19,7 +19,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
if tc and tc:IsRelateToBattle() and tc:IsFaceup() then if tc and tc:IsRelateToBattle() and tc:IsFaceup() then
local atk=-100*Duel.GetMatchingGroupCount(Card.IsRace,tp,0,LOCATION_GRAVE,nil,tc:GetRace()) local atk=Duel.GetMatchingGroupCount(Card.IsRace,tp,0,LOCATION_GRAVE,nil,tc:GetRace())*-100
RD.AttachAtkDef(e,tc,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,tc,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end end
end end
\ No newline at end of file
...@@ -35,7 +35,7 @@ end ...@@ -35,7 +35,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local tc=g:GetFirst() local tc=g:GetFirst()
local down=-200*tc:GetLevel() local down=tc:GetLevel()*-200
RD.AttachAtkDef(e,tc,down,down,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,tc,down,down,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end) end)
end end
......
...@@ -30,7 +30,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,7 +30,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(aux.Stringid(m,1),Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local down=-1000*e:GetLabel() local down=e:GetLabel()*-1000
RD.AttachAtkDef(e,g:GetFirst(),down,down,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,g:GetFirst(),down,down,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end) end)
end end
\ No newline at end of file
...@@ -23,7 +23,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,7 +23,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local atk=-400*Duel.GetMatchingGroupCount(cm.atkfilter,tp,LOCATION_MZONE,0,nil) local atk=Duel.GetMatchingGroupCount(cm.atkfilter,tp,LOCATION_MZONE,0,nil)*-400
if atk==0 then return end if atk==0 then return end
RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g) RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.AttachAtkDef(e,g:GetFirst(),atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,g:GetFirst(),atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......
...@@ -24,7 +24,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -24,7 +24,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local atk=-300*Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil) local atk=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil)*-300
if atk==0 then return end if atk==0 then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
g:ForEach(function(tc) g:ForEach(function(tc)
......
...@@ -21,7 +21,7 @@ end ...@@ -21,7 +21,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
if tc and tc:IsRelateToBattle() and tc:IsFaceup() then if tc and tc:IsRelateToBattle() and tc:IsFaceup() then
local atk=-100*tc:GetLevel() local atk=tc:GetLevel()*-100
RD.AttachAtkDef(e,tc,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,tc,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end end
end end
\ No newline at end of file
...@@ -28,24 +28,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,24 +28,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardDeck(tp,1,REASON_EFFECT)==0 then return end if RD.SendDeckTopToGraveAndExists(tp,1,cm.exfilter,1,nil) then
local og=Duel.GetOperatedGroup() local down=Duel.GetMatchingGroupCount(cm.adfilter,tp,LOCATION_MZONE,0,nil)*-500
if not og:IsExists(cm.exfilter,1,nil) then return end if down==0 then return end
local atk=Duel.GetMatchingGroupCount(cm.adfilter,tp,LOCATION_MZONE,0,nil)*500 RD.SelectAndDoAction(aux.Stringid(m,1),Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if atk==0 then return end RD.AttachAtkDef(e,g:GetFirst(),down,down,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1)) end)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
end end
end end
\ No newline at end of file
...@@ -26,18 +26,10 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,18 +26,10 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardDeck(tp,1,REASON_EFFECT)==0 then return end if Duel.DiscardDeck(tp,1,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1)) local atk=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_GRAVE,0,nil)*100
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) if atk==0 then return end
if g:GetCount()>0 then RD.SelectAndDoAction(aux.Stringid(m,1),Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil,function(g)
Duel.BreakEffect() Duel.BreakEffect()
local atk=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_GRAVE,0,nil)*100 RD.AttachAtkDef(e,g:GetFirst(),atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
Duel.HintSelection(g) end)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end end
\ No newline at end of file
...@@ -16,12 +16,7 @@ end ...@@ -16,12 +16,7 @@ end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() return Duel.IsAbleToEnterBP()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
......
...@@ -17,19 +17,11 @@ end ...@@ -17,19 +17,11 @@ end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,0,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,0,LOCATION_MZONE,1,nil)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) cm.cost=RD.CostSendDeckTopToGrave(1)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
Duel.DiscardDeck(tp,1,REASON_COST)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=Duel.GetMatchingGroupCount(Card.IsDefensePos,tp,0,LOCATION_MZONE,nil)*800 local atk=Duel.GetMatchingGroupCount(Card.IsDefensePos,tp,0,LOCATION_MZONE,nil)*800
local e1=Effect.CreateEffect(c) RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -19,41 +19,19 @@ function cm.filter(c) ...@@ -19,41 +19,19 @@ function cm.filter(c)
return c:IsFaceup() and c:IsLevelBelow(8) return c:IsFaceup() and c:IsLevelBelow(8)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(1-tp)>=4000 return RD.IsLPAbove(1-tp,4000)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,2,2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1)) RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Damage(1-tp,g:GetFirst():GetAttack(),REASON_EFFECT) Duel.Damage(1-tp,g:GetFirst():GetAttack(),REASON_EFFECT)
end end)
local c=e:GetHandler() RD.CreateHintEffect(e,aux.Stringid(m,2),tp,1,0,RESET_PHASE+PHASE_END)
local e1=Effect.CreateEffect(c) local e1=RD.CreateAttackLimitEffect(e,cm.atktg,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetLabel(e:GetHandler():GetFieldID())
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.atktg)
e1:SetLabel(c:GetFieldID())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--Hint
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end end
function cm.atktg(e,c) function cm.atktg(e,c)
return e:GetLabel()~=c:GetFieldID() return e:GetLabel()~=c:GetFieldID()
......
...@@ -18,12 +18,11 @@ function cm.filter(c) ...@@ -18,12 +18,11 @@ function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) return c:IsFaceup() and c:IsRace(RACE_MACHINE)
end end
function cm.posfilter(c) function cm.posfilter(c)
return c:IsPosition(POS_FACEDOWN_DEFENSE) and c:IsCanChangePosition() and RushDuel.IsHasDefense(c) return c:IsPosition(POS_FACEDOWN_DEFENSE) and RD.IsCanChangePosition(c)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return (c:IsReason(REASON_SUMMON) and c:IsStatus(STATUS_SUMMON_TURN)) return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
or (c:IsReason(REASON_SPSUMMON) and c:IsStatus(STATUS_SPSUMMON_TURN))
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) 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) if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
...@@ -34,22 +33,12 @@ end ...@@ -34,22 +33,12 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil) local ct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil)
if ct==0 then return end if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) RD.SelectAndDoAction(HINTMSG_POSCHANGE,cm.posfilter,tp,0,LOCATION_MZONE,1,ct,nil,function(g)
local g=Duel.SelectMatchingCard(tp,cm.posfilter,tp,0,LOCATION_MZONE,1,ct,nil) if RD.ChangePosition(g,POS_FACEUP_ATTACK)~=0 then
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.ChangePosition(g,POS_FACEUP_ATTACK)~=0 then
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
local tc=og:GetFirst() og:ForEach(function(tc)
while tc do RD.SetBaseAtkDef(e,tc,0,nil,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local e1=Effect.CreateEffect(e:GetHandler()) end)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=og:GetNext()
end
end end
end end)
end end
\ No newline at end of file
...@@ -19,8 +19,7 @@ function cm.desfilter(c) ...@@ -19,8 +19,7 @@ function cm.desfilter(c)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return (c:IsReason(REASON_SUMMON) and c:IsStatus(STATUS_SUMMON_TURN)) return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
or (c:IsReason(REASON_SPSUMMON) and c:IsStatus(STATUS_SPSUMMON_TURN))
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil) end
...@@ -28,18 +27,10 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,18 +27,10 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) RD.SelectAndDoAction(HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.Destroy(g,REASON_EFFECT)~=0 and c:IsFaceup() and c:IsRelateToEffect(e) then if Duel.Destroy(g,REASON_EFFECT)~=0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c) RD.AttachAtkDef(e,c,1000,0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end end
end end)
end end
\ No newline at end of file
...@@ -17,24 +17,15 @@ end ...@@ -17,24 +17,15 @@ end
function cm.filter(c) function cm.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsRace(RACE_INSECT) and c:IsAttackBelow(100) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsRace(RACE_INSECT) and c:IsAttackBelow(100)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) cm.cost=RD.CostPayLP(100)
if chk==0 then return Duel.CheckLPCost(tp,100) end
Duel.PayLPCost(tp,100)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local atk=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)*800 local atk=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)*800
if atk==0 then return end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst() g:ForEach(function(tc)
while tc do RD.AttachAtkDef(e,tc,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local e1=Effect.CreateEffect(e:GetHandler()) end)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end end
\ No newline at end of file
...@@ -15,7 +15,7 @@ function cm.initial_effect(c) ...@@ -15,7 +15,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--To Hand --To Hand
function cm.costfilter(c,tp) function cm.costfilter(c,e,tp)
return c:IsRace(RACE_PYRO) and c:IsAbleToDeckOrExtraAsCost() return c:IsRace(RACE_PYRO) and c:IsAbleToDeckOrExtraAsCost()
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,c) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,c)
end end
...@@ -25,22 +25,13 @@ end ...@@ -25,22 +25,13 @@ end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) cm.cost=RD.CostSendGraveToDeckBottom(cm.costfilter,1,1)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,1,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) 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 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) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) RD.SendToHandAndExists(g,1-tp)
if g:GetCount()>0 then end)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end end
\ No newline at end of file
...@@ -15,22 +15,11 @@ function cm.initial_effect(c) ...@@ -15,22 +15,11 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Recover --Recover
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,2,nil,nil,Group.GetCount)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,2,nil)
local ct=Duel.SendtoGrave(g,REASON_COST)
e:SetLabel(ct)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local rec=e:GetLabel()*300 RD.TargetRecover(tp,e:GetLabel()*300)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) RD.Recover(nil,e:GetLabel()*300)
local rec=e:GetLabel()*300
Duel.Recover(p,rec,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -17,28 +17,12 @@ end ...@@ -17,28 +17,12 @@ end
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:IsLevelBelow(4) return c:IsFaceup() and c:IsLevelBelow(4)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,4,nil,nil,Group.GetCount)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,4,nil)
local ct=Duel.SendtoGrave(g,REASON_COST)
e:SetLabel(ct)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1)) RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) RD.AttachAtkDef(e,g:GetFirst(),e:GetLabel()*500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if g:GetCount()>0 then end)
Duel.HintSelection(g)
local atk=e:GetLabel()*500
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end end
\ No newline at end of file
...@@ -14,20 +14,16 @@ function cm.initial_effect(c) ...@@ -14,20 +14,16 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Destroy --Destroy
function cm.costfilter(c,tp) function cm.costfilter(c,e,tp)
return c:IsRace(RACE_PYRO) and c:IsAbleToGraveAsCost() return c:IsRace(RACE_PYRO) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetLevel()) and Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetLevel())
end end
function cm.desfilter(c,lv) function cm.desfilter(c,lv)
return c:IsLevel(lv) and c:IsPosition(POS_FACEUP_DEFENSE) return c:IsLevel(lv) and c:IsPosition(POS_FACEUP_DEFENSE)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1,function(g)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,nil,tp) end return g:GetFirst():GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) end)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
e:SetLabel(g:GetFirst():GetLevel())
Duel.SendtoGrave(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local lv=e:GetLabel() local lv=e:GetLabel()
......
...@@ -34,11 +34,8 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,11 +34,8 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(cm.ctfilter,tp,0,LOCATION_ONFIELD,nil) local ct=Duel.GetMatchingGroupCount(cm.ctfilter,tp,0,LOCATION_ONFIELD,nil)
if ct<1 then return end if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,1,ct,nil,function(g)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,1,ct,nil) RD.SendToDeckAndExists(g)
if g:GetCount()>0 then end)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end end
\ No newline at end of file
local m=120208000
local cm=_G["c"..m]
cm.name="左轮手枪龙"
function cm.initial_effect(c)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_COIN+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
cm.toss_coin=true
--Destroy
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,nil,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local r1,r2,r3=Duel.TossCoin(tp,3)
if r1+r2+r3>=2 then
Duel.Destroy(g,REASON_EFFECT)
end
end)
end
\ No newline at end of file
local m=120208013
local cm=_G["c"..m]
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)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--To Deck
function cm.exfilter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsLevelAbove(7)
end
function cm.posfilter(c)
return c:IsAttackPos() and RD.IsCanChangePosition(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,0,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(Card.IsAbleToDeck),tp,0,LOCATION_GRAVE,1,1,nil,function(g)
if RD.SendToDeckAndExists(g) and Duel.IsExistingMatchingCard(exfilter,tp,LOCATION_MZONE,0,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,cm.posfilter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
RD.ChangePosition(sg,POS_FACEUP_DEFENSE)
end)
end
end)
end
\ No newline at end of file
local m=120208014 local m=120208014
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="星战骑 佩流安" cm.name="天文救援者"
function cm.initial_effect(c) function cm.initial_effect(c)
--Atk Up --To Hand
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_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost) e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Atk Up --To Hand
function cm.check(g) function cm.confilter(c)
return g:GetClassCount(Card.GetControler)==2 return c:IsFaceup() and c:IsType(TYPE_NORMAL)
end
function cm.thfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
and Duel.GetMatchingGroupCount(cm.confilter,tp,LOCATION_MZONE,0,nil)==2
end end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return g:CheckSubGroup(cm.check,2,2) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectGroupAndDoAction(aux.Stringid(m,1),Card.IsFaceup,cm.check,tp,LOCATION_MZONE,LOCATION_MZONE,2,2,nil,function(g) RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
g:ForEach(function(tc) RD.SendToHandAndExists(g,1-tp)
RD.AttachLevel(e,tc,2,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.AttachAtkDef(e,tc,500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.CreateHintEffect(e,aux.Stringid(m,1),tp,1,0,RESET_PHASE+PHASE_END)
end) RD.CreateAttackLimitEffect(e,cm.atktg,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end) end)
end
function cm.atktg(e,c)
return c:IsType(TYPE_EFFECT) and c:IsLevelBelow(8)
end end
\ No newline at end of file
local m=120208017
local cm=_G["c"..m]
cm.name="卫星天马"
function cm.initial_effect(c)
--Discard Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Discard Deck
function cm.exfilter(c)
return c:IsType(TYPE_MONSTER)
end
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.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardDeck(tp,1,REASON_EFFECT)==0 then return end
if not Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,2,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
Duel.Destroy(sg,REASON_EFFECT)
end)
end
end
\ No newline at end of file
local m=120208036 local m=120208036
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="翅甲王 迪纳斯·多尔库斯" cm.name="翅甲王 君主独角仙大锹"
function cm.initial_effect(c) function cm.initial_effect(c)
--Destroy --Destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
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