Commit 3832235d authored by Tachibana's avatar Tachibana

0

parent 947d1486
No preview for this file type
...@@ -170,10 +170,10 @@ function cm.disrmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -170,10 +170,10 @@ function cm.disrmop(e,tp,eg,ep,ev,re,r,rp)
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(m,4))+1 elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(m,4))+1
else return end else return end
if op==0 then if op==0 then
local cad=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local cad=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
local sc=cad:GetFirst() local sc=cad:GetFirst()
while sc do while sc do
sc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,1,aux.Stringid(m,5)) sc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,1,aux.Stringid(m,5))
sc=cad:GetNext() sc=cad:GetNext()
end end
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
...@@ -182,7 +182,7 @@ function cm.disrmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -182,7 +182,7 @@ function cm.disrmop(e,tp,eg,ep,ev,re,r,rp)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
e2:SetValue(cm.actfilter) e2:SetValue(cm.actfilter)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
else else
......
...@@ -68,8 +68,8 @@ end ...@@ -68,8 +68,8 @@ end
function cm.desop(e,tp,eg,ep,ev,re,r,rp) function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
if bc:IsRelateToBattle() then if bc:IsRelateToBattle() and bc:IsAbleToRemove(tp,POS_FACEDOWN,REASON_EFFECT) then
Duel.Remove(bc,REASON_EFFECT,POS_FACEDOWN) Duel.Remove(bc,POS_FACEDOWN,REASON_EFFECT)
end end
end end
--e5 --e5
......
...@@ -12,43 +12,48 @@ function cm.initial_effect(c) ...@@ -12,43 +12,48 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_CUSTOM+m)
e2:SetProperty(0x14000+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e2:SetCondition(cm.thcon) e2:SetCondition(cm.thcon)
e2:SetTarget(cm.sptg1) e2:SetTarget(cm.sptg1)
e2:SetOperation(cm.spop1) e2:SetOperation(cm.spop1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() if not cm.global_check then
e3:SetCode(EVENT_TO_DECK) cm.global_check=true
c:RegisterEffect(e3) local ge1=Effect.CreateEffect(c)
local e4=e2:Clone() ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_REMOVE) ge1:SetCode(EVENT_LEAVE_FIELD)
c:RegisterEffect(e4) ge1:SetOperation(cm.checkop)
local e5=e2:Clone() Duel.RegisterEffect(ge1,0)
e5:SetCode(EVENT_TO_HAND) end
c:RegisterEffect(e5) end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:FilterCount(cm.filter,nil,tp,rp)==1 and Duel.GetMatchingGroupCount(nil,tp,LOCATION_SZONE,0,nil)==0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,tp,ev)
end
if eg:FilterCount(cm.filter,nil,1-tp,rp)==1 and Duel.GetMatchingGroupCount(nil,1-tp,LOCATION_SZONE,0,nil)==0 then
Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,1-tp,ev)
end
end end
function cm.splimit(e,se,sp,st) function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS) return se:IsHasType(EFFECT_TYPE_ACTIONS)
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0) return ep==tp and Duel.GetFieldGroupCount(tp,LOCATION_SZONE,0)==0
Debug.Message(#g)
Debug.Message(eg:IsExists(cm.filter,1,nil,tp,rp))
return #g==0 and eg:IsExists(cm.filter,1,nil,tp,rp) and Duel.GetFieldGroupCount(tp,LOCATION_SZONE,0)==0
end end
function cm.filter(c,tp,rp) function cm.filter(c,tp,rp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT))) return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT)))
end end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
if Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) then if Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) then
Duel.SetChainLimit(function(e,ep,tp) Duel.SetChainLimit(function(e,ep,tp)
return tp==ep return tp==ep
end)end end)end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,0,LOCATION_ONFIELD+LOCATION_GRAVE)
end end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp) function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
--相对性单调逻辑 --相对性单调逻辑
function c9310024.initial_effect(c) function c9310024.initial_effect(c)
c:EnableReviveLimit()
--ritual summon --ritual summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
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