Commit 4dcdca1e authored by POLYMER's avatar POLYMER

fix

parent ad1f02ff
...@@ -99,7 +99,7 @@ function cm.mvop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -99,7 +99,7 @@ function cm.mvop1(e,tp,eg,ep,ev,re,r,rp)
local off=1 local off=1
local ops={} local ops={}
local opval={} local opval={}
if cm.mvop(e,tp,eg,ep,ev,re,r,rp,2,lab) and not chk then if not chk and cm.mvop(e,tp,eg,ep,ev,re,r,rp,2,lab) then
ops[off]=aux.Stringid(n,10) ops[off]=aux.Stringid(n,10)
opval[off-1]=1 opval[off-1]=1
off=off+1 off=off+1
...@@ -147,12 +147,20 @@ function cm.mvop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -147,12 +147,20 @@ function cm.mvop1(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab) function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab)
local c=e:GetHandler() local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
if ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL then
if opt==2 and Duel.GetFlagEffect(0,11451711)==0 then
Debug.Message("伤害步骤内不能触发效果战斗。")
Duel.RegisterFlagEffect(0,11451711,RESET_PHASE+PHASE_DAMAGE,0,1)
end
return false
end
if not c:IsAttackable() then return end if not c:IsAttackable() then return end
local g=c:GetAttackableTarget() local g=c:GetAttackableTarget()
local b1=0 local b1=0
local fid=e:GetLabel() local fid=e:GetLabel()
if fid~=0 then b1=1 end if fid~=0 then b1=1 end
if g and #g>0 and Duel.GetFlagEffect(0,11451711)==0 then if g and #g>0 then
if opt==2 then return true end if opt==2 then return true end
Duel.HintSelection(Group.FromCards(c)) Duel.HintSelection(Group.FromCards(c))
--if Duel.SelectYesNo(tp,aux.Stringid(m,4+b1)) then --if Duel.SelectYesNo(tp,aux.Stringid(m,4+b1)) then
...@@ -166,7 +174,6 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab) ...@@ -166,7 +174,6 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab)
e1:SetValue(lab*500) e1:SetValue(lab*500)
c:RegisterEffect(e1) c:RegisterEffect(e1)
Duel.CalculateDamage(c,tc) Duel.CalculateDamage(c,tc)
Duel.RegisterFlagEffect(0,11451711,RESET_PHASE+PHASE_DAMAGE,0,1)
end end
if fid~=0 then Duel.RaiseEvent(c,11451718,e,fid,0,0,0) end if fid~=0 then Duel.RaiseEvent(c,11451718,e,fid,0,0,0) end
if opt==1 then Duel.RegisterFlagEffect(tp,0xffffff+m,RESET_PHASE+PHASE_END,0,1) end if opt==1 then Duel.RegisterFlagEffect(tp,0xffffff+m,RESET_PHASE+PHASE_END,0,1) end
......
...@@ -86,6 +86,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -86,6 +86,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
g1 = Duel.SelectTarget(tp,s.sp2filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) g1 = Duel.SelectTarget(tp,s.sp2filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND,g1,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND,g1,1,0,0)
--Debug.Message(g1:GetFirst():GetCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil) local g2=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
...@@ -94,9 +95,9 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -94,9 +95,9 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local ex1,tg1=Duel.GetOperationInfo(0,CATEGORY_SPECIAL_SUMMON) local ex1,tg1=Duel.GetOperationInfo(0,CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
local ex2,tg2=Duel.GetOperationInfo(0,CATEGORY_REMOVE) local ex2,tg2=Duel.GetOperationInfo(0,CATEGORY_REMOVE)
--Debug.Message(tg1:GetFirst():GetCode())
local tc=tg1:GetFirst() local tc=tg1:GetFirst()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
--if aux.NecroValleyNegateCheck(tc) then return end --if aux.NecroValleyNegateCheck(tc) then return end
......
...@@ -41,7 +41,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -41,7 +41,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return s.tgfilter(chkc,tp) and chkc~=c and chkc:IsOnField() end if chkc then return s.tgfilter(chkc,tp) and chkc~=c and chkc:IsOnField() end
if chk==0 then if chk==0 then
Debug.Message(Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_ONFIELD,0,1,nil,tp,c)) --Debug.Message(Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_ONFIELD,0,1,nil,tp,c))
return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_ONFIELD,0,1,nil,tp,c) end return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_ONFIELD,0,1,nil,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
......
...@@ -15,20 +15,20 @@ function cm.initial_effect(c) ...@@ -15,20 +15,20 @@ function cm.initial_effect(c)
return not c:IsPosition(POS_FACEUP_ATTACK) and c:IsLocation(LOCATION_MZONE) return not c:IsPosition(POS_FACEUP_ATTACK) and c:IsLocation(LOCATION_MZONE)
end end
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(pfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) local g=Duel.GetMatchingGroup(pfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chk==0 then return #g>0 end if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,0,0)
end) end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(pfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) local g=Duel.GetMatchingGroup(pfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.ChangePosition(g,POS_FACEUP_ATTACK) local ct=Duel.ChangePosition(g,POS_FACEUP_ATTACK)
local c=e:GetHandler() local c=e:GetHandler()
if #g>0 and c:IsFaceup() and c:IsRelateToEffect(e) then if #g>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetValue(#g*200) e1:SetValue(ct*200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
......
...@@ -29,7 +29,7 @@ function s.initial_effect(c) ...@@ -29,7 +29,7 @@ function s.initial_effect(c)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id) e2:SetCountLimit(1)
e2:SetCondition(s.discon) e2:SetCondition(s.discon)
e2:SetTarget(s.distg) e2:SetTarget(s.distg)
e2:SetOperation(s.disop) e2:SetOperation(s.disop)
......
...@@ -53,14 +53,16 @@ end ...@@ -53,14 +53,16 @@ end
function c9911663.condition(e,tp,eg,ep,ev,re,r,rp) function c9911663.condition(e,tp,eg,ep,ev,re,r,rp)
return aux.NegateSummonCondition() and eg:IsExists(Card.IsControler,1,nil,1-tp) return aux.NegateSummonCondition() and eg:IsExists(Card.IsControler,1,nil,1-tp)
end end
function c9911663.thtgfilter(c)
return c:IsSetCard(0x5957) and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c9911663.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9911663.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end local b1=Duel.IsExistingMatchingCard(c9911663.thtgfilter,tp,LOCATION_DECK,0,3,nil)
local b2=Duel.GetFlagEffect(tp,9911654)>0
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end end
function c9911663.thtgfilter(c)
return c:IsSetCard(0x5957) and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c9911663.activate(e,tp,eg,ep,ev,re,r,rp) function c9911663.activate(e,tp,eg,ep,ev,re,r,rp)
local chk local chk
local g=Duel.GetMatchingGroup(c9911663.thtgfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c9911663.thtgfilter,tp,LOCATION_DECK,0,nil)
......
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