Commit f9860fb7 authored by Nemo Ma's avatar Nemo Ma

fix

parent 63f2d627
......@@ -17,10 +17,11 @@ function c10173077.initial_effect(c)
c:RegisterEffect(e2)
end
function c10173077.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
local bool=e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND)
if chk==0 then return not bool or Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) or not c:IsLocation(LOCATION_HAND) end
if bool then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,c)
end
end
function c10173077.cfilter(c,tp)
......
......@@ -13,7 +13,7 @@ function cm.initial_effect(c)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,nil,REASON_EFFECT)
local g=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,e:GetHandler(),REASON_EFFECT)
return g:GetCount()>=2 and g:FilterCount(Card.IsSetCard,nil,0xef)>0 and Duel.IsPlayerCanDraw(tp,3)
end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,2)
......@@ -23,7 +23,7 @@ function cm.filter(c,e,tp)
return c:IsSetCard(0xef) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,nil,REASON_EFFECT)
local g=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,e:GetHandler(),REASON_EFFECT)
if g:GetCount()<2 or g:FilterCount(Card.IsSetCard,nil,0xef)==0 or not Duel.IsPlayerCanDraw(tp,3) then return end
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DISCARD)
local sg1=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0xef)
......@@ -39,7 +39,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
if n==2 and Duel.GetMZoneCount(tp)>0 then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if sg and sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
......
......@@ -5,7 +5,7 @@ function c13909436.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(13909436,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
......
......@@ -46,7 +46,7 @@ end
function c60001168.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(c60001168.setter,nil):GetFirst()
while tc do
tc:RegisterFlagEffect(60001168,RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(60001168,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
......@@ -66,7 +66,7 @@ function c60001168.wxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c60001168.filter,tp,LOCATION_DECK,0,nil,tp)
Duel.NegateSummon(eg)
if Duel.Destroy(eg,REASON_EFFECT)>0 and c:GetFlagEffect(60001168)>0 and c:IsLocation(LOCATION_SZONE) and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(60001168,2)) then
if Duel.Destroy(eg,REASON_EFFECT)>0 and c:GetFlagEffect(60001168)>0 and c:(c:IsLocation(LOCATION_SZONE) or c:IsPreviousLocation(LOCATION_SZONE)) and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(60001168,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local tc=g:FilterSelect(tp,c60001168.filter,1,1,nil,tp):GetFirst()
if tc then
......@@ -101,6 +101,9 @@ function c60001168.hsop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
tc:RegisterEffect(e2)
end
end
end
......
......@@ -45,7 +45,7 @@ end
function c60001169.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(c60001169.setter,nil):GetFirst()
while tc do
tc:RegisterFlagEffect(60001168,RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(60001168,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
......@@ -61,7 +61,7 @@ function c60001169.wxop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not Duel.NegateActivation(ev) then return end
if (rc:IsType(TYPE_FIELD) and rc:IsRelateToEffect(re) and rc:IsCanTurnSet() or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then
if c:GetFlagEffect(60001168)>0 and c:IsLocation(LOCATION_SZONE) and rc:IsRelateToEffect(re) and Duel.SelectYesNo(tp,aux.Stringid(60001169,2)) then
if c:GetFlagEffect(60001168)>0 and (c:IsLocation(LOCATION_SZONE) or c:IsPreviousLocation(LOCATION_SZONE)) and rc:IsRelateToEffect(re) and Duel.SelectYesNo(tp,aux.Stringid(60001169,2)) then
rc:CancelToGrave()
Duel.MoveToField(rc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true)
Duel.ChangePosition(rc,POS_FACEDOWN)
......@@ -91,6 +91,9 @@ function c60001169.hsop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
tc:RegisterEffect(e2)
end
end
end
......
......@@ -45,7 +45,7 @@ end
function c60001170.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(c60001170.setter,nil):GetFirst()
while tc do
tc:RegisterFlagEffect(60001168,RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(60001168,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
......@@ -66,7 +66,7 @@ function c60001170.wxop(e,tp,eg,ep,ev,re,r,rp)
local g3=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
local sg=Group.CreateGroup()
local c=e:GetHandler()
if Duel.NegateActivation(ev) and c:GetFlagEffect(60001168)>0 and c:IsLocation(LOCATION_SZONE) and #g1>0 and #g2>0 and #g3>0 and Duel.SelectYesNo(tp,aux.Stringid(60001170,2)) then
if Duel.NegateActivation(ev) and c:GetFlagEffect(60001168)>0 and (c:IsLocation(LOCATION_SZONE) or c:IsPreviousLocation(LOCATION_SZONE)) and #g1>0 and #g2>0 and #g3>0 and Duel.SelectYesNo(tp,aux.Stringid(60001170,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
......@@ -103,6 +103,9 @@ function c60001170.hsop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
tc:RegisterEffect(e2)
end
end
end
......
......@@ -30,7 +30,7 @@ end
function c60001171.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(c60001171.setter,nil):GetFirst()
while tc do
tc:RegisterFlagEffect(60001168,RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(60001168,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
......
......@@ -46,7 +46,7 @@ end
function c60001172.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(c60001172.setter,nil):GetFirst()
while tc do
tc:RegisterFlagEffect(60001168,RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(60001168,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
......@@ -101,6 +101,9 @@ function c60001172.hsop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
tc:RegisterEffect(e2)
end
end
end
......
......@@ -45,7 +45,7 @@ end
function c60001173.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(c60001173.setter,nil):GetFirst()
while tc do
tc:RegisterFlagEffect(60001168,RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(60001168,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
......@@ -98,6 +98,9 @@ function c60001173.hsop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
tc:RegisterEffect(e2)
end
end
end
......
......@@ -46,7 +46,7 @@ end
function c60001174.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(c60001174.setter,nil):GetFirst()
while tc do
tc:RegisterFlagEffect(60001168,RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(60001168,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
......@@ -88,6 +88,9 @@ function c60001174.hsop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
tc:RegisterEffect(e2)
end
end
end
......
......@@ -55,7 +55,7 @@ end
function c60001175.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(c60001175.setter,nil):GetFirst()
while tc do
tc:RegisterFlagEffect(60001168,RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(60001168,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
......
......@@ -84,7 +84,7 @@ end
function c60001179.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(c60001179.setter,nil):GetFirst()
while tc do
tc:RegisterFlagEffect(60001168,RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(60001168,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
......
......@@ -47,7 +47,7 @@ end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(cm.setter,nil):GetFirst()
while tc do
tc:RegisterFlagEffect(60001168,RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(60001168,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
......@@ -95,6 +95,9 @@ function cm.hsop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
tc:RegisterEffect(e2)
end
end
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