Commit 04aba672 authored by nanahira's avatar nanahira

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

parents 70089f67 9ebc1aef
No preview for this file type
......@@ -46,7 +46,7 @@ end
function c12029022.chcon1(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return ((re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE)
or ((re:GetActiveType()==TYPE_SPELL or re:GetActiveType()==TYPE_TRAP) )) and Duel.IsExistingMatchingCard(c12029022.filter1,rp,0,LOCATION_ONFIELD,1,nil) and not re:GetHandler():IsCode(12029022)
or ((re:GetActiveType()==TYPE_SPELL or re:GetActiveType()==TYPE_TRAP) )) and Duel.IsExistingMatchingCard(c12029022.filter1,rp,0,LOCATION_ONFIELD,1,nil)
end
--
function c12029022.chop1(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -76,11 +76,11 @@ function c16100004.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e1)
end
end
local tc1=Duel.SelectMatchingCard(tp,c16100004.fil2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(tc1)
tc1=tc1:GetFirst()
Duel.Remove(tc1,POS_FACEDOWN,REASON_EFFECT)
end
end
--
function c16100004.tgfilter(c,e,tp)
......
......@@ -37,6 +37,10 @@ function c16100010.filter(c)
return c:IsSetCard(0xcc2)
end
--
function c16100010.filter0(c)
return c:IsSetCard(0xccd) and c:IsAbleToHand()
end
--
function c16100010.filter1(c)
return c:IsSetCard(0xccd) and c:IsControlerCanBeChanged()
end
......@@ -59,7 +63,7 @@ function c16100010.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
if Duel.SelectYesNo(tp,aux.Stringid(16100010,1)) then
local g=Duel.SelectMatchingCard(tp,c16100010.filter1,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c16100010.filter0,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
sg=g:Select(tp,1,1,nil)
......@@ -70,8 +74,14 @@ end
--
function c16100010.ctop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(1-tp,c16100010.filter1,1-tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.SelectMatchingCard(1-tp,c16100010.filter2,1-tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if not tc then return end
Duel.GetControl(tc,tp)
if Duel.GetControl(tc,tp)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1,true)
end
end
\ No newline at end of file
......@@ -95,6 +95,7 @@ function c16100014.op1(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
Duel.ShuffleDeck(tp)
local g=Duel.GetOperatedGroup()
local ct0=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct0==3 then
......
......@@ -14,6 +14,7 @@ function c16100018.initial_effect(c)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1)
e1:SetCost(c16100018.cost)
e1:SetOperation(c16100018.operation)
c:RegisterEffect(e1)
......
......@@ -102,7 +102,7 @@ end
function cm.value(e,c)
local tp=e:GetHandlerPlayer()
local att=0
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,e:GetHandler())
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local tc=g:GetFirst()
while tc do
att=bit.bor(att,tc:GetAttribute())
......
......@@ -20,7 +20,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m)
e2:SetCountLimit(1,m+1000)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(cm.thcon)
e2:SetTarget(cm.sptg)
......
......@@ -40,13 +40,13 @@ function c53799017.thfilter(c)
return c:IsCode(53799005) and c:IsAbleToHand()
end
function c53799017.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c53799017.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(c53799017.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,PLAYER_ALL,4)
end
function c53799017.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c53799017.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c53799017.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
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