Commit 03050540 authored by Amiya's avatar Amiya

Merge branch 'master' of git.mycard.moe:mycard/pre-release-database-cdb

parents 6f838dc7 b9819023
...@@ -41,7 +41,7 @@ function s.initial_effect(c) ...@@ -41,7 +41,7 @@ function s.initial_effect(c)
e5:SetOperation(s.spop) e5:SetOperation(s.spop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function s.setfilter(c) function s.setfilter(c,tp)
return c:IsSetCard(0x2c2) and c:IsType(TYPE_TRAP) and c:IsSSetable() return c:IsSetCard(0x2c2) and c:IsType(TYPE_TRAP) and c:IsSSetable()
and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode()) and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode())
end end
...@@ -58,7 +58,7 @@ end ...@@ -58,7 +58,7 @@ end
function s.damfilter(e,c) function s.damfilter(e,c)
local lg=c:GetLinkedGroup() local lg=c:GetLinkedGroup()
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x2c2) return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x2c2)
and lg and lg:IsContains(e:GetHandler()) and lg and lg:IsContains(e:GetHandler()) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,300) end if chk==0 then return Duel.CheckLPCost(tp,300) end
......
...@@ -54,7 +54,7 @@ end ...@@ -54,7 +54,7 @@ end
function s.immtg(e,c) function s.immtg(e,c)
local lg=c:GetLinkedGroup() local lg=c:GetLinkedGroup()
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x2c2) return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x2c2)
and lg and lg:IsContains(e:GetHandler()) and lg and lg:IsContains(e:GetHandler()) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,300) end if chk==0 then return Duel.CheckLPCost(tp,300) end
......
...@@ -61,7 +61,7 @@ end ...@@ -61,7 +61,7 @@ end
function s.immtg(e,c) function s.immtg(e,c)
local lg=c:GetLinkedGroup() local lg=c:GetLinkedGroup()
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x2c2) return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x2c2)
and lg and lg:IsContains(e:GetHandler()) and lg and lg:IsContains(e:GetHandler()) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,300) end if chk==0 then return Duel.CheckLPCost(tp,300) end
......
...@@ -53,12 +53,12 @@ end ...@@ -53,12 +53,12 @@ end
function s.atktg(e,c) function s.atktg(e,c)
return c:IsSetCard(0x2c2) and c:IsType(TYPE_LINK) return c:IsSetCard(0x2c2) and c:IsType(TYPE_LINK)
end end
function s.cfilter1(c,tp) function s.cfilter1(c)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x2c2) return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x2c2)
end end
function s.condition(e) function s.condition(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_ONFIELD,0,1,nil,tp) return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_ONFIELD,0,1,nil)
end end
function s.alimit(e,c) function s.alimit(e,c)
return c:IsFacedown() or not (c:IsType(TYPE_LINK) and c:IsSetCard(0x2c2)) return c:IsFacedown() or not (c:IsType(TYPE_LINK) and c:IsSetCard(0x2c2))
......
...@@ -35,14 +35,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,14 +35,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,aux.ExceptThisCard(e))
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e))
Duel.HintSelection(g) Duel.HintSelection(rg)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end end
end end
end end
......
...@@ -28,7 +28,8 @@ end ...@@ -28,7 +28,8 @@ end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local res=e:GetHandler():IsHasEffect(EFFECT_TRAP_ACT_IN_SET_TURN,tp) local res=e:GetHandler():IsHasEffect(EFFECT_TRAP_ACT_IN_SET_TURN,tp)
if chk==0 then return res and res:GetHandler()==c or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,nil) end if chk==0 then return res and res:GetHandler()==c
or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end end
function s.lpfilter(c) function s.lpfilter(c)
......
...@@ -29,7 +29,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,7 +29,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local co=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local co=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local res=e:GetHandler():IsHasEffect(EFFECT_TRAP_ACT_IN_SET_TURN,tp) local res=e:GetHandler():IsHasEffect(EFFECT_TRAP_ACT_IN_SET_TURN,tp)
if chk==0 then return res and res:GetHandler()==c or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,co,nil) end if chk==0 then return res and res:GetHandler()==c
or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,co,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
......
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