Commit fe41336e authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 7c03c96b
...@@ -60,7 +60,7 @@ function cm.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
if not eg then return end if not eg then return end
local tc=eg:GetFirst() local tc=eg:GetFirst()
while tc do while tc do
if ep~=1-tp then if tc:GetPreviousControler()==tp then
Duel.RegisterFlagEffect(tp,m+100,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+100,RESET_PHASE+PHASE_END,0,1)
end end
tc=eg:GetNext() tc=eg:GetNext()
......
...@@ -93,7 +93,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,7 +93,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and #g>0 then if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,1,2,nil) local sg=g:Select(tp,1,2,nil)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
end end
function cm.splimcon(e) function cm.splimcon(e)
......
...@@ -25,6 +25,31 @@ function cm.initial_effect(c) ...@@ -25,6 +25,31 @@ function cm.initial_effect(c)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(17035340,1))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,17035341)
e2:SetCondition(cm.discon)
e2:SetCost(cm.discost)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
--Revive
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(17035340,2))
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1)
e3:SetTarget(cm.sumtg)
e3:SetOperation(cm.sumop)
c:RegisterEffect(e3)
--to deck --to deck
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(17035340,3)) e4:SetDescription(aux.Stringid(17035340,3))
...@@ -199,7 +224,32 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -199,7 +224,32 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
e:GetHandler():RegisterFlagEffect(17035340,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:GetFlagEffect(17035340)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.filter(c) function cm.filter(c)
return c:IsSetCard(0x7f5) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() return c:IsSetCard(0x7f5) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
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