Commit b620333c authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent 07529349
Pipeline #30346 passed with stages
in 44 minutes and 53 seconds
...@@ -42,7 +42,7 @@ function cm.spfilter(c,e,tp) ...@@ -42,7 +42,7 @@ function cm.spfilter(c,e,tp)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFlagEffect(tp,20000086)==0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
......
...@@ -18,10 +18,10 @@ function cm.initial_effect(c) ...@@ -18,10 +18,10 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_ONFIELD)
e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCountLimit(1) e2:SetRange(LOCATION_ONFIELD)
e2:SetCondition(cm.con) e2:SetCondition(cm.con)
e2:SetCost(cm.cost)
e2:SetTarget(cm.tg) e2:SetTarget(cm.tg)
e2:SetOperation(cm.op) e2:SetOperation(cm.op)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -49,6 +49,11 @@ end ...@@ -49,6 +49,11 @@ end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) return e:GetHandler():IsFaceup() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1)
end
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and not (c:IsAttack(0) and c:IsDefense(0)) return c:IsFaceup() and not (c:IsAttack(0) and c:IsDefense(0))
end end
......
...@@ -18,8 +18,8 @@ function cm.initial_effect(c) ...@@ -18,8 +18,8 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_ONFIELD) e2:SetRange(LOCATION_ONFIELD)
e2:SetCountLimit(1)
e2:SetCondition(cm.descon) e2:SetCondition(cm.descon)
e2:SetCost(cm.cost)
e2:SetTarget(cm.destg) e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop) e2:SetOperation(cm.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -52,6 +52,11 @@ end ...@@ -52,6 +52,11 @@ end
function cm.descon(e,tp,eg,ep,ev,re,r,rp) function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() return e:GetHandler():IsFaceup()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsSummonType(SUMMON_TYPE_SPECIAL) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsSummonType(SUMMON_TYPE_SPECIAL) end
if chk==0 then return Duel.IsExistingTarget(Card.IsSummonType,tp,0,LOCATION_MZONE,1,nil,SUMMON_TYPE_SPECIAL) end if chk==0 then return Duel.IsExistingTarget(Card.IsSummonType,tp,0,LOCATION_MZONE,1,nil,SUMMON_TYPE_SPECIAL) end
......
...@@ -19,8 +19,8 @@ function cm.initial_effect(c) ...@@ -19,8 +19,8 @@ function cm.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetRange(LOCATION_ONFIELD) e2:SetRange(LOCATION_ONFIELD)
e2:SetCountLimit(1)
e2:SetCondition(cm.con) e2:SetCondition(cm.con)
e2:SetCost(cm.cost)
e2:SetTarget(cm.tg) e2:SetTarget(cm.tg)
e2:SetOperation(cm.op) e2:SetOperation(cm.op)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -47,7 +47,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
Duel.BreakEffect() Duel.BreakEffect()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not c:IsRelateToEffect(e) if not c:IsRelateToEffect(e)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x9f93,TYPES_EFFECT_TRAP_MONSTER,1600,2600,6,RACE_PLANT,ATTRIBUTE_WIND) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,m,0x9f93,TYPES_EFFECT_TRAP_MONSTER,1600,2600,6,RACE_PLANT,ATTRIBUTE_WIND) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
...@@ -56,6 +56,11 @@ end ...@@ -56,6 +56,11 @@ end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() return e:GetHandler():IsFaceup()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
...@@ -20,7 +20,7 @@ function cm.initial_effect(c) ...@@ -20,7 +20,7 @@ function cm.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_TOGRAVE) e2:SetHintTiming(0,TIMING_TOGRAVE)
e2:SetRange(LOCATION_ONFIELD) e2:SetRange(LOCATION_ONFIELD)
e2:SetCountLimit(1) e2:SetCost(cm.cost)
e2:SetCondition(cm.con) e2:SetCondition(cm.con)
e2:SetTarget(cm.tg) e2:SetTarget(cm.tg)
e2:SetOperation(cm.op) e2:SetOperation(cm.op)
...@@ -56,6 +56,11 @@ end ...@@ -56,6 +56,11 @@ end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() return e:GetHandler():IsFaceup()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
......
...@@ -18,7 +18,7 @@ function cm.initial_effect(c) ...@@ -18,7 +18,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_ONFIELD) e2:SetRange(LOCATION_ONFIELD)
e2:SetCountLimit(1) e2:SetCost(cm.cost)
e2:SetCondition(cm.descon) e2:SetCondition(cm.descon)
e2:SetTarget(cm.destg) e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop) e2:SetOperation(cm.desop)
...@@ -60,6 +60,11 @@ function cm.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,6 +60,11 @@ function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return ep==1-tp and re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re) and re:IsActiveType(TYPE_MONSTER) and c:IsFaceup() return ep==1-tp and re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re) and re:IsActiveType(TYPE_MONSTER) and c:IsFaceup()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsDestructable() end if chk==0 then return re:GetHandler():IsDestructable() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
......
...@@ -21,7 +21,7 @@ function cm.initial_effect(c) ...@@ -21,7 +21,7 @@ function cm.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_ONFIELD) e2:SetRange(LOCATION_ONFIELD)
e2:SetCountLimit(1) e2:SetCost(cm.cost)
e2:SetCondition(cm.con) e2:SetCondition(cm.con)
e2:SetTarget(cm.tg) e2:SetTarget(cm.tg)
e2:SetOperation(cm.op) e2:SetOperation(cm.op)
...@@ -53,6 +53,11 @@ end ...@@ -53,6 +53,11 @@ end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() return e:GetHandler():IsFaceup()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1)
end
function cm.tdfilter(c) function cm.tdfilter(c)
return (c:IsSetCard(0x9f93) or c:IsType(TYPE_TRAP)) and c:IsAbleToDeck() return (c:IsSetCard(0x9f93) or c:IsType(TYPE_TRAP)) and c:IsAbleToDeck()
end end
......
...@@ -19,7 +19,6 @@ function cm.initial_effect(c) ...@@ -19,7 +19,6 @@ function cm.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_ONFIELD) e2:SetRange(LOCATION_ONFIELD)
e2:SetCountLimit(1)
e2:SetCost(cm.scost) e2:SetCost(cm.scost)
e2:SetTarget(cm.stg) e2:SetTarget(cm.stg)
e2:SetOperation(cm.sop) e2:SetOperation(cm.sop)
...@@ -66,10 +65,12 @@ function cm.costfilter(c) ...@@ -66,10 +65,12 @@ function cm.costfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and (c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsStatus(STATUS_EFFECT_ENABLED))) and c:IsAbleToGraveAsCost() return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and (c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsStatus(STATUS_EFFECT_ENABLED))) and c:IsAbleToGraveAsCost()
end end
function cm.scost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.scost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) and c:GetFlagEffect(m)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1)
end end
function cm.stg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
...@@ -20,7 +20,6 @@ function cm.initial_effect(c) ...@@ -20,7 +20,6 @@ function cm.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_ONFIELD) e2:SetRange(LOCATION_ONFIELD)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1)
e2:SetCost(cm.descost) e2:SetCost(cm.descost)
e2:SetTarget(cm.destg) e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop) e2:SetOperation(cm.desop)
...@@ -64,8 +63,9 @@ function cm.cfilter(c) ...@@ -64,8 +63,9 @@ function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and c:IsAbleToGraveAsCost() and c:IsStatus(STATUS_EFFECT_ENABLED) return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and c:IsAbleToGraveAsCost() and c:IsStatus(STATUS_EFFECT_ENABLED)
end end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil) and c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1)GRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
......
...@@ -20,7 +20,7 @@ function cm.initial_effect(c) ...@@ -20,7 +20,7 @@ function cm.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_ONFIELD) e2:SetRange(LOCATION_ONFIELD)
e2:SetCountLimit(1) e2:SetCost(cm.cost)
e2:SetCondition(cm.thcon) e2:SetCondition(cm.thcon)
e2:SetTarget(cm.thtg) e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop) e2:SetOperation(cm.thop)
...@@ -55,8 +55,13 @@ end ...@@ -55,8 +55,13 @@ end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() return e:GetHandler():IsFaceup()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1)
end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsFaceup() and c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS and c:IsAbleToHand() return c:IsFaceup() and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and cm.thfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and cm.thfilter(chkc) end
...@@ -66,7 +71,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -66,7 +71,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function cm.setfilter(c) function cm.setfilter(c)
return c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS and c:IsSSetable() return c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsSSetable()
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -19,7 +19,6 @@ function cm.initial_effect(c) ...@@ -19,7 +19,6 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_ONFIELD) e2:SetRange(LOCATION_ONFIELD)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(cm.descost) e2:SetCost(cm.descost)
e2:SetTarget(cm.destg) e2:SetTarget(cm.destg)
...@@ -66,14 +65,17 @@ function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -66,14 +65,17 @@ function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
return true return true
end end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
if chk==0 then if chk==0 then
if e:GetLabel()==100 then if e:GetLabel()==100 then
e:SetLabel(0) e:SetLabel(0)
return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_MZONE,0,1,tp) return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_MZONE,0,1,tp)
and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and c:GetFlagEffect(m)==0 end
else return false end else return false end
end end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1)
local rt=Duel.GetTargetCount(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local rt=Duel.GetTargetCount(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local ct=0 local ct=0
local min=1 local min=1
......
...@@ -20,7 +20,7 @@ function cm.initial_effect(c) ...@@ -20,7 +20,7 @@ function cm.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_ONFIELD) e2:SetRange(LOCATION_ONFIELD)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1) e2:SetCost(cm.cost)
e2:SetTarget(cm.drtg) e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop) e2:SetOperation(cm.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -51,6 +51,11 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,6 +51,11 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1)
end
function cm.tdfilter(c) function cm.tdfilter(c)
return c:IsSetCard(0x9f93) and c:IsAbleToDeck() return c:IsSetCard(0x9f93) and c:IsAbleToDeck()
end end
......
...@@ -19,7 +19,6 @@ function cm.initial_effect(c) ...@@ -19,7 +19,6 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_ONFIELD) e2:SetRange(LOCATION_ONFIELD)
e2:SetCountLimit(1)
e2:SetCost(cm.spcost) e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg) e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
...@@ -54,8 +53,9 @@ function cm.costfilter(c,tp) ...@@ -54,8 +53,9 @@ function cm.costfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsFaceup() and c:IsAbleToGraveAsCost() return Duel.GetMZoneCount(tp,c)>0 and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsFaceup() and c:IsAbleToGraveAsCost()
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) and c:GetFlagEffect(m)==0 end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1)RAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
......
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