Commit 55f26bb3 authored by wind2009's avatar wind2009

Merge branch 'master' into mc_master

parents 7a0f82bb 3e91874b
......@@ -59,7 +59,8 @@ function c1490690.op(e,tp,eg,ep,ev,re,r,rp)
end
end
function c1490690.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return e:GetHandler()==se:GetHandler() and c:IsOriginalCodeRule(e:GetLabel())
local sc=se:GetHandler()
return sc and sc:IsCode(1490690) and c:IsOriginalCodeRule(e:GetLabel())
end
function c1490690.stcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD)
......
......@@ -19,7 +19,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp,op)
op=aux.SelectFromOptions(p,{true,aux.Stringid(id,1)},{true,aux.Stringid(id,2)})
end
if op==1 then
if Duel.Recover(tp,500,REASON_EFFECT)<1 or not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end
if Duel.Recover(tp,500,REASON_EFFECT)<1
or not Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil)
or not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_DECK,0,nil,0x1a3)
local dct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local seq=-1
......
......@@ -47,7 +47,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
if ct>1 then
Duel.BreakEffect()
if Duel.Damage(1-tp,600,REASON_EFFECT)>0 and Duel.GetLP(1-tp)>0 then
Duel.Damage(1-tp,600,REASON_EFFECT)
if Duel.GetLP(1-tp)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
......
......@@ -2,6 +2,7 @@
function c62161698.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62161698,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -36,7 +37,8 @@ function c62161698.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,62161698)~=0
end
function c62161698.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
if chk==0 then return Duel.IsPlayerCanSpecialSummon(tp)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
end
function c62161698.filter(c,e,tp)
return c:IsSetCard(0x9f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -44,9 +46,10 @@ end
function c62161698.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,5)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetDecktopGroup(tp,5):Filter(c62161698.filter,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(62161698,0)) then
if g:GetCount()>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(62161698,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -41,11 +41,11 @@ function c65046521.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)~=0 and tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end
end
local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if aux.GetAttributeCount(mg)>=2 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(65046521,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e))
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
......
......@@ -2,7 +2,7 @@
function c9113513.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c9113513.condition)
......
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