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

fix

parent 8e0cff8f
......@@ -3,7 +3,6 @@ function c118776531.initial_effect(c)
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c118776531.sumcon)
e1:SetTarget(c118776531.target1)
e1:SetOperation(c118776531.activate)
c:RegisterEffect(e1)
......@@ -43,7 +42,7 @@ function c118776531.initial_effect(c)
end
function c118776531.sumcon(e,tp,eg,ep,ev,re,r,rp)
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
function c118776531.sumfilter(c)
return c:IsSetCard(0xf9) and c:IsSummonable(true,nil,1)
......
......@@ -52,7 +52,7 @@ end
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
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)
end
end
......@@ -60,25 +60,25 @@ function c127541563.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
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()
Duel.ChangePosition(eg,POS_FACEDOWN_DEFENSE)
local tc=eg:GetFirst()
tc:CancelToGrave()
c:SetCardTarget(tc)
e:SetLabelObject(tc)
local rev=EVENT_SSET
if rc:IsLocation(LOCATION_MZONE) then rev=EVENT_MSET end
Duel.RaiseEvent(rc,rev,e,REASON_EFFECT,tp,tp,0)
c:SetCardTarget(rc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_LEAVE)
e1:SetCondition(c127541563.rcon)
e1:SetValue(1)
tc:RegisterEffect(e1)
rc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
tc:RegisterEffect(e2)
c:RegisterFlagEffect(127541563,RESET_LEAVE,0,1,c:GetFieldID(),nil)
tc:RegisterFlagEffect(127541563,RESET_LEAVE,0,1,c:GetFieldID(),nil)
rc:RegisterEffect(e2)
c:RegisterFlagEffect(127541563,0,0,1,c:GetFieldID(),nil)
rc:RegisterFlagEffect(127541563,0,0,1,c:GetFieldID(),nil)
end
end
function c127541563.rcon(e)
......@@ -112,6 +112,8 @@ function c127541563.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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
c:ResetFlagEffect(127541563)
g:ForEach(function (c) c:ResetFlagEffect(127541563) end)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c127541563.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if not tg then return end
......@@ -123,4 +125,4 @@ function c127541563.hfilter(c)
end
function c127541563.handcon(e)
return not Duel.IsExistingMatchingCard(c127541563.hfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
\ No newline at end of file
end
......@@ -35,7 +35,7 @@ function c33331811.accost1(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(x)
end
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
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
......
......@@ -28,7 +28,7 @@ function cm.initial_effect(c)
end
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
function cm.atkval(e,c)
return c:GetOverlayCount()*500
......
......@@ -38,7 +38,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local a=1
if sg:GetFirst():GetControler()==tp then a=0 end
e:SetTargetRange(POS_FACEUP_ATTACK,a)
Duel.SendtoGrave(g,REASON_COST)
Duel.SendtoGrave(sg,REASON_COST)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -27,7 +27,7 @@ end
function c88990268.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c88990268.filter,tp,LOCATION_DECK,0,nil)
return g:GetClassCount(Card.GetCode)>=2
return #g>=2
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
......@@ -39,11 +39,9 @@ function c88990268.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,sg)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SET)
local tg=sg:RandomSelect(1-tp,1)
if tg:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
Duel.SSet(tp,tg:GetFirst())
local tc=tg:GetFirst()
Duel.SSet(tp,tc)
sg:RemoveCard(tc)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
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