Commit ae5cb16d authored by 独孤朲's avatar 独孤朲

Merge pull request #1012 from salix5/patch-im

fix: immune effect
parents 17959947 c56c9a7b
......@@ -406,8 +406,6 @@ int32 effect::is_immuned(effect_set_v* effects) {
effect* peffect;
for (int i = 0; i < effects->count; ++i) {
peffect = effects->at(i);
if(peffect->owner == owner)
return FALSE;
if(peffect->value) {
pduel->lua->add_param(this, PARAM_TYPE_EFFECT);
if(peffect->check_value_condition(1))
......
......@@ -33,5 +33,5 @@ function c10817524.indval(e,c)
return not c:IsType(TYPE_NORMAL)
end
function c10817524.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER)
return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner()
end
......@@ -52,7 +52,7 @@ function c12275533.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(1)
e1:SetValue(c12275533.efilter)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......@@ -65,11 +65,14 @@ function c12275533.operation(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2)
end
end
function c12275533.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c12275533.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetCode(EFFECT_UPDATE_DEFENCE)
e1:SetValue(-500)
......
......@@ -52,8 +52,11 @@ function c1639384.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetValue(1)
e3:SetValue(c1639384.efilter)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
function c1639384.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
......@@ -24,7 +24,10 @@ function c19700943.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(1)
e1:SetValue(c19700943.efilter)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e1)
end
function c19700943.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
......@@ -29,24 +29,25 @@ function c26822796.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetValue(1)
e3:SetValue(c26822796.efilter)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
end
end
function c26822796.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
......@@ -42,5 +42,5 @@ function c27243130.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c27243130.efilter(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and te:GetOwner()~=e:GetOwner()
end
......@@ -30,5 +30,5 @@ function c27541267.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c27541267.efilter(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and te:GetOwner()~=e:GetOwner()
end
......@@ -41,5 +41,5 @@ function c28643791.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c28643791.imfilter(e,re)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetOwner()~=e:GetOwner()
end
......@@ -56,5 +56,5 @@ function c30845999.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c30845999.efilter(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and te:GetOwner()~=e:GetOwner()
end
......@@ -68,11 +68,14 @@ function c36898537.immop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(1)
e1:SetValue(c36898537.efilter)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
c:RegisterEffect(e1)
end
end
function c36898537.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c36898537.negcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
and bit.band(e:GetLabelObject():GetLabel(),TYPE_EFFECT)~=0
......
......@@ -27,7 +27,7 @@ function c41147577.initial_effect(c)
c:RegisterEffect(e2)
end
function c41147577.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER)
return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner()
end
function c41147577.poscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,14152862)
......
......@@ -36,7 +36,10 @@ function c41517789.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(1)
e1:SetValue(c41517789.efilter)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE)
e:GetHandler():RegisterEffect(e1)
end
function c41517789.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
......@@ -25,5 +25,5 @@ function c4638410.etarget(e,c)
return c:GetOwner()==e:GetHandlerPlayer()
end
function c4638410.efilter(e,te)
return e~=te and te:IsActiveType(TYPE_TRAP)
return te:IsActiveType(TYPE_TRAP) and te:GetOwner()~=e:GetOwner()
end
......@@ -6,7 +6,7 @@ function c46955770.initial_effect(c)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetCondition(c46955770.con)
e1:SetValue(1)
e1:SetValue(c46955770.efilter)
c:RegisterEffect(e1)
end
function c46955770.filter(c)
......@@ -16,3 +16,6 @@ function c46955770.con(e)
return Duel.IsExistingMatchingCard(c46955770.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
or Duel.IsEnvironment(47355498)
end
function c46955770.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
......@@ -26,7 +26,7 @@ function c57043117.initial_effect(c)
c:RegisterEffect(e2)
end
function c57043117.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER)
return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner()
end
function c57043117.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
......@@ -40,7 +40,7 @@ function c63504681.initial_effect(c)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetValue(1)
e5:SetValue(c63504681.efilter)
e5:SetCondition(c63504681.effcon)
e5:SetLabel(3)
c:RegisterEffect(e5)
......@@ -83,6 +83,9 @@ end
function c63504681.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()>=e:GetLabel()
end
function c63504681.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c63504681.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil)
......
......@@ -77,6 +77,7 @@ function c65384188.reg(c,tc1,tc2)
tc1:RegisterEffect(e4)
local e5=e2:Clone()
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetValue(c65384188.efilter)
tc1:RegisterEffect(e5)
end
function c65384188.posop(e,tp,eg,ep,ev,re,r,rp)
......@@ -88,3 +89,6 @@ end
function c65384188.effcon(e)
return e:GetHandler():GetFlagEffect(65384188)~=0 and e:GetLabelObject():GetFlagEffect(65384188)~=0
end
function c65384188.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
......@@ -32,5 +32,5 @@ function c65884091.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c65884091.efilter(e,te)
return te:IsActiveType(TYPE_EFFECT)
return te:IsActiveType(TYPE_EFFECT) and te:GetOwner()~=e:GetOwner()
end
......@@ -54,8 +54,11 @@ function c70329348.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetValue(1)
e3:SetValue(c70329348.efilter)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_MAIN1)
tc:RegisterEffect(e3)
end
end
function c70329348.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
......@@ -36,6 +36,7 @@ function c8062132.initial_effect(c)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetValue(c8062132.efilter)
c:RegisterEffect(e5)
--win
local e6=Effect.CreateEffect(c)
......@@ -47,6 +48,9 @@ function c8062132.initial_effect(c)
e6:SetOperation(c8062132.ctop)
c:RegisterEffect(e6)
end
function c8062132.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c8062132.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_REPTILE)*500
end
......
--Wo `
--閃珖竜 スターダスト
function c83994433.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
......
......@@ -65,10 +65,13 @@ function c86274272.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(1)
e1:SetValue(c86274272.efilter)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e1)
end
function c86274272.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c86274272.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_COST)
......
......@@ -29,14 +29,18 @@ function c88616795.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(c88616795.efilter)
if e:GetLabel()==0 then
e2:SetLabel(TYPE_SPELL)
else e2:SetLabel(TYPE_TRAP) end
e2:SetValue(c88616795.efilter1)
else
e2:SetValue(c88616795.efilter2)
end
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
function c88616795.efilter(e,te)
return te:IsActiveType(e:GetLabel())
function c88616795.efilter1(e,te)
return te:IsActiveType(TYPE_SPELL) and te:GetOwner()~=e:GetOwner()
end
function c88616795.efilter2(e,te)
return te:IsActiveType(TYPE_TRAP)
end
......@@ -48,7 +48,7 @@ function c91650245.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e2:SetValue(1)
e2:SetValue(c91650245.efilter)
sc:RegisterEffect(e2)
end
end
......@@ -62,3 +62,6 @@ function c91650245.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(c,nil,1,REASON_EFFECT)
end
end
function c91650245.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
......@@ -101,7 +101,7 @@ function c93211810.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c93211810.efilter(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and te:GetOwner()~=e:GetOwner()
end
function c93211810.desfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE)
......
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