Commit 623af1c1 authored by 未闻皂名's avatar 未闻皂名

2021/6/8 先行卡整合,代码优化

parent 5c0ef565
No preview for this file type
No preview for this file type
...@@ -14,6 +14,9 @@ function cm.initial_effect(c) ...@@ -14,6 +14,9 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--To Grave --To Grave
function cm.exfilter(c)
return c:IsLevelAbove(7) and c:IsLocation(LOCATION_GRAVE)
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)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
...@@ -30,8 +33,11 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,8 +33,11 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
if Duel.SendtoGrave(sg,REASON_EFFECT)~=0 and sg:GetFirst():IsLevelAbove(7) then if Duel.SendtoGrave(sg,REASON_EFFECT)~=0 then
Duel.Recover(tp,1000,REASON_EFFECT) local og=Duel.GetOperatedGroup()
if og:IsExists(cm.exfilter,1,nil) then
Duel.Recover(tp,1000,REASON_EFFECT)
end
end end
Duel.ShuffleHand(1-tp) Duel.ShuffleHand(1-tp)
end end
......
...@@ -14,7 +14,7 @@ function cm.initial_effect(c) ...@@ -14,7 +14,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.tdfilter(c) function cm.tdfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsLevelAbove(1) and c:IsAbleToDeck() return c:IsRace(RACE_DRAGON) and c:IsLevelAbove(1)
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.GetAttacker():IsControler(1-tp) return Duel.GetAttacker():IsControler(1-tp)
...@@ -37,6 +37,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,6 +37,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(-atk) e1:SetValue(-atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
Duel.BreakEffect()
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end end
end end
......
...@@ -28,8 +28,9 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,8 +28,9 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardDeck(tp,3,REASON_COST) Duel.DiscardDeck(tp,3,REASON_COST)
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 e:GetHandler():IsCanChangePosition() end local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) if chk==0 then return c:IsCanChangePosition() and RushDuel.IsHasDefense(c) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,c,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)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -28,8 +28,8 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,8 +28,8 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
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(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),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)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
...@@ -38,6 +38,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,6 +38,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end end
end end
\ No newline at end of file
...@@ -36,15 +36,20 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,15 +36,20 @@ 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.GetMZoneCount(tp)<1 then return end if Duel.GetMZoneCount(tp)<1 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 if g:GetCount()>0
and g:GetFirst():IsCode(list[1]) then and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0
local e1=Effect.CreateEffect(e:GetHandler()) and g:GetFirst():IsCode(list[1])
e1:SetType(EFFECT_TYPE_SINGLE) and c:IsFaceup()
e1:SetCode(EFFECT_UPDATE_ATTACK) and c:IsRelateToEffect(e) then
e1:SetValue(400) local e1=Effect.CreateEffect(c)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetType(EFFECT_TYPE_SINGLE)
e:GetHandler():RegisterEffect(e1) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(400)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end end
end end
\ No newline at end of file
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--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) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--To Hand --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_TOHAND) 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:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--To Deck --To Deck
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_TODECK) e1:SetCategory(CATEGORY_TODECK+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:SetCost(cm.cost)
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--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) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--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) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -18,8 +18,9 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,8 +18,9 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return c:IsReason(REASON_SUMMON) and c:IsStatus(STATUS_SUMMON_TURN) return c:IsReason(REASON_SUMMON) and c:IsStatus(STATUS_SUMMON_TURN)
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)
if chk==0 then return e:GetHandler():IsCanChangePosition() and RushDuel.IsHasDefense(e:GetHandler()) end local c=e:GetHandler()
Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) if chk==0 then return c:IsCanChangePosition() and RushDuel.IsHasDefense(c) end
Duel.ChangePosition(c,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
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 c=e:GetHandler() local c=e:GetHandler()
......
...@@ -37,17 +37,18 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,17 +37,18 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
local atk=400
if Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
local ct=Duel.GetMatchingGroupCount(cm.atkfilter,tp,LOCATION_GRAVE,0,nil)*100
atk=atk+ct
end
local tc=g:GetFirst() local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-atk) e1:SetValue(-400)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
if Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
local atk=Duel.GetMatchingGroupCount(cm.atkfilter,tp,LOCATION_GRAVE,0,nil)*100
local e2=e1:Clone()
e2:SetValue(-atk)
tc:RegisterEffect(e2)
end
end end
end end
\ No newline at end of file
...@@ -20,9 +20,6 @@ end ...@@ -20,9 +20,6 @@ end
function cm.confilter(c) function cm.confilter(c)
return c:IsFaceup() and c:IsCode(list[1]) return c:IsFaceup() and c:IsCode(list[1])
end end
function cm.filter(c)
return c:IsFaceup()
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(cm.confilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
end end
...@@ -33,11 +30,11 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,11 +30,11 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
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) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,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)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -44,13 +44,13 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,13 +44,13 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg=g:Select(p,ct,ct,nil) local sg=g:Select(p,ct,ct,nil)
local op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2)) local op=Duel.SelectOption(p,aux.Stringid(m,1),aux.Stringid(m,2))
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) if Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)==0 then return end
if ct>1 then Duel.SortDecktop(tp,tp,ct) end if ct>1 then Duel.SortDecktop(p,p,ct) end
if op==0 then return end if op==0 then return end
for i=1,ct do for i=1,ct do
local tg=Duel.GetDecktopGroup(tp,1) local tc=Duel.GetDecktopGroup(p,1):GetFirst()
Duel.MoveSequence(tg:GetFirst(),1) Duel.MoveSequence(tc,1)
end end
end 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)
end end
--Direct Attack --Direct Attack
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_FISH) and c:IsAttackBelow(1000) and c:IsAttackable() return c:IsFaceup() and c:IsRace(RACE_FISH) and c:IsAttackBelow(1000)
and not c:IsHasEffect(EFFECT_DIRECT_ATTACK) and not c:IsHasEffect(EFFECT_DIRECT_ATTACK)
and not c:IsHasEffect(EFFECT_CANNOT_ATTACK) and not c:IsHasEffect(EFFECT_CANNOT_ATTACK)
and not c:IsHasEffect(EFFECT_CANNOT_DIRECT_ATTACK) and not c:IsHasEffect(EFFECT_CANNOT_DIRECT_ATTACK)
......
...@@ -29,7 +29,7 @@ end ...@@ -29,7 +29,7 @@ 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
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
......
...@@ -13,8 +13,8 @@ function cm.initial_effect(c) ...@@ -13,8 +13,8 @@ function cm.initial_effect(c)
end end
--Activate --Activate
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) local tc=Duel.GetAttacker()
and Duel.IsExistingMatchingCard(Card.IsRace,tp,0,LOCATION_GRAVE,1,nil,Duel.GetAttacker():GetRace()) return tc:IsControler(1-tp) and Duel.IsExistingMatchingCard(Card.IsRace,tp,0,LOCATION_GRAVE,1,nil,tc:GetRace())
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 tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
......
...@@ -50,6 +50,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,6 +50,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.actlimit(e,tp,eg,ep,ev,re,r,rp) function cm.actlimit(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.SetChainLimitTillChainEnd(cm.chainlimit) Duel.SetChainLimitTillChainEnd(cm.chainlimit)
end end
function cm.chainlimit(e,rp,tp) function cm.chainlimit(e,rp,tp)
......
...@@ -15,7 +15,8 @@ function cm.initial_effect(c) ...@@ -15,7 +15,8 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.costfilter(c) function cm.costfilter(c)
return c:IsAttackPos() and c:IsLevelAbove(7) and c:IsRace(RACE_WARRIOR) and c:IsCanChangePosition() and RushDuel.IsHasDefense(c) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsLevelAbove(7) and c:IsRace(RACE_WARRIOR)
and c:IsCanChangePosition() and RushDuel.IsHasDefense(c)
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)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_MZONE,0,1,nil) end
......
...@@ -36,7 +36,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +36,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT) if Duel.SendtoHand(g,nil,REASON_EFFECT)==0 then return end
local sg=Duel.GetMatchingGroup(cm.posfilter,tp,LOCATION_MZONE,0,nil) local sg=Duel.GetMatchingGroup(cm.posfilter,tp,LOCATION_MZONE,0,nil)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.ChangePosition(sg,POS_FACEUP_DEFENSE) Duel.ChangePosition(sg,POS_FACEUP_DEFENSE)
......
...@@ -35,7 +35,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
local ct=1 local ct=1
if g:GetCount()>1 then ct=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))+1 end Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
if g:GetCount()>1 then ct=Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))+1 end
local sg=g:RandomSelect(1-tp,ct) local sg=g:RandomSelect(1-tp,ct)
Duel.SendtoGrave(sg,REASON_EFFECT) Duel.SendtoGrave(sg,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--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) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -47,11 +47,13 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,11 +47,13 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if ct>2 then ct=2 end if ct>2 then ct=2 end
if ct>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,nil) if ct>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,nil) local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=mg:SelectSubGroup(tp,aux.dncheck,true,1,ct) local sg=mg:SelectSubGroup(tp,aux.dncheck,false,1,ct)
Duel.SSet(tp,sg) if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SSet(tp,sg)
end
end end
end end
end end
\ No newline at end of file
...@@ -28,8 +28,8 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,8 +28,8 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(g,nil,0,REASON_COST) Duel.SendtoDeck(g,nil,0,REASON_COST)
Duel.SortDecktop(tp,tp,4) Duel.SortDecktop(tp,tp,4)
for i=1,4 do for i=1,4 do
local tg=Duel.GetDecktopGroup(tp,1) local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
Duel.MoveSequence(tg:GetFirst(),1) Duel.MoveSequence(tc,1)
end end
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)
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--To Deck --To Deck
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_TODECK) e1:SetCategory(CATEGORY_TODECK+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:SetCost(cm.cost)
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--Atk Up --Atk Up
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+CATEGORY_TODECK+CATEGORY_DESTROY+CATEGORY_GRAVE_ACTION) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
...@@ -42,7 +42,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +42,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.tdfilter2),tp,LOCATION_GRAVE,0,nil) local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.tdfilter2),tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=mg:SelectSubGroup(tp,aux.dncheck,true,2,2) local sg=mg:SelectSubGroup(tp,aux.dncheck,false,2,2)
if sg:GetCount()==0 then return end
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)~=0 if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil)
...@@ -50,7 +51,9 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,7 +51,9 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT) if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end end
end end
end end
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--To Hand --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_TOHAND) 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:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--To Hand --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_TOHAND) 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:SetTarget(cm.target) e1:SetTarget(cm.target)
......
...@@ -39,7 +39,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.SortDecktop(1-tp,1-tp,5) Duel.SortDecktop(1-tp,1-tp,5)
for i=1,5 do for i=1,5 do
local g=Duel.GetDecktopGroup(1-tp,1) local tc=Duel.GetDecktopGroup(1-tp,1):GetFirst()
Duel.MoveSequence(g:GetFirst(),1) Duel.MoveSequence(tc,1)
end end
end end
\ No newline at end of file
...@@ -21,7 +21,6 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -21,7 +21,6 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabel(g:GetSum(Card.GetLevel))
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
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)
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--To Hand --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_TOHAND) 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:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--To Hand --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_TOHAND) 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:SetCost(cm.cost)
......
...@@ -18,8 +18,9 @@ function cm.filter(c) ...@@ -18,8 +18,9 @@ function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsDefenseAbove(2000) and RushDuel.IsHasDefense(c) return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsDefenseAbove(2000) and RushDuel.IsHasDefense(c)
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)
if chk==0 then return e:GetHandler():IsCanChangePosition() and RushDuel.IsHasDefense(e:GetHandler()) end local c=e:GetHandler()
Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) if chk==0 then return c:IsCanChangePosition() and RushDuel.IsHasDefense(c) end
Duel.ChangePosition(c,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
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) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
......
...@@ -26,7 +26,7 @@ end ...@@ -26,7 +26,7 @@ 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.DiscardDeck(tp,1,REASON_EFFECT)~=0 then if Duel.DiscardDeck(tp,1,REASON_EFFECT)~=0 then
local oc=Duel.GetOperatedGroup():GetFirst() local oc=Duel.GetOperatedGroup():GetFirst()
if oc:IsType(TYPE_MONSTER) and oc:IsLocation(LOCATION_GRAVE) then if oc and oc:IsType(TYPE_MONSTER) and oc:IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -13,11 +13,11 @@ function cm.initial_effect(c) ...@@ -13,11 +13,11 @@ 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.uptg) e2:SetTarget(cm.atktg)
e2:SetValue(200) e2:SetValue(200)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
--Atk Up --Atk Up
function cm.uptg(e,c) function cm.atktg(e,c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT)
end end
\ No newline at end of file
...@@ -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.uptg) e2:SetTarget(cm.adtg)
e2:SetValue(200) e2:SetValue(200)
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 --Atk & Def
function cm.uptg(e,c) function cm.adtg(e,c)
return c:IsFaceup() and c:IsRace(RACE_INSECT+RACE_BEAST+RACE_PLANT+RACE_BEASTWARRIOR) return c:IsFaceup() and c:IsRace(RACE_INSECT+RACE_BEAST+RACE_PLANT+RACE_BEASTWARRIOR)
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)
aux.AddCodeList(c,list[1],list[2]) aux.AddCodeList(c,list[1],list[2])
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(cm.condition1) e1:SetCondition(cm.condition1)
......
...@@ -16,7 +16,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
local c=Duel.GetAttackTarget() local c=Duel.GetAttackTarget()
return tc:IsControler(1-tp) and tc:IsLevelAbove(1) return tc:IsControler(1-tp) and tc:IsLevelAbove(1)
and c and c:IsControler(tp) and c:IsAttackPos() and c:IsRace(RACE_WINDBEAST) and c and c:IsControler(tp) and c:IsPosition(POS_FACEUP_ATTACK) and c:IsRace(RACE_WINDBEAST)
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 tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--To Hand --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_TOHAND) 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:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -24,7 +24,7 @@ function cm.tdfilter(c) ...@@ -24,7 +24,7 @@ function cm.tdfilter(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 g=Duel.GetMatchingGroup(cm.confilter,tp,LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(cm.confilter,tp,LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)>=3 return g:GetClassCount(Card.GetRace)>=3
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,0,LOCATION_SZONE,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_SZONE,1,nil)
......
...@@ -4,7 +4,7 @@ cm.name="传开的耳语" ...@@ -4,7 +4,7 @@ cm.name="传开的耳语"
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK) e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_MSET) e1:SetCode(EVENT_MSET)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -29,7 +29,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,7 +29,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,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_DEFENSE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,cm.posfilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.posfilter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
......
...@@ -28,7 +28,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,7 +28,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsPlayerCanDiscardDeck(tp,2) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>3 end and Duel.IsPlayerCanDiscardDeck(tp,2) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>3 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
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 c=e:GetHandler() local c=e:GetHandler()
......
...@@ -28,7 +28,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,7 +28,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGrave() and Duel.IsPlayerCanDraw(tp,2) end if chk==0 then return e:GetHandler():IsAbleToGrave() and Duel.IsPlayerCanDraw(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,2)
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 c=e:GetHandler() local c=e:GetHandler()
...@@ -40,8 +39,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,8 +39,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.SendtoDeck(g,nil,0,REASON_EFFECT) local ct=Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
Duel.SortDecktop(tp,tp,ct) Duel.SortDecktop(tp,tp,ct)
for i=1,ct do for i=1,ct do
local tg=Duel.GetDecktopGroup(tp,1) local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
Duel.MoveSequence(tg:GetFirst(),1) Duel.MoveSequence(tc,1)
end end
end end
end end
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--Draw --Draw
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_TOGRAVE+CATEGORY_DRAW+CATEGORY_TODECK) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
...@@ -28,15 +28,14 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,15 +28,14 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(sg,nil,0,REASON_COST) Duel.SendtoDeck(sg,nil,0,REASON_COST)
Duel.SortDecktop(tp,tp,3) Duel.SortDecktop(tp,tp,3)
for i=1,3 do for i=1,3 do
local tg=Duel.GetDecktopGroup(tp,1) local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
Duel.MoveSequence(tg:GetFirst(),1) Duel.MoveSequence(tc,1)
end end
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 e:GetHandler():IsAbleToGrave() and Duel.IsPlayerCanDraw(tp,3) end if chk==0 then return e:GetHandler():IsAbleToGrave() and Duel.IsPlayerCanDraw(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,3)
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 c=e:GetHandler() local c=e:GetHandler()
......
...@@ -26,7 +26,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,7 +26,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2) Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,2)
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 p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
...@@ -38,8 +37,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,8 +37,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.SendtoDeck(g,nil,0,REASON_EFFECT) local ct=Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
Duel.SortDecktop(p,p,ct) Duel.SortDecktop(p,p,ct)
for i=1,ct do for i=1,ct do
local tg=Duel.GetDecktopGroup(p,1) local tc=Duel.GetDecktopGroup(p,1):GetFirst()
Duel.MoveSequence(tg:GetFirst(),1) Duel.MoveSequence(tc,1)
end end
end end
end end
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--To Deck --To Deck
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_TODECK) e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -25,7 +25,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,7 +25,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(ct) Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,ct) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,ct)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*300)
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) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
...@@ -33,6 +32,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,6 +32,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.Draw(p,ct,REASON_EFFECT) local d=Duel.Draw(p,ct,REASON_EFFECT)
if d>0 then if d>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Recover(tp,ct*300,REASON_EFFECT) Duel.Recover(tp,d*300,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--Draw --Draw
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_TODECK+CATEGORY_DRAW) e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
...@@ -32,7 +32,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,7 +32,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
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)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--To Hand --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_TOHAND) 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:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -29,8 +29,9 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,8 +29,9 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if (opt==0 and not tc:IsType(TYPE_MONSTER)) if (opt==0 and not tc:IsType(TYPE_MONSTER))
or (opt==1 and not tc:IsType(TYPE_SPELL)) or (opt==1 and not tc:IsType(TYPE_SPELL))
or (opt==2 and not tc:IsType(TYPE_TRAP)) then or (opt==2 and not tc:IsType(TYPE_TRAP)) then
Duel.NegateAttack() if Duel.NegateAttack() then
Duel.Damage(1-tp,300,REASON_EFFECT) Duel.Damage(1-tp,300,REASON_EFFECT)
end
end end
end end
end end
\ No newline at end of file
...@@ -24,8 +24,8 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -24,8 +24,8 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
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
local sg=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),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)
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_MZONE,nil)
......
...@@ -29,7 +29,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,7 +29,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,PLAYER_ALL,1)
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 g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
......
...@@ -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.downtg) e2:SetTarget(cm.adtg)
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 --Atk & Def
function cm.downtg(e,c) function cm.adtg(e,c)
return c:IsFaceup() and c:IsLevelBelow(4) return c:IsFaceup() and c:IsLevelBelow(4)
end end
\ No newline at end of file
...@@ -30,7 +30,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,7 +30,6 @@ 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
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,200) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,200)
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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
......
...@@ -9,7 +9,7 @@ function cm.initial_effect(c) ...@@ -9,7 +9,7 @@ function cm.initial_effect(c)
--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_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.IsMaximumMode) e1:SetCondition(RushDuel.IsMaximumMode)
......
...@@ -29,7 +29,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,7 +29,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.NegateAttack() Duel.NegateAttack()
end end
end end
......
...@@ -16,11 +16,10 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -16,11 +16,10 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,1000)
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 p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 then if Duel.Draw(p,d,REASON_EFFECT)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Recover(1-tp,1000,REASON_EFFECT) Duel.Recover(1-tp,1000,REASON_EFFECT)
end end
......
...@@ -14,6 +14,9 @@ function cm.initial_effect(c) ...@@ -14,6 +14,9 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Discard Deck --Discard Deck
function cm.exfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsLocation(LOCATION_GRAVE)
end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsDefense(0) and c:IsAbleToHand() return c:IsRace(RACE_CYBERSE) and c:IsDefense(0) and c:IsAbleToHand()
end end
...@@ -29,7 +32,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,7 +32,7 @@ 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
local g=Duel.GetOperatedGroup() local g=Duel.GetOperatedGroup()
local ct=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local ct=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:IsExists(Card.IsRace,1,nil,RACE_CYBERSE) and ct>0 if g:IsExists(cm.exfilter,1,nil) and ct>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--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) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
...@@ -36,8 +36,8 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,8 +36,8 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(sg,nil,0,REASON_COST) Duel.SendtoDeck(sg,nil,0,REASON_COST)
Duel.SortDecktop(tp,tp,2) Duel.SortDecktop(tp,tp,2)
for i=1,2 do for i=1,2 do
local tg=Duel.GetDecktopGroup(tp,1) local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
Duel.MoveSequence(tg:GetFirst(),1) Duel.MoveSequence(tc,1)
end end
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)
......
...@@ -39,21 +39,28 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,21 +39,28 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.ChangePosition(g,POS_FACEUP_DEFENSE)~=0 and Duel.GetFlagEffect(tp,m)==0 then if Duel.ChangePosition(g,POS_FACEUP_DEFENSE)~=0 and Duel.GetFlagEffect(tp,m)==0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(0,LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCondition(cm.atkcon)
e1:SetValue(cm.atklmt)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
--Hint
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetTargetRange(0,1) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(cm.atkcon)
e2:SetValue(cm.atklmt)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
--Hint
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e3:SetTargetRange(0,1)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end end
end end
......
...@@ -4,7 +4,7 @@ cm.name="幻刃复归" ...@@ -4,7 +4,7 @@ cm.name="幻刃复归"
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -14,6 +14,9 @@ function cm.initial_effect(c) ...@@ -14,6 +14,9 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Discard Deck --Discard Deck
function cm.exfilter(c)
return c:IsRace(RACE_WARRIOR) and c:IsLocation(LOCATION_GRAVE)
end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand()
end end
...@@ -28,7 +31,7 @@ end ...@@ -28,7 +31,7 @@ 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
local g=Duel.GetOperatedGroup() local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsRace,1,nil,RACE_WARRIOR) if g:IsExists(cm.exfilter,1,nil)
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--To Hand --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_TOHAND) 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:SetTarget(cm.target) e1:SetTarget(cm.target)
...@@ -23,27 +23,26 @@ end ...@@ -23,27 +23,26 @@ 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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,2,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,2,nil)
if g:GetCount()>0 then if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end if Duel.GetFlagEffect(tp,m)==0 then
if Duel.GetFlagEffect(tp,m)==0 then local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(m,1))
e1:SetDescription(aux.Stringid(m,1)) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0)
e1:SetTargetRange(1,0) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp)
Duel.RegisterEffect(e1,tp) local e2=e1:Clone()
local e2=e1:Clone() e2:SetDescription(aux.Stringid(m,2))
e2:SetDescription(aux.Stringid(m,2)) e2:SetCode(EFFECT_CANNOT_MSET)
e2:SetCode(EFFECT_CANNOT_MSET) Duel.RegisterEffect(e2,tp)
Duel.RegisterEffect(e2,tp) local e3=e1:Clone()
local e3=e1:Clone() e3:SetDescription(aux.Stringid(m,3))
e3:SetDescription(aux.Stringid(m,3)) e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) Duel.RegisterEffect(e3,tp)
Duel.RegisterEffect(e3,tp) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) end
end end
end end
\ No newline at end of file
...@@ -12,9 +12,6 @@ function cm.initial_effect(c) ...@@ -12,9 +12,6 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Activate --Activate
function cm.filter(c)
return c:IsAbleToGrave()
end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsLocation(LOCATION_GRAVE) return c:IsLocation(LOCATION_GRAVE)
end end
...@@ -22,13 +19,13 @@ function cm.spfilter(c,e,tp) ...@@ -22,13 +19,13 @@ function cm.spfilter(c,e,tp)
return c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,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_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,1,7,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,7,nil)
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
local lv=og:Filter(cm.exfilter,nil):GetSum(Card.GetOriginalLevel) local lv=og:Filter(cm.exfilter,nil):GetSum(Card.GetOriginalLevel)
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--Atk Up --Atk Up
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+CATEGORY_TODECK) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
......
...@@ -25,8 +25,8 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,8 +25,8 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(g,nil,0,REASON_COST) Duel.SendtoDeck(g,nil,0,REASON_COST)
Duel.SortDecktop(tp,tp,4) Duel.SortDecktop(tp,tp,4)
for i=1,4 do for i=1,4 do
local tg=Duel.GetDecktopGroup(tp,1) local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
Duel.MoveSequence(tg:GetFirst(),1) Duel.MoveSequence(tc,1)
end end
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)
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--Recover --Recover
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_RECOVER+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_RECOVER+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:SetCost(cm.cost)
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--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) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -33,7 +33,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,7 +33,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)
local ct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil) local ct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil)
if ct<1 then return end if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,cm.posfilter,tp,0,LOCATION_MZONE,1,ct,nil) local g=Duel.SelectMatchingCard(tp,cm.posfilter,tp,0,LOCATION_MZONE,1,ct,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--To Hand --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_TOHAND) 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:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--To Deck --To Deck
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_TODECK) e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
...@@ -38,7 +38,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,1,ct,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,1,ct,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -35,7 +35,9 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,9 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if g:CheckSubGroup(cm.check,2,2,nil) then if g:CheckSubGroup(cm.check,2,2,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,cm.check,false,2,2,nil) local sg=g:SelectSubGroup(tp,cm.check,false,2,2,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK) if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end end
end end
if Duel.GetFlagEffect(tp,m)~=0 then return end if Duel.GetFlagEffect(tp,m)~=0 then return end
......
...@@ -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.target) e2:SetTarget(cm.adtg)
e2:SetValue(400) e2:SetValue(400)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
...@@ -22,6 +22,6 @@ function cm.initial_effect(c) ...@@ -22,6 +22,6 @@ function cm.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
--Atk & Def --Atk & Def
function cm.target(e,c) function cm.adtg(e,c)
return c:IsFaceup() and c:IsRace(RACE_WYRM) return c:IsFaceup() and c:IsRace(RACE_WYRM)
end end
\ No newline at end of file
...@@ -23,7 +23,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -23,7 +23,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if ct>1 then Duel.SortDecktop(tp,tp,ct) end if ct>1 then Duel.SortDecktop(tp,tp,ct) end
if op==0 then return end if op==0 then return end
for i=1,ct do for i=1,ct do
local tg=Duel.GetDecktopGroup(tp,1) local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
Duel.MoveSequence(tg:GetFirst(),1) Duel.MoveSequence(tc,1)
end end
end end
\ No newline at end of file
...@@ -7,6 +7,7 @@ function cm.initial_effect(c) ...@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
...@@ -24,10 +25,13 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -24,10 +25,13 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
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 true end if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(300)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300)
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.Damage(1-tp,300,REASON_EFFECT)~=0 local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Damage(p,d,REASON_EFFECT)~=0 and p==1-tp
and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
...@@ -4,7 +4,7 @@ cm.name="大极流" ...@@ -4,7 +4,7 @@ cm.name="大极流"
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
......
...@@ -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.uptg) e2:SetTarget(cm.adtg)
e2:SetValue(200) e2:SetValue(200)
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 --Atk & Def
function cm.uptg(e,c) function cm.adtg(e,c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR+RACE_BEASTWARRIOR) return c:IsFaceup() and c:IsRace(RACE_WARRIOR+RACE_BEASTWARRIOR)
end end
\ No newline at end of file
...@@ -4,7 +4,7 @@ cm.name="三角重生" ...@@ -4,7 +4,7 @@ cm.name="三角重生"
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON) e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -33,7 +33,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,7 +33,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,1,REASON_EFFECT) if Duel.SendtoDeck(g,nil,1,REASON_EFFECT)~=0 then
Duel.Draw(tp,2,REASON_EFFECT) Duel.Draw(tp,2,REASON_EFFECT)
end
end end
end end
\ No newline at end of file
...@@ -45,10 +45,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,10 +45,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local sg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) local sg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.HintSelection(sg) Duel.HintSelection(sg)
local tc=sg:GetFirst() local tc=sg:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -47,7 +47,9 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,9 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil) local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SSet(tp,sg) if sg:GetCount()>0 then
Duel.SSet(tp,sg)
end
end end
end end
end end
\ No newline at end of file
...@@ -39,10 +39,12 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,10 +39,12 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if ct>2 then ct=2 end if ct>2 then ct=2 end
if ct>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,nil) if ct>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,ct,nil) local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,ct,nil)
Duel.SSet(tp,sg) if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SSet(tp,sg)
end
end end
end end
end end
\ No newline at end of file
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--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) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
...@@ -36,6 +36,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,6 +36,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMZoneCount(tp) local ct=Duel.GetMZoneCount(tp)
if ct<1 then return end if ct<1 then return end
if ct>2 then ct=2 end if ct>2 then ct=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,ct,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,ct,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--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) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
...@@ -33,8 +33,8 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,8 +33,8 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(sg,nil,0,REASON_COST) Duel.SendtoDeck(sg,nil,0,REASON_COST)
Duel.SortDecktop(tp,tp,2) Duel.SortDecktop(tp,tp,2)
for i=1,2 do for i=1,2 do
local tg=Duel.GetDecktopGroup(tp,1) local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
Duel.MoveSequence(tg:GetFirst(),1) Duel.MoveSequence(tc,1)
end end
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)
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--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) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -14,6 +14,9 @@ function cm.initial_effect(c) ...@@ -14,6 +14,9 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--To Grave --To Grave
function cm.exfilter(c)
return c:IsLevelAbove(7) and c:IsLocation(LOCATION_GRAVE)
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)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
...@@ -30,8 +33,11 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,8 +33,11 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
if Duel.SendtoGrave(sg,REASON_EFFECT)~=0 and sg:GetFirst():IsLevelAbove(7) then if Duel.SendtoGrave(sg,REASON_EFFECT)~=0 then
Duel.Recover(tp,1000,REASON_EFFECT) local og=Duel.GetOperatedGroup()
if og:IsExists(cm.exfilter,1,nil) then
Duel.Recover(tp,1000,REASON_EFFECT)
end
end end
Duel.ShuffleHand(1-tp) Duel.ShuffleHand(1-tp)
end end
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--To Hand --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_TOHAND) 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:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--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_TOGRAVE+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -28,11 +28,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,11 +28,10 @@ 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 ct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_GRAVE,0,nil) local ct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_GRAVE,0,nil)
local atk=ct*200
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk) e1:SetValue(ct*200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if ct>=5 then if ct>=5 then
......
...@@ -47,8 +47,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,8 +47,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT) if sg:GetCount()>0 then
Duel.ConfirmCards(1-tp,sg) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end end
end end
end end
\ No newline at end of file
...@@ -5,7 +5,7 @@ function cm.initial_effect(c) ...@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--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) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -6,7 +6,7 @@ function cm.initial_effect(c) ...@@ -6,7 +6,7 @@ function cm.initial_effect(c)
aux.AddCodeList(c,list[1]) aux.AddCodeList(c,list[1])
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_RECOVER) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
...@@ -33,8 +33,8 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,8 +33,8 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(sg,nil,0,REASON_COST) Duel.SendtoDeck(sg,nil,0,REASON_COST)
Duel.SortDecktop(tp,tp,2) Duel.SortDecktop(tp,tp,2)
for i=1,2 do for i=1,2 do
local tg=Duel.GetDecktopGroup(tp,1) local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
Duel.MoveSequence(tg:GetFirst(),1) Duel.MoveSequence(tc,1)
end end
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)
......
...@@ -7,6 +7,7 @@ function cm.initial_effect(c) ...@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_RECOVER+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
...@@ -24,10 +25,13 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -24,10 +25,13 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
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 true end if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500)
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.Recover(tp,500,REASON_EFFECT)~=0 local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Recover(p,d,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
...@@ -28,7 +28,6 @@ end ...@@ -28,7 +28,6 @@ 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.tgfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1300)
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_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......
...@@ -4,7 +4,7 @@ cm.name="昂光的裁决" ...@@ -4,7 +4,7 @@ cm.name="昂光的裁决"
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
......
...@@ -40,8 +40,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,8 +40,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,1,nil) local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) if sg:GetCount()>0 then
Duel.ConfirmDecktop(tp,1) Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)
Duel.ConfirmDecktop(tp,1)
end
end end
end end
end end
\ No newline at end of file
...@@ -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.uptg) e2:SetTarget(cm.adtg)
e2:SetValue(200) e2:SetValue(200)
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 --Atk & Def
function cm.uptg(e,c) function cm.adtg(e,c)
return c:IsFaceup() and c:IsRace(RACE_DINOSAUR+RACE_ZOMBIE+RACE_ROCK) return c:IsFaceup() and c:IsRace(RACE_DINOSAUR+RACE_ZOMBIE+RACE_ROCK)
end end
\ No newline at end of file
...@@ -4,7 +4,7 @@ cm.name="美☆魔女封禁" ...@@ -4,7 +4,7 @@ cm.name="美☆魔女封禁"
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK) e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
......
...@@ -43,6 +43,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,6 +43,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK) if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK)
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)
aux.AddCodeList(c,list[1]) aux.AddCodeList(c,list[1])
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_TODECK) e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
...@@ -37,7 +37,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,7 +37,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_GRAVE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_GRAVE,nil) local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,g:GetCount()*100) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,g:GetCount()*100)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),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)
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_GRAVE,nil) local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_GRAVE,nil)
......
...@@ -43,6 +43,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,6 +43,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local ct=Duel.GetMZoneCount(tp) local ct=Duel.GetMZoneCount(tp)
if ct>2 then ct=2 end if ct>2 then ct=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter2),tp,LOCATION_GRAVE,0,1,ct,nil,e,tp) local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter2),tp,LOCATION_GRAVE,0,1,ct,nil,e,tp)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
--To Hand --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_TOHAND) 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:SetCost(cm.cost)
...@@ -46,8 +46,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,8 +46,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_GRAVE,0,1,1,nil) local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT) if sg:GetCount()>0 then
Duel.ConfirmCards(1-tp,sg) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end end
end end
end end
\ No newline at end of file
...@@ -4,7 +4,7 @@ cm.name="死者转生" ...@@ -4,7 +4,7 @@ cm.name="死者转生"
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
......
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