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

2025/10/27 调整更新: XX的主要阶段才能发动

parent 25ead0a8
......@@ -33,8 +33,9 @@ EFFECT_NO_COST_SEND_HAND_TO_GRAVE = 120294004 -- 不需要支付"把手卡送去
-- 标记
FLAG_SUMMON_TURN = 120000011 -- 召唤·特殊召唤的回合被盖放, 不再符合召唤·特殊召唤的回合的条件
FLAG_ATTACK_ANNOUNCED = 120000012 -- 已经进行了攻击宣言, 不能向怪兽攻击的效果失效
FLAG_ATTACH_EFFECT = 120000013 -- 通过效果赋予的效果, 不能重复叠加
FLAG_SUMMON_MAIN_PHASE = 120000012 -- 召唤·特殊召唤的主要阶段
FLAG_ATTACK_ANNOUNCED = 120000013 -- 已经进行了攻击宣言, 不能向怪兽攻击的效果失效
FLAG_ATTACH_EFFECT = 120000014 -- 通过效果赋予的效果, 不能重复叠加
FLAG_CANNOT_ATTACK_NEXT_TURN = 120231059 -- 下个回合不能攻击
FLAG_CANNOT_ATTACK_UNTIL_NEXT_TURN = 120247006 -- 直到下个回合,不能攻击
FLAG_HAS_DRAW_IN_MAIN_PHASE = 120261037 -- 已在主要阶段抽卡
......
......@@ -13,6 +13,11 @@ end
function RushDuel.IsPreviousMaximumMode(card)
return card:IsType(TYPE_MAXIMUM) and card:IsSummonType(SUMMON_TYPE_MAXIMUM) and card:GetPreviousOverlayCountOnField()>0
end
-- 条件: 玩家的主要阶段
function RushDuel.IsMainPhase(player)
local ph = Duel.GetCurrentPhase()
return Duel.GetTurnPlayer() == player and (ph == PHASE_MAIN1 or ph == PHASE_MAIN2)
end
-- 条件: 这张卡召唤的回合
function RushDuel.IsSummonTurn(card)
return card:IsReason(REASON_SUMMON) and card:IsStatus(STATUS_SUMMON_TURN) and card:GetFlagEffect(FLAG_SUMMON_TURN) ~= 0
......@@ -25,6 +30,11 @@ end
function RushDuel.IsSpecialSummonTurn(card)
return card:IsReason(REASON_SPSUMMON) and card:IsStatus(STATUS_SPSUMMON_TURN) and card:GetFlagEffect(FLAG_SUMMON_TURN) ~= 0
end
-- 条件: 这张卡召唤·特殊召唤的自己主要阶段
function RushDuel.IsSummonOrSpecialSummonMainPhase(card)
return card:IsReason(REASON_SUMMON + REASON_SPSUMMON) and card:IsStatus(STATUS_SUMMON_TURN + STATUS_SPSUMMON_TURN)
and card:GetFlagEffect(FLAG_SUMMON_MAIN_PHASE) ~= 0
end
-- 条件: 处于攻击中
function RushDuel.IsAttacking(effect)
local player = Duel.GetTurnPlayer()
......@@ -341,3 +351,12 @@ end
function RushDuel.GroupAllCount(group, filter, count, ...)
return group:GetCount() == count and group:FilterCount(filter, nil, ...) == count
end
-- 通用条件: 这张卡召唤的回合
function RushDuel.ConditionSummonTurn(e)
return RushDuel.IsSummonTurn(e:GetHandler())
end
-- 通用条件: 这张卡召唤·特殊召唤的自己主要阶段
function RushDuel.ConditionSummonOrSpecialSummonMainPhase(e)
return RushDuel.IsSummonOrSpecialSummonMainPhase(e:GetHandler())
end
\ No newline at end of file
......@@ -91,11 +91,17 @@ function RushDuel.InitFlag()
local reg_summon = function(e, tp, eg, ep, ev, re, r, rp)
eg:ForEach(function(tc)
tc:RegisterFlagEffect(FLAG_SUMMON_TURN, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, EFFECT_FLAG_CLIENT_HINT, 1, 0, HINTMSG_SUMMON_TURN)
if RushDuel.IsMainPhase() then
tc:RegisterFlagEffect(FLAG_SUMMON_MAIN_PHASE, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_MAIN1 + PHASE_MAIN2, 0, 1)
end
end)
end
local reg_spsummon = function(e, tp, eg, ep, ev, re, r, rp)
eg:ForEach(function(tc)
tc:RegisterFlagEffect(FLAG_SUMMON_TURN, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, EFFECT_FLAG_CLIENT_HINT, 1, 0, HINTMSG_SPSUMMON_TURN)
if RushDuel.IsMainPhase() then
tc:RegisterFlagEffect(FLAG_SUMMON_MAIN_PHASE, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_MAIN1 + PHASE_MAIN2, 0, 1)
end
end)
end
local reg_attack = function(e, tp, eg, ep, ev, re, r, rp)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -20,9 +20,6 @@ end
function cm.spfilter(c,e,tp)
return c:IsLevelAbove(7) and c:IsRace(RACE_FIEND) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP_DEFENSE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
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.GetMZoneCount(tp)>0
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -17,9 +17,6 @@ end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsAttribute(ATTRIBUTE_EARTH) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostSendDeckTopToGrave(3)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -17,8 +17,7 @@ function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
return RD.IsSummonOrSpecialSummonMainPhase(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_DAMAGE+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -22,9 +22,6 @@ end
function cm.posfilter(c,e,tp)
return c:IsAttackPos() and RD.IsCanChangePosition(c,e,tp,REASON_EFFECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2)
and Duel.IsPlayerCanDiscardDeck(1-tp,2) end
......
......@@ -11,7 +11,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -25,10 +25,6 @@ end
function cm.spfilter(c,e,tp)
return c:IsCode(list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
cm.cost=RD.CostSendHandToDeckTop(Card.IsAbleToDeckAsCost,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -17,9 +17,6 @@ end
function cm.thfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostPayLP(1000)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -19,9 +19,6 @@ end
function cm.thfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(1-tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,2)
......
......@@ -20,9 +20,8 @@ function cm.thfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON+RACE_FIEND) and RD.IsDefense(c,1200) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.confilter,tp,0,LOCATION_MZONE,nil)
return g:GetSum(Card.GetLevel)>=10 and (RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c))
return g:GetSum(Card.GetLevel)>=10 and RD.ConditionSummonOrSpecialSummonMainPhase(e)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -18,9 +18,6 @@ end
function cm.thfilter(c)
return (c:IsCode(list[1]) or (c:IsType(TYPE_MAXIMUM) and c:IsRace(RACE_CYBERSE))) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>3 end
end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -17,10 +17,6 @@ end
function cm.filter(c)
return c:IsFaceup() and c:GetBaseAttack()>=100
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -6,15 +6,12 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Cannot Summon
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostChangeSelfPosition()
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -8,16 +8,13 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Draw
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -18,10 +18,6 @@ function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(6) and c:IsRace(RACE_DINOSAUR)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -16,9 +16,6 @@ end
function cm.thfilter(c)
return c:IsLevelAbove(6) and c:IsRace(RACE_FIEND) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -16,9 +16,6 @@ end
function cm.thfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_AQUA) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
......
......@@ -8,7 +8,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -17,9 +17,6 @@ end
function cm.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local dam=Duel.GetMatchingGroupCount(cm.filter,tp,0,LOCATION_ONFIELD,nil)*300
if chk==0 then return dam>0 end
......
......@@ -7,16 +7,12 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Draw & Recover
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(1-tp,ct) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -19,9 +19,6 @@ end
function cm.thfilter(c)
return c:IsRace(RACE_CYBERSE) and RD.IsDefense(c,0) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -19,9 +19,6 @@ end
function cm.thfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -19,10 +19,6 @@ end
function cm.posfilter(c,e,tp)
return c:IsPosition(POS_FACEDOWN_DEFENSE) and RD.IsCanChangePosition(c,e,tp,REASON_EFFECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
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)
and Duel.IsExistingMatchingCard(cm.posfilter,tp,0,LOCATION_MZONE,1,nil,e,tp) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -16,10 +16,6 @@ end
function cm.desfilter(c)
return c:IsPosition(POS_FACEDOWN_DEFENSE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_MZONE,nil)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -20,9 +20,6 @@ end
function cm.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostSendGraveToDeckBottom(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -18,9 +18,6 @@ function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_WARRIOR+RACE_WINDBEAST)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEDOWN_DEFENSE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
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
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -17,9 +17,6 @@ end
function cm.thfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_PLANT) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostPayLP(500)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -19,9 +19,6 @@ end
function cm.spfilter(c,e,tp)
return c:IsLevel(7) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -8,7 +8,7 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -18,10 +18,6 @@ end
function cm.setfilter(c)
return c:IsCode(list[1],list[2]) and c:IsSSetable()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
cm.cost=RD.CostPayLP(600)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
......@@ -20,8 +20,7 @@ function cm.desfilter(c)
return c:IsFaceup() and c:IsLevelBelow(8) and c:IsAttackAbove(2500)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c))
return RD.ConditionSummonOrSpecialSummonMainPhase(e)
and Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_GRAVE,0,7,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -19,9 +19,6 @@ end
function cm.thfilter(c)
return c:IsLevelAbove(6) and c:IsRace(RACE_PYRO) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -16,9 +16,6 @@ end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_PYRO) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
......
......@@ -8,7 +8,7 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -21,9 +21,6 @@ end
function cm.setfilter(c)
return c:IsCode(list[1],list[2],list[3]) and c:IsSSetable()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
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.GetLocationCount(tp,LOCATION_SZONE)>0
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -17,9 +17,6 @@ function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsLevel(3) and c:IsRace(RACE_FIEND)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
......
......@@ -6,15 +6,12 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Confirm Card
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
end
......
......@@ -7,16 +7,12 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Down
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -16,9 +16,6 @@ end
function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_CYBERSE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(cm.filter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,ct) and Duel.IsPlayerCanDiscardDeck(1-tp,ct) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -19,9 +19,6 @@ end
function cm.desfilter(c)
return c:IsFaceup() and c:IsLevelBelow(8)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -20,9 +20,6 @@ end
function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:GetSequence()<5
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,3,3)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_SZONE,1,nil) end
......
......@@ -8,7 +8,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -20,9 +20,6 @@ end
function cm.spfilter(c,e,tp)
return c:IsCode(list[3]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -18,9 +18,6 @@ end
function cm.spfilter(c,e,tp)
return c:IsCode(list[1],list[2]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -17,9 +17,6 @@ end
function cm.thfilter(c)
return c:IsLevelAbove(7) and c:IsRace(RACE_AQUA) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostSendHandToDeckBottom(Card.IsAbleToDeckAsCost,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -16,9 +16,6 @@ end
function cm.thfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_ZOMBIE) and c:IsAttack(0) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -18,9 +18,6 @@ function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(4) and c:IsRace(RACE_ZOMBIE)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
......
......@@ -8,15 +8,12 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Damage
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
RD.TargetDamage(1-tp,400)
......
......@@ -8,15 +8,12 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Damage
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
RD.TargetDamage(1-tp,300)
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -24,9 +24,6 @@ end
function cm.spfilter(c,e,tp)
return c:IsCode(list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.ctfilter,tp,0,LOCATION_GRAVE,1,nil)
and Duel.IsExistingMatchingCard(cm.tdfilter,tp,0,LOCATION_GRAVE,1,nil) end
......
......@@ -22,7 +22,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if RD.SendDeckTopToGraveAndExists(tp,2) and (RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)) then
if RD.SendDeckTopToGraveAndExists(tp,2) and RD.IsSummonOrSpecialSummonMainPhase(c) then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end
end
\ No newline at end of file
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -16,10 +16,6 @@ end
function cm.spfilter(c,e,tp)
return c:IsLevel(5,6,7) and c:IsRace(RACE_BEASTWARRIOR) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -22,10 +22,6 @@ end
function cm.thfilter(c)
return c:IsCode(list[1],list[2]) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
cm.cost=RD.CostPayLP(700)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil,e,tp) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -19,9 +19,6 @@ end
function cm.posfilter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and RD.IsCanChangePosition(c,e,tp,REASON_EFFECT) and c:IsCanTurnSet()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
......
......@@ -7,17 +7,13 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_COIN+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
cm.toss_coin=true
--Destroy
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,2)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -16,9 +16,6 @@ end
function cm.thfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsLevel(4) and c:IsRace(RACE_PYRO) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -20,9 +20,6 @@ end
function cm.thfilter(c)
return c:IsFaceup() and c:IsLevelBelow(4) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
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(cm.thfilter,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -24,9 +24,6 @@ end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_PLANT) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -20,9 +20,6 @@ end
function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_PSYCHO) and RD.IsCanAttachDoubleTribute(c,cm.trival)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -17,9 +17,6 @@ end
function cm.thfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(2) and c:IsRace(RACE_PSYCHO) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostPayLP(1000)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -22,8 +22,7 @@ function cm.thfilter(c)
return c:IsCode(list[2],list[3]) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c))
return RD.ConditionSummonOrSpecialSummonMainPhase(e)
and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)==3
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -16,9 +16,6 @@ end
function cm.tdfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -22,10 +22,6 @@ end
function cm.exfilter(c)
return c:IsCode(list[1]) and c:IsLocation(LOCATION_HAND)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
cm.cost=RD.CostSendHandToDeckBottom(Card.IsAbleToDeckAsCost,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -16,9 +16,6 @@ end
function cm.thfilter(c)
return not c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(6) and RD.IsDefense(c,500) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -22,9 +22,6 @@ end
function cm.thfilter(c)
return c:IsCode(list[1]) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,3,3)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -20,9 +20,6 @@ end
function cm.thfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsLocation(LOCATION_GRAVE) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -17,10 +17,6 @@ end
function cm.thfilter(c)
return c:IsLevel(4) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
cm.cost=RD.CostSendHandToDeckBottom(Card.IsAbleToDeckAsCost,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -20,9 +20,6 @@ end
function cm.thfilter(c)
return c:IsLevelAbove(7) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,0,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,1-tp,LOCATION_GRAVE)
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -18,9 +18,6 @@ end
function cm.thfilter(c)
return c:IsCode(list[1]) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -17,9 +17,6 @@ function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_GALAXY)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -22,9 +22,6 @@ end
function cm.spfilter(c,e,tp)
return c:IsCode(list[3],list[4]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostShowHand(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
......
......@@ -10,7 +10,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -20,9 +20,6 @@ end
function cm.costfilter(c,e,tp)
return not c:IsPublic() and c:IsCode(list[1],list[2])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostShowHand(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
......
......@@ -8,7 +8,7 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -17,10 +17,6 @@ end
function cm.setfilter(c)
return c:IsCode(list[1]) and c:IsSSetable()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -16,9 +16,6 @@ end
function cm.spfilter(c,e,tp)
return c:IsCode(m) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -24,9 +24,6 @@ end
function cm.eqcheck(c,ec)
return ec:CheckEquipTarget(c)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return false end
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -18,9 +18,6 @@ end
function cm.thfilter(c)
return c:IsRace(RACE_BEAST) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=RD.GetTributeCount(e:GetHandler())
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,ct,nil) end
......
......@@ -6,15 +6,12 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Cannot Activate
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -19,9 +19,6 @@ end
function cm.thfilter(c)
return RD.IsLegendCard(c) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostSendGraveToDeckBottom(cm.costfilter,1,1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -17,9 +17,6 @@ function cm.spfilter(c,e,tp)
return RD.IsLegendCard(c) and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON)
and Duel.GetMZoneCount(tp)>0 and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>3 end
end
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -18,9 +18,6 @@ end
function cm.filter(c)
return ((c:IsType(TYPE_NORMAL) and c:IsLevelBelow(4)) or c:IsType(TYPE_EQUIP)) and c:IsAbleToDeck()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil)
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -18,9 +18,6 @@ end
function cm.thfilter(c)
return RD.IsLegendCode(c,list[1]) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -16,9 +16,6 @@ end
function cm.thfilter(c)
return c.toss_coin and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
......
......@@ -20,8 +20,7 @@ function cm.confilter(c)
return c:IsFaceup() and c:IsCode(list[1],list[2])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c))
return RD.ConditionSummonOrSpecialSummonMainPhase(e)
and Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -8,7 +8,7 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -21,10 +21,6 @@ end
function cm.setfilter(c)
return c:IsCode(list[3],list[4]) and c:IsSSetable()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
cm.cost=RD.CostShowHand(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -23,9 +23,6 @@ end
function cm.thfilter(c)
return c:IsLevelAbove(5) and RD.IsDefense(c,1000) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,0,LOCATION_GRAVE,1,nil) end
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -23,9 +23,6 @@ end
function cm.thfilter(c)
return c:IsLevelAbove(5) and RD.IsDefense(c,1000) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(1-tp)>0
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -25,9 +25,6 @@ function cm.max(e,tp,eg,ep,ev,re,r,rp)
local ct2=Duel.GetMatchingGroupCount(cm.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
return math.min(ct1,ct2)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostShowHand(cm.costfilter,1,cm.max,Group.GetCount)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -20,9 +20,6 @@ end
function cm.filter(c)
return c:IsFaceup() and not c:IsAttribute(ATTRIBUTE_LIGHT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
......
......@@ -8,7 +8,7 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -23,10 +23,6 @@ end
function cm.posfilter(c,e,tp)
return RD.IsCanChangePosition(c,e,tp,REASON_EFFECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -19,9 +19,6 @@ function cm.thfilter(c)
return (c:IsCode(list[1]) or (c:IsType(TYPE_NORMAL) and c:IsRace(RACE_WARRIOR) and c:IsAttackBelow(500)))
and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -21,9 +21,6 @@ end
function cm.spfilter(c,e,tp)
return c:IsCode(m) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP_DEFENSE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,0,LOCATION_GRAVE,2,nil) end
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,0,LOCATION_GRAVE,nil)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -17,9 +17,6 @@ function cm.spfilter(c,e,tp)
return c:IsLevel(2) and c:IsRace(RACE_PSYCHO) and c:IsAttack(500) and RD.IsDefense(c,0)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -18,10 +18,6 @@ end
function cm.exfilter(c)
return c:IsFaceup() and c:IsCode(list[1])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -18,10 +18,6 @@ end
function cm.exfilter(c)
return c:IsFaceup() and c:IsCode(list[1])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -19,9 +19,6 @@ end
function cm.exfilter(c)
return c:IsRace(RACE_PYRO) and c:IsLocation(LOCATION_GRAVE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetRace)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -16,10 +16,6 @@ end
function cm.thfilter(c)
return c:IsLevelAbove(3) and c:IsRace(RACE_REPTILE) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end
end
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -18,9 +18,6 @@ end
function cm.exfilter(c)
return RD.IsLegendCode(c,list[1])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -22,9 +22,6 @@ end
function cm.exfilter(c)
return c:IsCode(list[1])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
......
......@@ -21,8 +21,7 @@ function cm.thfilter(c)
return c:IsCode(list[1]) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c))
return RD.ConditionSummonOrSpecialSummonMainPhase(e)
and Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_GRAVE,0,3,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -7,16 +7,12 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Confirm
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end
end
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -26,10 +26,6 @@ function cm.check(g)
return (tc1:IsRace(RACE_DRAGON) and tc2:IsCode(list[1]))
or (tc2:IsRace(RACE_DRAGON) and tc1:IsCode(list[1]))
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>3 end
end
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonTurn)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
......@@ -18,9 +18,6 @@ end
function cm.thfilter(c)
return c:IsCode(list[1],list[2]) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCondition(RD.ConditionSummonOrSpecialSummonMainPhase)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -24,10 +24,6 @@ function cm.spfilter(c,e,tp)
return c:IsLevel(8) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
end
cm.cost=RD.CostSendMZoneSubToGrave(cm.costfilter,cm.costcheck,2,2,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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