Commit faead0f0 authored by Nemo Ma's avatar Nemo Ma

fix

parent f4f94ba1
......@@ -33,7 +33,6 @@ function c115072031.initial_effect(c)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_ADD_FUSION_SETCODE)
e4:SetRange(LOCATION_MZONE)
......@@ -44,11 +43,10 @@ end
function c115072031.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
Duel.SendtoGrave(g,REASON_COST)
end
function c115072031.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c115072031.spfilter(c,e,tp)
......@@ -56,7 +54,7 @@ function c115072031.spfilter(c,e,tp)
end
function c115072031.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if Duel.IsExistingMatchingCard(c115072031.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(115072031,1)) then
......
......@@ -2,6 +2,8 @@ local m=189111
local cm=_G["c"..m]
cm.name="半洗孤钻-傀影"
function cm.initial_effect(c)
aux.AddXyzProcedure(c,nil,6,2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE)
......
......@@ -10,6 +10,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.eqtg)
......@@ -39,8 +40,11 @@ function cm.eqfilter(c,tp)
return c:IsFaceup() and (c:IsControler(tp) or c:IsAbleToChangeControler())
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler(),tp) end
and Duel.IsExistingTarget(cm.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,cm.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,0)
end
function cm.eqlimit(e,c)
......@@ -59,13 +63,11 @@ function cm.equip_monster(c,tp,tc)
tc:RegisterEffect(e1)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler(),tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,cm.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler(),tp)
Duel.HintSelection(g)
local c=e:GetHandler()
local tc=g:GetFirst()
cm.equip_monster(c,tp,tc)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
cm.equip_monster(c,tp,tc)
end
end
function cm.atkval(e,c)
local atk=0
......
......@@ -36,7 +36,7 @@ function c98920173.splimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function c98920173.cfilter2(c,e,tp)
return c:IsSetCard(0x9c,0xc4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x9c,0xc4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(98920173)
end
function c98920173.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -35,26 +35,24 @@ function c98950010.initial_effect(c)
c:RegisterEffect(e2)
end
function c98950010.spfilter1(c,e,tp,tc)
return (c:IsSetCard(0xf) and c:IsSetCard(0x8)) and not c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
return (c:IsSetCard(0xf) and c:IsSetCard(0x8)) and not c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>=0
end
function c98950010.gvfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xf) and not c:IsType(TYPE_FUSION)
end
function c98950010.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c98950010.gvfilter(chkc,ft) end
if chk==0 then return ft>-1 and Duel.IsExistingTarget(c98950010.gvfilter,tp,LOCATION_MZONE,0,1,nil,ft)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c98950010.gvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c98950010.gvfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c98950010.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c98950010.gvfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
local g=Duel.SelectTarget(tp,c98950010.gvfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98950010.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98950010.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98950010.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
......
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