Commit e3397bc9 authored by POLYMER's avatar POLYMER

fix

parent 7156599e
......@@ -166,7 +166,7 @@ local function GetUseableMzoneXY()
for p = 0, 1 do
local isp = p == ORDER
local _, zone = Duel.GetLocationCount(p, LOCATION_MZONE, PLAYER_NONE, 0)
y = (p + 1) * 2
local y = isp and 2 or 4
for i = 0, 4 do
if (zone & (1 << i)) == 0 then
......
......@@ -42,7 +42,7 @@ local function GetUseableMzoneXY()
for p = 0, 1 do
local isp = p == ORDER
local _, zone = Duel.GetLocationCount(p, LOCATION_MZONE, PLAYER_NONE, 0)
y = (p + 1) * 2
local y = isp and 2 or 4
for i = 0, 4 do
if (zone & (1 << i)) == 0 then
......@@ -77,12 +77,11 @@ local function CreatPart(code, x, y)
[false] = { [2] = 6, [4] = 5 },
}
if ct > 0 then
_x, _y = table.unpack(xys[math.random(1, ct)])
_x, _y = table.unpack(xys[1])
else
local g = Duel.GetFieldGroup(0, LOCATION_MZONE, LOCATION_MZONE)
g = g:Filter(Card.IsCode, nil, m + 1, m + 4, m + 5, m + 6, m + 7, m + 8)
local _part = g:RandomSelect(0, 1):GetFirst()
_x, _y = GetXY(c)
local f = function(c) return c:GetSequence() == x - 1 end
local _part = Duel.GetMatchingGroup(f, ORDER, LOCATION_MZONE, 0, nil):GetFirst()
_x, _y = x, 2
_code = _part:GetCode()
_ismine = _part:GetFlagEffect(MINE) > 0
Duel.Destroy(_part, REASON_RULE)
......
......@@ -87,7 +87,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2))
local lv=Duel.AnnounceNumber(tp,table.unpack(lvt))
local g=Duel.GetDecktopGroup(tp,lv)
if Duel.Destroy(g,nil,REASON_EFFECT)<3 then return end
if Duel.Destroy(g,REASON_EFFECT)<3 then return end
if Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
......
......@@ -31,6 +31,7 @@ function c33200908.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE+LOCATION_HAND)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetTarget(c33200908.cttg)
e2:SetOperation(c33200908.ctop)
......@@ -62,10 +63,11 @@ function c33200908.ctfilter(c)
end
function c33200908.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c33200908.ctfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33200908.ctfilter,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c33200908.ctfilter,tp,0,LOCATION_MZONE,1,nil) and e:GetHandler():GetFlagEffect(33200908)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c33200908.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
e:GetHandler():RegisterFlagEffect(33200908,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,nil,0,0)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,tc,nil,0,0x132a)
if e:GetHandler():IsLocation(LOCATION_HAND) then
......
......@@ -58,7 +58,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,g1)
local c2=g2:SelectUnselect(g1,tp,false,true,1,1)
if not c2 then goto SelectStart end
if not c2 or g1:IsContains(c2) then goto SelectStart end
--g1:Merge(g2)
g1:AddCard(c2)
Duel.HintSelection(g1)
......
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