Commit 05e3e471 authored by 未闻皂名's avatar 未闻皂名

2022/3/6 新增:吉兆之面,幻刃栋龙 手工具龙,MAX2部分卡模块化

parent e95b07a2
No preview for this file type
No preview for this file type
...@@ -249,62 +249,71 @@ function RushDuel.CostSendSelfToGrave() ...@@ -249,62 +249,71 @@ function RushDuel.CostSendSelfToGrave()
Duel.SendtoGrave(RushDuel.ToMaximunGroup(e:GetHandler()), REASON_COST) Duel.SendtoGrave(RushDuel.ToMaximunGroup(e:GetHandler()), REASON_COST)
end end
end end
-- Private Cost: Send Grave to Deck -- Cost: Send Card(s) to Deck
function RushDuel._cost_send_grave_to_deck(e, tp, filter, min, max, set_label, set_object, sequence) function RushDuel.CostSendToDeck(filter, field, min, max, except_self, sequence, set_label_before, set_object_before, set_label_after, set_object_after)
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
local g = Duel.SelectMatchingCard(tp, filter, tp, LOCATION_GRAVE, 0, min, max, nil, e, tp)
Duel.ConfirmCards(1 - tp, g)
if set_label ~= nil then
e:SetLabel(set_label(g))
end
if set_object ~= nil then
e:SetLabelObject(set_object(g))
end
if sequence == 1 and g:GetCount() > 1 then
sequence = 0
end
return Duel.SendtoDeck(g, nil, sequence, REASON_COST)
end
-- Cost: Send Grave to Deck
function RushDuel.CostSendGraveToDeck(filter, min, max, set_label, set_object)
return function(e, tp, eg, ep, ev, re, r, rp, chk) return function(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then local exc = nil
return Duel.IsExistingMatchingCard(filter, tp, LOCATION_GRAVE, 0, min, nil, e, tp) if except_self then
end exc = e:GetHandler()
RushDuel._cost_send_grave_to_deck(e, tp, filter, min, max, set_label, set_object, 2)
end end
end
-- Cost: Send Grave to Deck Top (Sort)
function RushDuel.CostSendGraveToDeckTop(filter, min, max, set_label, set_object)
return function(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then if chk == 0 then
return Duel.IsExistingMatchingCard(filter, tp, LOCATION_GRAVE, 0, min, nil, e, tp) return Duel.IsExistingMatchingCard(filter, tp, field, 0, min, exc, e, tp)
end
if RushDuel._cost_send_grave_to_deck(e, tp, filter, min, max, set_label, set_object, 0) > 1 then
local ct = Duel.GetOperatedGroup():FilterCount(Card.IsLocation, nil, LOCATION_DECK)
if ct > 1 then
Duel.SortDecktop(tp, tp, ct)
end end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
local g = Duel.SelectMatchingCard(tp, filter, tp, field, 0, min, max, exc, e, tp)
if set_label_before ~= nil then
e:SetLabel(set_label_before(g))
end end
if set_object_before ~= nil then
e:SetLabelObject(set_object_before(g))
end end
end if sequence == 1 and g:GetCount() > 1 then
-- Cost: Send Grave to Deck Bottom (Sort) Duel.SendtoDeck(g, nil, 0, REASON_COST)
function RushDuel.CostSendGraveToDeckBottom(filter, min, max, set_label, set_object) else
return function(e, tp, eg, ep, ev, re, r, rp, chk) Duel.SendtoDeck(g, nil, sequence, REASON_COST)
if chk == 0 then
return Duel.IsExistingMatchingCard(filter, tp, LOCATION_GRAVE, 0, min, nil, e, tp)
end end
if RushDuel._cost_send_grave_to_deck(e, tp, filter, min, max, set_label, set_object, 1) > 1 then local og = Duel.GetOperatedGroup()
local ct = Duel.GetOperatedGroup():FilterCount(Card.IsLocation, nil, LOCATION_DECK) local ct = og:FilterCount(Card.IsLocation, nil, LOCATION_DECK)
if ct > 1 then if sequence ~= 2 and ct > 1 then
Duel.SortDecktop(tp, tp, ct) Duel.SortDecktop(tp, tp, ct)
if sequence == 1 then
for i = 1, ct do for i = 1, ct do
local tc = Duel.GetDecktopGroup(tp, 1):GetFirst() local tc = Duel.GetDecktopGroup(tp, 1):GetFirst()
Duel.MoveSequence(tc, 1) Duel.MoveSequence(tc, 1)
end end
end end
end end
if set_label_after ~= nil then
e:SetLabel(set_label_after(g))
end end
if set_object_after ~= nil then
e:SetLabelObject(set_object_after(g))
end
end
end
-- Cost: Send Hand Card(s) to Deck
function RushDuel.CostSendHandToDeck(filter, min, max, set_label_before, set_object_before, set_label_after, set_object_after)
return RushDuel.CostSendToDeck(filter, LOCATION_HAND, min, max, true, 2, set_label_before, set_object_before, set_label_after, set_object_after)
end
-- Cost: Send Hand Card(s) to Deck Top (Sort)
function RushDuel.CostSendHandToDeckTop(filter, min, max, set_label_before, set_object_before, set_label_after, set_object_after)
return RushDuel.CostSendToDeck(filter, LOCATION_HAND, min, max, true, 0, set_label_before, set_object_before, set_label_after, set_object_after)
end
-- Cost: Send Hand Card(s) to Deck Bottom (Sort)
function RushDuel.CostSendHandToDeckBottom(filter, min, max, set_label_before, set_object_before, set_label_after, set_object_after)
return RushDuel.CostSendToDeck(filter, LOCATION_HAND, min, max, true, 1, set_label_before, set_object_before, set_label_after, set_object_after)
end
-- Cost: Send Grave to Deck
function RushDuel.CostSendGraveToDeck(filter, min, max, set_label_before, set_object_before, set_label_after, set_object_after)
return RushDuel.CostSendToDeck(filter, LOCATION_GRAVE, min, max, false, 2, set_label_before, set_object_before, set_label_after, set_object_after)
end
-- Cost: Send Grave to Deck Top (Sort)
function RushDuel.CostSendGraveToDeckTop(filter, min, max, set_label_before, set_object_before, set_label_after, set_object_after)
return RushDuel.CostSendToDeck(filter, LOCATION_GRAVE, min, max, false, 0, set_label_before, set_object_before, set_label_after, set_object_after)
end
-- Cost: Send Grave to Deck Bottom (Sort)
function RushDuel.CostSendGraveToDeckBottom(filter, min, max, set_label_before, set_object_before, set_label_after, set_object_after)
return RushDuel.CostSendToDeck(filter, LOCATION_GRAVE, min, max, false, 1, set_label_before, set_object_before, set_label_after, set_object_after)
end end
-- Target: Draw -- Target: Draw
......
...@@ -9,43 +9,33 @@ function cm.initial_effect(c) ...@@ -9,43 +9,33 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetLabel(m) e1:SetLabel(m)
e1:SetCondition(RushDuel.MaximumMode) e1:SetCondition(RD.MaximumMode)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Damage --Damage
function cm.costfilter(c,tp) function cm.costfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost() return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,c) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,c)
end end
function cm.filter(c) function cm.filter(c)
return c:IsLevelAbove(1) return c:IsLevelAbove(1)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) cm.cost=RD.CostSendGraveToDeck(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,2,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.filter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,100) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,100)
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),aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst() local tc=g:GetFirst()
if Duel.Damage(1-tp,tc:GetLevel()*100,REASON_EFFECT)~=0 if Duel.Damage(1-tp,tc:GetLevel()*100,REASON_EFFECT)~=0
and tc:IsAbleToHand() and tc:IsAbleToHand()
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) RD.SendToHandAndExists(tc,1-tp)
Duel.ConfirmCards(1-tp,tc)
end
end end
end)
end end
\ No newline at end of file
...@@ -5,14 +5,14 @@ cm.name="超魔旗舰 大霸道王" ...@@ -5,14 +5,14 @@ cm.name="超魔旗舰 大霸道王"
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,list[1],list[2]) aux.AddCodeList(c,list[1],list[2])
--Maximum Summon --Maximum Summon
RushDuel.AddMaximumProcedure(c,3500,list[1],list[2]) RD.AddMaximumProcedure(c,3500,list[1],list[2])
--Special Summon --Special Summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RushDuel.MaximumMode) e1:SetCondition(RD.MaximumMode)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
...@@ -25,32 +25,17 @@ end ...@@ -25,32 +25,17 @@ end
function cm.desfilter(c) function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) cm.cost=RD.CostSendSelfToGrave()
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() end
local g=c:GetOverlayGroup()
g:AddCard(c)
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 Duel.GetMZoneCount(tp,e:GetHandler())>0 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
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=RushDuel.GetSPCount(tp,2) if RD.SelectAndSpecialSummon(cm.spfilter,e,tp,LOCATION_HAND,0,1,2,nil,POS_FACEUP)~=0 then
if ct<1 then return end RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND,0,1,ct,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectMatchingCard(tp,cm.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if sg:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.HintSelection(sg) Duel.Destroy(g,REASON_EFFECT)
Duel.Destroy(sg,REASON_EFFECT) end)
end
end end
end end
\ No newline at end of file
...@@ -9,17 +9,14 @@ function cm.initial_effect(c) ...@@ -9,17 +9,14 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetLabel(m) e1:SetLabel(m)
e1:SetCondition(RushDuel.MaximumMode) e1:SetCondition(RD.MaximumMode)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Multiple Attack --Multiple Attack
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) cm.cost=RD.CostSendDeckTopToGrave(2)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,2) end
Duel.DiscardDeck(tp,2,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
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
...@@ -27,33 +24,10 @@ end ...@@ -27,33 +24,10 @@ 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 e1=Effect.CreateEffect(c) local reset=RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END
e1:SetType(EFFECT_TYPE_SINGLE) RD.AttachAtkDef(e,c,-1000,0,reset)
e1:SetCode(EFFECT_UPDATE_ATTACK) RD.AttachCannotDirectAttack(e,c,aux.Stringid(m,1),reset)
e1:SetValue(-1000) RD.AttachAttackAll(e,c,1,aux.Stringid(m,2),reset)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) RD.AttachPierce(e,c,aux.Stringid(m,3),reset)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ATTACK_ALL)
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,3))
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_PIERCE)
e4:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e4)
end end
end end
\ No newline at end of file
...@@ -13,24 +13,24 @@ function cm.initial_effect(c) ...@@ -13,24 +13,24 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Activate --Activate
function cm.thfilter(c) function cm.filter(c)
return c:IsFaceup() and c:IsLevelAbove(5) and c:IsAbleToHand() return c:IsFaceup() and c:IsLevelAbove(5) and c:IsAbleToHand()
end end
function cm.exfilter(c)
return c:IsLocation(LOCATION_HAND)
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.GetAttacker():IsControler(1-tp) return Duel.GetAttacker():IsControler(1-tp)
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.thfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) RD.SelectAndDoAction(HINTMSG_RTOHAND,cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_MZONE,0,1,1,nil) if RD.SendToHandAndExists(g,1-tp,cm.exfilter,1,nil) then
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.NegateAttack() Duel.NegateAttack()
end end
end end)
end end
\ No newline at end of file
...@@ -6,7 +6,7 @@ function cm.initial_effect(c) ...@@ -6,7 +6,7 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_XMATERIAL) e1:SetType(EFFECT_TYPE_XMATERIAL)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(RushDuel.MaximumMode) e1:SetCondition(RD.MaximumMode)
e1:SetValue(cm.indes) e1:SetValue(cm.indes)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -5,7 +5,7 @@ cm.name="大恐龙驾 联力恐龙车" ...@@ -5,7 +5,7 @@ cm.name="大恐龙驾 联力恐龙车"
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,list[1],list[2]) aux.AddCodeList(c,list[1],list[2])
--Maximum Summon --Maximum Summon
RushDuel.AddMaximumProcedure(c,3400,list[1],list[2]) RD.AddMaximumProcedure(c,3400,list[1],list[2])
--Destroy --Destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
...@@ -26,25 +26,16 @@ function cm.costfilter(c) ...@@ -26,25 +26,16 @@ function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
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 RushDuel.MaximumMode(e) return RD.MaximumMode(e) and not Duel.IsExistingMatchingCard(cm.confilter,tp,0,LOCATION_MZONE,1,nil)
and not Duel.IsExistingMatchingCard(cm.confilter,tp,0,LOCATION_MZONE,1,nil)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,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)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
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,nil,tp,0,LOCATION_MZONE,1,2,nil,function(g)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,2,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end)
end end
\ No newline at end of file
...@@ -8,7 +8,7 @@ function cm.initial_effect(c) ...@@ -8,7 +8,7 @@ function cm.initial_effect(c)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RushDuel.MaximumMode) e1:SetCondition(RD.MaximumMode)
e1:SetValue(cm.efilter) e1:SetValue(cm.efilter)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -19,14 +19,9 @@ function cm.exfilter(c) ...@@ -19,14 +19,9 @@ function cm.exfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsLocation(LOCATION_GRAVE) return c:IsType(TYPE_MONSTER) and c:IsLocation(LOCATION_GRAVE)
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)>Duel.GetLP(tp) return RD.IsLPBelowOpponent(tp)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(g,nil,1,REASON_COST)
end end
cm.cost=RD.CostSendHandToDeckBottom(Card.IsAbleToDeckAsCost,1,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)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2)
and Duel.IsPlayerCanDiscardDeck(1-tp,2) end and Duel.IsPlayerCanDiscardDeck(1-tp,2) end
...@@ -38,8 +33,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,8 +33,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
g1:Merge(g2) g1:Merge(g2)
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
if Duel.SendtoGrave(g1,REASON_EFFECT)==0 then return end if Duel.SendtoGrave(g1,REASON_EFFECT)==0 then return end
local g=Duel.GetOperatedGroup() local ct=Duel.GetOperatedGroup():FilterCount(cm.exfilter,nil)
local ct=g:FilterCount(cm.exfilter,nil)
if ct>0 then if ct>0 then
Duel.Damage(1-tp,ct*400,REASON_EFFECT) Duel.Damage(1-tp,ct*400,REASON_EFFECT)
end end
......
...@@ -18,19 +18,11 @@ end ...@@ -18,19 +18,11 @@ end
function cm.costfilter(c) function cm.costfilter(c)
return c:IsRace(RACE_DINOSAUR) and c:IsAbleToGraveAsCost() return c:IsRace(RACE_DINOSAUR) and c:IsAbleToGraveAsCost()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND,0,1,1,nil)
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 Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) RD.TargetDraw(tp,1)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,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)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) RD.Draw()
Duel.Draw(p,d,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -27,14 +27,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,14 +27,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,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.Draw(tp,1,REASON_EFFECT)+Duel.Draw(1-tp,1,REASON_EFFECT)==2 if Duel.Draw(tp,1,REASON_EFFECT)+Duel.Draw(1-tp,1,REASON_EFFECT)==2 then
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 RD.CanSelectAndSet(aux.Stringid(m,1),aux.NecroValleyFilter(cm.setfilter),e,tp,LOCATION_GRAVE,0,1,1,nil)
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g)
end
end end
end end
\ No newline at end of file
...@@ -18,7 +18,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,7 +18,7 @@ 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 if Duel.DiscardDeck(tp,1,REASON_EFFECT)~=0
and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
......
...@@ -13,7 +13,7 @@ function cm.initial_effect(c) ...@@ -13,7 +13,7 @@ function cm.initial_effect(c)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(cm.adtg) e2:SetTarget(cm.uptg)
e2:SetValue(300) e2:SetValue(300)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
...@@ -21,6 +21,6 @@ function cm.initial_effect(c) ...@@ -21,6 +21,6 @@ function cm.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
--Atk & Def Up --Atk & Def Up
function cm.adtg(e,c) function cm.uptg(e,c)
return c:IsFaceup() and c:IsRace(RACE_DINOSAUR) return c:IsFaceup() and c:IsRace(RACE_DINOSAUR)
end end
\ No newline at end of file
...@@ -18,7 +18,7 @@ function cm.costfilter(c,tp) ...@@ -18,7 +18,7 @@ function cm.costfilter(c,tp)
and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsLevelAbove(5) and c:IsRace(RACE_DINOSAUR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelAbove(5) and c:IsRace(RACE_DINOSAUR) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1) e:SetLabel(1)
...@@ -37,16 +37,8 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,16 +37,8 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<1 then return end if RD.SelectAndSpecialSummon(cm.spfilter,e,tp,LOCATION_HAND,0,1,1,nil,POS_FACEUP)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.GetOperatedGroup():GetFirst()
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) RD.AttachAtkDef(e,tc,e:GetLabel()*100,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(e:GetLabel()*100)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
local m=120208019 local m=120208019
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)
......
local m=120208038
local list={120155002,120155025,120155042,120151030}
local cm=_G["c"..m]
cm.name="幻刃栋龙 手工具龙"
function cm.initial_effect(c)
aux.AddCodeList(c,list[1],list[2])
--Fusion Material
aux.AddFusionProcCode2(c,list[1],list[2],true,true)
--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:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Up
function cm.thfilter(c)
return c:IsCode(list[3],list[4]) and c:IsAbleToHand()
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,200,0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
Duel.BreakEffect()
RD.SendToHandAndExists(g,1-tp)
end)
end
end
\ No newline at end of file
local m=120208056
local cm=_G["c"..m]
cm.name="吉兆之面"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:IsLevelAbove(1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
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),cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
local tc=g:GetFirst()
RD.AttachAtkDef(e,tc,tc:GetLevel()*100,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
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