Commit 4f7a569c authored by salix5's avatar salix5

EFFECT_IRON_WALL

https://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=5&fid=12764&keyword=&tag=-1
https://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=5&fid=19934&keyword=&tag=-1
https://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=5&fid=12764&keyword=&tag=-1
EFFECT_IRON_WALL: the player is already affected by effects like "Imperial Iron Wall"
"negate activation and banish" effetcs cannot be activated while "Imperial Iron Wall" is on the field.
parent 4d4735dc
...@@ -11,7 +11,7 @@ function c1475311.initial_effect(c) ...@@ -11,7 +11,7 @@ function c1475311.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c1475311.target(e,tp,eg,ep,ev,re,r,rp,chk) function c1475311.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,30459350) and Duel.IsPlayerCanDraw(tp,2) end if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_IRON_WALL) and Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2) Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
......
...@@ -116,7 +116,7 @@ function c14799437.negcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -116,7 +116,7 @@ function c14799437.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c14799437.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function c14799437.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsAbleToRemove() end if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
......
...@@ -27,12 +27,12 @@ function c15693423.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,12 +27,12 @@ function c15693423.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local ct=g:GetCount()-Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) local ct=g:GetCount()-Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
if e:GetHandler():IsLocation(LOCATION_HAND) then ct=ct-1 end if e:GetHandler():IsLocation(LOCATION_HAND) then ct=ct-1 end
if chk==0 then return not Duel.IsPlayerAffectedByEffect(1-tp,30459350) if chk==0 then return not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_IRON_WALL)
and ct>0 and g:IsExists(c15693423.rmfilter,1,nil,1-tp) end and ct>0 and g:IsExists(c15693423.rmfilter,1,nil,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,ct,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,ct,0,0)
end end
function c15693423.activate(e,tp,eg,ep,ev,re,r,rp) function c15693423.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(1-tp,30459350) then return end if Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_IRON_WALL) then return end
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local ct=g:GetCount()-Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) local ct=g:GetCount()-Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
if ct>0 then if ct>0 then
......
...@@ -117,7 +117,7 @@ function c23440231.negcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -117,7 +117,7 @@ function c23440231.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c23440231.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function c23440231.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsAbleToRemove() end if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
......
...@@ -17,7 +17,7 @@ function c30459350.initial_effect(c) ...@@ -17,7 +17,7 @@ function c30459350.initial_effect(c)
--30459350 chk --30459350 chk
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(30459350) e3:SetCode(EFFECT_IRON_WALL)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1) e3:SetTargetRange(1,1)
......
...@@ -69,7 +69,7 @@ function c32617464.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +69,7 @@ function c32617464.negcon(e,tp,eg,ep,ev,re,r,rp)
return not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and c:GetMutualLinkedGroupCount()>=3 return not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and c:GetMutualLinkedGroupCount()>=3
end end
function c32617464.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function c32617464.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsAbleToRemove() end if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
......
...@@ -60,7 +60,7 @@ function c34267821.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function c34267821.rmop(e,tp,eg,ep,ev,re,r,rp)
--30459350 chk --30459350 chk
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(30459350) e2:SetCode(EFFECT_IRON_WALL)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1) e2:SetTargetRange(1,1)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
......
...@@ -11,7 +11,7 @@ function c40465719.initial_effect(c) ...@@ -11,7 +11,7 @@ function c40465719.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c40465719.target(e,tp,eg,ep,ev,re,r,rp,chk) function c40465719.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,30459350) and Duel.IsPlayerCanDraw(tp,2) end if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_IRON_WALL) and Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2) Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
......
...@@ -31,7 +31,7 @@ function c51858306.filter(c) ...@@ -31,7 +31,7 @@ function c51858306.filter(c)
and c:IsAbleToRemove() and c:IsAbleToRemove()
end end
function c51858306.operation(e,tp,eg,ep,ev,re,r,rp) function c51858306.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,30459350) then return end if Duel.IsPlayerAffectedByEffect(tp,EFFECT_IRON_WALL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c51858306.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c51858306.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -64,7 +64,7 @@ function c55063751.negcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,7 +64,7 @@ function c55063751.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RemoveCounter(tp,1,1,0x37,2,REASON_COST) Duel.RemoveCounter(tp,1,1,0x37,2,REASON_COST)
end end
function c55063751.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function c55063751.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsAbleToRemove() end if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
......
...@@ -53,13 +53,13 @@ function c58820923.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,13 +53,13 @@ function c58820923.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c58820923.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c58820923.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>2 if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>2
and not Duel.IsPlayerAffectedByEffect(1-tp,30459350) end and not Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_IRON_WALL) end
end end
function c58820923.rmfilter(c) function c58820923.rmfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end end
function c58820923.rmop(e,tp,eg,ep,ev,re,r,rp) function c58820923.rmop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(1-tp,30459350) then return end if Duel.IsPlayerAffectedByEffect(1-tp,EFFECT_IRON_WALL) then return end
local g=Duel.GetMatchingGroup(c58820923.rmfilter,1-tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c58820923.rmfilter,1-tp,LOCATION_DECK,0,nil)
if g:GetCount()>2 then if g:GetCount()>2 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
......
...@@ -23,7 +23,7 @@ function c62015408.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,7 +23,7 @@ function c62015408.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end end
function c62015408.target(e,tp,eg,ep,ev,re,r,rp,chk) function c62015408.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,30459350) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_IRON_WALL)
and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)>0 and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)>0
and Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>0 end and Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA)
......
...@@ -15,7 +15,7 @@ function c65703851.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,7 +15,7 @@ function c65703851.condition(e,tp,eg,ep,ev,re,r,rp)
return (loc==LOCATION_HAND or loc==LOCATION_GRAVE) and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) return (loc==LOCATION_HAND or loc==LOCATION_GRAVE) and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end end
function c65703851.target(e,tp,eg,ep,ev,re,r,rp,chk) function c65703851.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsAbleToRemove() end if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
......
...@@ -25,14 +25,14 @@ function c66171432.filter(c,e,tp) ...@@ -25,14 +25,14 @@ function c66171432.filter(c,e,tp)
return c:IsSetCard(0xe6) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsSetCard(0xe6) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end end
function c66171432.target(e,tp,eg,ep,ev,re,r,rp,chk) function c66171432.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,30459350) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_IRON_WALL)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c66171432.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c66171432.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end end
function c66171432.activate(e,tp,eg,ep,ev,re,r,rp) function c66171432.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.IsPlayerAffectedByEffect(tp,30459350) then return end if Duel.IsPlayerAffectedByEffect(tp,EFFECT_IRON_WALL) then return end
Duel.ConfirmDecktop(tp,3) Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3) local g=Duel.GetDecktopGroup(tp,3)
local sg=g:Filter(c66171432.filter,nil,e,tp) local sg=g:Filter(c66171432.filter,nil,e,tp)
......
...@@ -34,7 +34,7 @@ function c703897.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,7 @@ function c703897.condition(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end end
function c703897.target(e,tp,eg,ep,ev,re,r,rp,chk) function c703897.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
......
...@@ -19,7 +19,7 @@ function c72648810.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,7 +19,7 @@ function c72648810.condition(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsChainNegatable(ev) and Duel.IsChainNegatable(ev)
end end
function c72648810.target(e,tp,eg,ep,ev,re,r,rp,chk) function c72648810.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsAbleToRemove() end if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
......
...@@ -19,7 +19,7 @@ function c7403341.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,7 +19,7 @@ function c7403341.condition(e,tp,eg,ep,ev,re,r,rp)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end end
function c7403341.target(e,tp,eg,ep,ev,re,r,rp,chk) function c7403341.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsAbleToRemove() end if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
......
...@@ -31,7 +31,7 @@ function c75286621.negcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,7 +31,7 @@ function c75286621.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,c75286621.cfilter,1,1,REASON_COST,nil,rtype) Duel.DiscardHand(tp,c75286621.cfilter,1,1,REASON_COST,nil,rtype)
end end
function c75286621.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function c75286621.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsAbleToRemove() end if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
......
...@@ -11,7 +11,7 @@ function c77116346.initial_effect(c) ...@@ -11,7 +11,7 @@ function c77116346.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tohand --tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_DECK) e2:SetCode(EVENT_TO_DECK)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
......
...@@ -21,12 +21,12 @@ function c90506641.filter(c) ...@@ -21,12 +21,12 @@ function c90506641.filter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToHand() return c:IsType(TYPE_NORMAL) and c:IsAbleToHand()
end end
function c90506641.target(e,tp,eg,ep,ev,re,r,rp,chk) function c90506641.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,30459350) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_IRON_WALL)
and Duel.IsExistingMatchingCard(c90506641.filter,tp,LOCATION_DECK,0,5,nil) end and Duel.IsExistingMatchingCard(c90506641.filter,tp,LOCATION_DECK,0,5,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c90506641.activate(e,tp,eg,ep,ev,re,r,rp) function c90506641.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,30459350) then return end if Duel.IsPlayerAffectedByEffect(tp,EFFECT_IRON_WALL) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(90506641,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(90506641,0))
local g=Duel.SelectMatchingCard(tp,c90506641.filter,tp,LOCATION_DECK,0,5,5,nil) local g=Duel.SelectMatchingCard(tp,c90506641.filter,tp,LOCATION_DECK,0,5,5,nil)
if g:GetCount()<5 then return end if g:GetCount()<5 then return end
......
...@@ -38,21 +38,24 @@ end ...@@ -38,21 +38,24 @@ end
function c94662235.activate1(e,tp,eg,ep,ev,re,r,rp) function c94662235.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg:GetFirst()) Duel.NegateSummon(eg:GetFirst())
local ec=eg:GetFirst() local ec=eg:GetFirst()
Duel.Remove(ec,POS_FACEUP,REASON_EFFECT) if Duel.Remove(ec,POS_FACEUP,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_REMOVED) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetLabelObject(ec)
e1:SetOperation(c94662235.retop) e1:SetCondition(c94662235.retcon)
ec:RegisterEffect(e1) e1:SetOperation(c94662235.retop)
Duel.RegisterEffect(e1,tp)
ec:RegisterFlagEffect(94662235,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end end
function c94662235.condition2(e,tp,eg,ep,ev,re,r,rp) function c94662235.condition2(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and c94662235.check(tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and c94662235.check(tp)
end end
function c94662235.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c94662235.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:GetFirst():IsAbleToRemove() end if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
...@@ -60,18 +63,26 @@ function c94662235.target2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -60,18 +63,26 @@ function c94662235.target2(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c94662235.activate2(e,tp,eg,ep,ev,re,r,rp) function c94662235.activate2(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst() local ec=eg:GetFirst()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then
Duel.Remove(ec,POS_FACEUP,REASON_EFFECT) if Duel.Remove(ec,POS_FACEUP,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_REMOVED) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetLabelObject(ec)
e1:SetOperation(c94662235.retop) e1:SetCondition(c94662235.retcon)
ec:RegisterEffect(e1) e1:SetOperation(c94662235.retop)
Duel.RegisterEffect(e1,tp)
ec:RegisterFlagEffect(94662235,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end end
end end
function c94662235.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return tc:GetFlagEffect(94662235)~=0
end
function c94662235.retop(e,tp,eg,ep,ev,re,r,rp) function c94662235.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) local tc=e:GetLabelObject()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
...@@ -9,7 +9,7 @@ function c94937430.initial_effect(c) ...@@ -9,7 +9,7 @@ function c94937430.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--add counter --add counter
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_DECK) e2:SetCode(EVENT_TO_DECK)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetOperation(c94937430.acop) e2:SetOperation(c94937430.acop)
......
...@@ -23,7 +23,7 @@ function c97940434.initial_effect(c) ...@@ -23,7 +23,7 @@ function c97940434.initial_effect(c)
--30459350 chk --30459350 chk
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(30459350) e3:SetCode(EFFECT_IRON_WALL)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(0,1) e3:SetTargetRange(0,1)
......
...@@ -17,7 +17,7 @@ function c99188141.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,7 +17,7 @@ function c99188141.condition(e,tp,eg,ep,ev,re,r,rp)
return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>1 return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>1
end end
function c99188141.target(e,tp,eg,ep,ev,re,r,rp,chk) function c99188141.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsAbleToRemove() end if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
......
...@@ -268,7 +268,7 @@ EFFECT_FLAG_FUNC_VALUE =0x0002 --此效果的Value属性是函数 ...@@ -268,7 +268,7 @@ EFFECT_FLAG_FUNC_VALUE =0x0002 --此效果的Value属性是函数
EFFECT_FLAG_COUNT_LIMIT =0x0004 --发动次数限制 EFFECT_FLAG_COUNT_LIMIT =0x0004 --发动次数限制
EFFECT_FLAG_FIELD_ONLY =0x0008 --此效果是注册给全局环境的 EFFECT_FLAG_FIELD_ONLY =0x0008 --此效果是注册给全局环境的
EFFECT_FLAG_CARD_TARGET =0x0010 --取对象效果 EFFECT_FLAG_CARD_TARGET =0x0010 --取对象效果
EFFECT_FLAG_IGNORE_RANGE =0x0020 --影响所有区域的卡(禁止令 大宇宙 王宫的铁壁 EFFECT_FLAG_IGNORE_RANGE =0x0020 --影响所有区域的卡(大宇宙
EFFECT_FLAG_ABSOLUTE_TARGET =0x0040 --Target Range不会因为控制权的改变而改变 EFFECT_FLAG_ABSOLUTE_TARGET =0x0040 --Target Range不会因为控制权的改变而改变
EFFECT_FLAG_IGNORE_IMMUNE =0x0080 --无视效果免疫 EFFECT_FLAG_IGNORE_IMMUNE =0x0080 --无视效果免疫
EFFECT_FLAG_SET_AVAILABLE =0x0100 --影响场上里侧的卡/裡側狀態可發動 EFFECT_FLAG_SET_AVAILABLE =0x0100 --影响场上里侧的卡/裡側狀態可發動
...@@ -542,6 +542,7 @@ EFFECT_ADD_LINK_RACE =357 --用作连接素材时的种族 ...@@ -542,6 +542,7 @@ EFFECT_ADD_LINK_RACE =357 --用作连接素材时的种族
EFFECT_EXTRA_LINK_MATERIAL =358 --手卡的连接素材 EFFECT_EXTRA_LINK_MATERIAL =358 --手卡的连接素材
EFFECT_QP_ACT_IN_SET_TURN =359 --速攻魔法可以在盖放的回合发动 EFFECT_QP_ACT_IN_SET_TURN =359 --速攻魔法可以在盖放的回合发动
EFFECT_EXTRA_PENDULUM_SUMMON =360 --extra pendulum summon EFFECT_EXTRA_PENDULUM_SUMMON =360 --extra pendulum summon
EFFECT_IRON_WALL =361 --玩家已受到"不能除外"的效果影響
--下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发) --下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发)
EVENT_STARTUP =1000 --游戏开始时 EVENT_STARTUP =1000 --游戏开始时
......
...@@ -2156,3 +2156,9 @@ end ...@@ -2156,3 +2156,9 @@ end
function Auxiliary.ctg(e,c) function Auxiliary.ctg(e,c)
return e:GetHandler():IsHasCardTarget(c) return e:GetHandler():IsHasCardTarget(c)
end end
--condition of "negate activation and banish"
function Auxiliary.nbcon(tp,re)
local rc=re:GetHandler()
return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_IRON_WALL)
and (not rc:IsRelateToEffect(re) or rc:IsAbleToRemove())
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