Commit 576f6d48 authored by Huangnan's avatar Huangnan

Merge branch 'patch-2' into 'master'

fix

See merge request mycard/pre-release-database-cdb!36
parents 17bc9787 4fbb8d9e
......@@ -39,7 +39,7 @@ function s.tbfilter(c)
end
function s.ttcon(e,c,minc)
if c==nil then return true end
local g=Duel.GetMatchingGroup(s.tbfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(s.tbfilter,c:GetControler(),LOCATION_MZONE,0,nil)
return minc<=1 and Duel.CheckTribute(c,1,1,g,c:GetControler())
end
function s.ttop(e,tp,eg,ep,ev,re,r,rp,c)
......
......@@ -6,6 +6,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--atk up
......@@ -30,9 +31,13 @@ end
function s.thfilter(c)
return c:IsSetCard(0x2b9) and not c:IsCode(101206058) and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
......@@ -16,6 +16,7 @@ function s.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(s.rmcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.rmtg)
......@@ -67,7 +68,7 @@ end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.rmcfilter,1,nil,tp)
end
function s.rmfilter1(c)
function s.rmfilter1(c,tp)
return c:IsType(TYPE_NORMAL) and c:IsFaceup() and Duel.IsExistingMatchingCard(s.rmfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetAttack())
end
function s.rmfilter2(c,atk)
......@@ -78,9 +79,9 @@ function s.rmfilter3(c,atk)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsFaceup() and chkc:GetAttack()>0 end
if chk==0 then return Duel.IsExistingTarget(s.rmfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(s.rmfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
Duel.SelectTarget(tp,s.rmfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
Duel.SelectTarget(tp,s.rmfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -21,7 +21,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetDescription(aux.Stringid(id,2))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+o)
......@@ -88,7 +88,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return Deul.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x2b9)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x2b9)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -15,6 +15,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(s.gccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.gctg)
......@@ -60,7 +61,7 @@ end
function s.gccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function s.gcfilter1(c)
function s.gcfilter1(c,tp)
return c:IsType(TYPE_NORMAL) and c:IsFaceup() and Duel.IsExistingMatchingCard(s.gcfilter2,tp,0,LOCATION_MZONE,1,nil,c:GetAttack())
end
function s.gcfilter2(c,atk)
......@@ -71,9 +72,9 @@ function s.gcfilter3(c,atk)
end
function s.gctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(s.gcfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(s.gcfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
Duel.SelectTarget(tp,s.gcfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
Duel.SelectTarget(tp,s.gcfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end
function s.gcop(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