Commit 7c46d4ce authored by Nemo Ma's avatar Nemo Ma

fix

parent 8e0cff8f
...@@ -3,7 +3,6 @@ function c118776531.initial_effect(c) ...@@ -3,7 +3,6 @@ function c118776531.initial_effect(c)
e1:SetCategory(CATEGORY_SUMMON) e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c118776531.sumcon)
e1:SetTarget(c118776531.target1) e1:SetTarget(c118776531.target1)
e1:SetOperation(c118776531.activate) e1:SetOperation(c118776531.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -43,7 +42,7 @@ function c118776531.initial_effect(c) ...@@ -43,7 +42,7 @@ function c118776531.initial_effect(c)
end end
function c118776531.sumcon(e,tp,eg,ep,ev,re,r,rp) function c118776531.sumcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or Duel.GetTurnPlayer()~=tp return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function c118776531.sumfilter(c) function c118776531.sumfilter(c)
return c:IsSetCard(0xf9) and c:IsSummonable(true,nil,1) return c:IsSetCard(0xf9) and c:IsSummonable(true,nil,1)
......
...@@ -52,7 +52,7 @@ end ...@@ -52,7 +52,7 @@ end
function c127541563.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c127541563.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsCanTurnSet() and not re:GetHandler():IsType(TYPE_PENDULUM) end if chk==0 then return re:GetHandler():IsCanTurnSet() and not re:GetHandler():IsType(TYPE_PENDULUM) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsLocation(LOCATION_MZONE) then
Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,1,0,0)
end end
end end
...@@ -60,25 +60,25 @@ function c127541563.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,25 +60,25 @@ function c127541563.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=re:GetHandler() local rc=re:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) then if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and rc:IsCanTurnSet() then
rc:CancelToGrave() rc:CancelToGrave()
Duel.ChangePosition(eg,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(eg,POS_FACEDOWN_DEFENSE)
local tc=eg:GetFirst() local rev=EVENT_SSET
tc:CancelToGrave() if rc:IsLocation(LOCATION_MZONE) then rev=EVENT_MSET end
c:SetCardTarget(tc) Duel.RaiseEvent(rc,rev,e,REASON_EFFECT,tp,tp,0)
e:SetLabelObject(tc) c:SetCardTarget(rc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_LEAVE) e1:SetReset(RESET_LEAVE)
e1:SetCondition(c127541563.rcon) e1:SetCondition(c127541563.rcon)
e1:SetValue(1) e1:SetValue(1)
tc:RegisterEffect(e1) rc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
tc:RegisterEffect(e2) rc:RegisterEffect(e2)
c:RegisterFlagEffect(127541563,RESET_LEAVE,0,1,c:GetFieldID(),nil) c:RegisterFlagEffect(127541563,0,0,1,c:GetFieldID(),nil)
tc:RegisterFlagEffect(127541563,RESET_LEAVE,0,1,c:GetFieldID(),nil) rc:RegisterFlagEffect(127541563,0,0,1,c:GetFieldID(),nil)
end end
end end
function c127541563.rcon(e) function c127541563.rcon(e)
...@@ -112,6 +112,8 @@ function c127541563.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -112,6 +112,8 @@ function c127541563.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c127541563.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c,c:GetFlagEffectLabel(127541563)) local g=Duel.GetMatchingGroup(c127541563.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c,c:GetFlagEffectLabel(127541563))
if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c127541563.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(127541563,2)) then if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c127541563.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(127541563,2)) then
c:ResetFlagEffect(127541563)
g:ForEach(function (c) c:ResetFlagEffect(127541563) end)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c127541563.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local tg=Duel.SelectMatchingCard(tp,c127541563.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if not tg then return end if not tg then return end
......
...@@ -35,7 +35,7 @@ function c33331811.accost1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,7 +35,7 @@ function c33331811.accost1(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(x) e:SetLabel(x)
end end
function c33331811.rlfil2(c) function c33331811.rlfil2(c)
return c:IsFaceup() and c:IsRace(RACE_WYRM) and c:IsReleasable() return c:IsRace(RACE_WYRM) and c:IsReleasable() --and c:IsFaceup()
end end
function c33331811.accost2(e,tp,eg,ep,ev,re,r,rp,chk) function c33331811.accost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33331811.rlfil2,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c33331811.rlfil2,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end
......
...@@ -28,7 +28,7 @@ function cm.initial_effect(c) ...@@ -28,7 +28,7 @@ function cm.initial_effect(c)
end end
function cm.ovfilter(c) function cm.ovfilter(c)
return c:IsFaceup() and not c:IsCode(m) and c:GetOverlayCount()==0 return c:IsFaceup() and not c:IsCode(m) and c:GetOverlayCount()==0 and c:IsType(TYPE_XYZ)
end end
function cm.atkval(e,c) function cm.atkval(e,c)
return c:GetOverlayCount()*500 return c:GetOverlayCount()*500
......
...@@ -38,7 +38,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -38,7 +38,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local a=1 local a=1
if sg:GetFirst():GetControler()==tp then a=0 end if sg:GetFirst():GetControler()==tp then a=0 end
e:SetTargetRange(POS_FACEUP_ATTACK,a) e:SetTargetRange(POS_FACEUP_ATTACK,a)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(sg,REASON_COST)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -27,7 +27,7 @@ end ...@@ -27,7 +27,7 @@ end
function c88990268.target(e,tp,eg,ep,ev,re,r,rp,chk) function c88990268.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local g=Duel.GetMatchingGroup(c88990268.filter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c88990268.filter,tp,LOCATION_DECK,0,nil)
return g:GetClassCount(Card.GetCode)>=2 return #g>=2
end end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end end
...@@ -39,11 +39,9 @@ function c88990268.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,11 +39,9 @@ function c88990268.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SET)
local tg=sg:RandomSelect(1-tp,1) local tg=sg:RandomSelect(1-tp,1)
if tg:GetCount()>0 then local tc=tg:GetFirst()
Duel.DisableShuffleCheck() Duel.SSet(tp,tc)
Duel.SendtoHand(tg,nil,REASON_EFFECT) sg:RemoveCard(tc)
end Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.SSet(tp,tg:GetFirst())
end 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