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)
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(m,4))+1
else return end
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()
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()
end
local e2=Effect.CreateEffect(e:GetHandler())
......@@ -182,7 +182,7 @@ function cm.disrmop(e,tp,eg,ep,ev,re,r,rp)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetValue(cm.actfilter)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
else
......
......@@ -68,8 +68,8 @@ end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.Remove(bc,REASON_EFFECT,POS_FACEDOWN)
if bc:IsRelateToBattle() and bc:IsAbleToRemove(tp,POS_FACEDOWN,REASON_EFFECT) then
Duel.Remove(bc,POS_FACEDOWN,REASON_EFFECT)
end
end
--e5
......
......@@ -12,43 +12,48 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(0x14000+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CUSTOM+m)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_HAND)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.sptg1)
e2:SetOperation(cm.spop1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_TO_DECK)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_REMOVE)
c:RegisterEffect(e4)
local e5=e2:Clone()
e5:SetCode(EVENT_TO_HAND)
c:RegisterEffect(e5)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_LEAVE_FIELD)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
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
function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,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
return ep==tp and Duel.GetFieldGroupCount(tp,LOCATION_SZONE,0)==0
end
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)))
end
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
Duel.SetChainLimit(function(e,ep,tp)
return tp==ep
end)end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,0,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
--相对性单调逻辑
function c9310024.initial_effect(c)
c:EnableReviveLimit()
--ritual summon
local e1=Effect.CreateEffect(c)
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