Commit 76239843 authored by Tachibana's avatar Tachibana

E

parent 50b3cab3
...@@ -43,7 +43,7 @@ function c12899017.cfilter(c) ...@@ -43,7 +43,7 @@ function c12899017.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5a71) return c:IsFaceup() and c:IsSetCard(0x5a71)
end end
function c12899017.sumcon(e,tp,eg,ep,ev,re,r,rp) function c12899017.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c12899017.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(c12899017.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c12899017.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) function c12899017.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......
...@@ -21,7 +21,7 @@ function s.eqlimit(e,c) ...@@ -21,7 +21,7 @@ function s.eqlimit(e,c)
return s.eqfilter(c) return s.eqfilter(c)
end end
function s.resfilter(c) function s.resfilter(c)
return c:IsComplexType(TYPE_SPELL+TYPE_EQUIP) or (c:IsRace(RACE_SEASERPENT) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(1)) return c:IsComplexType(TYPE_SPELL+TYPE_EQUIP) or (c:IsRace(RACE_SEASERPENT) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(1)) and c:IsReleasable()
end end
function s.thop(e,tp) function s.thop(e,tp)
local c = rscf.GetSelf(e) local c = rscf.GetSelf(e)
...@@ -78,15 +78,18 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -78,15 +78,18 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local op = rshint.SelectOption(tp,b1,{id,0},b2,{id,1}) local op = rshint.SelectOption(tp,b1,{id,0},b2,{id,1})
if op == 1 then if op == 1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
else else
e:SetProperty(0)
rstg.token(id+1)(e,tp,eg,ep,ev,re,r,rp,1) rstg.token(id+1)(e,tp,eg,ep,ev,re,r,rp,1)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
e:SetLabel(op) e:SetLabel(op)
end end
function s.act(e,tp) function s.act(e,tp)
local c = rscf.GetFaceUpSelf(e), rscf.GetTargetCard(Card.IsFaceup) local c, tc = rscf.GetFaceUpSelf(e), rscf.GetTargetCard(Card.IsFaceup)
local op = e:GetLabel() local op = e:GetLabel()
if op == 1 then if op == 1 then
if c and tc then if c and tc then
......
...@@ -21,7 +21,7 @@ function s.eqlimit(e,c) ...@@ -21,7 +21,7 @@ function s.eqlimit(e,c)
return s.eqfilter(c) return s.eqfilter(c)
end end
function s.resfilter(c) function s.resfilter(c)
return c:IsComplexType(TYPE_SPELL+TYPE_EQUIP) or (c:IsRace(RACE_SEASERPENT) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(1)) return c:IsComplexType(TYPE_SPELL+TYPE_EQUIP) or (c:IsRace(RACE_SEASERPENT) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(1)) and c:IsReleasable()
end end
function s.thop(e,tp) function s.thop(e,tp)
local c = rscf.GetSelf(e) local c = rscf.GetSelf(e)
...@@ -75,18 +75,21 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -75,18 +75,21 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b2 = rstg.token(id+1)(e,tp,eg,ep,ev,re,r,rp,0) and not Duel.IsExistingMatchingCard(s.exfilter,tp,LOCATION_ONFIELD,0,1,nil) local b2 = rstg.token(id+1)(e,tp,eg,ep,ev,re,r,rp,0) and not Duel.IsExistingMatchingCard(s.exfilter,tp,LOCATION_ONFIELD,0,1,nil)
if chkc then return s.eqfilter(chkc) and chkc:IsControler(tp) end if chkc then return s.eqfilter(chkc) and chkc:IsControler(tp) end
if chk == 0 then return b1 or b2 end if chk == 0 then return b1 or b2 end
local op = rshint.SelectOption(tp,b1,{m,0},b2,{m,1}) local op = rshint.SelectOption(tp,b1,{id,0},b2,{id,1})
if op == 1 then if op == 1 then
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
else else
e:SetProperty(0)
rstg.token(id+1)(e,tp,eg,ep,ev,re,r,rp,1) rstg.token(id+1)(e,tp,eg,ep,ev,re,r,rp,1)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
e:SetLabel(op) e:SetLabel(op)
end end
function s.act(e,tp) function s.act(e,tp)
local c = rscf.GetFaceUpSelf(e), rscf.GetTargetCard(Card.IsFaceup) local c, tc = rscf.GetFaceUpSelf(e), rscf.GetTargetCard(Card.IsFaceup)
local op = e:GetLabel() local op = e:GetLabel()
if op == 1 then if op == 1 then
if c and tc then if c and tc then
......
...@@ -22,6 +22,10 @@ function s.initial_effect(c) ...@@ -22,6 +22,10 @@ function s.initial_effect(c)
e2:SetValue(s.eqlimit) e2:SetValue(s.eqlimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.thcon(e,tp)
local c = e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function s.thfilter(c) function s.thfilter(c)
return c:IsComplexType(TYPE_SPELL+TYPE_EQUIP) and c:IsAbleToHand() return c:IsComplexType(TYPE_SPELL+TYPE_EQUIP) and c:IsAbleToHand()
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