Commit 1c1cd5e5 authored by Tachibana's avatar Tachibana

ybb

parent 565dc093
No preview for this file type
...@@ -132,7 +132,7 @@ function cm.namecon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -132,7 +132,7 @@ function cm.namecon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,m) return Duel.IsPlayerAffectedByEffect(tp,m)
end end
function cm.filter(c) function cm.filter(c)
return c:IsSetCard(0xccb) and c:IsAbleToHand() return c:IsSetCard(0xccb) and c:IsAbleToHand() and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
......
...@@ -103,11 +103,19 @@ function cm.op3(e,tp,eg,ep,ev,re,r,rp) ...@@ -103,11 +103,19 @@ function cm.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.pfilter,tp,LOCATION_EXTRA,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.pfilter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
local res=false
if tc:IsLocation(LOCATION_HAND) then
res=tc:IsSummonable(true,nil)
else
local minc,maxc=tc:GetTributeRequirement()
res=Duel.IsPlayerCanSummon(tp,SUMMON_TYPE_NORMAL,tc) and Duel.CheckTribute(tc,minc,maxc) and not tc:IsAbleToExtraAsCost() and tc:GetOriginalType()&TYPE_SPSUMMON==0 and tc:GetOriginalType()&TYPE_RITUAL==0
end
local res1=tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
if tc then if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
if tc:IsLocation(LOCATION_PZONE) if tc:IsLocation(LOCATION_PZONE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (res or res1) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
if not tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or Duel.SelectOption(tp,1152,1151)==1 then if not res1 or (res and Duel.SelectOption(tp,1152,1151)==1) then
local s1=tc:IsSummonable(true,nil) local s1=tc:IsSummonable(true,nil)
local s2=tc:IsMSetable(true,nil) local s2=tc:IsMSetable(true,nil)
local minc,maxc=tc:GetTributeRequirement() local minc,maxc=tc:GetTributeRequirement()
......
...@@ -40,10 +40,10 @@ end ...@@ -40,10 +40,10 @@ end
function cm.sumfilter(c,e,tp) function cm.sumfilter(c,e,tp)
local res=false local res=false
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
res=c:IsSummonable(true,nil) res=c:IsSummonable(true,nil)
else else
local minc,maxc=c:GetTributeRequirement() local minc,maxc=c:GetTributeRequirement()
res=Duel.IsPlayerCanSummon(tp,SUMMON_TYPE_NORMAL,c) and Duel.CheckTribute(c,minc,maxc) res=Duel.IsPlayerCanSummon(tp,SUMMON_TYPE_NORMAL,c) and Duel.CheckTribute(c,minc,maxc) and not c:IsAbleToExtraAsCost() and c:GetOriginalType()&TYPE_SPSUMMON==0 and c:GetOriginalType()&TYPE_RITUAL==0
end end
return c:GetOriginalType()&TYPE_MONSTER~=0 and (res or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)) and c:IsSetCard(0xccb) and Duel.IsExistingMatchingCard(cm.atkfilter1,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil,c:GetAttack()) return c:GetOriginalType()&TYPE_MONSTER~=0 and (res or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)) and c:IsSetCard(0xccb) and Duel.IsExistingMatchingCard(cm.atkfilter1,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil,c:GetAttack())
end end
...@@ -65,7 +65,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
res=tc:IsSummonable(true,nil) res=tc:IsSummonable(true,nil)
else else
local minc,maxc=tc:GetTributeRequirement() local minc,maxc=tc:GetTributeRequirement()
res=Duel.IsPlayerCanSummon(tp,SUMMON_TYPE_NORMAL,tc) and Duel.CheckTribute(tc,minc,maxc) res=Duel.IsPlayerCanSummon(tp,SUMMON_TYPE_NORMAL,tc) and Duel.CheckTribute(tc,minc,maxc) and not tc:IsAbleToExtraAsCost() and tc:GetOriginalType()&TYPE_SPSUMMON==0 and tc:GetOriginalType()&TYPE_RITUAL==0
end end
if tc then if tc then
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
...@@ -79,7 +79,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +79,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if not tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or Duel.SelectOption(tp,1152,1151)==1 then if not tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) or (res and Duel.SelectOption(tp,1152,1151)==1) then
Duel.Summon(tp,tc,true,nil) Duel.Summon(tp,tc,true,nil)
Duel.BreakEffect() Duel.BreakEffect()
else else
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CANNOT_INACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
......
...@@ -58,7 +58,7 @@ function c51419706.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function c51419706.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c51419706.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp) local g=Duel.SelectMatchingCard(tp,c51419706.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
g:AddCard(c) g:AddCard(c)
Duel.SpecialSummon(g,0,tp,tp,false,false,,POS_FACEUP_DEFENSE) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
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