Commit e11acf07 authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:alstroemeria-silentlove/ygopro-222DIY-cards

parents 239b404f c2dc0ad8
......@@ -77,8 +77,7 @@ end
function c12008027.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local t=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
local s=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) and s>t end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
......
......@@ -21,7 +21,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_MUST_USE_MZONE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_EXTRA,LOCATION_EXTRA)
e2:SetTargetRange(0,LOCATION_EXTRA)
e2:SetCondition(cm.frccon)
e2:SetValue(cm.frcval)
c:RegisterEffect(e2)
......
......@@ -47,7 +47,7 @@ function c34511110.penop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c34511110.penfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
......
......@@ -8,6 +8,7 @@ function c34511160.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c34511160.atkcost)
e2:SetCountLimit(1,34511160)
e2:SetTarget(c34511160.ptg)
e2:SetOperation(c34511160.pop)
......@@ -22,13 +23,17 @@ function c34511160.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,34511160)
e3:SetCondition(c34511170.spcon)
e3:SetTarget(c34511170.sptg1)
e3:SetOperation(c34511170.spop1)
e3:SetTarget(c34511160.ptg1)
e3:SetOperation(c34511160.pop1)
c:RegisterEffect(e3)
end
function c34511160.matfilter(c)
return c:IsXyzType(TYPE_PENDULUM)
end
function c34511160.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c34511160.pfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
......@@ -65,13 +70,13 @@ function c34511160.spcon(e,tp,eg,ep,ev,re,r,rp)
end
-----------------------
function c34511160.thfilter(c)
return c:IsSetCard(0xac5) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
return c:IsSetCard(0xac5) and c:IsType(TYPE_SPELL or TYPE_TRAP) and c:IsAbleToHand()
end
function c34511160.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
function c34511160.ptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c34511160.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c34511160.spop1(e,tp,eg,ep,ev,re,r,rp)
function c34511160.pop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c34511160.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -46,7 +46,7 @@ function c34511170.penop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c34511170.penfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
......@@ -101,7 +101,7 @@ function c34511170.spop(e,tp,eg,ep,ev,re,r,rp)
end
----------------------------
if ec:IsPreviousLocation(LOCATION_SZONE) and ec:IsPreviousPosition(POS_FACEUP) and (not ec:IsForbidden()) and ec:GetOriginalType(TYPE_PENDULUM) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and ec:GetPreviousControler()==tp and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(34511170,4)) then
Duel.MoveToField(ec,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.MoveToField(ec,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
------------------------
if ec:IsPreviousLocation(LOCATION_MZONE) and (not Duel.IsPlayerAffectedByEffect(tp,59822133)) and ec:IsLocation(LOCATION_EXTRA) and ec:GetOriginalType(TYPE_PENDULUM) and ec:IsPreviousPosition(POS_FACEDOWN) and ec:IsCanBeSpecialSummoned(e,0,tp,true,false) and ec:GetPreviousControler()==tp and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and Duel.SelectYesNo(tp,aux.Stringid(34511170,1)) then
......
......@@ -38,7 +38,7 @@ function c75646956.efffilter(c,e,tp,eg,ep,ev,re,r,rp)
if not m then return false end
local te=m.Seele_effect
if not te then return false end
tg=te:GetTarget()
local tg=te:GetTarget()
return not tg or tg and tg(e,tp,eg,ep,ev,re,r,rp,0)
end
function c75646956.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......@@ -53,7 +53,7 @@ function c75646956.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local m=_G["c"..tc:GetCode()]
local te=m.Seele_effect
if not te then return false end
tg=te:GetTarget()
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
end
function c75646956.effop(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -15,7 +15,7 @@ function c75646959.initial_effect(c)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75646959,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
......@@ -66,7 +66,7 @@ function c75646959.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,c75646959.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp)
e:SetLabelObject(g:GetFirst())
Duel.SendtoGrave(g,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND+CATEGORY_SEARCH,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c75646959.thop(e,tp,eg,ep,ev,re,r,rp)
local sc=e:GetLabelObject()
......
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