Commit 8251ffc2 authored by Tachibana's avatar Tachibana

E

parent 8aea06ae
......@@ -58,6 +58,14 @@ function c12895006.initial_effect(c)
ge1:SetOperation(aux.sumreg)
Duel.RegisterEffect(ge1,0)
end
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_COST)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetCost(cm.spncost)
e0:SetOperation(cm.costop)
c:RegisterEffect(e0)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -53,11 +53,15 @@ function c12895011.initial_effect(c)
ge1:SetOperation(aux.sumreg)
Duel.RegisterEffect(ge1,0)
end
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e9:SetCode(EVENT_SPSUMMON_SUCCESS)
e9:SetOperation(cm.rcop)
c:RegisterEffect(e9)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_COST)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetCost(cm.spncost)
e0:SetOperation(cm.costop)
c:RegisterEffect(e0)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.sprfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa74) and c:IsAbleToRemoveAsCost()
......@@ -117,16 +121,24 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp)
end
end
--效果5
function cm.rcop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
function cm.spncost(e,c,tp)
return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0
end
function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xa74)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xa74)
end
\ No newline at end of file
function cm.counterfilter(c)
return c:IsSetCard(0xa74)
end
\ No newline at end of file
......@@ -36,11 +36,15 @@ function c12895012.initial_effect(c)
ge1:SetOperation(aux.sumreg)
Duel.RegisterEffect(ge1,0)
end
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e9:SetCode(EVENT_SPSUMMON_SUCCESS)
e9:SetOperation(cm.rcop)
c:RegisterEffect(e9)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_COST)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetCost(cm.spncost)
e0:SetOperation(cm.costop)
c:RegisterEffect(e0)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.matfilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsType(TYPE_MONSTER)
......@@ -80,17 +84,24 @@ end
function cm.rcop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
function cm.spncost(e,c,tp)
return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0
end
function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xa74)
end
function cm.counterfilter(c)
return c:IsSetCard(0xa74)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0xa74)
end
--特招限制
......@@ -15,7 +15,7 @@ function c33300362.initial_effect(c)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
--e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetCountLimit(1,m)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
......@@ -32,7 +32,7 @@ function cm.filter2(c)
return c:IsSetCard(0x563) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and cm.filter(chkc) and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
......@@ -66,7 +66,8 @@ function cm.initial_effect(c)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetRange(LOCATION_FZONE)
e5:SetTargetRange(1,1)
e5:SetValue(cm.drval)
e5:SetCondition(cm.drcon)
e5:SetValue(2)
c:RegisterEffect(e5)
--recover
local e6=Effect.CreateEffect(c)
......@@ -142,15 +143,8 @@ function cm.sumval(e,c)
local sp=cm.GetNorthPlayer(e:GetHandler(),e:GetHandlerPlayer())
return c:IsControler(sp)
end
function cm.drval(e)
local tp=Duel.GetTurnPlayer()
local sp=cm.GetNorthPlayer(e:GetHandler(),e:GetHandlerPlayer())
local dr=Duel.GetDrawCount(tp)
if tp==1-sp then
return 2
else
return dr
end
function cm.drcon(e)
return Duel.GetTurnPlayer()=1-cm.GetNorthPlayer(e:GetHandler(),e:GetHandlerPlayer())
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
local sp=cm.GetNorthPlayer(e:GetHandler(),tp)
......
......@@ -2,8 +2,8 @@
local m=92369013
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,92369014)
--activate
aux.AddCodeList(c,92369014)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -18,7 +18,7 @@ aux.AddCodeList(c,92369014)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--discard deck
--discard deck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
......@@ -28,6 +28,7 @@ aux.AddCodeList(c,92369014)
e3:SetRange(LOCATION_FZONE)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
cm.diyep_effect=e3
end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -58,17 +59,17 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local ss=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,92369014)
if Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,ss,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,ss,ss,nil)
if #g>0 then
Duel.HintSelection(g)
local ss2=Duel.Destroy(g,REASON_EFFECT)
if ss2>0 then
if not e:GetHandler():IsRelateToEffect(e) then return end
local ss=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,92369014)
if Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,ss,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,ss,ss,nil)
if #g>0 then
Duel.HintSelection(g)
local ss2=Duel.Destroy(g,REASON_EFFECT)
if ss2>0 then
Duel.Draw(tp,ss2,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
end
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