Commit 00ba917c authored by DailyShana's avatar DailyShana

fix

parent 01399a8b
...@@ -78,7 +78,7 @@ function c1118137.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -78,7 +78,7 @@ function c1118137.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local tg=c:GetEquipTarget() local tg=c:GetEquipTarget()
if chk==0 then return not c:IsStatus(STATUS_DESTROY_CONFIRMED) if chk==0 then return not c:IsStatus(STATUS_DESTROY_CONFIRMED)
and tg and tg:IsReason(REASON_BATTLE+REASON_EFFECT) and tg and tg:IsReason(REASON_BATTLE+REASON_EFFECT) and not tg:IsReason(REASON_REPLACE)
and Duel.IsCanRemoveCounter(tp,1,0,0x1,1,REASON_EFFECT) end and Duel.IsCanRemoveCounter(tp,1,0,0x1,1,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,c,96) return Duel.SelectEffectYesNo(tp,c,96)
end end
......
...@@ -42,11 +42,15 @@ function c2930675.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,11 +42,15 @@ function c2930675.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
function c2930675.cfilter(c,tp) function c2930675.cfilter(c,seq2)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0x10c) local seq1=c:GetSequence()
return c:IsFaceup() and c:IsSetCard(0x10c)
and (seq1==4-seq2 or (seq2==5 and seq1==3) or (seq2==6 and seq1==1))
end end
function c2930675.discon(e,tp,eg,ep,ev,re,r,rp) function c2930675.discon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and re:IsActiveType(TYPE_TRAP) and re:GetHandler():GetColumnGroup():FilterCount(c2930675.cfilter,nil,tp)>0 local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
return rp~=tp and re:IsActiveType(TYPE_TRAP) and loc==LOCATION_SZONE
and Duel.IsExistingMatchingCard(c2930675.cfilter,tp,LOCATION_MZONE,0,1,nil,seq)
end end
function c2930675.disop(e,tp,eg,ep,ev,re,r,rp) function c2930675.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
......
...@@ -11,10 +11,17 @@ function c35146019.initial_effect(c) ...@@ -11,10 +11,17 @@ function c35146019.initial_effect(c)
e1:SetOperation(c35146019.operation) e1:SetOperation(c35146019.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Destroy --Destroy
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_LEAVE_FIELD_P)
e0:SetOperation(c35146019.checkop)
c:RegisterEffect(e0)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(c35146019.desop) e2:SetOperation(c35146019.desop)
e2:SetLabelObject(e0)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to hand --to hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -87,7 +94,13 @@ function c35146019.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,7 +94,13 @@ function c35146019.operation(e,tp,eg,ep,ev,re,r,rp)
c:CancelToGrave(false) c:CancelToGrave(false)
end end
end end
function c35146019.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c35146019.desop(e,tp,eg,ep,ev,re,r,rp) function c35146019.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetLabel()~=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetFirstCardTarget() local tc=c:GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then if tc and tc:IsLocation(LOCATION_MZONE) then
...@@ -106,7 +119,7 @@ function c35146019.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -106,7 +119,7 @@ function c35146019.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c35146019.thop(e,tp,eg,ep,ev,re,r,rp) function c35146019.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
...@@ -90,6 +90,6 @@ function c36368606.immop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,6 +90,6 @@ function c36368606.immop(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext() tc=g:GetNext()
end end
end end
function c36368606.efilter(e,te) function c36368606.efilter(e,te,c)
return te:GetOwner()~=e:GetHandler() return te:GetOwner()~=c
end end
...@@ -72,7 +72,7 @@ end ...@@ -72,7 +72,7 @@ end
function c36668118.spop2(e,tp,eg,ep,ev,re,r,rp) function c36668118.spop2(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)-Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)-Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c36668118.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(c36668118.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if ft<1 or ct<1 or g:GetCount()==0 then return end if ft<1 or ct<1 or g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
......
...@@ -22,12 +22,6 @@ function c49725936.initial_effect(c) ...@@ -22,12 +22,6 @@ function c49725936.initial_effect(c)
e2:SetCode(EFFECT_PIERCE) e2:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--special summon --special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetOperation(c49725936.regop)
c:RegisterEffect(e0)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(49725936,1)) e3:SetDescription(aux.Stringid(49725936,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -53,11 +47,8 @@ end ...@@ -53,11 +47,8 @@ end
function c49725936.negop(e,tp,eg,ep,ev,re,r,rp) function c49725936.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev) Duel.NegateActivation(ev)
end end
function c49725936.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(49725936,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c49725936.spcon(e,tp,eg,ep,ev,re,r,rp) function c49725936.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(49725936)==0 return not e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN)
end end
function c49725936.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c49725936.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end if chk==0 then return e:GetHandler():IsReleasable() end
......
...@@ -11,16 +11,16 @@ function c55787576.initial_effect(c) ...@@ -11,16 +11,16 @@ function c55787576.initial_effect(c)
--cannot be target/indestructable --cannot be target/indestructable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_ONFIELD,0) e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(c55787576.tgtg) e2:SetTarget(c55787576.tgtg)
e2:SetValue(aux.tgoval) e2:SetValue(aux.indoval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetValue(aux.indoval) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--spsummon --spsummon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
......
...@@ -57,11 +57,15 @@ function c62530723.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,11 +57,15 @@ function c62530723.activate(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
function c62530723.cfilter(c,tp) function c62530723.cfilter(c,seq2)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0x10c) local seq1=c:GetSequence()
return c:IsFaceup() and c:IsSetCard(0x10c)
and (seq1==4-seq2 or (seq2==5 and seq1==3) or (seq2==6 and seq1==1))
end end
function c62530723.discon(e,tp,eg,ep,ev,re,r,rp) function c62530723.discon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and re:IsActiveType(TYPE_SPELL) and re:GetHandler():GetColumnGroup():FilterCount(c62530723.cfilter,nil,tp)>0 local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
return rp~=tp and re:IsActiveType(TYPE_SPELL) and loc==LOCATION_SZONE
and Duel.IsExistingMatchingCard(c62530723.cfilter,tp,LOCATION_MZONE,0,1,nil,seq)
end end
function c62530723.disop(e,tp,eg,ep,ev,re,r,rp) function c62530723.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
......
...@@ -5,7 +5,7 @@ function c73275815.initial_effect(c) ...@@ -5,7 +5,7 @@ function c73275815.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,73275815) e1:SetCountLimit(1,73275815+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c73275815.condition) e1:SetCondition(c73275815.condition)
e1:SetTarget(c73275815.target) e1:SetTarget(c73275815.target)
e1:SetOperation(c73275815.activate) e1:SetOperation(c73275815.activate)
......
...@@ -46,7 +46,7 @@ function c75119040.atkval(e,c) ...@@ -46,7 +46,7 @@ function c75119040.atkval(e,c)
return c:GetLinkedGroup():FilterCount(c75119040.atkfilter,nil)*500 return c:GetLinkedGroup():FilterCount(c75119040.atkfilter,nil)*500
end end
function c75119040.spcon(e,tp,eg,ep,ev,re,r,rp) function c75119040.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetAttackedCount()>0 return e:GetHandler():GetAttackAnnouncedCount()>0
end end
function c75119040.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c75119040.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -19,8 +19,8 @@ function c77058170.atkfilter(c,g) ...@@ -19,8 +19,8 @@ function c77058170.atkfilter(c,g)
return c:IsFaceup() and c:GetAttack()>0 and g:IsContains(c) return c:IsFaceup() and c:GetAttack()>0 and g:IsContains(c)
end end
function c77058170.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c77058170.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lg=e:GetHandler():GetLinkedGroup()
if chkc then return false end if chkc then return false end
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.IsExistingTarget(c77058170.atkfilter,tp,LOCATION_MZONE,0,1,nil,lg) if chk==0 then return Duel.IsExistingTarget(c77058170.atkfilter,tp,LOCATION_MZONE,0,1,nil,lg)
and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
......
...@@ -120,7 +120,6 @@ function c879958.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -120,7 +120,6 @@ function c879958.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
......
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