Commit f329baed authored by nanahira's avatar nanahira

pres

parent e9037d8d
......@@ -8,7 +8,6 @@ function c101003007.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101003007)
e1:SetCondition(c101003007.descon)
......
......@@ -28,33 +28,25 @@ function c101003014.initial_effect(c)
e3:SetCondition(c101003014.thcon)
c:RegisterEffect(e3)
end
function c101003014.cfilter(c,tp,seq)
local s=c:GetSequence()
if c:IsLocation(LOCATION_SZONE) and s==5 then return false end
if c:IsControler(tp) then
return s==seq or (seq==1 and s==5) or (seq==3 and s==6)
else
return s==4-seq or (seq==1 and s==6) or (seq==3 and s==5)
end
function c101003014.cfilter(c)
return c:GetColumnGroupCount()>0
end
function c101003014.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=0
for i=0,4 do
if Duel.GetMatchingGroupCount(c101003014.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,i)>=2 then
zone=zone+math.pow(2,i)
end
local lg=Duel.GetMatchingGroup(c101003014.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE))
end
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c101003014.hspval(e,c)
local tp=c:GetControler()
local zone=0
for i=0,4 do
if Duel.GetMatchingGroupCount(c101003014.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,i)>=2 then
zone=zone+math.pow(2,i)
end
local lg=Duel.GetMatchingGroup(c101003014.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE))
end
return 0,zone
end
......
......@@ -25,33 +25,25 @@ function c101003015.initial_effect(c)
e2:SetOperation(c101003015.thop)
c:RegisterEffect(e2)
end
function c101003015.cfilter(c,tp,seq)
local s=c:GetSequence()
if c:IsLocation(LOCATION_SZONE) and s==5 then return false end
if c:IsControler(tp) then
return s==seq or (seq==1 and s==5) or (seq==3 and s==6)
else
return s==4-seq or (seq==1 and s==6) or (seq==3 and s==5)
end
function c101003015.cfilter(c)
return c:GetColumnGroupCount()>0
end
function c101003015.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=0
for i=0,4 do
if Duel.GetMatchingGroupCount(c101003015.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,i)>=2 then
zone=zone+math.pow(2,i)
end
local lg=Duel.GetMatchingGroup(c101003015.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE))
end
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c101003015.hspval(e,c)
local tp=c:GetControler()
local zone=0
for i=0,4 do
if Duel.GetMatchingGroupCount(c101003015.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,i)>=2 then
zone=zone+math.pow(2,i)
end
local lg=Duel.GetMatchingGroup(c101003015.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE))
end
return 0,zone
end
......
......@@ -25,42 +25,37 @@ function c101003016.initial_effect(c)
e2:SetOperation(c101003016.spop)
c:RegisterEffect(e2)
end
function c101003016.cfilter(c,tp,seq)
local s=c:GetSequence()
if c:IsLocation(LOCATION_SZONE) and s==5 then return false end
if c:IsControler(tp) then
return s==seq or (seq==1 and s==5) or (seq==3 and s==6)
else
return s==4-seq or (seq==1 and s==6) or (seq==3 and s==5)
end
function c101003016.cfilter(c)
return c:GetColumnGroupCount()>0
end
function c101003016.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=0
for i=0,4 do
if Duel.GetMatchingGroupCount(c101003016.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,i)>=2 then
zone=zone+math.pow(2,i)
end
local lg=Duel.GetMatchingGroup(c101003016.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE))
end
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c101003016.hspval(e,c)
local tp=c:GetControler()
local zone=0
for i=0,4 do
if Duel.GetMatchingGroupCount(c101003016.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,i)>=2 then
zone=zone+math.pow(2,i)
end
local lg=Duel.GetMatchingGroup(c101003016.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE))
end
return 0,zone
end
function c101003016.spcfilter(c,tp,seq)
local s=c:GetPreviousSequence()
return c:GetPreviousControler()~=tp and (s==4-seq or (seq==1 and s==6) or (seq==3 and s==5))
function c101003016.spcfilter(c,tp,zone)
if c:GetPreviousControler()==tp or not zone then return false end
local seq=c:GetPreviousSequence()+16
return bit.extract(zone,seq)~=0
end
function c101003016.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101003016.spcfilter,1,nil,tp,e:GetHandler():GetSequence())
local c=e:GetHandler()
local zone=bit.bor(0,c:GetColumnZone(LOCATION_MZONE),c:GetColumnZone(LOCATION_SZONE))
return eg:IsExists(c101003016.spcfilter,1,nil,tp,zone)
end
function c101003016.filter(c,e,tp)
return c:IsSetCard(0x20c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -24,33 +24,25 @@ function c101003017.initial_effect(c)
e3:SetOperation(c101003017.operation)
c:RegisterEffect(e3)
end
function c101003017.cfilter(c,tp,seq)
local s=c:GetSequence()
if c:IsLocation(LOCATION_SZONE) and s==5 then return false end
if c:IsControler(tp) then
return s==seq or (seq==1 and s==5) or (seq==3 and s==6)
else
return s==4-seq or (seq==1 and s==6) or (seq==3 and s==5)
end
function c101003017.cfilter(c)
return c:GetColumnGroupCount()>0
end
function c101003017.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=0
for i=0,4 do
if Duel.GetMatchingGroupCount(c101003017.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,i)>=2 then
zone=zone+math.pow(2,i)
end
local lg=Duel.GetMatchingGroup(c101003017.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE))
end
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c101003017.hspval(e,c)
local tp=c:GetControler()
local zone=0
for i=0,4 do
if Duel.GetMatchingGroupCount(c101003017.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,i)>=2 then
zone=zone+math.pow(2,i)
end
local lg=Duel.GetMatchingGroup(c101003017.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE))
end
return 0,zone
end
......
......@@ -24,33 +24,25 @@ function c101003018.initial_effect(c)
e3:SetOperation(c101003018.operation)
c:RegisterEffect(e3)
end
function c101003018.cfilter(c,tp,seq)
local s=c:GetSequence()
if c:IsLocation(LOCATION_SZONE) and s==5 then return false end
if c:IsControler(tp) then
return s==seq or (seq==1 and s==5) or (seq==3 and s==6)
else
return s==4-seq or (seq==1 and s==6) or (seq==3 and s==5)
end
function c101003018.cfilter(c)
return c:GetColumnGroupCount()>0
end
function c101003018.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=0
for i=0,4 do
if Duel.GetMatchingGroupCount(c101003018.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,i)>=2 then
zone=zone+math.pow(2,i)
end
local lg=Duel.GetMatchingGroup(c101003018.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE))
end
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c101003018.hspval(e,c)
local tp=c:GetControler()
local zone=0
for i=0,4 do
if Duel.GetMatchingGroupCount(c101003018.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,i)>=2 then
zone=zone+math.pow(2,i)
end
local lg=Duel.GetMatchingGroup(c101003018.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE))
end
return 0,zone
end
......
......@@ -25,33 +25,25 @@ function c101003020.initial_effect(c)
e2:SetOperation(c101003020.thop)
c:RegisterEffect(e2)
end
function c101003020.cfilter(c,tp,seq)
local s=c:GetSequence()
if c:IsLocation(LOCATION_SZONE) and s==5 then return false end
if c:IsControler(tp) then
return s==seq or (seq==1 and s==5) or (seq==3 and s==6)
else
return s==4-seq or (seq==1 and s==6) or (seq==3 and s==5)
end
function c101003020.cfilter(c)
return c:GetColumnGroupCount()>0
end
function c101003020.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local zone=0
for i=0,4 do
if Duel.GetMatchingGroupCount(c101003020.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,i)>=2 then
zone=zone+math.pow(2,i)
end
local lg=Duel.GetMatchingGroup(c101003020.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE))
end
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c101003020.hspval(e,c)
local tp=c:GetControler()
local zone=0
for i=0,4 do
if Duel.GetMatchingGroupCount(c101003020.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,i)>=2 then
zone=zone+math.pow(2,i)
end
local lg=Duel.GetMatchingGroup(c101003020.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE))
end
return 0,zone
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