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