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

byd

parent 3bcb48ec
...@@ -11,7 +11,6 @@ function cm.initial_effect(c) ...@@ -11,7 +11,6 @@ function cm.initial_effect(c)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
e1:SetTarget(cm.thtg) e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop) e1:SetOperation(cm.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -23,7 +22,6 @@ function cm.initial_effect(c) ...@@ -23,7 +22,6 @@ function cm.initial_effect(c)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH) e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e2:SetCost(cm.cost)
e2:SetTarget(cm.tstg) e2:SetTarget(cm.tstg)
e2:SetOperation(cm.tsop) e2:SetOperation(cm.tsop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -33,19 +31,20 @@ function cm.initial_effect(c) ...@@ -33,19 +31,20 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_ACTIVATE) e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH) e3:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e3:SetCost(cm.cost) e3:SetTarget(cm.target)
e3:SetOperation(cm.activate) e3:SetOperation(cm.activate)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
cm.VrAqua=true cm.VrAqua=true
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.filter(c)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_CYBERSE)
end end
function cm.thfilter(c) function cm.thfilter(c)
return c.VrAqua and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c.VrAqua and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND)
end end
...@@ -53,6 +52,7 @@ function cm.sumfilter(c) ...@@ -53,6 +52,7 @@ function cm.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsAttribute(ATTRIBUTE_WATER) return c:IsSummonable(true,nil) and c:IsAttribute(ATTRIBUTE_WATER)
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 c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
...@@ -68,12 +68,19 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,12 +68,19 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
if Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) and c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end end
function cm.tsfilter(c) function cm.tsfilter(c)
return c.VrAqua and not c:IsCode(m) and c:IsAbleToHand() return c.VrAqua and not c:IsCode(m) and c:IsAbleToHand()
end end
function cm.tstg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tsfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tsfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND)
end end
...@@ -81,6 +88,7 @@ function cm.ssmfilter(c) ...@@ -81,6 +88,7 @@ function cm.ssmfilter(c)
return c:IsSummonable(true,nil) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(10) return c:IsSummonable(true,nil) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(10)
end end
function cm.tsop(e,tp,eg,ep,ev,re,r,rp) function cm.tsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tsfilter),tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tsfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
...@@ -96,20 +104,37 @@ function cm.tsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,20 +104,37 @@ function cm.tsop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
if Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) and c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE) e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetValue(cm.effectfilter) e1:SetValue(cm.effectfilter)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DISEFFECT) e2:SetCode(EFFECT_CANNOT_DISEFFECT)
e2:SetValue(cm.effectfilter) e2:SetValue(cm.effectfilter)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
if Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) and c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end end
function cm.effectfilter(e,ct) function cm.effectfilter(e,ct)
local p=e:GetHandler():GetControler() local p=e:GetHandler():GetControler()
......
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