Commit f02a730a authored by POLYMER's avatar POLYMER

fix

parent 37606a3a
......@@ -65,6 +65,7 @@ function c75000855.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
......@@ -25,7 +25,12 @@ function cm.sretop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rc=Duel.SelectMatchingCard(tp,cm.rmfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil):GetFirst()
if rc and Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,c,e,tp,rc) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
if not rc then
Duel.ConfirmCards(1-tp,Duel.GetFieldGroup(tp,LOCATION_HAND,0))
Duel.ShuffleHand(tp)
return
end
if Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,c,e,tp,rc) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,c,e,tp,rc):GetFirst()
......
......@@ -50,7 +50,7 @@ function c9910080.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local ct=Duel.GetOperatedGroup():FilterCount(Card.IsAttribute,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
if ct==0 and c:IsRelateToEffect(e) and c:IsCanTurnSet() then
if ct==0 and c:IsRelateToEffect(e) and c:IsSSetable(true) then
Duel.BreakEffect()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
......
......@@ -50,7 +50,7 @@ function c9910182.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,rc)
if c:IsRelateToEffect(e) then
c:CancelToGrave()
local b1=c:IsCanTurnSet()
local b1=c:IsSSetable(true)
local b2=c:IsAbleToDeck()
if b1 and (not b2 or Duel.SelectOption(tp,aux.Stringid(9910182,0),aux.Stringid(9910182,1))==0) then
Duel.BreakEffect()
......
......@@ -57,7 +57,7 @@ function c9910184.activate(e,tp,eg,ep,ev,re,r,rp)
and c:IsRelateToEffect(e) then
c:CancelToGrave()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c9910184.thfilter),tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local b1=c:IsCanTurnSet()
local b1=c:IsSSetable(true)
local b2=c:IsAbleToDeck() and g:GetCount()>0
if b1 and (not b2 or Duel.SelectOption(tp,aux.Stringid(9910184,0),aux.Stringid(9910184,1))==0) then
Duel.BreakEffect()
......
......@@ -24,10 +24,14 @@ function c9910264.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c9910264.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re)
and Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,0,1,nil,0x956,1) end
if chk==0 then
local b1=Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,0,1,nil,0x956,1)
local b2=Duel.GetCounter(tp,1,0,0x956)>=6 and aux.nbcon(tp,re)
local b3=Duel.GetCounter(tp,1,0,0x956)<6
return b1 or b2 or b3
end
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,0,nil,0x956,1)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,#g,0,0)
if #g>0 then Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,#g,0,0) end
end
function c9910264.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -49,7 +53,7 @@ function c9910264.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
else
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
if c:IsRelateToEffect(e) and c:IsSSetable(true) then
if chk then Duel.BreakEffect() end
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
......
......@@ -89,7 +89,7 @@ function c9910268.activate2(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet()
if c:IsRelateToEffect(e) and c:IsSSetable(true)
and Duel.IsExistingMatchingCard(c9910268.cfilter2,tp,LOCATION_GRAVE,0,1,nil) then
Duel.BreakEffect()
c:CancelToGrave()
......
......@@ -56,7 +56,7 @@ function c9910868.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c9910868.setop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) and rc:IsCanTurnSet() then
if rc:IsRelateToEffect(re) and rc:IsSSetable(true) then
rc:CancelToGrave()
if Duel.ChangePosition(rc,POS_FACEDOWN)==0 then return end
Duel.RaiseEvent(rc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
......
......@@ -44,7 +44,7 @@ function c9910923.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and c:IsRelateToEffect(e) then
c:CancelToGrave()
local b1=c:IsCanTurnSet()
local b1=c:IsSSetable(true)
local b2=c:IsAbleToDeck() and rc:IsRelateToEffect(re) and rc:IsLocation(LOCATION_MZONE)
and rc:IsControler(1-tp) and rc:IsControlerCanBeChanged()
if b1 and (not b2 or Duel.SelectOption(tp,aux.Stringid(9910923,0),aux.Stringid(9910923,1))==0) then
......
......@@ -58,7 +58,7 @@ function c9910926.activate(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end
c:CancelToGrave()
local sg=eg:Filter(c9910926.cfilter2,nil,tp,e)
local b1=c:IsCanTurnSet()
local b1=c:IsSSetable(true)
local b2=c:IsAbleToDeck() and sg:GetCount()>0
if b1 and (not b2 or Duel.SelectOption(tp,aux.Stringid(9910926,0),aux.Stringid(9910926,1))==0) then
Duel.BreakEffect()
......
......@@ -44,7 +44,7 @@ function c9910929.activate(e,tp,eg,ep,ev,re,r,rp)
if rc:IsRelateToEffect(re) and Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)~=0 and rc:IsLocation(LOCATION_REMOVED)
and c:IsRelateToEffect(e) then
c:CancelToGrave()
local b1=c:IsCanTurnSet()
local b1=c:IsSSetable(true)
local b2=c:IsAbleToDeck() and not rc:IsReason(REASON_REDIRECT)
if b1 and (not b2 or Duel.SelectOption(tp,aux.Stringid(9910929,0),aux.Stringid(9910929,1))==0) then
Duel.BreakEffect()
......
......@@ -53,7 +53,7 @@ function c9910931.activate(e,tp,eg,ep,ev,re,r,rp)
and ct>0 and Duel.Damage(1-tp,ct*300,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
c:CancelToGrave()
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local b1=c:IsCanTurnSet()
local b1=c:IsSSetable(true)
local b2=c:IsAbleToDeck() and g:GetCount()>0
if b1 and (not b2 or Duel.SelectOption(tp,aux.Stringid(9910931,0),aux.Stringid(9910931,1))==0) then
Duel.BreakEffect()
......
......@@ -96,7 +96,7 @@ function c9910971.repfilter(c,tp)
end
function c9910971.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c9910971.repfilter,1,nil,tp) and c:IsCanTurnSet() end
if chk==0 then return eg:IsExists(c9910971.repfilter,1,nil,tp) and c:IsSSetable(true) end
return true
end
function c9910971.desrepval(e,c)
......
......@@ -66,7 +66,7 @@ function c9911014.activate(e,tp,eg,ep,ev,re,r,rp)
end
if #sg==0 or Duel.Destroy(sg,REASON_EFFECT)==0 then return end
local dg=Duel.GetOperatedGroup():Filter(c9911014.disfilter,nil)
if (lab==1 or lab==3) and c:IsRelateToEffect(e) and c:IsCanTurnSet()
if (lab==1 or lab==3) and c:IsRelateToEffect(e) and c:IsSSetable(true)
and Duel.SelectYesNo(tp,aux.Stringid(9911014,0)) then
Duel.BreakEffect()
c:CancelToGrave()
......
......@@ -69,7 +69,7 @@ function c9911021.activate(e,tp,eg,ep,ev,re,r,rp)
end
if res and Duel.Release(tc,REASON_EFFECT)>0 then res=true end
if res and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
and c:IsRelateToEffect(e) and c:IsCanTurnSet() and Duel.SelectYesNo(tp,aux.Stringid(9911021,0)) then
and c:IsRelateToEffect(e) and c:IsSSetable(true) and Duel.SelectYesNo(tp,aux.Stringid(9911021,0)) then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
......
......@@ -59,7 +59,7 @@ function c9911201.setcon(e,tp,eg,ep,ev,re,r,rp)
end
function c9911201.setfilter(c)
local b1=c:IsLocation(LOCATION_HAND) and c:IsSSetable()
local b2=c:IsLocation(LOCATION_SZONE) and c:IsCanTurnSet()
local b2=c:IsLocation(LOCATION_SZONE) and c:IsSSetable(true)
return c:IsType(TYPE_TRAP) and (b1 or b2)
end
function c9911201.settg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -59,7 +59,7 @@ function c9911202.setcon(e,tp,eg,ep,ev,re,r,rp)
end
function c9911202.setfilter(c)
local b1=c:IsLocation(LOCATION_HAND) and c:IsSSetable()
local b2=c:IsLocation(LOCATION_SZONE) and c:IsCanTurnSet()
local b2=c:IsLocation(LOCATION_SZONE) and c:IsSSetable(true)
return c:IsType(TYPE_TRAP) and (b1 or b2)
end
function c9911202.settg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -57,7 +57,7 @@ function c9911212.setcon(e,tp,eg,ep,ev,re,r,rp)
end
function c9911212.setfilter(c)
local b1=c:IsLocation(LOCATION_HAND) and c:IsSSetable()
local b2=c:IsLocation(LOCATION_SZONE) and c:IsCanTurnSet()
local b2=c:IsLocation(LOCATION_SZONE) and c:IsSSetable(true)
return c:IsType(TYPE_TRAP) and (b1 or b2)
end
function c9911212.settg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -45,7 +45,7 @@ function c9911218.setcon(e,tp,eg,ep,ev,re,r,rp)
end
function c9911218.setfilter(c)
local b1=c:IsLocation(LOCATION_HAND) and c:IsSSetable()
local b2=c:IsLocation(LOCATION_SZONE) and c:IsCanTurnSet()
local b2=c:IsLocation(LOCATION_SZONE) and c:IsSSetable(true)
return c:IsType(TYPE_TRAP) and (b1 or b2)
end
function c9911218.settg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -62,7 +62,7 @@ function c9911223.setcon(e,tp,eg,ep,ev,re,r,rp)
end
function c9911223.setfilter(c)
local b1=c:IsLocation(LOCATION_HAND) and c:IsSSetable()
local b2=c:IsLocation(LOCATION_SZONE) and c:IsCanTurnSet()
local b2=c:IsLocation(LOCATION_SZONE) and c:IsSSetable(true)
return c:IsType(TYPE_TRAP) and (b1 or b2)
end
function c9911223.settg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -84,7 +84,7 @@ function c9911224.setcon(e,tp,eg,ep,ev,re,r,rp)
end
function c9911224.setfilter(c)
local b1=c:IsLocation(LOCATION_HAND) and c:IsSSetable()
local b2=c:IsLocation(LOCATION_SZONE) and c:IsCanTurnSet()
local b2=c:IsLocation(LOCATION_SZONE) and c:IsSSetable(true)
return c:IsType(TYPE_TRAP) and (b1 or b2)
end
function c9911224.settg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -48,7 +48,7 @@ function c9911231.setcon(e,tp,eg,ep,ev,re,r,rp)
end
function c9911231.setfilter(c)
local b1=c:IsLocation(LOCATION_HAND) and c:IsSSetable()
local b2=c:IsLocation(LOCATION_SZONE) and c:IsCanTurnSet()
local b2=c:IsLocation(LOCATION_SZONE) and c:IsSSetable(true)
return c:IsType(TYPE_TRAP) and (b1 or b2)
end
function c9911231.settg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -211,7 +211,7 @@ function c9911565.activate2(e,tp,eg,ep,ev,re,r,rp)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e3)
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
if c:IsRelateToEffect(e) and c:IsSSetable(true) then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
......
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